Posting to multiple Emoncms accounts

I’ve read the Guide carefully but am having a problem …

I have an emonTx serially connected to an RPi3+ (running June 2018 beta image). It works fine - I can see an input and create a feed - IP=192.168.0.69.

I have a second RPi3+ (also running June 2018 beta image). It does not and will not have an emonTx connected (not its purpose). I can access it on my local network - IP=192.168.0.208.

I’m trying to post data from emoncms (192.168.0.69) to emoncms (192.168.0.208) using the following Interfacer per the Guide …

[[watchman_emoncms]]
    Type = EmonHubEmoncmsHTTPInterfacer
    [[[init_settings]]]
    [[[runtimesettings]]]
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url = https://192.168.0.208/emoncms
        apikey = 198bc892e4dca583b14a9ef51fa2ec32
        senddata = 1                    # watchman_emoncms
        sendstatus = 0                  # Enable sending WAN IP to Emoncms MyIP (requires My IP installed)
        sendinterval = 10                # Bulk send interval to post in seconds

The EmonHub log suggests that this is correctly established …

INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'watchman_emoncms' 
DEBUG    MainThread Setting watchman_emoncms subchannels: ['ToEmonCMS']
DEBUG    MainThread Setting watchman_emoncms pubchannels: ['ToRFM12']
INFO     MainThread Setting watchman_emoncms url: https://192.168.0.208/emoncms
INFO     MainThread Setting watchman_emoncms senddata: 1
INFO     MainThread Setting watchman_emoncms apikey: set
INFO     MainThread Setting watchman_emoncms sendstatus: 0

I used the apikey from the Account page for emoncms (192.168.0.208) … the first one listed & described as Write

Then there’s a problem as the log shows …

INFO     watchman_emoncms sending: https://192.168.0.208/emoncms/input/bulk.json?apikey=E-M-O-N-C .... etc with a whole bunch of data
WARNING  watchman_emoncms watchman_emoncms couldn't send to server, URLError: [Errno 111] Connection refused
WARNING  watchman_emoncms send failure: wanted 'ok' but got ''

Any suggestions would be most helpful - thanks

Could it be a problem with the June 2018 beta image?

Does emoncms (192.168.0.208) ‘the receiver’ require a special Interfacer?

John Banks

That’s my problem.

Could it be another June 2018 beta image issue?

Any suggestions - Thanks

@pb66 is the creator of emonHub - I could well be wrong, but I think data that’s already been “interpreted” by the first emonHub bypasses the second and goes straight into emonCMS.

This is very frustrating …
What logs should I be looking at other than emonHub’s
Any steers would be most helpful.
Thanks

The emonhub.logs seem to show the connection was refused (as opposed to not found or incorrect), this could be (for example) a port not open on the “watchman”, do you have UFW installed on the “watchman” pi? is port 443 open? Have you checked the ufw.log file for any clues?

Do you have an SSL cert correctly set up on the watchman? If you copy and paste the url from the emonhub.log to a browser bar (with a correct apikey) does the browser succeed or give you more info? Does the fault still occur if you change the url from https to http (in either emonhub or the browser)?

Also try checking the apache logs on the watchman. The emonhub.log on the watchman will offer no assistance as the 1st Pi is using emonhub to post directly to the 2 emoncms instances, bypassing emonhub on the watchman pi, so also no settings or interfacers are required in the watchman emonhub instance as it plays no part in the route you’re using.

Paul …

I did sudo ufw status … world and group writeable and 443/tcp is allowed from anywhere.

So that is not the problem.

I will pursue yr other suggestions.

Many thx for the response

Paul …
Setting up SSL certification and using http:// in the Interfacer solved the problem.
Many thx