Stange values like 21845 from all sensors

This is the EmonPi that I use:

This is not an EmonPi, That is an EmonBase (as stated in the shop banner).

Makes a big difference.

This is an EmonPi

https://shop.openenergymonitor.com/emonpi-3/

So you posted a config in the first post;

Is this the config from the original emonhub.cfg file?

That is odd. I thought the limit was 6. More than 6 can cause timing issues but let’s leave that for later.

@Robert.Wall - will the EmonTX need the dip switch changed to change the node number?

About the original emonhub.cfg: What I remember is that I only added temp sensors over time. And that the emonhub.cfg is not changed in one or another way.

What I once had to change is logged in the following: MQTT Server Issue - Connection Refused not authorized - #5 by emontxv3

About the EmonBase (sorry that I got that wrong by mentioning EmonPi) with the new SD card: do you why the linux screen is not showing the “emonpi login:” line, about 5 seconds after completing reboot?

Looking at Trystan’s sketch “EmonTxV3CM.ino”, it is horribly confused.

The comment at the top says - from an early version:

/*
Change Log:
v0.1: First version, combination of EmonTxV3CM_max and EmonTx v3 original firmware

emonhub.conf node decoder (nodeid is 8 when switch is off, 9 when switch is on)
See: https://github.com/openenergymonitor/emonhub/blob/emon-pi/configuration.md
copy the following in to emonhub.conf:

[[8]]
  nodename = emontx8
  [[[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

*/

and the DIP switch changes it to NodeID = 9.

and from a later version:

/*
Change Log:
v1.0: First release of EmonTxV3 Continuous Monitoring Firmware.
v1.1: First stable release, Set default node to 15
v1.2: Enable RF startup test sequence (factory testing), Enable DEBUG by default to support EmonESP
v1.3: Inclusion of watchdog

emonhub.conf node decoder (nodeid is 8 when switch is off, 9 when switch is on)
See: https://github.com/openenergymonitor/emonhub/blob/emon-pi/configuration.md
copy the following in to emonhub.conf:

[[15]]
  nodename = EmonTxV3CM_15
  [[[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

*/

and the DIP switch changes it to NodeID = 16.

So, if the ORIGINAL emonTx is Node 14, then no - no matter which version of software the new emonTx has.

But remember, you must have only one definition for each NodeID in the emonhub.conf file.

1 Like

I’m a bit lost where we are.

Your system is still not working?

If not, try replacing the current node [[14]] definition with the old one, restart emonhub and see if that works (posting the emonhub log will be useful).

OK, I’ll try again.

But what causes the linux screen of the EmonBase not showing the “emonpi login:” line, about 5 seconds after completing reboot?
Why is the raspberry not ready after reboot and has it removed the line “emonpi login:” and only shows cursor blinking?

Do you have a mouse and keyboard plugged in?

no, only the hdmi

I think it Raspbian might detect there is no input device now.

This is indeed pretty difficult and still not working allthough this is I think the 10th attempt.

Hereby in short what I did now and attached the emonhub log:

  • re-installed the SD-card and waited for updates and rebooted
  • before re-installing: attached the mouse and key-board. Result: the cursor is blinking but the line “emon login:” is still gone
  • switched on the new emonTX on node 15: it shows values but I cannot make a graph of it.
  • switched on the old emonTX as node 10 afterwards as node 8 and afterwards as node 14. Result: only node 14 shows proper values.
  • two errors are shown under Admin
    — Update log: a problem because of an old or undefined version
    — Emoncms log: something because of MQTT
LAST ENTRIES ON THE LOG FILE
Starting update via service-runner-update.sh (v3.0) >
- emonSD version: emonSD-17Oct19
ERROR: emonSD base image old or undefined...update will not continue
See latest verson: https://github.com/openenergymonitor/emonpi/wiki/emonSD-pre-built-SD-card-Download-&-Change-Log
Stopping update

Emoncmslog:
LAST ENTRIES ON THE LOG FILE
2019-10-17 10:05:37.094|WARN|emoncms_mqtt.php|Not connected, retrying connection
2019-10-17 10:05:37.130|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2019-10-17 10:05:50.248|WARN|rememberme_model.php|getCookieValues: cookie must contain 3 parts: 2
2019-10-17 10:05:50.300|ERROR|index.php|Not Authenticated|dashboard/view
2019-10-17 10:44:08.009|ERROR|index.php|Not Authenticated|dashboard/view

emonhub log.txt (545,1 KB)

Server Information

Server Information

Services

  • emonhub :- Active Running
  • emoncms_mqtt :- Active Running
  • feedwriter :- Active Running - sleep 300s 168 feed points pending write
  • service-runner :- Active Running
  • emonPiLCD :- Inactive Dead
  • redis-server :- Active Running
  • mosquitto :- Active Running
  • demandshaper :- Active Running

Emoncms

Server

  • OS :- Linux 4.19.75-v7+
  • Host :- emonpi | emonpi | (192.168.0.42)
  • Date :- 2019-10-17 11:49:46 BST
  • Uptime :- 11:49:46 up 44 min, 0 users, load average: 0.13, 0.28, 0.17

Memory

  • RAM :- Used: 17.01%
    • Total :- 975.62 MB
    • Used :- 165.91 MB
    • Free :- 809.71 MB
  • Swap :- Used: 0.00%
    • Total :- 100 MB
    • Used :- 0 B
    • Free :- 100 MB
      Write Load Period

Disk

  • / :- Used: 46.42%
    • Total :- 3.92 GB
    • Used :- 1.82 GB
    • Free :- 1.91 GB
    • Write Load :- 500.68 B/s (42 mins)
  • /boot :- Used: 20.55%
    • Total :- 252.05 MB
    • Used :- 51.79 MB
    • Free :- 200.25 MB
    • Write Load :- 0 B/s (42 mins)
  • /var/opt/emoncms :- Used: 0.04%
    • Total :- 9.98 GB
    • Used :- 3.78 MB
    • Free :- 9.47 GB
    • Write Load :- 36.95 B/s (42 mins)
  • /var/log :- Used: 5.93%
    • Total :- 50 MB
    • Used :- 2.96 MB
    • Free :- 47.04 MB
    • Write Load :- n/a

HTTP

  • Server :- Apache/2.4.38 (Raspbian) HTTP/1.1 CGI/1.1 80

MySQL

  • Version :- 5.5.5-10.3.17-MariaDB-0+deb10u1
  • Host :- localhost:6379 (127.0.0.1)
  • Date :- 2019-10-17 11:49:45 (UTC 01:00‌​)
  • Stats :- Uptime: 2652 Threads: 13 Questions: 5885 Slow queries: 0 Opens: 46 Flush tables: 1 Open tables: 40 Queries per second avg: 2.219

Redis

  • Version :-
    • Redis Server :- 5.0.3
    • PHP Redis :- 5.0.2
  • Host :- localhost:6379
  • Size :- 207 keys (848.43K)
  • Uptime :- 0 days

MQTT Server

  • Version :- Mosquitto 1.5.7
  • Host :- localhost:1883 (127.0.0.1)

PHP

  • Version :- 7.3.9-1~deb10u1 (Zend Version 3.3.9)
  • Modules :- apache2handler | calendar v7.3.9-1~deb10u1 | Core v7.3.9-1~deb10u1 | ctype v7.3.9-1~deb10u1 | curl v7.3.9-1~deb10u1 | date v7.3.9-1~deb10u1 | dom v20031129 | exif v7.3.9-1~deb10u1 | fileinfo v7.3.9-1~deb10u1 | filter v7.3.9-1~deb10u1 | ftp v7.3.9-1~deb10u1 | gd v7.3.9-1~deb10u1 | gettext v7.3.9-1~deb10u1 | hash v7.3.9-1~deb10u1 | iconv v7.3.9-1~deb10u1 | json v1.7.0 | libxml v7.3.9-1~deb10u1 | mbstring v7.3.9-1~deb10u1 | mosquitto v0.4.0 | mysqli v7.3.9-1~deb10u1 | mysqlnd vmysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $ | openssl v7.3.9-1~deb10u1 | pcre v7.3.9-1~deb10u1 | PDO v7.3.9-1~deb10u1 | pdo_mysql v7.3.9-1~deb10u1 | Phar v7.3.9-1~deb10u1 | posix v7.3.9-1~deb10u1 | readline v7.3.9-1~deb10u1 | redis v5.0.2 | Reflection v7.3.9-1~deb10u1 | session v7.3.9-1~deb10u1 | shmop v7.3.9-1~deb10u1 | SimpleXML v7.3.9-1~deb10u1 | sockets v7.3.9-1~deb10u1 | sodium v7.3.9-1~deb10u1 | SPL v7.3.9-1~deb10u1 | standard v7.3.9-1~deb10u1 | sysvmsg v7.3.9-1~deb10u1 | sysvsem v7.3.9-1~deb10u1 | sysvshm v7.3.9-1~deb10u1 | tokenizer v7.3.9-1~deb10u1 | wddx v7.3.9-1~deb10u1 | xml v7.3.9-1~deb10u1 | xmlreader v7.3.9-1~deb10u1 | xmlwriter v7.3.9-1~deb10u1 | xsl v7.3.9-1~deb10u1 | Zend OPcache v7.3.9-1~deb10u1 | zlib v7.3.9-1~deb10u1

Pi

  • Model :- Raspberry Pi 3 Model B Rev 1.2 - 1GB (Sony UK)

  • Serial num. :- 670D57CB

  • Temperature :- 52.62°C - 52.1°C

  • emonpiRelease :- emonSD-17Oct19

  • File-system :- read-write

Client Information

Client Information

HTTP

  • Browser :- Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36
  • Language :- nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7

Window

  • Size :- 1759 x 841

Screen

  • Resolution :- 1600 x 900

And the emon conf:

#######################################################################
#######################      emonhub.conf     #########################
#######################################################################
### emonHub configuration file, for info see documentation:
### https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf
#######################################################################
#######################    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 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/

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


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

[[10]]
    nodename = emontx2
    [[[rx]]]
       names = P1, P2, P3, P4, batt, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacodes = h
       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 = emontx1
[[[rx]]]
names = P1, P2, P3, P4, batt, temp1, temp2, temp3, temp4, temp5, temp6,temp7,temp8,temp9,temp10,temp11,temp12,temp13,temp14,temp15,temp16,temp17,temp18,temp19,temp20,temp21,temp22,temp23,temp24,pulse
datacode = h
scales = 1,1,1, 0.11, 0.01, 0.1,0.1,0.1,0.1,0.1, 0.1,0.1,0.1,0.1,0.1, 0.1,0.1,0.1,0.1,0.1, 0.1,0.1,0.1,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,C,C,C,C, C,C,C,C,C, C,C,C,C,C, C,C,C,C, N


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


If the data being sent from the emonTx is compatible with Node 14, then Nodes 8 and 10 will not work because the default definition is not correct for your emonTx as Node 8, and node 10 definition is not legal - therefore it does not know how to decode the data so it will be rejected as “interference”.

In order to decode and use the data, you must have either all the data sent as signed 2-byte integers, or a Node ID defined in emonhub.conf that either exactly matches the format of the data being sent, or uses one of the “universal” specifiers, e.g. “datacode = h” - meaning that every value comes as a signed 2-byte integer, with no exceptions. Note “datacode”, not “datacodes” - which is why Node 10 does not work.
Node 14 will probably not work also, because I think the pulse count will be an unsigned long 4-byte integer, needing code “L”, therefore you must specify a code for every variable coming in since they are not all the same.

All the details:

Are you processing the Inputs to Feeds? You can only graph feeds (note there is a delay of 5 minutes as the data is only written to disk once every 5 minutes).

Not sure why you would expect the definitions of node 8 / 9 to wok - only node 14 matches your data string - as it used to do.

Question:

Do you see Inputs for each of the EmonTXs?

Does the EmonBase have internet connectivity?

Yes you always seem to get one error of a failed connection followed immediately by a connection accepted message.

To answer the three questions:
Are you processing the Inputs to Feeds ? Yes
Do you see Inputs for each of the EmonTXs? Yes
Does the EmonBase have internet connectivity? Yes I think so, I enabled SSH and can access the emonBase now with Putty.

But about the internet connectivity: I tried to use
sudo su
apt-get update

This causes errors and says something about a autorisation for the internet connection.
Do you know why apt-get is not working?