Hi there.
Sorry for taking so long to answer: I’m between jobs and has to pause this project for a while.
Meanwhile I already updated the bootloader of the 328P to the new one that already programs @115200 baudrate.
Here is the emonhub.cfg
#######################################################################
####################### 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 = WARNING
loglevel = DEBUG
#loglevel = INFO
### Uncomment this to also send to syslog
# use_syslog = yes
#######################################################################
####################### Interfacers #######################
#######################################################################
[interfacers]
### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module
[[RFM2Pi]]
Type = EmonHubJeeInterfacer
[[[init_settings]]]
com_port = /dev/ttyAMA0
com_baud = 38400 # 9600 for old RFM12Pi
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
subchannels = ToRFM12,
group = 210
frequency = 433
baseid = 5 # emonPi / emonBase nodeID
calibration = 230V # (UK/EU: 230V, US: 110V)
quiet = true # Disable quite mode (default enabled) to enable RF packet debugging, show packets which fail crc
# interval = 300 # Interval to transmit time to emonGLCD (seconds)
[[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 = 1
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 = 1
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
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
#######################################################################
####################### Nodes #######################
#######################################################################
[nodes]
## See config user guide: https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf
[[5]]
nodename = MyEmonPi4CT
firmware = MyEmonPi_NewBoard_2022.ino.eightanaloginputs.ino
hardware = emonpi_V0.1
[[[rx]]]
names = Grid, Solar, W_Heater, EV, TotalPower, Vrms, noSamples, LowestNoSamples, minEnergy, maxEnergy, T1, T2, T3, T4, T5, T6, Wh_Import, Wh_Export, TriaqOn, Permanent, Worse, Best, V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, TotalEnergy
datacodes = h, h, h, h, h, h, L, h, h, h, h, h, h, h, h, h, L, L, b, h, h, h, h, h, h, h, h, h, h, h, h, h, h
scales = 1, 1, 1, 1, 1, 0.01, 1, 1, 1, 1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1,1, 1, 1,1,1,1,1,1,1,1,1,1,1,1,0.01, 1
units = W, W, W, W, V, Samp, Samp, J, J, C, C, C, C, C, C, Wh, Wh, (0:Off / 1:On), uS, uS, uS
[[[tx]]]
names = O
units = X
scales = 1
datacodes = L
[[10]]
nodename = EmonFrigo
firmware = Frigo_RMF_SoftSPI.ino
hardware = emonFrigo
[[[rx]]]
names = power1, power2, TotalPower, Vrms, noSamples, LowestNoSamples, T1, T2, T3, T4, RainLevel, Worse, Best, V0, V1, V2, V3, V4, V5, V6, V7, V8, V9
datacodes = h, h, h, h, L, h, h, h, h, h, h, L, L, h, h, h, h, h, h, h, h, h, h
scales = 1, 1, 1, 0.01, 1, 1, 0.1, 0.1, 0.1, 0.1, 1, 1, 1, 1,1,1,1,1,1,1,1,1,1
units = W, W, W, V, Samp, Samp, C, C, C, C, L, uS, uS
[[[tx]]]
names = O
units = X
scales = 1
datacodes = L
[[6]]
nodename = emontxshield
[[[rx]]]
names = power1, power2, power3, power4, vrms
datacode = h
scales = 1,1,1,1,0.01
units = W,W,W,W,V
[[7]]
nodename = emontx4
[[[rx]]]
names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
datacodes = h,h,h,h,h,h,h,h,h,h,h,L
scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1
units = W,W,W,W,V,C,C,C,C,C,C,p
[[8]]
nodename = emontx3
[[[rx]]]
names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
datacodes = h,h,h,h,h,h,h,h,h,h,h,L
scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1
units = W,W,W,W,V,C,C,C,C,C,C,p
[[9]]
nodename = emontx2
[[[rx]]]
names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
datacodes = h,h,h,h,h,h,h,h,h,h,h,L
scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1
units = W,W,W,W,V,C,C,C,C,C,C,p
[[11]]
nodename = 3phase
[[[rx]]]
names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
datacodes = h,h,h,h,h,h,h,h,h,h,h,L
scales = 1,1,1,1,0.01,0.01,0.01,0.01,0.01,0.01,0.01,1
units = W,W,W,W,V,C,C,C,C,C,C,p
[[12]]
nodename = 3phase2
[[[rx]]]
names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
datacodes = h,h,h,h,h,h,h,h,h,h,h,L
scales = 1,1,1,1,0.01,0.01,0.01,0.01,0.01,0.01,0.01,1
units = W,W,W,W,V,C,C,C,C,C,C,p
[[13]]
nodename = 3phase3
[[[rx]]]
names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
datacodes = h,h,h,h,h,h,h,h,h,h,h,L
scales = 1,1,1,1,0.01,0.01,0.01,0.01,0.01,0.01,0.01,1
units = W,W,W,W,V,C,C,C,C,C,C,p
[[14]]
nodename = 3phase4
[[[rx]]]
names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
datacodes = h,h,h,h,h,h,h,h,h,h,h,L
scales = 1,1,1,1,0.01,0.01,0.01,0.01,0.01,0.01,0.01,1
units = W,W,W,W,V,C,C,C,C,C,C,p
[[15]]
nodename = emontx3cm15
[[[rx]]]
names = MSG, Vrms, P1, P2, P3, P4, E1, E2, E3, E4, T1, T2, T3, pulse
datacodes = L,h,h,h,h,h,l,l,l,l,h,h,h,L
scales = 1,0.01,1,1,1,1,1,1,1,1,0.01,0.01,0.01,1
units = n,V,W,W,W,W,Wh,Wh,Wh,Wh,C,C,C,p
whitening = 1
[[16]]
nodename = emontx3cm16
[[[rx]]]
names = MSG, Vrms, P1, P2, P3, P4, E1, E2, E3, E4, T1, T2, T3, pulse
datacodes = L,h,h,h,h,h,l,l,l,l,h,h,h,L
scales = 1,0.01,1,1,1,1,1,1,1,1,0.01,0.01,0.01,1
units = n,V,W,W,W,W,Wh,Wh,Wh,Wh,C,C,C,p
whitening = 1
[[19]]
nodename = emonth1
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[20]]
nodename = emonth2
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[21]]
nodename = emonth3
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[22]]
nodename = emonth4
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[23]]
nodename = emonth5
[[[rx]]]
names = temperature, external temperature, humidity, battery, pulsecount
datacodes = h,h,h,h,L
scales = 0.1,0.1,0.1,0.1,1
units = C,C,%,V,p
[[24]]
nodename = emonth6
[[[rx]]]
names = temperature, external temperature, humidity, battery, pulsecount
datacodes = h,h,h,h,L
scales = 0.1,0.1,0.1,0.1,1
units = C,C,%,V,p
[[25]]
nodename = emonth7
[[[rx]]]
names = temperature, external temperature, humidity, battery, pulsecount
datacodes = h,h,h,h,L
scales = 0.1,0.1,0.1,0.1,1
units = C,C,%,V,p
[[26]]
nodename = emonth8
[[[rx]]]
names = temperature, external temperature, humidity, battery, pulsecount
datacodes = h,h,h,h,L
scales = 0.1,0.1,0.1,0.1,1
units = C,C,%,V,p
Some log with Debug activated, the crassing comand is:
mosquitto_pub -h 127.0.0.1 -u emonpi -P emonpimqtt2016 -t emonhub/tx/5/values -m 10 -d
2022-05-02 22:24:35,242 DEBUG RFM2Pi 148 Sent to channel(start)' : ToEmonCMS
2022-05-02 22:24:35,242 DEBUG RFM2Pi 148 Sent to channel(end)' : ToEmonCMS
2022-05-02 22:24:35,327 DEBUG MQTT Publishing: emon/MyEmonPi4CT/Grid 0
2022-05-02 22:24:35,328 DEBUG MQTT Publishing: emon/MyEmonPi4CT/Solar 0
2022-05-02 22:24:35,329 DEBUG MQTT Publishing: emon/MyEmonPi4CT/W_Heater 0
2022-05-02 22:24:35,330 DEBUG MQTT Publishing: emon/MyEmonPi4CT/EV 0
2022-05-02 22:24:35,331 DEBUG MQTT Publishing: emon/MyEmonPi4CT/TotalPower 0
2022-05-02 22:24:35,333 DEBUG MQTT Publishing: emon/MyEmonPi4CT/Vrms 247.63
2022-05-02 22:24:35,334 DEBUG MQTT Publishing: emon/MyEmonPi4CT/noSamples 9613
2022-05-02 22:24:35,335 DEBUG MQTT Publishing: emon/MyEmonPi4CT/LowestNoSamples 38
2022-05-02 22:24:35,336 DEBUG MQTT Publishing: emon/MyEmonPi4CT/minEnergy 0
2022-05-02 22:24:35,337 DEBUG MQTT Publishing: emon/MyEmonPi4CT/maxEnergy 110
2022-05-02 22:24:35,338 DEBUG MQTT Publishing: emon/MyEmonPi4CT/T1 0
2022-05-02 22:24:35,339 DEBUG MQTT Publishing: emon/MyEmonPi4CT/T2 0
2022-05-02 22:24:35,340 DEBUG MQTT Publishing: emon/MyEmonPi4CT/T3 0
2022-05-02 22:24:35,341 DEBUG MQTT Publishing: emon/MyEmonPi4CT/T4 0
2022-05-02 22:24:35,342 DEBUG MQTT Publishing: emon/MyEmonPi4CT/T5 0
2022-05-02 22:24:35,343 DEBUG MQTT Publishing: emon/MyEmonPi4CT/T6 0
2022-05-02 22:24:35,345 DEBUG MQTT Publishing: emon/MyEmonPi4CT/Wh_Import 0
2022-05-02 22:24:35,346 DEBUG MQTT Publishing: emon/MyEmonPi4CT/Wh_Export 0
2022-05-02 22:24:35,347 DEBUG MQTT Publishing: emon/MyEmonPi4CT/TriaqOn 0
2022-05-02 22:24:35,348 DEBUG MQTT Publishing: emon/MyEmonPi4CT/Permanent 20001
2022-05-02 22:24:35,349 DEBUG MQTT Publishing: emon/MyEmonPi4CT/Worse 88
2022-05-02 22:24:35,350 DEBUG MQTT Publishing: emon/MyEmonPi4CT/Best 28
2022-05-02 22:24:35,350 DEBUG MQTT Publishing: emon/MyEmonPi4CT/V0 0
2022-05-02 22:24:35,351 DEBUG MQTT Publishing: emon/MyEmonPi4CT/V1 0
2022-05-02 22:24:35,352 DEBUG MQTT Publishing: emon/MyEmonPi4CT/V2 0
2022-05-02 22:24:35,353 DEBUG MQTT Publishing: emon/MyEmonPi4CT/V3 0
2022-05-02 22:24:35,353 DEBUG MQTT Publishing: emon/MyEmonPi4CT/V4 500
2022-05-02 22:24:35,354 DEBUG MQTT Publishing: emon/MyEmonPi4CT/V5 0
2022-05-02 22:24:35,355 DEBUG MQTT Publishing: emon/MyEmonPi4CT/V6 0
2022-05-02 22:24:35,356 DEBUG MQTT Publishing: emon/MyEmonPi4CT/V7 0
2022-05-02 22:24:35,356 DEBUG MQTT Publishing: emon/MyEmonPi4CT/V8 611
2022-05-02 22:24:35,357 DEBUG MQTT Publishing: emon/MyEmonPi4CT/V9 50.01
2022-05-02 22:24:35,358 DEBUG MQTT Publishing: emon/MyEmonPi4CT/TotalEnergy -26
2022-05-02 22:24:35,359 INFO MQTT Publishing 'node' formatted msg
2022-05-02 22:24:35,359 DEBUG MQTT Publishing: emonhub/rx/5/values 0,0,0,0,0,247.63,9613,38,0,110,0,0,0,0,0,0,0,0,0,20001,88,28,0,0,0,0,500,0,0,0,611,50.01,-26
2022-05-02 22:24:35,360 DEBUG MQTT Publishing: emon/MyEmonPi4CT {"Grid": 0, "Solar": 0, "W_Heater": 0, "EV": 0, "TotalPower": 0, "Vrms": 247.63, "noSamples": 9613, "LowestNoSamples": 38, "minEnergy": 0, "maxEnergy": 110, "T1": 0, "T2": 0, "T3": 0, "T4": 0, "T5": 0, "T6": 0, "Wh_Import": 0, "Wh_Export": 0, "TriaqOn": 0, "Permanent": 20001, "Worse": 88, "Best": 28, "V0": 0, "V1": 0, "V2": 0, "V3": 0, "V4": 500, "V5": 0, "V6": 0, "V7": 0, "V8": 611, "V9": 50.01, "TotalEnergy": -26, "time": 1651526675.2375312}
2022-05-02 22:24:36,983 WARNING MQTT Exception caught in MQTT thread. Traceback (most recent call last):
File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 31, in wrapper
return func(*args)
File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 126, in run
self.action()
File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubMqttInterfacer.py", line 214, in action
self._mqttc.loop(0)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1181, in loop
rc = self.loop_read(max_packets)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1572, in loop_read
rc = self._packet_read()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 2310, in _packet_read
rc = self._packet_handle()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 2936, in _packet_handle
return self._handle_publish()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3216, in _handle_publish
self._handle_on_message(message)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3444, in _handle_on_message
self.on_message(self, self._userdata, message)
File "/opt/openenergymonitor/emonhub/src/interfacers/EmonHubMqttInterfacer.py", line 264, in on_message
realdata = payload.split(",")
TypeError: a bytes-like object is required, not 'str'
2022-05-02 22:24:37,166 WARNING MainThread MQTT thread is dead.
2022-05-02 22:24:37,166 WARNING MainThread Attempting to restart thread MQTT (thread has been restarted 1 times...)
2022-05-02 22:24:37,167 INFO MainThread Setting RFM2Pi quiet: 1 (1q)
2022-05-02 22:24:37,254 DEBUG RFM2Pi device settings updated: E i5 g210 @ 433 MHz
2022-05-02 22:24:38,169 INFO MainThread Setting RFM2Pi calibration: 230V (1p)
2022-05-02 22:24:38,259 DEBUG RFM2Pi device settings updated: E i5 g210 @ 433 MHz
2022-05-02 22:24:39,171 INFO MainThread Creating EmonHubMqttInterfacer 'MQTT'
2022-05-02 22:24:39,173 DEBUG MainThread Setting MQTT pubchannels: ['ToRFM12']
2022-05-02 22:24:39,174 DEBUG MainThread Setting MQTT subchannels: ['ToEmonCMS']
2022-05-02 22:24:39,174 INFO MainThread Setting MQTT node_format_enable: 1
2022-05-02 22:24:39,175 INFO MainThread Setting MQTT nodevar_format_enable: 1
2022-05-02 22:24:39,175 INFO MainThread Setting MQTT nodevar_format_basetopic: emon/
2022-05-02 22:24:39,175 INFO MainThread Setting MQTT node_JSON_enable: 1
2022-05-02 22:24:39,177 INFO MainThread Setting emoncmsorg senddata: 1
2022-05-02 22:24:39,177 INFO MainThread Setting emoncmsorg sendstatus: 1
2022-05-02 22:24:40,276 DEBUG RFM2Pi 149 NEW FRAME : OK 5 0 0 0 0 0 0 0 0 0 0 189 96 141 37 0 0 38 0 0 0 110 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33 78 88 0 28 0 0 0 0 0 0 0 0 0 244 1 0 0 0 0 0 0 104 2 138 19 230 255 (-0)
2022-05-02 22:24:40,278 DEBUG RFM2Pi 149 Timestamp : 1651526680.275959
2022-05-02 22:24:40,279 DEBUG RFM2Pi 149 From Node : 5
2022-05-02 22:24:40,280 DEBUG RFM2Pi 149 Values : [0, 0, 0, 0, 0, 247.65, 9613, 38, 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20001, 88, 28, 0, 0, 0, 0, 500, 0, 0, 0, 616, 50.02, -26]
2022-05-02 22:24:40,280 DEBUG RFM2Pi 149 Sent to channel(start)' : ToEmonCMS
2022-05-02 22:24:40,281 DEBUG RFM2Pi 149 Sent to channel(end)' : ToEmonCMS
2022-05-02 22:24:40,480 INFO MQTT Connecting to MQTT Server
2022-05-02 22:24:40,582 INFO MQTT connection status: Connection successful
2022-05-02 22:24:40,583 DEBUG MQTT CONACK => Return code: 0
2022-05-02 22:24:40,684 INFO MQTT on_subscribe
2022-05-02 22:24:41,637 DEBUG emoncmsorg Buffer size: 7