Sorry for the screenshot, trying to do from IPad so here is another one for now and I’ll try to do it the way you want in future. Thanks Mike
I don’t know the answer, but there are quite a few posts here on sontex (not this model) have you looked at the various posts?
The sontex 449 does not appear to be listed in the interfacer so is not directly supported. You would probably need to specify the registers yourself. (emonhub/EmonHubMBUSInterfacer.py at afa562bb371a2a426c80ed15a96d808efefc2fed · openenergymonitor/emonhub · GitHub)
@TrystanLea would be the best source for an answer I suspect.
Is emonhub still running when you go to the Admin System Information page?
I wonder if it’s just crashed out without logging an error to the log? it’s strange that there are no MBUS requests being made and logged in the log…
I don’t think that ‘type’ is valid. The code doesn’t appear to check for a valid value.
Can you see the MBUS ID on the LCD? The address
in emonhub needs to match the ID of your meter. Alternatively, you can use this script to set the ID to 1:
python3 /opt/emoncms/modules/usefulscripts/mbus/./mbus_set_address.py
With the ID set to 1 the following config shuld work:
[[MBUS]]
Type = EmonHubMBUSInterfacer
[[[init_settings]]]
device = /dev/ttyAMA0
baud = 2400
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
read_interval = 10
validate_checksum = False
nodename = MBUS
[[[[meters]]]]
[[[[[heatmeter]]]]]
address = 1
type = standard
#pleaseaddtothedocs
Hi all and thanks for all your input, so I need help but don’t want spoon feeding or I will never learn. I really haven’t a clue on setting up emoncms, logging into the pi for system changes, I can edit emonhub although nothing works or logs yet?. I have an electric meter smartrail x45m onto a modbus connector connected but not recording anything. And I have two sensors from the shop but need to edit the config? to make them work. If there are any walk through on here I can’t find them sorry
That shouldn’t be necessary - the default settings should be there and you should see the inputs.
A quick rundown of emonCMS:
Data comes in to emonhub. If the structure/format of the data doesn’t fit one of the specifications in emonhub.conf, everything from that device in the data feed grinds to a halt there. If it does fit, it gets passed on to the Inputs page. There you can ‘fiddle’ with it. Click the spanner icon on the end of the line for each value, and you can add a ‘process’ that, for example, scales the value, converts power to accumulated energy, and so on. From there, you must “Log to Feed” to store the data. A Feed is a database - one for each quantity you want to store. Once the data is in there, you can look at it with Graphs or assemble a ‘Dashboard’ with dials etc, or use a pre-built ‘Visualisation’.
If you can’t see anything, the first place to look is the emonhub log file. If it’s in there with no errors, go to the Inputs page. If it’s getting to the Inputs page, is it logged to a Feed? If yes, go to the Feeds page to check. There, you can trigger a graph (but leave this for a while so that you have enough data to see). If you get this far, then you have something to work with.
Your emonPi is Node 5. This is what emonhub log looks like for Node 5 (Yours won’t be identical, this is the CM version)
2022-12-19 23:22:50,147 DEBUG RFM2Pi 3509089 NEW FRAME : OK 5 142 0 132 0 18 1 99 93 0 0 0 0 0 0 0 0 0 0 0 0 127 172 31 0 0 0 0 0 25 162 31 0 178 98 33 0 (-0)
2022-12-19 23:22:50,151 DEBUG RFM2Pi 3509089 Timestamp : 1671492170.146580
2022-12-19 23:22:50,152 DEBUG RFM2Pi 3509089 From Node : 5
2022-12-19 23:22:50,152 DEBUG RFM2Pi 3509089 Values : [142, 132, 274, 239.07, 0, 0, 0, 0, 0, 0, 2075775, 0, 2073113, 2187954]
2022-12-19 23:22:50,153 DEBUG RFM2Pi 3509089 Sent to channel(start)' : ToEmonCMS
2022-12-19 23:22:50,154 DEBUG RFM2Pi 3509089 Sent to channel(end)' : ToEmonCMS
2022-12-19 23:22:50,201 DEBUG MQTT Publishing: emon/emonpi/power1 142
2022-12-19 23:22:50,204 DEBUG MQTT Publishing: emon/emonpi/power2 132
2022-12-19 23:22:50,206 DEBUG MQTT Publishing: emon/emonpi/power1pluspower2 274
2022-12-19 23:22:50,208 DEBUG MQTT Publishing: emon/emonpi/vrms 239.07
2022-12-19 23:22:50,211 DEBUG MQTT Publishing: emon/emonpi/t1 0
2022-12-19 23:22:50,213 DEBUG MQTT Publishing: emon/emonpi/t2 0
2022-12-19 23:22:50,215 DEBUG MQTT Publishing: emon/emonpi/t3 0
2022-12-19 23:22:50,216 DEBUG MQTT Publishing: emon/emonpi/t4 0
2022-12-19 23:22:50,218 DEBUG MQTT Publishing: emon/emonpi/t5 0
2022-12-19 23:22:50,220 DEBUG MQTT Publishing: emon/emonpi/t6 0
2022-12-19 23:22:50,222 DEBUG MQTT Publishing: emon/emonpi/pulse1count 2075775
2022-12-19 23:22:50,224 DEBUG MQTT Publishing: emon/emonpi/pulse2count 0
2022-12-19 23:22:50,225 DEBUG MQTT Publishing: emon/emonpi/E1 2073113
2022-12-19 23:22:50,227 DEBUG MQTT Publishing: emon/emonpi/E2 2187954
2022-12-19 23:22:50,229 INFO MQTT Publishing 'node' formatted msg
2022-12-19 23:22:50,230 DEBUG MQTT Publishing: emonhub/rx/5/values 142,132,274,239.07,0,0,0,0,0,0,2075775,0,2073113,2187954
On the first line, OK
says the message is intact, 5
is the Node ID - which is what you look for.
Documentation for emonHub MBUS interfacers are here: https://docs.openenergymonitor.org/emonhub/emonhub-interfacers.html#mbus-reader-for-electric-and-heat-meters
This bit isn’t (AFAICS)
Neither is the Standard config (as shown here).
I think this interfacer section needs to be first broken down by the interfacer name, and then the supported hardware.
Evening all, so sorry everyone I now have this in feeds, am I getting anywhere or does it mean nothing.
Are you able to read data from the heat meter? Please post your emonhub.log
Here is my latest log
022-12-20 22:21:20,079 INFO MainThread Setting MBUS meters: {"heatmeter": {"address": "7", "type": "sontex449"}}
2022-12-20 22:21:20,079 DEBUG MainThread Setting MBUS pubchannels: ['ToEmonCMS']
2022-12-20 22:21:20,080 INFO MainThread Creating EmonHubRFM69LPLInterfacer 'SPI'
2022-12-20 22:21:20,085 INFO MainThread Creating RFM69 LowPowerLabs interfacer
2022-12-20 22:21:20,085 INFO MainThread node_id = 5
2022-12-20 22:21:20,085 INFO MainThread network_id = 210
2022-12-20 22:21:20,086 INFO MainThread Starting radio setup
2022-12-20 22:21:20,186 ERROR MainThread Could not connect to RFM69 module
2022-12-20 22:21:20,186 DEBUG MainThread Setting SPI pubchannels: ['ToEmonCMS']
2022-12-20 22:21:20,187 INFO MainThread Creating EmonHubMqttInterfacer 'MQTT'
2022-12-20 22:21:20,187 DEBUG MainThread Setting MQTT pubchannels: ['ToRFM12']
2022-12-20 22:21:20,187 DEBUG MainThread Setting MQTT subchannels: ['ToEmonCMS']
2022-12-20 22:21:20,187 INFO MainThread Setting MQTT node_format_enable: 0
2022-12-20 22:21:20,188 INFO MainThread Setting MQTT nodevar_format_enable: 1
2022-12-20 22:21:20,188 INFO MainThread Setting MQTT nodevar_format_basetopic: emon/
2022-12-20 22:21:20,188 INFO MainThread Setting MQTT node_JSON_enable: 0
2022-12-20 22:21:20,188 INFO MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg'
2022-12-20 22:21:20,189 DEBUG MainThread Setting emoncmsorg interval: 30
2022-12-20 22:21:20,189 DEBUG MainThread Setting emoncmsorg pubchannels: ['ToRFM12']
2022-12-20 22:21:20,189 DEBUG MainThread Setting emoncmsorg subchannels: ['ToEmonCMS']
2022-12-20 22:21:20,189 WARNING MainThread Setting emoncmsorg apikey: obscured
2022-12-20 22:21:20,189 INFO MainThread Setting emoncmsorg url: https://emoncms.org
2022-12-20 22:21:20,190 INFO MainThread Setting emoncmsorg senddata: 1
2022-12-20 22:21:20,190 INFO MainThread Setting emoncmsorg sendstatus: 0
2022-12-20 22:21:20,190 INFO MainThread Setting emoncmsorg sendnames: 1
2022-12-20 22:21:20,190 INFO MainThread Setting emoncmsorg compress: 0
2022-12-20 22:21:20,190 DEBUG MainThread Automatic configuration of nodes enabled
2022-12-20 22:59:45,693 INFO MainThread Setting MBUS read_interval: 10
2022-12-20 22:59:45,693 INFO MainThread Setting MBUS validate_checksum: False
2022-12-20 22:59:45,693 INFO MainThread Setting MBUS meters: {"heatmeter": {"address": "7", "type": "sontex449"}}
2022-12-20 22:59:45,693 INFO MainThread Creating EmonHubDS18B20Interfacer 'DS18B20'
2022-12-20 22:59:45,713 INFO MainThread Setting DS18B20 read_interval: 10
2022-12-20 22:59:45,713 INFO MainThread Setting DS18B20 nodename: sensors
2022-12-20 22:59:45,713 INFO MainThread Setting DS18B20 ids:
2022-12-20 22:59:45,714 INFO MainThread Setting DS18B20 names:
2022-12-20 22:59:45,714 DEBUG MainThread Setting DS18B20 pubchannels: ['ToEmonCMS']
2022-12-20 22:59:45,715 INFO MainThread Setting emoncmsorg senddata: 1
2022-12-20 22:59:45,715 INFO MainThread Setting emoncmsorg sendnames: 1[quote="Satwelsh, post:14, topic:22188, full:true"]
Evening all, so sorry everyone I now have this in feeds, am I getting anywhere or does it mean nothing.
[/quote]
It doesn’t look like you’re reading any data from the Sontex, it will show up in the Inputs first.
Did you manage to set the Sontex ID?
I see your config is still using an ID of 7, are you sure this is the correct MBUS ID for your meter? All meters have random IDs to start with. You need to find out what the ID is using the LCD or use the scritp I linked above to set the ID
Please post your emonhub.conf
#######################################################################
####################### emonhub.conf #########################
#######################################################################
### emonHub configuration file, for info see documentation:
### https://github.com/openenergymonitor/emonhub/blob/emon-pi/configuration.md
#######################################################################
####################### emonHub settings #######################
#######################################################################
[hub]
### loglevel must be one of DEBUG, INFO, WARNING, ERROR, and CRITICAL
loglevel = DEBUG
autoconf = 1
### Uncomment this to also send to syslog
# use_syslog = yes
#######################################################################
####################### Interfacers #######################
#######################################################################
[interfacers]
### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module
[[EmonPi2]]
Type = EmonHubOEMInterfacer
[[[init_settings]]]
com_port = /dev/ttyAMA0
com_baud = 38400
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
subchannels = ToRFM12,
[[USB0]]
Type = EmonHubOEMInterfacer
[[[init_settings]]]
com_port = /dev/ttyUSB0
com_baud = 115200
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
subchannels = ToRFM12,
nodename = emonTx4
[[MBUS]]
Type = EmonHubMBUSInterfacer
[[[init_settings]]]
device = /dev/ttyAMA0
baud = 2400
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
read_interval = 10
validate_checksum = False
nodename = MBUS
[[[[meters]]]]
[[[[[heatmeter]]]]]
address = 7
type = sontex449
[[ DS18B20]]
Type = EmonHubDS18B20Interfacer
[[[init_settings]]]
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
read_interval = 10
nodename = sensors
# ids = 28-000008e2db06, 28-000009770529, 28-0000096a49b4
# names = ambient, cyl_bot, cyl_top
[[SPI]]
Type = EmonHubRFM69LPLInterfacer
[[[init_settings]]]
nodeid = 5
networkID = 210
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
[[MQTT]]
Type = EmonHubMqttInterfacer
[[[init_settings]]]
mqtt_host = 127.0.0.1
mqtt_port = 1883
mqtt_user = emonpi
mqtt_passwd = emonpimqtt2016
[[[runtimesettings]]]
pubchannels = ToRFM12,
subchannels = ToEmonCMS,
# emonhub/rx/10/values format
# Use with emoncms Nodes module
node_format_enable = 0
node_format_basetopic = emonhub/
# emon/emontx/power1 format - use with Emoncms MQTT input
# http://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md
nodevar_format_enable = 1
nodevar_format_basetopic = emon/
# Single JSON payload published - use with Emoncms MQTT
node_JSON_enable = 0
node_JSON_basetopic = emon/
[[emoncmsorg]]
Type = EmonHubEmoncmsHTTPInterfacer
[[[init_settings]]]
[[[runtimesettings]]]
pubchannels = ToRFM12,
subchannels = ToEmonCMS,
url = https://emoncms.org
apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
senddata = 1 # Enable sending data to Emoncms.org
sendnames = 1 # Send full input names (compression will be automatically enabled)
interval = 30 # Bulk send interval to Emoncms.org in seconds
#######################################################################
####################### Nodes #######################
#######################################################################
## See config user guide: https://github.com/openenergymonitor/emonhub
## If autoconf is enabled above, node configuration will automatically
## populate based on templates listed in available.conf
type = sontex449
is not correct, you should use type = standard
see my post above
Have you set the MBUS ID as detailed in the post above?
It may also be worth trying type = sontex531
, we don’t have experience reading from the Sontex449, so I can’t say for sure. Let me know if you want me to take a look via remote access.
Morning all
After lots of struggles I am here with this, what do I do now to view it and should I see more than just that from my heat meter.
Thanks
Mike