Daisy chaining emoncms installs (sending monitoring data to a remote emoncms instance)

I recently moved my heat meter as part of my re-pipe whilst converting to a dual heat pump cascade system.

As part of this change I needed to move my USB to MBUS adapter to be close to the new heat meter location and this meant installing a second emoncms instance to gather the data from the MBUS enabled heat meters and send it to my existing (primary) emoncms instance via TCP/IP (over wifi in this instance).

It wasn’t obvious to me reviewing the docs (there’s a lot in there!) as to what I needed to configure so I thought I would write it up here to share and remind me in future.

I started by connecting the new emoncms instance to the MBUS meter and verifying that the inputs were showing with data updating every 10 seconds as expected from my Kamstrup meter. This involved adding my MBUS meter configuration to the emoncms interfacers section and commenting out the default [USB0] interface which was interferring with the USB port access/settings.

My MBUS interfacers configuration includes the line below which is critical as it tells the MBUS configuation to publish data to the ‘ToEmonCMS’ channel.

pubchannels = ToEmonCMS,

There is a default interfacer configuration named [emoncmsorg] which is documented here and subscribes to the ‘ToEmonCMS’ channel. I used this and inserted the IP address and read/write API key from my primary emoncms instance and voila the data from my second emoncms instance is sent to my primary emoncms instance where I can log/store/manipulate as needed. The API keys are in the ‘My Account’ area of the emoncms web interface.

    [[emoncmsorg]]
        Type = EmonHubEmoncmsHTTPInterfacer
        [[[init_settings]]]
        [[[runtimesettings]]]
            pubchannels = ToRFM12,
            subchannels = ToEmonCMS,
            url = http://192.168.x.x
            apikey = ##############################
            senddata = 1    # Enable sending data to Emoncms.org
            sendnames = 1    # Send full input names (compression will be automatically enabled)
            interval = 10    # Bulk send interval to Emoncms.org in seconds

Just to clarify in case someone later gets confused.

There is a difference between emoncms and emonhub. Both come as part of the standard SD Card image. In broad terms, emonhub gathers and transfers data and emoncms stores & translates/transforms data and creates visualisations.

The config you listed is an emonhub config. You have simply configured emonhub to send the data to the existing emoncms instance.

When using the standard SDCard it is a little confusing, but you ended up with the right result :slight_smile:

1 Like