Local emonBase emonHub ==> local emonPi emonCMS "send failure: wanted 'ok' but got"

I have Two buildings. An electrical panel in each building.
One building has an emontx with 4 x CTs connected.
The other building has an emonPi with local emonCMS.

The buildings are separated by distance… too far for reliable radio transmission.

I have purchased a emonbase installed in close proximity to the emontx in Building1.

I want the emonBase in Building1 to receive RFM data from emonTX and EmonTH’s, then relay the information over ethernet to the EmonPi / local emonCMS in building2.
Ethernet transmission will resolve the rfm distance issue.

Building1 - emonbase ( with local EmonCMS installed.
Building2 - emonpi ( with local EmonCMS (full bundle from OpenEnergy Monitor)

I’m trying to get the emonBase to send it’s inputs to the emonPi

on restarting emonHub on the emonBase i get the message:

WARNING  savages-road-emonpi savages-road-emonpi couldn't send to server, HTTPError: 404
WARNING  savages-road-emonpi send failure: wanted 'ok' but got ''

So the emonBase appears to be trying to send the data to the emonPi… but is not succeeding. where can I start looking…

looking in the target EmonCMS located on the emonPi (, the Apache web server has this in the /var/log/apache2/access.log - - [11/Feb/2019:10:43:36 +0000] "POST /input/bulk.json?apikey=293769cbaa615ee1eec2b3dbe8a2ab95 HTTP/1.1" 404 471 "-" "Python-urllib/2.7"
  • Is this an auth issue? I’m confident i’m using the correct read/write api key.

  • Maybe the emonBase needs a new NodeID?

Both Pi and base are running emonCMS 9.9.5 emonSD-30Oct18 (clean image from github)

I’m trying to get the local emonBase to send inputs/log data to the local emonPi cms.

I have the config done on the emonBase to send data to emonPi below.

    Type = EmonHubEmoncmsHTTPInterfacer
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url =   #my emonPi emonCMS 
        apikey = myemonpi API key in here
        senddata = 1                    # Enable sending data to Emoncms.org
        sendstatus = 1                  # Enable sending WAN IP to Emoncms.org MyIP > https://emoncms.org/myip/list
        sendinterval= 10                # Bulk send interval to Emoncms.org in seconds

Issue/log output below:

savages-road-emonpi Buffer size: 15
2019-02-10 02:22:09,270 INFO     savages-road-emonpi sending:[[1549765178.786775,8,1316,1127,1486,4,5.28,29.700000000000003,300,300,300,300,300,1,-73],[1549765188.026323,8,1248,2507,2178,5,5.29,29.700000000000003,300,300,300,300,300,1,-72],[1549765197.315734,8,2569,4030,1486,6,5.3,29.700000000000003,300,300,300,300,300,1,-72],[1549765206.562077,8,1159,1853,1484,4,5.29,29.8,300,300,300,300,300,1,-72],[1549765219.3003,24,38.300000000000004,0,45,2,1,-57],[1549765234.292007,8,2590,4023,1468,6,5.32,29.8,300,300,300,300,300,1,-72],[1549765243.500423,8,2587,3998,1464,5,5.32,30,300,300,300,300,300,1,-73],[1549765252.694462,8,2576,3996,1477,6,5.25,30,300,300,300,300,300,1,-71],[1549765262.019569,8,2559,3983,1480,6,5.25,30.1,300,300,300,300,300,1,-72],[1549765280.202664,24,38.300000000000004,0,44.7,2.1,1,-58],[1549765280.527011,8,2567,4018,2662,5,5.24,30.1,300,300,300,300,300,1,-71],[1549765289.722137,8,2559,4041,1474,6,5.3,30.1,300,300,300,300,300,1,-71],[1549765298.991449,8,2573,3984,1464,6,5.32,30.200000000000003,300,300,300,300,300,1,-72],[1549765317.420539,8,2574,4031,1472,6,5.28,30.200000000000003,300,300,300,300,300,1,-71],[1549765326.712797,8,2588,4029,1469,6,5.23,30.200000000000003,300,300,300,300,300,1,-71]]&sentat=1549765329
2019-02-10 02:22:09,277 WARNING  savages-road-emonpi savages-road-emonpi couldn't send to server, HTTPError: 404
2019-02-10 02:22:09,279 WARNING  savages-road-emonpi send failure: wanted 'ok' but got ''

Edit - formatted text for readability. BT, Moderator.

Is there a network path across the subnets?

Can I just clarify as ‘EmonBase’ can mean different things - do you mean an RPi with the RFM Board attached? What type of data are you sending? You may have over complicated your setup by adding a second RFM board/emoncms setup.

That needs to be the URL of the local Emonpi (if this is the config for the emon base). You are currently trying to log data with the service emoncms.org.

TBH EmonHub is not my area of expertise though :slight_smile: (I just know this bit)

That is a different IP address…

Thanks Borpin,
here is a diagram that might help explain whats going on.
OpenEnergy Monitor architecture v0.1.pdf (126.1 KB)

[edit] inserted as an image - Mod Brian

That makes sense. In which case you just need the emonhub on the 1.52 RPi, although full emoncms will not hurt. Set the EmonHub URL on 1.51 to and the API write key for the instance of Emoncms.

Just one question, why not put the EmonPi where the base is? You can access EmonCMS over the Network.

Both building1 and building2 have electrical panels.
I want to monitor power at both buildings.
I want both buildings to have all the logged data arrive at the emonPi at building1.

I have configured emonhub to send logged data to emonPi (emonCMS) and this is where the problem is. The data/connection is getting rejected by (emonPi / emonCMS).

Are they both called savages-road-emonpi? Have you changed both hostnames to savages-road-emonpi?

Your logs etc aren’t entirely clear.

I don’t follow this statement, is it a typo when you say “send logged data to” do you mean “”?

Presumably this is a typo? If the url was set to emoncms.org we would see different log entries.

Can you try setting the url on the emonBase to just to test if the use of an IP rather than domain is causing a problem and not landing in the emoncms sub-directory.

I see an error in the posting of my config file. I have updated my original post to reflect current state

The emonhub config file in has been updated to point to the emonPi

url = #my emonPi emonCMS

The savages road text is just the heading of the separator in the config file. The target emonCMS server is the http address.

Thanks Paul!
Issue resolved!
Adding the fully qualified path resolved the problem. DEBUG log result below.

2019-02-12 05:09:47,357 DEBUG savages-road-emonpi acknowledged receipt with 'ok' from

1 Like