Community
OpenEnergyMonitor

Community

Emontx to local server

mqtt
esp8266
emoncms
emontx
Tags: #<Tag:0x00007f880e35bc20> #<Tag:0x00007f880e35ba90> #<Tag:0x00007f880e35b928> #<Tag:0x00007f880e35b7c0>
(Soloam) #1

Hello all, I’m new to the community, but been following the project for a long time! Now finally I’m gonna enter this world!

I would like to have one EmonTx monitoring the power in my house, and posting it to my local server. This is my main question! At the moment I already have the emoncms running on my home server, and I would like to keep it that way, my server is by far more reliable than a raspberry pi SD card! So my question is, what is the best approach to get the data from the emontx to the emoncms on my server? Can I use the esp to do it by wirless? Or do I need a emonbase with the raspberry pi? Can the emonbase post to my local server?

Thank you all

(Robert Wall) #2

Yes, no, and yes.

Details of the emonESP: https://github.com/openenergymonitor/EmonESP

When using the EmonSerialTx3eInterfacer in emonHub to connect to the emonTx using the output designed solely for the emonESP you will need to tell it what node ID you would like it to use by using the “nodeoffset” setting in emonhub.conf eg if using the default node id of 8.

    [[SerialTx3e]]
         Type = EmonHubTx3eInterfacer
          [[[init_settings]]]
               com_port= /dev/ttyAMA0
               com_baud = 115200
          [[[runtimesettings]]]
               pubchannels = ToEmonCMS,
     
               nodeoffset = 8

Forwarding from an emonBase to any emonCMS is a matter of giving emonHub the correct URL to send to:

[[emoncmsorg]]
    Type = EmonHubEmoncmsHTTPInterfacer
    [[[init_settings]]]
    [[[runtimesettings]]]
        pubchannels = ToRFM12,
        subchannels = ToEmonCMS,
        url = https://emoncms.org    #  << Your URL in here
        apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        senddata = 1                    # Enable sending data to Emoncms.org
        sendstatus = 1                  # Enable sending WAN IP to Emoncms.org MyIP > https://emoncms.org/myip/list
        sendinterval= 30                # Bulk send interval to Emoncms.org in seconds
(Soloam) #3

So, from what I understand, for my setup, a esp is more than enough! I will be having a emontx monitoring my main devices and the house total consumption! I don’t know if I my need a second emontx, but from what I understand, that would not be a problem! They will be posting directly to my mqtt server and my emoncms instance! Correct?

Thank you

(Robert Wall) #4

That is correct. All you need to do is ensure they use different NodeIDs.

I think the part above about the EmonSerialTx3eInterfacer might be misleading, as I think that’s only when you are using the direct serial interface, not sending the data by WiFi / Ethernet, as you will be doing.

(Soloam) #5

Thank you! I’ll be placing a order for the emontx :blush: