Post to multiple emonCMS

Forgive me if this has been asked before, I’ve tried searching and couldn’t find anything!

Is it possible to post data to multiple emonCMS instances from my emonPi? I have my data going to my own server, but I’d also like it going to

Yes, look at emonhub.ini - it’s all in there (and it has been asked before - your Search-Fu has failed you :grin:)

Gah! I’ll take a look, thanks. I found a lot about multiple emon’s posting to a single emonCMS, but mine is the other way round.

Oooookay, so I found it in the end. Ended up reading the code. I had originally tried exactly what I needed to work, but maybe it didn’t save properly. I had duplicated the EmonHubEmoncmsHTTPInterfacer config block, changed names, URL & api key, but after I saved the second one disappeared, so I assumed there was something wrong with that.

I must have done something a bit wrong.

Anyhow, @Robert.Wall, I’m happy to add this to some documentation somewhere. I seriously couldn’t find any after searching. Any thoughts on where I could add it?

Did you see emonhub/ at emon-pi · openenergymonitor/emonhub · GitHub ?
and Posting locally and to | Archived Forum ?

Yes, but correct me if I’m wrong, it doesn’t mention being able to duplicate the emoncmsorg config section. It seems obvious now, and especially obvious to me having read the code now. But it wasn’t obvious when reading that page.

I hadn’t seen this. I hadn’t thought to search the old forums actually - that is something I’ll need to remember to do from now on, thanks!

Doesn’t emonhub need to be restarted after its conf file is modified?


sudo service emonhub restart

or a reboot?

I didn’t need to. I believe it re-checks the config every so often and updates itself as necessary.

It’s emonhub.conf that needs to be edited and EmonHubEmoncmsHTTPInterfacer section duplicated with a different name e.g.

    Type = EmonHubEmoncmsHTTPInterfacer
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url =
        apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        senddata = 1                    # Enable sending data to
        sendstatus = 1                  # Enable sending WAN IP to MyIP >
        sendinterval= 30                # Bulk send interval to in seconds

    Type = EmonHubEmoncmsHTTPInterfacer
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url = https://<IP/URL of emoncms sever>/emoncms
        apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxx
        senddata = 1                    # Enable sending data to
        sendinterval= 30                # Bulk send interval to in seconds

You probably also want to remove the myip from the second server unless you have MyIP installed on your emoncms server.

Good luck :slight_smile:

@glyn.hudson Doesn’t this need mentioning in the file? It’s not the first time this question’s been asked.

Thanks! Merged :grinning:

Hi there.
I am posting with my emonpi to a local emoncms server.
Now I will start posting to too (I mean in parallel)

I have an emonesp too (actually two… you may remember that Glyn ;-)) and wanted to post too on two server. local and remote.
Is it possible? not through the gui I guess…?
Is it possible at all?
Alternatively can I Sync somehow my local emoncms to


Plus : i habe been trying for the last hour to post mqtt from the emonesp to emonpi but I can’t connect. I am sure the emonpi mqtt server is up and running as I can see messages using a client :frowning:

Solved. Sorry. Stupid typo.

1 Like