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