Emonhub non data to emoncms

Hello!
there would be a problem that the data that appears in the emonhub does not appear in the emoncms.
I reinstalled the system several times (pi4, emonsd)
i can’t find the error or the solution either.
attach the emonhub log file.
Thanks for the help.

2021-10-20 14:11:56,978 DEBUG    MainThread Signal 15 received.
2021-10-20 14:11:57,128 INFO     MainThread Exiting hub...
2021-10-20 14:11:57,327 INFO     MainThread Exit completed
2021-10-20 14:11:58,243 INFO     MainThread EmonHub emonHub (emon-pi variant) v2.2.6
2021-10-20 14:11:58,244 INFO     MainThread Opening hub...
2021-10-20 14:11:58,244 INFO     MainThread Logging level set to DEBUG
2021-10-20 14:11:58,245 INFO     MainThread Creating EmonHubTx3eInterfacer 'SerialTx3e'
2021-10-20 14:11:58,246 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 115200 bits/s
2021-10-20 14:11:58,246 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT'
2021-10-20 14:11:58,248 DEBUG    MainThread Setting MQTT pubchannels: ['ToRFM12']
2021-10-20 14:11:58,248 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2021-10-20 14:11:58,248 INFO     MainThread Setting MQTT node_format_enable: 1
2021-10-20 14:11:58,249 INFO     MainThread Setting MQTT nodevar_format_enable: 1
2021-10-20 14:11:58,249 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2021-10-20 14:11:58,249 INFO     MainThread Setting MQTT node_JSON_enable: 0
2021-10-20 14:11:58,250 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg'
2021-10-20 14:11:58,250 DEBUG    MainThread Setting emoncmsorg pubchannels: ['ToRFM12']
2021-10-20 14:11:58,250 DEBUG    MainThread Setting emoncmsorg subchannels: ['ToEmonCMS']
2021-10-20 14:11:58,251 WARNING  MainThread Setting emoncmsorg apikey: obscured
2021-10-20 14:11:58,251 INFO     MainThread Setting emoncmsorg url: https://emoncms.org
2021-10-20 14:11:58,251 INFO     MainThread Setting emoncmsorg senddata: 1
2021-10-20 14:11:58,251 INFO     MainThread Setting emoncmsorg sendstatus: 1
2021-10-20 14:12:02,461 INFO     SerialTx3e START MESSAGE: ct1:1571,ct2:0,ct3:0,ct4:3124,vrms:24291,pulse:0

plus info:
The emoncms log shows:

LAST ENTRIES ON THE LOG FILE
2021-10-19 19: 06: 38.949 | WARN | emoncms_mqtt.php | Not connected, retrying connection
2021-10-19 19: 06: 38.989 | WARN | emoncms_mqtt.php | Connecting to MQTT server: Connection Accepted .: code: 0
2021-10-19 19: 11: 57.871 | WARN | emoncms_mqtt.php | Not connected, retrying connection
2021-10-19 19: 11: 57.890 | WARN | emoncms_mqtt.php | Connecting to MQTT server: Connection Accepted .: code: 0
2021-10-19 19: 36: 57.236 | ERROR | index.php | Not Authenticated | admin / info
2021-10-20 11: 24: 28.424 | WARN | emoncms_mqtt.php | Not connected, retrying connection
2021-10-20 11: 24: 28.466 | WARN | emoncms_mqtt.php | Connecting to MQTT server: Connection Accepted .: code: 0

What system do you have?

We will need the emonhub.cfg file as well.

Hi!
Emonpi sd card image 21. july 21
Thx!
emonhub cfg:
It does not allow you to copy the .conf file

But what is it plugged into - what is the hardware…

What doesn’t allow you to copy? If you access the config page, click in the edit window the select all and copy, then paste here.

when posting code or bash output, please put in 3 ‘backticks’ (found at the top left of the keyboard normally) on a line on their own, then the code, then 3 more backticks on a line following the code.

    ```
    code
    ```

“Sorry, new users can only put 2 links in a post.”
When you paste the emonhub.conf file, the web page throws this up.

When you paste the emonhub.conf file, the web page throws this up.
The hardware: Emontx v3.4.3
It worked with an rpi2 until about 2 months ago, but then the data transfer stopped.
That’s why I’m trying a p4 over a serial connection.

#######################################################################
#######################      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
### Uncomment this to also send to syslog
# use_syslog = yes
#######################################################################
#######################       Interfacers       #######################
#######################################################################

[interfacers]
### This interfacer manages the EmonTx3 ESP format serial
[[SerialTx3e]]
     Type = EmonHubTx3eInterfacer
      [[[init_settings]]]
           # Un-comment line below if using RS485 adapter
           #com_port = /dev/ttyRS485-0
           # default com port if using USB to UART adapter
           com_port= /dev/ttyAMA0
           com_baud = 115200
      [[[runtimesettings]]]
           #nodeoffset = 1
           # nodeoffet can be used for multiple devices. it will change the nodeID as seen by emonCMS Inputs.
           pubchannels = ToEmonCMS,
        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 = 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
        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 = emonpi
    [[[rx]]]
        names = power1,power2,power1pluspower2,vrms,t1,t2,t3,t4,t5,t6,pulsecount
        datacodes = h, h, h, h, h, h, h, h, h, h, L
        scales = 1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
        units = W,W,W,V,C,C,C,C,C,C,p

[[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

[[10]]
    nodename = emontx1
    [[[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.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

[[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

You should be able to attach the file now.

Thanks for the tip so I succeeded :slight_smile:

Thanks!!!

Bit of tidying up that may solve it…

Set this to 0

This should not be here at all.

All of this can be removed (commented out).

Is this all there is in the Log?

RPi2 with an RFM Card plugged in?

Try

        nodevar_format_enable = 0

and

        node_JSON_enable = 1

I rewrote it restarted, but nothing changed.

The emoncms log shows this,

Is this good?

2021-10-19 19:06:38.949|WARN|emoncms_mqtt.php|Not connected, retrying connection
2021-10-19 19:06:38.989|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2021-10-19 19:11:57.871|WARN|emoncms_mqtt.php|Not connected, retrying connection
2021-10-19 19:11:57.890|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2021-10-19 19:36:57.236|ERROR|index.php|Not Authenticated|admin/info
2021-10-20 11:24:28.424|WARN|emoncms_mqtt.php|Not connected, retrying connection
2021-10-20 11:24:28.466|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2021-10-20 17:07:11.052|ERROR|index.php|Not Authenticated|device/list
2021-10-20 17:17:34.231|ERROR|index.php|Not Authenticated|input/view
2021-10-20 18:57:28.448|ERROR|index.php|Not Authenticated|input/view
2021-10-20 19:02:22.503|ERROR|index.php|Not Authenticated|admin/info
2021-10-20 19:02:23.302|WARN|emoncms_mqtt.php|Not connected, retrying connection
2021-10-20 19:02:23.323|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0

First reboot the Pi wait until it has fully started, then press the reset pin on the EmonTX. You will get the startup messages as above.

Then can you post the log from emonhub from restart.

Click on ‘download log’ but don’t include it all :slight_smile:

You should see something along the lines of this after the startup messages (include them as well please).

2021-10-21 03:17:17,822 DEBUG    SerialTx   445586 NEW FRAME : MSG:445594,Vrms:248.10,P1:564,E1:906752,pulse:1
2021-10-21 03:17:17,825 DEBUG    SerialTx   445586 Timestamp : 1634782637.822044
2021-10-21 03:17:17,826 DEBUG    SerialTx   445586 From Node : Serial_PiZ
2021-10-21 03:17:17,828 DEBUG    SerialTx   445586    Values : [445594, 248.1, 564, 906752, 1]
2021-10-21 03:17:17,830 DEBUG    SerialTx   445586 Sent to channel(start)' : ToEmonCMS
2021-10-21 03:17:17,832 DEBUG    SerialTx   445586 Sent to channel(end)' : ToEmonCMS
2021-10-21 03:17:17,949 DEBUG    MQTT       Publishing: emon/Serial_PiZ {"MSG": 445594, "Vrms": 248.1, "P1": 564, "E1": 906752, "pulse": 1, "time": 1634782637.822044}

This was logged after a reset:

2021-10-21 09:27:47,322 INFO     SerialTx3e START MESSAGE: emonTx V3.4 Discrete Sampling V3.30
2021-10-21 09:27:47,424 INFO     SerialTx3e START MESSAGE: OpenEnergyMonitor.org
2021-10-21 09:27:47,525 INFO     SerialTx3e START MESSAGE: 
2021-10-21 09:27:47,627 INFO     SerialTx3e START MESSAGE: No EEPROM config
2021-10-21 09:27:47,730 INFO     SerialTx3e START MESSAGE: RFM69CW Node: 7 Freq: 433Mhz Group: 210
2021-10-21 09:27:47,831 INFO     SerialTx3e START MESSAGE: 
2021-10-21 09:27:48,434 INFO     SerialTx3e START MESSAGE: POST.....wait 10s
2021-10-21 09:27:48,537 INFO     SerialTx3e START MESSAGE: '+++' then [Enter] for RF config mode
2021-10-21 09:27:48,642 INFO     SerialTx3e START MESSAGE: (Arduino IDE Serial Monitor: make sure 'Both NL & CR' is selected)
2021-10-21 09:28:06,208 INFO     SerialTx3e START MESSAGE: CT 1 Cal 90.90
2021-10-21 09:28:06,309 INFO     SerialTx3e START MESSAGE: CT 2 Cal 90.90
2021-10-21 09:28:06,411 INFO     SerialTx3e START MESSAGE: CT 3 Cal 90.90
2021-10-21 09:28:06,513 INFO     SerialTx3e START MESSAGE: CT 4 Cal 16.67
2021-10-21 09:28:07,219 INFO     SerialTx3e START MESSAGE: RMS Voltage on AC-AC  is: ~242V
2021-10-21 09:28:07,323 INFO     SerialTx3e START MESSAGE: AC-AC detected - Real Power measure enabled
2021-10-21 09:28:07,426 INFO     SerialTx3e START MESSAGE: assuming pwr from AC-AC (jumper closed)
2021-10-21 09:28:07,527 INFO     SerialTx3e START MESSAGE: Vcal: 285.66
2021-10-21 09:28:07,629 INFO     SerialTx3e START MESSAGE: Phase Shift: 1.70
2021-10-21 09:28:07,731 INFO     SerialTx3e START MESSAGE: CT 1 detected
2021-10-21 09:28:07,838 INFO     SerialTx3e START MESSAGE: CT 4 detected
2021-10-21 09:28:07,940 INFO     SerialTx3e START MESSAGE: No temperature sensor
2021-10-21 09:28:08,043 INFO     SerialTx3e START MESSAGE: CT1 CT2 CT3 CT4 VRMS/BATT PULSE
2021-10-21 09:28:09,255 INFO     SerialTx3e START MESSAGE: ct1:325,ct2:0,ct3:0,ct4:946,vrms:24256,pulse:0
2021-10-21 09:28:19,088 INFO     SerialTx3e START MESSAGE: ct1:370,ct2:0,ct3:0,ct4:1045,vrms:24274,pulse:0
2021-10-21 09:28:29,029 INFO     SerialTx3e START MESSAGE: ct1:630,ct2:0,ct3:0,ct4:1279,vrms:24312,pulse:0

Restart emonhub and post log please.

2021-10-21 09:40:21,938 DEBUG    MainThread Signal 15 received.
2021-10-21 09:40:22,082 INFO     MainThread Exiting hub...
2021-10-21 09:40:22,163 INFO     MainThread Exit completed
2021-10-21 09:40:23,093 INFO     MainThread EmonHub emonHub (emon-pi variant) v2.2.6
2021-10-21 09:40:23,094 INFO     MainThread Opening hub...
2021-10-21 09:40:23,094 INFO     MainThread Logging level set to DEBUG
2021-10-21 09:40:23,094 INFO     MainThread Creating EmonHubTx3eInterfacer 'SerialTx3e'
2021-10-21 09:40:23,095 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 115200 bits/s
2021-10-21 09:40:23,096 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT'
2021-10-21 09:40:23,097 DEBUG    MainThread Setting MQTT pubchannels: ['ToRFM12']
2021-10-21 09:40:23,097 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2021-10-21 09:40:23,097 INFO     MainThread Setting MQTT node_format_enable: 1
2021-10-21 09:40:23,097 INFO     MainThread Setting MQTT nodevar_format_enable: 0
2021-10-21 09:40:23,098 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2021-10-21 09:40:23,098 INFO     MainThread Setting MQTT node_JSON_enable: 1
2021-10-21 09:40:32,028 INFO     SerialTx3e START MESSAGE: ct1:34,ct2:0,ct3:0,ct4:469,vrms:23806,pulse:0

Is that it? Nothing after that?

@Robert.Wall @TrystanLea has the message format changed? The serial output used to start with “MSG:” and the interfacer looked for that to know it was a data string.

If the data string has changed, the serial interfacer needs to be updated as it will never work. This was added to the interfacer stop the preamble being interpreted as data and generating random inputs as a result!

[edit]
Or was there something that had to be done in the EmonTX config menu?