Emonhub stopped and can't restart

The baud rate has been 38400 for some time now, but 9600 and 57600 have been used. The easy way is to change it in emonhub.conf to one of those and restart emonHub. If it is correct, communication will start.

The BaseID has been 5 for the emonPi for as long as I can remember. In the days of the NanodeRF and the OKG base, I think it was 15 or 16.

thx, but all 3 still are not working.
And results in “WARNING MainThread Device communication error - check settings”

2020-06-30 07:09:29,613 INFO     MainThread Opening hub...
2020-06-30 07:09:29,614 INFO     MainThread Logging level set to DEBUG
2020-06-30 07:09:29,615 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
2020-06-30 07:09:29,618 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2020-06-30 07:09:31,622 WARNING  MainThread Device communication error - check settings
2020-06-30 07:09:31,623 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2020-06-30 07:09:32,626 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
2020-06-30 07:09:33,628 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2020-06-30 07:09:34,631 INFO     MainThread Setting RFM2Pi quiet: 1 (1q)
2020-06-30 07:09:35,633 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2020-06-30 07:09:36,636 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2020-06-30 07:09:36,637 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2020-06-30 07:09:36,638 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT' 
2020-06-30 07:09:36,642 DEBUG    MainThread Setting MQTT pubchannels: ['ToRFM12']
2020-06-30 07:09:36,643 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2020-06-30 07:09:36,644 INFO     MainThread Setting MQTT node_format_enable: 1
2020-06-30 07:09:36,644 INFO     MainThread Setting MQTT nodevar_format_enable: 1
2020-06-30 07:09:36,645 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2020-06-30 07:09:36,646 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2020-06-30 07:09:36,648 DEBUG    MainThread Setting emoncmsorg pubchannels: ['ToRFM12']
2020-06-30 07:09:36,649 DEBUG    MainThread Setting emoncmsorg subchannels: ['ToEmonCMS']
2020-06-30 07:09:36,650 WARNING  MainThread Setting emoncmsorg apikey: obscured
2020-06-30 07:09:36,651 INFO     MainThread Setting emoncmsorg url: https://emoncms.org
2020-06-30 07:09:36,652 INFO     MainThread Setting emoncmsorg senddata: 1
2020-06-30 07:09:36,652 INFO     MainThread Setting emoncmsorg sendstatus: 1
2020-06-30 07:14:06,791 INFO     MainThread EmonHub emonHub emon-pi variant v3-beta
2020-06-30 07:14:06,792 INFO     MainThread Opening hub...
2020-06-30 07:14:06,793 INFO     MainThread Logging level set to DEBUG
2020-06-30 07:14:06,794 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
2020-06-30 07:14:06,797 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 9600 bits/s
2020-06-30 07:14:08,801 WARNING  MainThread Device communication error - check settings
2020-06-30 07:14:08,802 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2020-06-30 07:14:09,805 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
2020-06-30 07:14:10,807 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2020-06-30 07:14:11,809 INFO     MainThread Setting RFM2Pi quiet: 1 (1q)
2020-06-30 07:14:12,812 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2020-06-30 07:14:13,814 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2020-06-30 07:14:13,815 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2020-06-30 07:14:13,817 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT' 
2020-06-30 07:14:13,821 DEBUG    MainThread Setting MQTT pubchannels: ['ToRFM12']
2020-06-30 07:14:13,822 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2020-06-30 07:14:13,823 INFO     MainThread Setting MQTT node_format_enable: 1
2020-06-30 07:14:13,824 INFO     MainThread Setting MQTT nodevar_format_enable: 1
2020-06-30 07:14:13,824 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2020-06-30 07:14:13,826 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2020-06-30 07:14:13,827 DEBUG    MainThread Setting emoncmsorg pubchannels: ['ToRFM12']
2020-06-30 07:14:13,828 DEBUG    MainThread Setting emoncmsorg subchannels: ['ToEmonCMS']
2020-06-30 07:14:13,828 WARNING  MainThread Setting emoncmsorg apikey: obscured
2020-06-30 07:14:13,829 INFO     MainThread Setting emoncmsorg url: https://emoncms.org
2020-06-30 07:14:13,830 INFO     MainThread Setting emoncmsorg senddata: 1
2020-06-30 07:14:13,830 INFO     MainThread Setting emoncmsorg sendstatus: 1
2020-06-30 07:14:40,933 INFO     MainThread Deleting interfacer 'RFM2Pi' 
2020-06-30 07:14:47,405 INFO     MainThread EmonHub emonHub emon-pi variant v3-beta
2020-06-30 07:14:47,406 INFO     MainThread Opening hub...
2020-06-30 07:14:47,407 INFO     MainThread Logging level set to DEBUG
2020-06-30 07:14:47,408 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
2020-06-30 07:14:47,411 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2020-06-30 07:14:49,415 WARNING  MainThread Device communication error - check settings
2020-06-30 07:14:49,416 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2020-06-30 07:14:50,419 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
2020-06-30 07:14:51,421 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2020-06-30 07:14:52,424 INFO     MainThread Setting RFM2Pi quiet: 1 (1q)
2020-06-30 07:14:53,426 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2020-06-30 07:14:54,429 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2020-06-30 07:14:54,430 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2020-06-30 07:14:54,432 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT' 
2020-06-30 07:14:54,435 DEBUG    MainThread Setting MQTT pubchannels: ['ToRFM12']
2020-06-30 07:14:54,436 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2020-06-30 07:14:54,437 INFO     MainThread Setting MQTT node_format_enable: 1
2020-06-30 07:14:54,438 INFO     MainThread Setting MQTT nodevar_format_enable: 1
2020-06-30 07:14:54,438 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2020-06-30 07:14:54,440 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2020-06-30 07:14:54,442 DEBUG    MainThread Setting emoncmsorg pubchannels: ['ToRFM12']
2020-06-30 07:14:54,442 DEBUG    MainThread Setting emoncmsorg subchannels: ['ToEmonCMS']
2020-06-30 07:14:54,443 WARNING  MainThread Setting emoncmsorg apikey: obscured
2020-06-30 07:14:54,443 INFO     MainThread Setting emoncmsorg url: https://emoncms.org
2020-06-30 07:14:54,444 INFO     MainThread Setting emoncmsorg senddata: 1
2020-06-30 07:14:54,444 INFO     MainThread Setting emoncmsorg sendstatus: 1
2020-06-30 07:15:10,107 INFO     MainThread Deleting interfacer 'RFM2Pi' 
2020-06-30 07:15:20,077 INFO     MainThread EmonHub emonHub emon-pi variant v3-beta
2020-06-30 07:15:20,078 INFO     MainThread Opening hub...
2020-06-30 07:15:20,079 INFO     MainThread Logging level set to DEBUG
2020-06-30 07:15:20,080 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
2020-06-30 07:15:20,083 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 57600 bits/s
2020-06-30 07:15:22,087 WARNING  MainThread Device communication error - check settings
2020-06-30 07:15:22,089 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2020-06-30 07:15:23,091 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
2020-06-30 07:15:24,093 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2020-06-30 07:15:25,096 INFO     MainThread Setting RFM2Pi quiet: 1 (1q)
2020-06-30 07:15:26,098 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2020-06-30 07:15:27,100 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2020-06-30 07:15:27,102 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2020-06-30 07:15:27,104 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT' 
2020-06-30 07:15:27,108 DEBUG    MainThread Setting MQTT pubchannels: ['ToRFM12']
2020-06-30 07:15:27,109 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2020-06-30 07:15:27,109 INFO     MainThread Setting MQTT node_format_enable: 1
2020-06-30 07:15:27,110 INFO     MainThread Setting MQTT nodevar_format_enable: 1
2020-06-30 07:15:27,110 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2020-06-30 07:15:27,112 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2020-06-30 07:15:27,113 DEBUG    MainThread Setting emoncmsorg pubchannels: ['ToRFM12']
2020-06-30 07:15:27,114 DEBUG    MainThread Setting emoncmsorg subchannels: ['ToEmonCMS']
2020-06-30 07:15:27,115 WARNING  MainThread Setting emoncmsorg apikey: obscured
2020-06-30 07:15:27,115 INFO     MainThread Setting emoncmsorg url: https://emoncms.org
2020-06-30 07:15:27,116 INFO     MainThread Setting emoncmsorg senddata: 1
2020-06-30 07:15:27,116 INFO     MainThread Setting emoncmsorg sendstatus: 1

also hereby the update log after first install:

Starting update via service-runner-update.sh (v3.0) >
- emonSD version: emonSD-17Oct19
emonSD base image check passed...continue update
git pull /opt/openenergymonitor/EmonScripts
  master
* stable
On branch stable
Your branch is up to date with 'origin/stable'.

nothing to commit, working tree clean
From https://github.com/openenergymonitor/EmonScripts
   13d472a..27bb17e  stable           -> origin/stable
 * [new branch]      emonhub_python3  -> origin/emonhub_python3
   ff3d1c6..cfdca23  master           -> origin/master
 * [new branch]      remove_large_log -> origin/remove_large_log
 * [new tag]         1.0.3-beta       -> 1.0.3-beta
 * [new tag]         1.0.4-beta       -> 1.0.4-beta
 * [new tag]         1.0.5-beta       -> 1.0.5-beta
 * [new tag]         1.0.6-beta       -> 1.0.6-beta
 * [new tag]         1.0.7-beta       -> 1.0.7-beta
 * [new tag]         v1.0.2-beta      -> v1.0.2-beta
Updating 13d472a..27bb17e
Fast-forward
 EmonPiFileSystem.md                  |  2 +-
 defaults/etc/logrotate.d/00_defaults | 12 ++++++
 defaults/readme.md                   |  2 +-
 install/emoncms_core.sh              | 76 ++++++++++++++++++++++--------------
 install/emoncms_emonpi_modules.sh    | 30 ++++++++++++++
 install/emoncms_modules.sh           | 29 +-------------
 install/emonsd.config.ini            | 49 ++++++++++++++++-------
 install/emonsd.sh                    |  3 ++
 install/init_resize.sh               | 61 +++++++++++++++++++++--------
 install/main.sh                      |  5 ++-
 install/non_emonsd.sh                |  1 +
 install/readme.md                    | 22 ++++++++++-
 install/rpi-install.md               | 18 +++++++--
 safe-update                          |  1 +
 update/config.ini                    | 19 ---------
 update/emoncms_core.sh               | 57 +++++++++++++++------------
 update/emoncms_modules.sh            | 26 +++++-------
 update/emonhub.sh                    | 37 +++++++++++++++---
 update/emonpi.sh                     |  2 +-
 update/emontxv3cm.sh                 | 36 +++++++++++++++++
 update/load_config.sh                | 11 ++++++
 update/main.sh                       |  9 ++++-
 update/rfm12pi.sh                    | 25 ++++++++++++
 update/rfm69pi.sh                    |  2 +-
 update/service-runner-update.sh      | 17 +++++++-
 version.txt                          |  2 +-
 26 files changed, 383 insertions(+), 171 deletions(-)
 create mode 100755 install/emoncms_emonpi_modules.sh
 delete mode 100755 update/config.ini
 create mode 100755 update/emontxv3cm.sh
 create mode 100644 update/load_config.sh
 create mode 100755 update/rfm12pi.sh
-------------------------------------------------------------
Main Update Script
-------------------------------------------------------------
Date: Tue 30 Jun 07:05:53 BST 2020
EUID: 1000
openenergymonitor_dir: /opt/openenergymonitor
type: all
firmware: 
Hardware detected: rfm2pi
git pull /opt/openenergymonitor/emonpi
* master
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
Fetching origin
From https://github.com/openenergymonitor/emonpi
 - [deleted]         (none)     -> origin/settings_object
   a9839b7..73a63d2  master     -> origin/master
 * [new tag]         2.9.2      -> 2.9.2
Updating a9839b7..73a63d2
Fast-forward
 emoncmsdbupdate_old.php | 14 ++++++++++++++
 firmware/platformio.ini |  4 ++--
 firmware/src/src.ino    |  3 ++-
 lcd/emonPiLCD.py        | 10 ++++------
 lcd/emonPiLCD_update.py |  5 ++++-
 5 files changed, 26 insertions(+), 10 deletions(-)
 create mode 100644 emoncmsdbupdate_old.php
git pull /opt/openenergymonitor/RFM2Pi
* master
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
Fetching origin
From https://github.com/openenergymonitor/RFM2Pi
   e5d874d..1658310  master     -> origin/master
Updating e5d874d..1658310
Fast-forward
 hardware/readme.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Start emonhub update script:
-------------------------------------------------------------
emonHub update
-------------------------------------------------------------
git pull /opt/openenergymonitor/emonhub
Migrating from emon-pi branch to stable branch

git fetch --all --prune -v
Fetching origin
From https://github.com/openenergymonitor/emonhub
 - [deleted]         (none)     -> origin/service_update
POST git-upload-pack (gzip 1384 to 769 bytes)
   bbd2e71..e443b94  emon-pi                -> origin/emon-pi
 * [new branch]      MQTTSubscriberInterfacer -> origin/MQTTSubscriberInterfacer
 * [new branch]      SDS011                 -> origin/SDS011
   5d239b3..a97f849  env_example            -> origin/env_example
   cb798e7..0a82be4  lanip-status           -> origin/lanip-status
 * [new branch]      master                 -> origin/master
   5e0fa7d..1a49197  redis_config_interface -> origin/redis_config_interface
 * [new branch]      stable                 -> origin/stable
   f3f78d8..1ce386a  unitless_decoder       -> origin/unitless_decoder
 * [new tag]         2.1.3                  -> 2.1.3
 * [new tag]         2.1.4                  -> 2.1.4
git checkout stable
Switched to a new branch 'stable'
Branch 'stable' set up to track remote branch 'stable' from 'origin'.
git pull origin stable
From https://github.com/openenergymonitor/emonhub
 * branch            stable     -> FETCH_HEAD
Already up to date.

running emonhub install script emonSD_pi_env:1

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Get:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:3 http://archive.raspberrypi.org/debian buster/main armhf Packages [330 kB]
Get:4 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Get:5 http://raspbian.raspberrypi.org/raspbian buster/contrib armhf Packages [58.7 kB]
Get:6 http://raspbian.raspberrypi.org/raspbian buster/non-free armhf Packages [104 kB]
Fetched 13.5 MB in 19s (732 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
147 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  dh-python libpython3-dev libpython3.7 libpython3.7-dev libpython3.7-minimal
  libpython3.7-stdlib python3-asn1crypto python3-cffi-backend python3-crypto
  python3-cryptography python3-dbus python3-dev python3-distutils
  python3-entrypoints python3-gi python3-keyring python3-keyrings.alt
  python3-lib2to3 python3-secretstorage python3-setuptools python3-wheel
  python3-xdg python3.7 python3.7-dev python3.7-minimal
Suggested packages:
  python-configobj-doc python-crypto-doc python-cryptography-doc
  python3-cryptography-vectors python-dbus-doc python3-dbus-dbg gnome-keyring
  libkf5wallet-bin gir1.2-gnomekeyring-1.0 python-secretstorage-doc
  python3-wxgtk3.0 | python3-wxgtk python-setuptools-doc python3.7-venv
  python3.7-doc binfmt-support
The following NEW packages will be installed:
  dh-python libpython3-dev libpython3.7-dev python3-asn1crypto
  python3-cffi-backend python3-configobj python3-crypto python3-cryptography
  python3-dbus python3-dev python3-distutils python3-entrypoints python3-gi
  python3-keyring python3-keyrings.alt python3-lib2to3 python3-pip
  python3-secretstorage python3-serial python3-setuptools python3-wheel
  python3-xdg python3.7-dev
The following packages will be upgraded:
  libpython3.7 libpython3.7-minimal libpython3.7-stdlib python3.7
  python3.7-minimal
5 upgraded, 23 newly installed, 0 to remove and 142 not upgraded.
Need to get 54.9 MB of archives.
After this operation, 81.1 MB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian buster/main armhf python3-pip all 18.1-5+rpt1 [171 kB]
Get:2 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3.7 armhf 3.7.3-2+deb10u1 [330 kB]
Get:4 http://mirror.nl.leaseweb.net/raspbian/raspbian buster/main armhf libpython3.7-stdlib armhf 3.7.3-2+deb10u1 [1,662 kB]
Get:3 http://raspbian.mirror.liteserver.nl/raspbian buster/main armhf libpython3.7 armhf 3.7.3-2+deb10u1 [1,252 kB]
Get:5 http://mirror.transip.net/raspbian/raspbian buster/main armhf python3.7-minimal armhf 3.7.3-2+deb10u1 [1,463 kB]
Get:6 http://mirror.serverius.net/raspbian/raspbian buster/main armhf libpython3.7-minimal armhf 3.7.3-2+deb10u1 [583 kB]
Get:7 http://raspbian.mirror.liteserver.nl/raspbian buster/main armhf python3-lib2to3 all 3.7.3-1 [76.7 kB]
Get:8 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3-distutils all 3.7.3-1 [142 kB]
Get:9 http://mirror.serverius.net/raspbian/raspbian buster/main armhf dh-python all 3.20190308 [99.3 kB]
Get:10 http://mirror.nl.leaseweb.net/raspbian/raspbian buster/main armhf libpython3.7-dev armhf 3.7.3-2+deb10u1 [47.2 MB]
Get:11 http://raspbian.mirror.liteserver.nl/raspbian buster/main armhf libpython3-dev armhf 3.7.3-1 [20.1 kB]
Get:12 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3-asn1crypto all 0.24.0-1 [78.2 kB]
Get:13 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3-cffi-backend armhf 1.12.2-1 [70.1 kB]
Get:15 http://mirror.transip.net/raspbian/raspbian buster/main armhf python3-crypto armhf 2.6.1-9+b1 [251 kB]
Get:16 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3-cryptography armhf 2.6.1-3+deb10u2 [184 kB]
Get:17 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3-dbus armhf 1.2.8-3 [95.9 kB]
Get:18 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3.7-dev armhf 3.7.3-2+deb10u1 [522 kB]
Get:19 http://raspbian.raspberrypi.org/raspbian buster/main armhf python3-dev armhf 3.7.3-1 [1,264 B]
Get:20 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3-entrypoints all 0.3-1 [5,508 B]
Get:21 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3-gi armhf 3.30.4-1 [161 kB]
Get:22 http://raspbian.mirror.liteserver.nl/raspbian buster/main armhf python3-secretstorage all 2.3.1-2 [14.2 kB]
Get:23 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3-keyring all 17.1.1-1 [43.1 kB]
Get:25 http://mirror.transip.net/raspbian/raspbian buster/main armhf python3-serial all 3.4-4 [67.6 kB]
Get:26 http://mirror.serverius.net/raspbian/raspbian buster/main armhf python3-setuptools all 40.8.0-1 [306 kB]
Get:27 http://raspbian.mirror.liteserver.nl/raspbian buster/main armhf python3-wheel all 0.32.3-2 [19.4 kB]
Get:28 http://mirror.proserve.nl/raspbian/raspbian buster/main armhf python3-xdg all 0.25-5 [35.9 kB]
Get:14 http://mirror.nl.leaseweb.net/raspbian/raspbian buster/main armhf python3-configobj all 5.0.6-3 [35.7 kB]
Get:24 http://mirror.nl.leaseweb.net/raspbian/raspbian buster/main armhf python3-keyrings.alt all 3.1.1-1 [18.2 kB]
apt-listchanges: Reading changelogs...
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Fetched 54.9 MB in 7s (7,443 kB/s)
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 47086 files and directories currently installed.)
Preparing to unpack .../00-python3.7_3.7.3-2+deb10u1_armhf.deb ...
Unpacking python3.7 (3.7.3-2+deb10u1) over (3.7.3-2) ...
Preparing to unpack .../01-libpython3.7_3.7.3-2+deb10u1_armhf.deb ...
Unpacking libpython3.7:armhf (3.7.3-2+deb10u1) over (3.7.3-2) ...
Preparing to unpack .../02-libpython3.7-stdlib_3.7.3-2+deb10u1_armhf.deb ...
Unpacking libpython3.7-stdlib:armhf (3.7.3-2+deb10u1) over (3.7.3-2) ...
Preparing to unpack .../03-python3.7-minimal_3.7.3-2+deb10u1_armhf.deb ...
Unpacking python3.7-minimal (3.7.3-2+deb10u1) over (3.7.3-2) ...
Preparing to unpack .../04-libpython3.7-minimal_3.7.3-2+deb10u1_armhf.deb ...
Unpacking libpython3.7-minimal:armhf (3.7.3-2+deb10u1) over (3.7.3-2) ...
Selecting previously unselected package python3-lib2to3.
Preparing to unpack .../05-python3-lib2to3_3.7.3-1_all.deb ...
Unpacking python3-lib2to3 (3.7.3-1) ...
Selecting previously unselected package python3-distutils.
Preparing to unpack .../06-python3-distutils_3.7.3-1_all.deb ...
Unpacking python3-distutils (3.7.3-1) ...
Selecting previously unselected package dh-python.
Preparing to unpack .../07-dh-python_3.20190308_all.deb ...
Unpacking dh-python (3.20190308) ...
Selecting previously unselected package libpython3.7-dev:armhf.
Preparing to unpack .../08-libpython3.7-dev_3.7.3-2+deb10u1_armhf.deb ...
Unpacking libpython3.7-dev:armhf (3.7.3-2+deb10u1) ...
Selecting previously unselected package libpython3-dev:armhf.
Preparing to unpack .../09-libpython3-dev_3.7.3-1_armhf.deb ...
Unpacking libpython3-dev:armhf (3.7.3-1) ...
Selecting previously unselected package python3-asn1crypto.
Preparing to unpack .../10-python3-asn1crypto_0.24.0-1_all.deb ...
Unpacking python3-asn1crypto (0.24.0-1) ...
Selecting previously unselected package python3-cffi-backend.
Preparing to unpack .../11-python3-cffi-backend_1.12.2-1_armhf.deb ...
Unpacking python3-cffi-backend (1.12.2-1) ...
Selecting previously unselected package python3-configobj.
Preparing to unpack .../12-python3-configobj_5.0.6-3_all.deb ...
Unpacking python3-configobj (5.0.6-3) ...
Selecting previously unselected package python3-crypto.
Preparing to unpack .../13-python3-crypto_2.6.1-9+b1_armhf.deb ...
Unpacking python3-crypto (2.6.1-9+b1) ...
Selecting previously unselected package python3-cryptography.
Preparing to unpack .../14-python3-cryptography_2.6.1-3+deb10u2_armhf.deb ...
Unpacking python3-cryptography (2.6.1-3+deb10u2) ...
Selecting previously unselected package python3-dbus.
Preparing to unpack .../15-python3-dbus_1.2.8-3_armhf.deb ...
Unpacking python3-dbus (1.2.8-3) ...
Selecting previously unselected package python3.7-dev.
Preparing to unpack .../16-python3.7-dev_3.7.3-2+deb10u1_armhf.deb ...
Unpacking python3.7-dev (3.7.3-2+deb10u1) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../17-python3-dev_3.7.3-1_armhf.deb ...
Unpacking python3-dev (3.7.3-1) ...
Selecting previously unselected package python3-entrypoints.
Preparing to unpack .../18-python3-entrypoints_0.3-1_all.deb ...
Unpacking python3-entrypoints (0.3-1) ...
Selecting previously unselected package python3-gi.
Preparing to unpack .../19-python3-gi_3.30.4-1_armhf.deb ...
Unpacking python3-gi (3.30.4-1) ...
Selecting previously unselected package python3-secretstorage.
Preparing to unpack .../20-python3-secretstorage_2.3.1-2_all.deb ...
Unpacking python3-secretstorage (2.3.1-2) ...
Selecting previously unselected package python3-keyring.
Preparing to unpack .../21-python3-keyring_17.1.1-1_all.deb ...
Unpacking python3-keyring (17.1.1-1) ...
Selecting previously unselected package python3-keyrings.alt.
Preparing to unpack .../22-python3-keyrings.alt_3.1.1-1_all.deb ...
Unpacking python3-keyrings.alt (3.1.1-1) ...
Selecting previously unselected package python3-pip.
Preparing to unpack .../23-python3-pip_18.1-5+rpt1_all.deb ...
Unpacking python3-pip (18.1-5+rpt1) ...
Selecting previously unselected package python3-serial.
Preparing to unpack .../24-python3-serial_3.4-4_all.deb ...
Unpacking python3-serial (3.4-4) ...
Selecting previously unselected package python3-setuptools.
Preparing to unpack .../25-python3-setuptools_40.8.0-1_all.deb ...
Unpacking python3-setuptools (40.8.0-1) ...
Selecting previously unselected package python3-wheel.
Preparing to unpack .../26-python3-wheel_0.32.3-2_all.deb ...
Unpacking python3-wheel (0.32.3-2) ...
Selecting previously unselected package python3-xdg.
Preparing to unpack .../27-python3-xdg_0.25-5_all.deb ...
Unpacking python3-xdg (0.25-5) ...
Setting up python3-entrypoints (0.3-1) ...
Setting up python3-dbus (1.2.8-3) ...
Setting up python3-xdg (0.25-5) ...
Setting up libpython3.7-minimal:armhf (3.7.3-2+deb10u1) ...
Setting up python3-wheel (0.32.3-2) ...
Setting up python3-serial (3.4-4) ...
Setting up python3-configobj (5.0.6-3) ...
Setting up python3-gi (3.30.4-1) ...
Setting up python3.7-minimal (3.7.3-2+deb10u1) ...
Setting up python3-crypto (2.6.1-9+b1) ...
Setting up python3-lib2to3 (3.7.3-1) ...
Setting up python3-asn1crypto (0.24.0-1) ...
Setting up python3-cffi-backend (1.12.2-1) ...
Setting up python3-distutils (3.7.3-1) ...
Setting up dh-python (3.20190308) ...
Setting up libpython3.7-stdlib:armhf (3.7.3-2+deb10u1) ...
Setting up python3-setuptools (40.8.0-1) ...
Setting up libpython3.7:armhf (3.7.3-2+deb10u1) ...
Setting up libpython3.7-dev:armhf (3.7.3-2+deb10u1) ...
Setting up python3-cryptography (2.6.1-3+deb10u2) ...
Setting up python3-pip (18.1-5+rpt1) ...
Setting up python3-keyrings.alt (3.1.1-1) ...
Setting up python3.7 (3.7.3-2+deb10u1) ...
Setting up libpython3-dev:armhf (3.7.3-1) ...
Setting up python3.7-dev (3.7.3-2+deb10u1) ...
Setting up python3-secretstorage (2.3.1-2) ...
Setting up python3-dev (3.7.3-1) ...
Setting up python3-keyring (17.1.1-1) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for mime-support (3.62) ...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting paho-mqtt
  Downloading https://www.piwheels.org/simple/paho-mqtt/paho_mqtt-1.5.0-py3-none-any.whl (61kB)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.21.0)
Installing collected packages: paho-mqtt
Successfully installed paho-mqtt-1.5.0
Unit /etc/systemd/system/[email protected] is masked, ignoring.
useradd: user 'emonhub' already exists
- installing emonhub.service
- Service ActiveState=active
- Service ActiveState=active
Running emonhub automatic node addition script
[[5]]
Node 5 already present
[[6]]
Node 6 already present
[[7]]
Node 7 already present
[[8]]
Node 8 already present
[[9]]
Node 9 already present
[[10]]
Node 10 already present
[[11]]
Node 11 already present
[[12]]
Node 12 already present
[[13]]
Node 13 already present
[[14]]
Node 14 already present
[[15]]
Node 15 already present
[[16]]
Node 16 already present
[[19]]
Node 19 already present
[[20]]
Node 20 already present
[[21]]
Node 21 already present
[[22]]
Node 22 already present
[[23]]
Node 23 already present
[[24]]
Node 24 already present
[[25]]
Node 25 already present
[[26]]
Node 26 already present


and part two off the update after install:

-------------------------------------------------------------
Update Emoncms Core
-------------------------------------------------------------


Checking status of /var/www/emoncms git repository
- git branch: stable
- no local changes
- running: git pull origin stable

Fetching origin
From https://github.com/emoncms/emoncms
   8a559545..8af639a9  stable                  -> origin/stable
 * [new branch]        auto_detect_timezone    -> origin/auto_detect_timezone
 * [new branch]        emoncms_component_table -> origin/emoncms_component_table
 * [new branch]        emonmuc                 -> origin/emonmuc
 * [new branch]        kwh_hh                  -> origin/kwh_hh
   8a559545..28fb790b  master                  -> origin/master
   03978db5..439111a9  mqttauth                -> origin/mqttauth
 * [new branch]        timezone_support_csv_export -> origin/timezone_support_csv_export
 * [new tag]           10.2.3                  -> 10.2.3
 * [new tag]           10.1.10                 -> 10.1.10
 * [new tag]           10.1.11                 -> 10.1.11
 * [new tag]           10.2.0                  -> 10.2.0
 * [new tag]           10.2.1                  -> 10.2.1
 * [new tag]           10.2.2                  -> 10.2.2
From https://github.com/emoncms/emoncms
 * branch              stable     -> FETCH_HEAD
Updating 8a559545..8af639a9
Fast-forward
 .travis.yml                                        |    5 +
 Lib/EmonLogger.php                                 |   59 +-
 Lib/dbschemasetup.php                              |   76 +-
 Lib/email.php                                      |  105 +-
 Lib/enum.php                                       |   29 +-
 Lib/misc/nav_functions.php                         |   11 +-
 Lib/misc/sidebar.css                               |   50 +-
 Lib/misc/sidebar.js                                |    7 +-
 Lib/process_old_settings.php                       |   11 +-
 Lib/units.php                                      |    6 +-
 Modules/admin/admin_controller.php                 |   43 +-
 Modules/admin/admin_db_view.php                    |   23 -
 Modules/admin/admin_main_view.php                  |   16 +-
 Modules/admin/admin_menu.php                       |    2 +-
 Modules/admin/admin_model.php                      |   74 +-
 Modules/admin/locale/it_IT/LC_MESSAGES/messages.mo |  Bin 2392 -> 6742 bytes
 Modules/admin/locale/it_IT/LC_MESSAGES/messages.po |  537 +++++++--
 Modules/admin/locale/messages.pot                  |  462 ++++++++
 Modules/admin/pi-model.json                        |  623 ++++++-----
 Modules/admin/static/admin_styles.css              |   39 +
 Modules/admin/update_view.php                      |    3 +-
 Modules/admin/userlist_view.php                    |    6 +-
 Modules/eventp/locale/eventp_messages.pot          | 1138 +++++++++++++++++++
 .../locale/it_IT/LC_MESSAGES/eventp_messages.mo    |  Bin 0 -> 999 bytes
 .../locale/it_IT/LC_MESSAGES/eventp_messages.po    | 1167 ++++++++++++++++++++
 Modules/feed/Views/feedapi_view.php                |    2 +-
 Modules/feed/Views/feedlist_view.php               |   49 +-
 Modules/feed/engine/TemplateEngine.php             |   67 +-
 Modules/feed/engine/VirtualFeed.php                |   46 +-
 Modules/feed/feed_controller.php                   |   48 +-
 Modules/feed/feed_model.php                        |   43 +-
 Modules/feed/locale/fr_FR/LC_MESSAGES/messages.mo  |  Bin 13798 -> 13991 bytes
 Modules/feed/locale/fr_FR/LC_MESSAGES/messages.po  |   29 +-
 Modules/feed/locale/it_IT/LC_MESSAGES/messages.mo  |  Bin 1827 -> 3995 bytes
 Modules/feed/locale/it_IT/LC_MESSAGES/messages.po  |  742 +++++++++++--
 Modules/feed/locale/messages.pot                   |  631 +++++++++++
 Modules/input/Views/input_api.php                  |    2 +-
 Modules/input/Views/input_view.js                  |   31 +-
 Modules/input/Views/input_view.php                 |   25 +-
 Modules/input/Views/schedule.php                   |    8 +-
 Modules/input/input_controller.php                 |    3 +-
 Modules/input/input_menu.php                       |   10 +-
 Modules/input/input_methods.php                    |    1 +
 Modules/input/input_model.php                      |    6 +-
 Modules/input/locale/it_IT/LC_MESSAGES/messages.mo |  Bin 1153 -> 4010 bytes
 Modules/input/locale/it_IT/LC_MESSAGES/messages.po |  777 ++++++++-----
 Modules/input/locale/messages.pot                  |  543 +++++++++
 Modules/process/Views/process_ui.js                |   14 +-
 Modules/process/Views/process_ui.php               |    9 +-
 .../locale/it_IT/LC_MESSAGES/process_messages.mo   |  Bin 0 -> 6119 bytes
 .../locale/it_IT/LC_MESSAGES/process_messages.po   | 1166 +++++++++++++++++++
 Modules/process/locale/process_messages.pot        |  922 ++++++++++++++++
 Modules/process/process_model.php                  |   32 +-
 Modules/process/process_processlist.php            |  151 ++-
 .../locale/it_IT/LC_MESSAGES/schedule_messages.mo  |  Bin 0 -> 2817 bytes
 .../locale/it_IT/LC_MESSAGES/schedule_messages.po  |  317 ++++++
 Modules/schedule/locale/schedule_messages.pot      |  261 +++++
 Modules/user/locale/it_IT/LC_MESSAGES/messages.mo  |  Bin 4776 -> 7188 bytes
 Modules/user/locale/it_IT/LC_MESSAGES/messages.po  |  387 ++++---
 Modules/user/locale/messages.pot                   |  361 ++++++
 Modules/user/rememberme_model.php                  |    4 +-
 Modules/user/user_controller.php                   |    4 +-
 Modules/user/user_menu.php                         |    5 +-
 Modules/user/user_model.php                        |   31 +-
 Modules/vis/README.md                              |   38 +
 .../vis/locale/fr_FR/LC_MESSAGES/vis_messages.mo   |  Bin 11922 -> 13087 bytes
 .../vis/locale/fr_FR/LC_MESSAGES/vis_messages.po   |  374 ++++---
 .../vis/locale/it_IT/LC_MESSAGES/vis_messages.mo   |  Bin 4865 -> 8493 bytes
 .../vis/locale/it_IT/LC_MESSAGES/vis_messages.po   | 1051 ++++++++++++++----
 Modules/vis/locale/vis_messages.pot                |  941 ++++++++++++++++
 Modules/vis/vis_object.php                         |   40 +-
 Modules/vis/visualisations/editrealtime.php        |   58 +-
 Modules/vis/visualisations/graph.js                |    6 +-
 Modules/vis/visualisations/graph.php               |   48 +-
 Modules/vis/visualisations/multigraph.php          |   86 +-
 .../vis/visualisations/multigraph/multigraph.js    |  290 ++---
 Modules/vis/visualisations/rawdata.php             |    1 +
 Modules/vis/visualisations/realtime.php            |    2 +-
 Modules/vis/visualisations/stacked.php             |    9 +-
 Modules/vis/visualisations/stackedsolar.php        |    9 +-
 Theme/basic/embed.php                              |    9 +-
 Theme/basic/emon-blue.css                          |    4 +-
 Theme/basic/emon-standard.css                      |    4 +-
 Theme/basic/emon-sun.css                           |    4 +-
 .../locale/fr_FR/LC_MESSAGES/theme_messages.mo     |  Bin 0 -> 948 bytes
 .../locale/fr_FR/LC_MESSAGES/theme_messages.po     |   54 +
 .../locale/it_IT/LC_MESSAGES/theme_messages.mo     |  Bin 0 -> 983 bytes
 .../locale/it_IT/LC_MESSAGES/theme_messages.po     |   54 +
 Theme/basic/locale/theme_messages.pot              |   54 +
 Theme/basic/menu_view.php                          |   19 +-
 Theme/basic/sidebar_view.php                       |   12 +-
 Theme/basic/theme.php                              |    8 +-
 composer.json                                      |   12 +-
 core.php                                           |  215 ++--
 default-settings.ini                               |   23 +-
 default-settings.php                               |   36 +-
 docs/RaspberryPi/Low-write-mode.md                 |    6 +-
 docs/RaspberryPi/MQTT.md                           |    6 +-
 docs/RaspberryPi/install_Wheezy.md                 |    6 +-
 docs/RaspberryPi/jessie.md                         |    6 +-
 docs/RaspberryPi/language_support.md               |   49 +
 docs/RaspberryPi/read-only.md                      |    6 +-
 example.settings.ini                               |   14 +-
 example.settings.php                               |   86 ++
 index.php                                          |  704 ++++++------
 locale.php                                         |   31 +-
 param.php                                          |   79 +-
 php-info.php                                       |    2 +-
 process_settings.php                               |   87 +-
 readme.md                                          |   41 +-
 route.php                                          |    8 +-
 scripts/phpmqtt_input.php                          |   18 +-
 scripts/services/emoncms_mqtt/emoncms_mqtt.php     |  110 +-
 settings.env.ini                                   |   27 +-
 version.txt                                        |    2 +-
 115 files changed, 13485 insertions(+), 2483 deletions(-)
 delete mode 100644 Modules/admin/admin_db_view.php
 create mode 100644 Modules/admin/locale/messages.pot
 create mode 100644 Modules/eventp/locale/eventp_messages.pot
 create mode 100644 Modules/eventp/locale/it_IT/LC_MESSAGES/eventp_messages.mo
 create mode 100644 Modules/eventp/locale/it_IT/LC_MESSAGES/eventp_messages.po
 create mode 100644 Modules/feed/locale/messages.pot
 create mode 100644 Modules/input/locale/messages.pot
 create mode 100644 Modules/process/locale/it_IT/LC_MESSAGES/process_messages.mo
 create mode 100644 Modules/process/locale/it_IT/LC_MESSAGES/process_messages.po
 create mode 100644 Modules/process/locale/process_messages.pot
 create mode 100644 Modules/schedule/locale/it_IT/LC_MESSAGES/schedule_messages.mo
 create mode 100644 Modules/schedule/locale/it_IT/LC_MESSAGES/schedule_messages.po
 create mode 100644 Modules/schedule/locale/schedule_messages.pot
 create mode 100644 Modules/user/locale/messages.pot
 create mode 100644 Modules/vis/README.md
 create mode 100644 Modules/vis/locale/vis_messages.pot
 create mode 100644 Theme/basic/locale/fr_FR/LC_MESSAGES/theme_messages.mo
 create mode 100644 Theme/basic/locale/fr_FR/LC_MESSAGES/theme_messages.po
 create mode 100644 Theme/basic/locale/it_IT/LC_MESSAGES/theme_messages.mo
 create mode 100644 Theme/basic/locale/it_IT/LC_MESSAGES/theme_messages.po
 create mode 100644 Theme/basic/locale/theme_messages.pot
 create mode 100644 docs/RaspberryPi/language_support.md
 create mode 100644 example.settings.php

Update Emoncms database
[]

-------------------------------------------------------------
Update Emoncms Services
-------------------------------------------------------------
emoncms_mqtt.service already installed
feedwriter.service already installed
service-runner.service already installed

Reloading systemctl deamon
Restarting Services...
- sudo systemctl restart feedwriter.service
--- ActiveState=active ---
- sudo systemctl restart emoncms_mqtt.service
--- ActiveState=active ---
- sudo systemctl restart emonhub.service
--- ActiveState=active ---
/opt/openenergymonitor/EmonScripts/sudoers.d/emoncms-rebootbutton: parsed OK
emonPi emoncms admin reboot button sudoers updated

-------------------------------------------------------------
Update Emoncms Modules
-------------------------------------------------------------
------------------------------------------
Updating /var/www/emoncms/Modules/app module
------------------------------------------
- git branch: stable
- git tags: 2.0.1-78-gc170ae6
- no local changes
- running: git pull origin stable

Fetching origin
From https://github.com/emoncms/app
 - [deleted]         (none)     -> origin/octopus_outgoing
   c170ae6..e5d51a4  stable     -> origin/stable
   c170ae6..e5d51a4  master     -> origin/master
 * [new tag]         2.1.0      -> 2.1.0
 * [new tag]         2.1.1      -> 2.1.1
Already on 'stable'
Your branch is behind 'origin/stable' by 65 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Updating c170ae6..e5d51a4
Fast-forward
 Lib/config.js                                      |   47 +-
 Lib/feed.js                                        |    1 +
 Lib/timeseries.js                                  |    4 +
 Readme.md                                          |   29 +-
 Views/css/app.css                                  |    6 +-
 app_controller.php                                 |   21 +-
 app_model.php                                      |    2 +-
 .../costcomparison/costcomparison.php              |    3 +-
 apps/OpenEnergyMonitor/graph-nav.php               |    3 +-
 apps/OpenEnergyMonitor/myelectric/myelectric.php   |    3 +-
 apps/OpenEnergyMonitor/myelectric2/myelectric2.php |    5 +-
 apps/OpenEnergyMonitor/myenergy/myenergy.php       |    4 +-
 apps/OpenEnergyMonitor/myheatpump/myheatpump.php   |    3 +-
 apps/OpenEnergyMonitor/mysolarpv/mysolarpv.php     |   74 +-
 apps/OpenEnergyMonitor/mysolarpvbattery/app.json   |    5 +
 .../mysolarpvbattery/mysolarpvbattery.php          | 1210 ++++++++++++++++++++
 .../mysolarpvdivert/mysolarpvdivert.php            |   42 +-
 apps/OpenEnergyMonitor/octopus/octopus.php         |  395 ++++---
 apps/OpenEnergyMonitor/openevse/app.json           |    5 -
 apps/OpenEnergyMonitor/openevse/openevse.php       |  622 ----------
 apps/OpenEnergyMonitor/timeofuse/timeofuse.php     |    3 +-
 apps/OpenEnergyMonitor/timeofuse2/timeofuse2.php   |    3 +-
 apps/OpenEnergyMonitor/timeofusecl/timeofusecl.php |    3 +-
 apps/blank/blank.php                               |    3 +-
 apps/template/app.json                             |    6 +-
 apps/template/template.php                         |   23 +-
 composer.json                                      |    5 +-
 module.json                                        |    2 +-
 28 files changed, 1658 insertions(+), 874 deletions(-)
 create mode 100644 apps/OpenEnergyMonitor/mysolarpvbattery/app.json
 create mode 100644 apps/OpenEnergyMonitor/mysolarpvbattery/mysolarpvbattery.php
 delete mode 100644 apps/OpenEnergyMonitor/openevse/app.json
 delete mode 100644 apps/OpenEnergyMonitor/openevse/openevse.php

------------------------------------------
Updating /var/www/emoncms/Modules/config module
------------------------------------------
- git branch: stable
- git tags: 2.0.2-9-g1bba25a
- no local changes
- running: git pull origin stable

Fetching origin
From https://github.com/emoncms/config
   1bba25a..8d278bc  stable     -> origin/stable
   1bba25a..d28ff1e  master     -> origin/master
 * [new tag]         2.0.5      -> 2.0.5
Already on 'stable'
Your branch is behind 'origin/stable' by 8 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Updating 1bba25a..8d278bc
Fast-forward
 calibration.php       |  1 -
 config_controller.php | 10 ++++++----
 config_model.php      |  2 +-
 connect.php           |  2 --
 editor.php            |  2 --
 module.json           |  2 +-
 view.php              |  4 ++--
 7 files changed, 10 insertions(+), 13 deletions(-)

------------------------------------------
Updating /var/www/emoncms/Modules/dashboard module
------------------------------------------
- git branch: stable
- git tags: 2.0.3-39-g5aa74d0
- no local changes
- running: git pull origin stable

Fetching origin
From https://github.com/emoncms/dashboard
   5aa74d0..3b92632  stable            -> origin/stable
   5aa74d0..7c73b21  master            -> origin/master
 * [new branch]      stability_testing -> origin/stability_testing
 * [new tag]         2.0.7             -> 2.0.7
 * [new tag]         2.0.5             -> 2.0.5
Already on 'stable'
Your branch is behind 'origin/stable' by 36 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Updating 5aa74d0..3b92632
Fast-forward
 Views/dashboard_config.php                   |    6 +
 Views/dashboard_edit_view.php                |   38 +-
 Views/dashboard_view.php                     |   27 +-
 dashboard_controller.php                     |    3 +-
 dashboard_menu.php                           |   12 +-
 dashboard_model.php                          |   12 +-
 dashboard_schema.php                         |    1 +
 module.json                                  |    2 +-
 widget/battery/battery_render.js             |    4 +-
 widget/button/button_render.js               |   15 +-
 widget/feedvalue/feedvalue_render.js         |   22 +-
 widget/isactivefeed/isactivefeed_render.js   |   41 +-
 widget/kwhlastperiod/kwhlastperiod_render.js |  323 -------
 widget/kwhperiod/kwhperiod_doco.png          |  Bin 0 -> 243205 bytes
 widget/kwhperiod/kwhperiod_render.js         | 1180 ++++++++++++++++++--------
 widget/kwhperiod/kwhperiod_render.md         |    1 +
 widget/thresholds/thresholds_render.js       |   37 +-
 17 files changed, 994 insertions(+), 730 deletions(-)
 delete mode 100644 widget/kwhlastperiod/kwhlastperiod_render.js
 create mode 100644 widget/kwhperiod/kwhperiod_doco.png
 create mode 100644 widget/kwhperiod/kwhperiod_render.md

------------------------------------------
Updating /var/www/emoncms/Modules/device module
------------------------------------------
- git branch: stable
- git tags: 2.0.0-20-g4907021
- no local changes
- running: git pull origin stable

Fetching origin
From https://github.com/emoncms/device
 - [deleted]         (none)     -> origin/remove_user_dependency
   4907021..34f09b1  stable     -> origin/stable
   4907021..bfc5de3  master     -> origin/master
 * [new tag]         2.0.5      -> 2.0.5
 * [new tag]         2.0.4      -> 2.0.4
Already on 'stable'
Your branch is behind 'origin/stable' by 12 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Updating 4907021..34f09b1
Fast-forward
 Views/device_dialog.js       |  5 ++-
 device_controller.php        |  8 ++--
 device_model.php             |  2 +
 examples/add_input.json      | 68 ++++++++++++++++++++++++++++++++++
 examples/readme.md           |  3 ++
 examples/reset2original.json | 87 ++++++++++++++++++++++++++++++++++++++++++++
 module.json                  |  2 +-
 7 files changed, 169 insertions(+), 6 deletions(-)
 create mode 100644 examples/add_input.json
 create mode 100644 examples/readme.md
 create mode 100644 examples/reset2original.json

------------------------------------------
Updating /var/www/emoncms/Modules/graph module
------------------------------------------
- git branch: stable
- git tags: 2.0.1-55-gebd9a9a
- no local changes
- running: git pull origin stable

Fetching origin
From https://github.com/emoncms/graph
   ebd9a9a..5124499  stable     -> origin/stable
   ebd9a9a..b6e4ce1  master     -> origin/master
 * [new branch]      mobile     -> origin/mobile
 * [new tag]         2.0.9      -> 2.0.9
 * [new tag]         2.0.8      -> 2.0.8
Already on 'stable'
Your branch is behind 'origin/stable' by 36 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Updating ebd9a9a..5124499
Fast-forward
 .travis.yml                          |  14 +
 LICENSE.txt                          | 619 +++++++++++++++++++++++++++++++++++
 composer.json                        |  17 +
 embed.php                            |  43 ++-
 graph.css                            |  41 ++-
 graph.js                             | 413 ++++++++++++-----------
 graph_controller.php                 | 118 -------
 locale/fr_FR/LC_MESSAGES/messages.mo | Bin 4454 -> 4671 bytes
 locale/fr_FR/LC_MESSAGES/messages.po |  46 ++-
 module.json                          |   2 +-
 view.php                             | 179 ++++------
 vis.helper.js                        |  61 ++--
 12 files changed, 1075 insertions(+), 478 deletions(-)
 create mode 100644 .travis.yml
 create mode 100644 LICENSE.txt
 create mode 100644 composer.json

------------------------------------------
Updating /var/www/emoncms/Modules/setup module
------------------------------------------
- git branch: stable
fatal: No names found, cannot describe anything.
- git tags: 
- no local changes
- running: git pull origin stable

Fetching origin
From https://github.com/emoncms/setup
   5e525a2..ee65e22  master     -> origin/master
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.

------------------------------------------
Updating /var/www/emoncms/Modules/wifi module
------------------------------------------
- git branch: stable
- git tags: 2.0.0-29-g274bcd5
- no local changes
- running: git pull origin stable

Fetching origin
From https://github.com/emoncms/wifi
   274bcd5..2b69da7  master     -> origin/master
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.

/opt/openenergymonitor/EmonScripts/sudoers.d/wifi-sudoers: parsed OK
wifi sudoers entry updated
------------------------------------------
Updating /opt/emoncms/modules/backup module
------------------------------------------
- git branch: stable
- git tags: 2.0.0-28-g517ebab
- no local changes
- running: git pull origin stable

From https://github.com/emoncms/backup
   517ebab..70894e1  stable     -> origin/stable
   517ebab..d65a722  master     -> origin/master
 * [new tag]         2.2.1      -> 2.2.1
 * [new tag]         2.2.2      -> 2.2.2
Updating 517ebab..70894e1
Fast-forward
 .travis.yml                         |  14 +
 LICENSE.txt                         | 619 ++++++++++++++++++++++++++++++++++++
 backup-module/backup_controller.php |  53 ++-
 backup-module/backup_view.php       |  49 ++-
 backup-module/module.json           |   2 +-
 composer.json                       |  17 +
 emoncms-import.sh                   |  49 +--
 install.sh                          | 103 ++++--
 readme.md                           |  32 +-
 usb-import.sh                       | 206 ++++++++++++
 10 files changed, 1066 insertions(+), 78 deletions(-)
 create mode 100644 .travis.yml
 create mode 100644 LICENSE.txt
 create mode 100644 composer.json
 create mode 100755 usb-import.sh
Already on 'stable'
Your branch is up to date with 'origin/stable'.

------------------------------------------
Updating /opt/emoncms/modules/demandshaper module
------------------------------------------
- git branch: stable
- git tags: 1.1-21-g0d8d2bf
- no local changes
- running: git pull origin stable

From https://github.com/emoncms/demandshaper
   0d8d2bf..d689aae  stable            -> origin/stable
   0d8d2bf..a64c5fe  master            -> origin/master
 * [new branch]      modular_forecasts -> origin/modular_forecasts
 * [new tag]         1.2.0             -> 1.2.0
 * [new tag]         1.2.4             -> 1.2.4
Updating 0d8d2bf..d689aae
Fast-forward
 demandshaper-module/battery.js                  |  15 +-
 demandshaper-module/demandshaper.css            |   3 +-
 demandshaper-module/demandshaper_controller.php |  81 ++-
 demandshaper-module/demandshaper_menu.php       |  17 +-
 demandshaper-module/demandshaper_model.php      |  61 ++-
 demandshaper-module/general.js                  | 241 ++++++---
 demandshaper-module/general.php                 |  37 +-
 demandshaper-module/module.json                 |   2 +-
 demandshaper-module/scheduler.js                |   6 +-
 demandshaper-module/view.php                    |   6 +-
 demandshaper_run.php                            | 623 ++++++++++++++----------
 ovms_bridge/ovms_bridge.py                      |  64 +++
 ovms_bridge/ovms_bridge.service                 |  36 ++
 ovms_bridge/readme.md                           |  20 +
 readme.md                                       |  90 +---
 scheduler.php                                   |  78 +--
 16 files changed, 870 insertions(+), 510 deletions(-)
 create mode 100644 ovms_bridge/ovms_bridge.py
 create mode 100644 ovms_bridge/ovms_bridge.service
 create mode 100644 ovms_bridge/readme.md
Already on 'stable'
Your branch is up to date with 'origin/stable'.

------------------------------------------
Updating /opt/emoncms/modules/postprocess module
------------------------------------------
- git branch: stable
- git tags: 2.1.0-17-g48fcafd
- no local changes
- running: git pull origin stable

From https://github.com/emoncms/postprocess
   48fcafd..5c50627  stable     -> origin/stable
   48fcafd..5c50627  master     -> origin/master
 * [new tag]         2.1.3      -> 2.1.3
Updating 48fcafd..5c50627
Fast-forward
 common.php                                    | 184 +++++++++++++++++++--
 composer.json                                 |   2 +-
 postprocess-module/module.json                |   2 +-
 postprocess-module/postprocess_controller.php |  67 +++++++-
 postprocess-module/view.js                    | 136 +++++++++-------
 processes/average.php                         | 120 ++++++++++++++
 processes/basic_formula.php                   | 224 ++++++++++++++++----------
 processes/batterysimulator.php                | 185 +++++++++++++++++++++
 processes/constantflow_tokwh.php              |  32 ++--
 processes/liquidorairflow_tokwh.php           |  26 +--
 processes/removenan.php                       | 116 ++++++-------
 11 files changed, 837 insertions(+), 257 deletions(-)
 create mode 100644 processes/average.php
 create mode 100644 processes/batterysimulator.php
Already on 'stable'
Your branch is up to date with 'origin/stable'.

------------------------------------------
Updating /opt/emoncms/modules/sync module
------------------------------------------
- git branch: stable
- git tags: 2.0.1-15-g39361e4
- no local changes
- running: git pull origin stable

From https://github.com/emoncms/sync
   39361e4..afd953d  stable     -> origin/stable
   39361e4..8096379  master     -> origin/master
 * [new tag]         2.0.5      -> 2.0.5
 * [new tag]         2.0.3      -> 2.0.3
 * [new tag]         2.0.4      -> 2.0.4
Updating 39361e4..afd953d
Fast-forward
 sync-module/Module.json         |   2 +-
 sync-module/sync_controller.php |  49 ++++++++-------
 sync-module/sync_view.php       | 128 +++++++++++++++++++++++++++-------------
 3 files changed, 116 insertions(+), 63 deletions(-)
Already on 'stable'
Your branch is up to date with 'origin/stable'.

------------------------------------------
Updating /opt/emoncms/modules/usefulscripts module
------------------------------------------
- git branch: stable
fatal: No names found, cannot describe anything.
- git tags: 
- no local changes
- running: git pull origin stable

From https://github.com/emoncms/usefulscripts
   34f8363..69b7831  stable     -> origin/stable
   34f8363..9700f78  master     -> origin/master
Updating 34f8363..69b7831
Fast-forward
 SDS011/.gitignore       |  1 +
 SDS011/Dockerfile       |  8 +++++
 SDS011/SDS011.py        | 96 +++++++++++++++++++++++++++++++++++++++++++++++++
 SDS011/SDS011.service   | 52 +++++++++++++++++++++++++++
 SDS011/default.env      | 12 +++++++
 SDS011/readme.md        | 69 +++++++++++++++++++++++++++++++++++
 backup/lib/metadata.php |  2 ++
 sdpart/sdpart_imagefile | 40 +++++++++++++++------
 8 files changed, 270 insertions(+), 10 deletions(-)
 create mode 100644 SDS011/.gitignore
 create mode 100644 SDS011/Dockerfile
 create mode 100755 SDS011/SDS011.py
 create mode 100644 SDS011/SDS011.service
 create mode 100644 SDS011/default.env
 create mode 100644 SDS011/readme.md
Already on 'stable'
Your branch is up to date with 'origin/stable'.

--------------------------------------------
Backup module installation and update script
--------------------------------------------
- Loading EmonScripts config.ini
- Copying default.config.cfg to config.cfg
- Setting config.cfg settings
- Backup module symlink already exists
- PHP Version: 7.3
- Creating /etc/php/7.3/mods-available/emoncmsbackup.ini
post_max_size = 3G
upload_max_filesize = 3G
upload_tmp_dir = /var/opt/emoncms/backup/uploads
- phpenmod emoncmsbackup
- creating /var/opt/emoncms/backup directory
- creating /var/opt/emoncms/backup/uploads directory
- restarting apache

Update Emoncms database
["ALTER TABLE `dashboard` ADD `fullscreen` tinyint(1) DEFAULT '0'"]


-------------------------------------------------------------
emonPi update done: Tue 30 Jun 07:10:02 BST 2020
-------------------------------------------------------------
restarting service-runner
  1. If this is an emonPi, you should not need to edit emonhub.
  2. What did you do with the 3 emonTXs. You must have done something to set the NodeID.
  3. emonPi baud rate is 38400

SSH into the Pi and do

miniterm --rtscts /dev/ttyAMA0 38400

do you get anything (I expect not)?

what does this give

ls -lh /dev/serial*

I have an emonbase with 2 emontxV3 with nodeid 14 and nodeid 15.

hereby the result on the 2 scripts:

pi@emonpi:~ $ miniterm --rtscts /dev/ttyAMA0 38400
--- Miniterm on /dev/ttyAMA0  38400,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

--- exit ---
pi@emonpi:~ $ ls -lh /dev/serial*
lrwxrwxrwx 1 root root 7 Jun 30 07:17 /dev/serial0 -> ttyAMA0
lrwxrwxrwx 1 root root 5 Jun 30 07:17 /dev/serial1 -> ttyS0
pi@emonpi:~ $

and also the configuration as it worked till yesterday:

[[14]]
nodename = emontx1
[[[rx]]]
          names = P1, P2, P3, P4,    batt,           Ptotal,                   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
          scales = 0.77,0.77,0.77, 0.65,            0.01,              0.77,                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,                   W,                            C,C,C,C,C,                    C,C,C,C,C,                       C,C,C,C,C,                  C,C,C,C,C,                   C,C,C,C,                   p 

[[15]]
nodename = emontx2
[[[rx]]]
          names = P1, P2, P3, P4,    batt,           Ptotal,                   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
          scales = 0.77,0.77,0.77, 0.65,            0.01,              0.77,                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,                   W,                            C,C,C,C,C,                    C,C,C,C,C,                       C,C,C,C,C,                  C,C,C,C,C,                   C,C,C,C,                    p 

And the most recent emonhub log:

2020-06-30 07:46:44,449 INFO     MainThread EmonHub emonHub emon-pi variant v3-beta
2020-06-30 07:46:44,450 INFO     MainThread Opening hub...
2020-06-30 07:46:44,451 INFO     MainThread Logging level set to DEBUG
2020-06-30 07:46:44,452 INFO     MainThread Creating EmonHubJeeInterfacer 'RFM2Pi' 
2020-06-30 07:46:44,456 DEBUG    MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2020-06-30 07:46:46,459 WARNING  MainThread Device communication error - check settings
2020-06-30 07:46:46,460 INFO     MainThread Setting RFM2Pi baseid: 5 (5i)
2020-06-30 07:46:47,462 INFO     MainThread Setting RFM2Pi frequency: 433 (4b)
2020-06-30 07:46:48,465 INFO     MainThread Setting RFM2Pi group: 210 (210g)
2020-06-30 07:46:49,467 INFO     MainThread Setting RFM2Pi quiet: 1 (1q)
2020-06-30 07:46:50,470 INFO     MainThread Setting RFM2Pi calibration: 230V (1p)
2020-06-30 07:46:51,472 DEBUG    MainThread Setting RFM2Pi pubchannels: ['ToEmonCMS']
2020-06-30 07:46:51,473 DEBUG    MainThread Setting RFM2Pi subchannels: ['ToRFM12']
2020-06-30 07:46:51,475 INFO     MainThread Creating EmonHubMqttInterfacer 'MQTT' 
2020-06-30 07:46:51,479 DEBUG    MainThread Setting MQTT pubchannels: ['ToRFM12']
2020-06-30 07:46:51,480 DEBUG    MainThread Setting MQTT subchannels: ['ToEmonCMS']
2020-06-30 07:46:51,480 INFO     MainThread Setting MQTT node_format_enable: 1
2020-06-30 07:46:51,481 INFO     MainThread Setting MQTT nodevar_format_enable: 1
2020-06-30 07:46:51,482 INFO     MainThread Setting MQTT nodevar_format_basetopic: emon/
2020-06-30 07:46:51,483 INFO     MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncmsorg' 
2020-06-30 07:46:51,485 DEBUG    MainThread Setting emoncmsorg pubchannels: ['ToRFM12']
2020-06-30 07:46:51,485 DEBUG    MainThread Setting emoncmsorg subchannels: ['ToEmonCMS']
2020-06-30 07:46:51,486 WARNING  MainThread Setting emoncmsorg apikey: obscured
2020-06-30 07:46:51,486 INFO     MainThread Setting emoncmsorg url: https://emoncms.org
2020-06-30 07:46:51,487 INFO     MainThread Setting emoncmsorg senddata: 1
2020-06-30 07:46:51,488 INFO     MainThread Setting emoncmsorg sendstatus: 1

Ok great - recent purchase?

It looked like minitrerm connected OK, you would have got an error if not, but I’d have expected to see data. Try stopping emonhub first…

sudo systemctl stop emonhub

then connect via miniterm. Do you see any data?

wait 10s

pi@emonpi:~ $ sudo systemctl stop emonhub.service
pi@emonpi:~ $ miniterm --rtscts /dev/ttyAMA0 38400
--- Miniterm on /dev/ttyAMA0  38400,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
OK 5 81 0 0 0 81 0 241 91 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 73 0 0 0 73 0 238 91 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 10 186 1 0 0 0 0 0 0 142 94 48 117 48 117 48 117 48 117 48 117 48 117 0 0 0 0 (-49)
OK 5 72 0 0 0 72 0 214 91 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)

Check the console has been detatched please do

cat /boot/cmdline.txt

and post the output.

the output, but miniterm did not show data:


pi@emonpi:~ $ sudo systemctl stop emonhub
pi@emonpi:~ $ miniterm --rtscts /dev/ttyAMA0 38400
--- Miniterm on /dev/ttyAMA0  38400,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

--- exit ---
pi@emonpi:~ $ cat /boot/cmdline.txt
console=tty1 root=PARTUUID=6c586e13-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

Hereby too the emontxV3 code:

/*
  byte nodeID = 14; 
  emonTxV3.4 Discrete Sampling
  
  If AC-AC adapter is detected assume emonTx is also powered from adapter (jumper shorted) and take Real Power Readings and disable sleep mode to keep load on power supply constant
  If AC-AC addapter is not detected assume powering from battereis / USB 5V AC sample is not present so take Apparent Power Readings and enable sleep mode
  
  Transmitt values via RFM69CW radio
  
   -----------------------------------------
  Part of the openenergymonitor.org project
  
  Authors: Glyn Hudson & Trystan Lea 
  Builds upon JCW JeeLabs RF12 library and Arduino 
  
  Licence: GNU GPL V3

*/

/*Recommended node ID allocation
------------------------------------------------------------------------------------------------------------
-ID-  -Node Type- 
0 - Special allocation in JeeLib RFM12 driver - reserved for OOK use
1-4     - Control nodes 
5-10  - Energy monitoring nodes
11-14 --Un-assigned --
15-16 - Base Station & logging nodes
17-30 - Environmental sensing nodes (temperature humidity etc.)
31  - Special allocation in JeeLib RFM12 driver - Node31 can communicate with nodes on any network group
-------------------------------------------------------------------------------------------------------------


Change Log:
V1.9.1 30/09/15 Update number of samples 1480 > 1662 to improve sampling accurancy: 1662 samples take 300 mS, which equates to 15 cycles @ 50 Hz or 18 cycles @ 60 Hz.
V1.9   25/08/15 Fix spurious pulse readings from RJ45 port when DS18B20 but no pulse counter is connected (enable internal pull-up)
V1.8 - 18/06/15 Increase max pulse width to 110ms
V1.7 - 12/06/15 Fix pulse count debounce issue & enable pulse count pulse temperature
V1.6 - Add support for multiple DS18B20 temperature sensors 
V1.5 - Add interrupt pulse counting - simplify serial print debug 
V1.4.1 - Remove filter settle routine as latest emonLib 19/01/15 does not require 
V1.4 - Support for RFM69CW, DIP switches and battery voltage reading on emonTx V3.4
V1.3 - fix filter settle time to eliminate large inital reading
V1.2 - fix bug which caused Vrms to be returned as zero if CT1 was not connected 
V1.1 - fix bug in startup Vrms calculation, startup Vrms startup calculation is now more accuratre
*/

#define emonTxV3                                                                          // Tell emonLib this is the emonTx V3 - don't read Vcc assume Vcc = 3.3V as is always the case on emonTx V3 eliminates bandgap error and need for calibration http://harizanov.com/2013/09/thoughts-on-avr-adc-accuracy/
#define RF69_COMPAT 1                                                              // Set to 1 if using RFM69CW or 0 is using RFM12B
#include <JeeLib.h>                                                                      //https://github.com/jcw/jeelib - Tested with JeeLib 3/11/14
ISR(WDT_vect) { Sleepy::watchdogEvent(); }                            // Attached JeeLib sleep function to Atmega328 watchdog -enables MCU to be put into sleep mode inbetween readings to reduce power consumption 

#include "EmonLib.h"                                                                    // Include EmonLib energy monitoring library https://github.com/openenergymonitor/EmonLib
EnergyMonitor ct1, ct2, ct3, ct4;       

#include <OneWire.h>                                                  //http://www.pjrc.com/teensy/td_libs_OneWire.html
#include <DallasTemperature.h>                                        //http://download.milesburton.com/Arduino/MaximTemperature/DallasTemperature_LATEST.zip


const byte version = 19;                   // firmware version divided by 10 e,g 16 = V1.6

//----------------------------emonTx V3 Settings---------------------------------------------------------------------------------------------------------------
const byte Vrms=                  230;                               // Vrms for apparent power readings (when no AC-AC voltage sample is present)
const byte TIME_BETWEEN_READINGS= 10;            //Time between readings   

//http://openenergymonitor.org/emon/buildingblocks/calibration

const float Ical1=                90.9;                                 // (2000 turns / 22 Ohm burden) = 90.9
const float Ical2=                90.9;                                 // (2000 turns / 22 Ohm burden) = 90.9
const float Ical3=                90.9;                                 // (2000 turns / 22 Ohm burden) = 90.9
const float Ical4=                16.67;                               // (2000 turns / 120 Ohm burden) = 16.67

float Vcal=                       250.00;              // was 268.97               // (230V x 13) / (9V x 1.2) = 276.9 Calibration for UK AC-AC adapter 77DB-06-09 
//float Vcal=276.9;
//const float Vcal=               260;                             //  Calibration for EU AC-AC adapter 77DE-06-09 
//const float Vcal_USA=           130.0;                           //  Calibration for US AC-AC adapter 77DA-10-09
//boolean USA=FALSE; 

const float phase_shift=          1.7;
const int no_of_samples=          1260;             // was  1480; 
const int no_of_half_wavelengths= 20;
const int timeout=                2000;                               //emonLib timeout 
const int ACAC_DETECTION_LEVEL=   3000;
const byte min_pulsewidth= 110;                                // minimum width of interrupt pulse (default pulse output meters = 100ms)
const int TEMPERATURE_PRECISION=  11;          //was 11                //9 (93.8ms),10 (187.5ms) ,11 (375ms) or 12 (750ms) bits equal to resplution of 0.5C, 0.25C, 0.125C and 0.0625C
const byte MaxOnewire=            24;                            
#define ASYNC_DELAY 375                                          // DS18B20 conversion delay - 9bit requres 95ms, 10bit 187ms, 11bit 375ms and 12bit resolution takes 750ms
//-------------------------------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------------------------------


//----------------------------emonTx V3 hard-wired connections--------------------------------------------------------------------------------------------------------------- 
const byte LEDpin=                 6;                              // emonTx V3 LED
const byte DS18B20_PWR=            19;                             // DS18B20 Power
const byte DIP_switch1=            8;                              // Voltage selection 230 / 110 V AC (default switch off 230V)  - switch off D8 is HIGH from internal pullup
const byte DIP_switch2=            9;                              // RF node ID (default no chance in node ID, switch on for nodeID -1) switch off D9 is HIGH from internal pullup
const byte battery_voltage_pin=    7;                              // Battery Voltage sample from 3 x AA
const byte pulse_countINT=         1;                              // INT 1 / Dig 3 Terminal Block / RJ45 Pulse counting pin(emonTx V3.4) - (INT0 / Dig2 emonTx V3.2)
const byte pulse_count_pin=        3;                              // INT 1 / Dig 3 Terminal Block / RJ45 Pulse counting pin(emonTx V3.4) - (INT0 / Dig2 emonTx V3.2)
#define ONE_WIRE_BUS               5                               // DS18B20 Data                     
//-------------------------------------------------------------------------------------------------------------------------------------------

//Setup DS128B20
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
byte allAddress [MaxOnewire][8];  // was 8  /// 8 bytes per address
byte numSensors;
//-------------------------------------------------------------------------------------------------------------------------------------------

//-----------------------RFM12B / RFM69CW SETTINGS----------------------------------------------------------------------------------------------------
#define RF_freq RF12_433MHZ                                              // Frequency of RF69CW module can be RF12_433MHZ, RF12_868MHZ or RF12_915MHZ. You should use the one matching the module you have.
byte nodeID = 14;                                                // emonTx RFM12B node ID
const int networkGroup = 210;  
//int power1, power2, power3, power4, Vrms, pf1, pf2, pf3, temp[MaxOnewire];
typedef struct { 
int power1, power2, power3, power4, Vrms, Ptotal, temp[MaxOnewire];
int pulseCount; 
} PayloadTX;     // create structure - a neat way of packaging data for RF comms
  PayloadTX emontx; 
//-------------------------------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------------------------------


//Random Variables 
//boolean settled = false;
boolean CT1, CT2, CT3, CT4, ACAC, debug, DS18B20_STATUS; 
byte CT_count=0;
volatile byte pulseCount = 0;
unsigned long pulsetime=0;                                      // Record time of interrupt pulse        



void setup()
{ 
  pinMode(LEDpin, OUTPUT); 
  pinMode(DS18B20_PWR, OUTPUT); 

  pinMode(pulse_count_pin, INPUT_PULLUP);       // Set emonTx V3.4 interrupt pulse counting pin as input (Dig 3 / INT1)
  emontx.pulseCount=0;                                        // Make sure pulse count starts at zero

  digitalWrite(LEDpin,HIGH); 

  Serial.begin(115200);
  Serial.println("emonTx V3.4"); 
  /*Serial.print("emonTx V3.4 Discrete Sampling V"); 
  Serial.print(version*0.1); 
  #if (RF69_COMPAT)
    Serial.println(" RFM69CW");
  #else
    Serial.println(" RFM12B");
  #endif
  Serial.println("OpenEnergyMonitor.org");
  Serial.println("POST.....wait 10s");*/
  
  
  //READ DIP SWITCH POSITIONS 
  pinMode(DIP_switch1, INPUT_PULLUP);
  pinMode(DIP_switch2, INPUT_PULLUP);
  if (digitalRead(DIP_switch1)==LOW) nodeID--;                            //IF DIP switch 1 is switched on then subtract 1 from nodeID
  //if (digitalRead(DIP_switch2)==LOW) USA=TRUE;                       //IF DIP switch 2 is switched on then activate USA mode
 

 //if (USA==TRUE){                                                                             //if USA mode is true
 // Vcal=Vcal_USA;                                                                               //Assume USA AC/AC adatper is being used, set calibration accordingly 
 //} 
  
  delay(10);
  rf12_initialize(nodeID, RF_freq, networkGroup);                          // initialize RFM12B/rfm69CW
   for (int i=10; i>=0; i--)                                                                  //Send RF test sequence (for factory testing)
   {
     emontx.power1=i; 
     rf12_sendNow(0, &emontx, sizeof emontx);
     delay(100);
   }
  rf12_sendWait(2);
  emontx.power1=0;
  
  if (analogRead(1) > 0) {CT1 = 1; CT_count++;} else CT1=0;              // check to see if CT is connected to CT1 input, if so enable that channel
  if (analogRead(2) > 0) {CT2 = 1; CT_count++;} else CT2=0;              // check to see if CT is connected to CT2 input, if so enable that channel
  if (analogRead(3) > 0) {CT3 = 1; CT_count++;} else CT3=0;              // check to see if CT is connected to CT3 input, if so enable that channel
  if (analogRead(4) > 0) {CT4 = 1; CT_count++;} else CT4=0;              //  check to see if CT is connected to CT4 input, if so enable that channel
  
  if ( CT_count == 0) CT1=1;                                              // If no CT's are connect ed CT1-4 then by default read from CT1

  // Quick check to see if there is a voltage waveform present on the ACAC Voltage input
  // Check consists of calculating the RMS from 100 samples of the voltage input.
  Sleepy::loseSomeTime(10000);            //wait for settle
  digitalWrite(LEDpin,LOW); 
  
  // Calculate if there is an ACAC adapter on analog input 0
  //double vrms = calc_rms(0,1780) * (Vcal * (3.3/1024) );
  double vrms = calc_rms(0,1780) * 0.87;
  if (vrms>90) ACAC = 1; else ACAC=0;
 
  if (ACAC) 
  {
    for (int i=0; i<10; i++)                                              // indicate AC has been detected by flashing LED 10 times
    { 
      digitalWrite(LEDpin, HIGH); delay(200);
      digitalWrite(LEDpin, LOW); delay(300);
    }
  }
  else 
  {
    delay(1000);
    digitalWrite(LEDpin, HIGH); delay(2000); digitalWrite(LEDpin, LOW);   // indicate DC power has been detected by turing LED on then off
  }
 
 
 //################################################################################################################################
  //Setup and for presence of DS18B20
  //################################################################################################################################
  digitalWrite(DS18B20_PWR, HIGH); delay(100); 
  sensors.begin();
  sensors.setWaitForConversion(false);             //disable automatic temperature conversion to reduce time spent awake, conversion will be implemented manually in sleeping http://harizanov.com/2013/07/optimizing-ds18b20-code-for-low-power-applications/ 
  numSensors=(sensors.getDeviceCount());
  if (numSensors > MaxOnewire) numSensors=MaxOnewire;   //Limit number of sensors to max number of sensors 
  
  byte j=0;                                        // search for one wire devices and
                                                   // copy to device address arrays.
  while ((j < numSensors) && (oneWire.search(allAddress[j])))  j++;
  
  delay(500);
  digitalWrite(DS18B20_PWR, LOW);
  
  if (numSensors==0) DS18B20_STATUS=0; 
    else DS18B20_STATUS=1;

  
  //################################################################################################################################

  if (Serial) debug = 1; else debug=0;          //if serial UART to USB is connected show debug O/P. If not then disable serial
  if (debug==1)
  {
    Serial.print("CT 1 Cal "); Serial.println(Ical1);
    Serial.print("CT 2 Cal "); Serial.println(Ical2);
    Serial.print("CT 3 Cal "); Serial.println(Ical3);
    Serial.print("CT 4 Cal "); Serial.println(Ical4);
    delay(1000);

    Serial.print("RMS Voltage on AC-AC  is: ~");
    Serial.print(vrms,0); Serial.println("V");
      
    if (ACAC) 
    {
      //Serial.println("AC-AC detected - Real Power measure enabled");
      Serial.println("assuming pwr from AC-AC (jumper closed)");
      //if (USA==TRUE) Serial.println("USA mode active"); 
      //Serial.print("Vcal: "); Serial.println(Vcal);
     // Serial.print("Phase Shift: "); Serial.println(phase_shift);
    }
     else 
     {
       //Serial.println("AC-AC NOT detected - Apparent Pwr measure enabled");
       //Serial.print("Assuming VRMS: "); 
       //Serial.print(Vrms); Serial.println("V");
       Serial.println("Assuming power from batt / 5V USB - power save enabled");
     }  

    if (CT_count==0) Serial.println("NO CT's detected");
    else   
    {
      if (CT1) Serial.println("CT 1 detected");
      if (CT2) Serial.println("CT 2 detected");
      if (CT3) Serial.println("CT 3 detected");
      if (CT4) Serial.println("CT 4 detected");
    }
    if (DS18B20_STATUS==1) {Serial.print("Detected Temp Sensors:  "); Serial.println(numSensors);}
      else Serial.println("No temperature sensor");
   
    #if (RF69_COMPAT)
       Serial.println("RFM69CW");
    #else
      Serial.println("RFM12B");
    #endif
    
    
    Serial.print("Node: "); Serial.println(nodeID); 
    /*Serial.print(" Freq: "); 
    if (RF_freq == RF12_433MHZ) Serial.print("433Mhz");
    if (RF_freq == RF12_868MHZ) Serial.print("868Mhz");
    if (RF_freq == RF12_915MHZ) Serial.print("915Mhz"); 
    Serial.print(" Network: "); Serial.println(networkGroup);*/

    Serial.print("CT1 CT2 CT3 CT4 BATT PTOTAL");
    //Serial.print("CT1 CT2 CT3 CT4 VRMS/BATT PF1 PF2 PF3");
    //Serial.print("CT1 CT2 CT3 CT4 VRMS PULSE");
    if (DS18B20_STATUS==1){Serial.print(" Temperature 1-"); Serial.print(numSensors);}
    Serial.print(" PULSE");
    Serial.println(" "); 
   delay(500);  

  }
  else 
    Serial.end();
  
  
    
  if (CT1) ct1.current(1, Ical1);             // CT ADC channel 1, calibration.  calibration (2000 turns / 22 Ohm burden resistor = 90.909)
  if (CT2) ct2.current(2, Ical2);             // CT ADC channel 2, calibration.
  if (CT3) ct3.current(3, Ical3);             // CT ADC channel 3, calibration. 
  //CT 3 is high accuracy @ low power -  4.5kW Max @ 240V 
  if (CT4) ct4.current(4, Ical4);                                      // CT channel ADC 4, calibration.    calibration (2000 turns / 120 Ohm burden resistor = 16.66)
  
  if (ACAC)
  {
    if (CT1) ct1.voltage(0, Vcal, phase_shift);          // ADC pin, Calibration, phase_shift
    if (CT2) ct2.voltage(0, Vcal, phase_shift);          // ADC pin, Calibration, phase_shift
    if (CT3) ct3.voltage(0, Vcal, phase_shift);          // ADC pin, Calibration, phase_shift
    if (CT4) ct4.voltage(0, Vcal, phase_shift);          // ADC pin, Calibration, phase_shift
  }

attachInterrupt(pulse_countINT, onPulse, FALLING);     // Attach pulse counting interrupt pulse counting 
 
} //end SETUP

void loop()
{
  
  if (ACAC) {
    delay(200);                         //if powering from AC-AC allow time for power supply to settle    
    emontx.Vrms=0;                      //Set Vrms to zero, this will be overwirtten by CT 1-4
  }
  
  if (CT1) 
  {
   if (ACAC) 
   {
     ct1.calcVI(no_of_half_wavelengths,timeout); 
     emontx.power1=ct1.realPower;
     //emontx.pf1 = ct1.powerFactor * 100;
     emontx.Vrms=ct1.Vrms*100;
   }
   else
     emontx.power1 = ct1.calcIrms(no_of_samples)*Vrms;                               // Calculate Apparent Power 1  1480 is  number of sample
     //emontx.pf1 = 1;
  }
  
  if (CT2) 
  {
   if (ACAC) 
   {
     ct2.calcVI(no_of_half_wavelengths,timeout); 
     emontx.power2=ct2.realPower;
     //emontx.pf2 = ct2.powerFactor * 100;
     emontx.Vrms=ct2.Vrms*100;
   }
   else
     emontx.power2 = ct2.calcIrms(no_of_samples)*Vrms;                               // Calculate Apparent Power 1  1480 is  number of samples4
     //emontx.pf2 = 1;
  }

  if (CT3) 
  {
   if (ACAC) 
   {
     ct3.calcVI(no_of_half_wavelengths,timeout); 
     emontx.power3=ct3.realPower;
     //emontx.pf3 = ct3.powerFactor * 100;
     emontx.Vrms=ct3.Vrms*100;
   }
   else
     emontx.power3 = ct3.calcIrms(no_of_samples)*Vrms;                               // Calculate Apparent Power 1  1480 is  number of samples
     //emontx.pf3 = 1;
  }

  emontx.Ptotal = emontx.power1 + emontx.power2 + emontx.power3;

  if (CT4) 
  {
   if (ACAC) 
   {
     ct4.calcVI(no_of_half_wavelengths,timeout); emontx.power4=ct4.realPower;
     emontx.Vrms=ct4.Vrms*100;
   }
   else
     emontx.power4 = ct4.calcIrms(no_of_samples)*Vrms;                               // Calculate Apparent Power 1  1480 is  number of samples
  }

  

  if (!ACAC){                                                                                         //read battery voltage if powered by DC
    int battery_voltage=analogRead(battery_voltage_pin) * 0.681322727;     //6.6V battery = 3.3V input = 1024 ADC
    emontx.Vrms = battery_voltage;
  }

  
  if (DS18B20_STATUS==1) 
    {
      digitalWrite(DS18B20_PWR, HIGH); Sleepy::loseSomeTime(50); 
      for(int j=0;j<numSensors;j++) sensors.setResolution(allAddress[j], TEMPERATURE_PRECISION);      // and set the a to d conversion resolution of each.
      sensors.requestTemperatures();
      Sleepy::loseSomeTime(ASYNC_DELAY); //Must wait for conversion, since we use ASYNC mode 
      for(byte j=0;j<numSensors;j++) emontx.temp[j]=get_temperature(j); 
      digitalWrite(DS18B20_PWR, LOW);
    } 
  
  if (pulseCount)                                                       // if the ISR has counted some pulses, update the total count
  {
    cli();                                                             // Disable interrupt just in case pulse comes in while we are updating the count
    emontx.pulseCount += pulseCount;
    pulseCount = 0;
    sei();                                                            // Re-enable interrupts
  }
 
  if (debug==1) {
    
    Serial.print(emontx.power1); Serial.print(" ");
    Serial.print(emontx.power2); Serial.print(" ");
    Serial.print(emontx.power3); Serial.print(" ");
    Serial.print(emontx.power4); Serial.print(" ");
    Serial.print(emontx.Vrms); Serial.print(" ");
    Serial.print(emontx.Ptotal); Serial.print(" ");
    //Serial.print(emontx.pf1); Serial.print(" ");
    //Serial.print(emontx.pf2); Serial.print(" ");
    //Serial.print(emontx.pf3); Serial.print(" ");
    if (DS18B20_STATUS==1){
      for(byte j=0;j<numSensors;j++){
        Serial.print(emontx.temp[j]);
       Serial.print(" ");
      } 
    }
    Serial.print(emontx.pulseCount); Serial.print(" ");
    Serial.println(" ");
    delay(50);
  } 
  
  

  if (ACAC) {digitalWrite(LEDpin, HIGH); delay(200); digitalWrite(LEDpin, LOW);}    // flash LED if powered by AC
  
  send_rf_data();                                                       // *SEND RF DATA* - see emontx_lib
    
    if (ACAC)                                                               //If powered by AC-AC adaper (mains power) then delay instead of sleep
    {
     delay(TIME_BETWEEN_READINGS*1000);
    }
    
    else                                                                  //if powered by battery then sleep rather than dealy and disable LED to lower energy consumption  
      Sleepy::loseSomeTime(TIME_BETWEEN_READINGS*1000);                                  // sleep or delay in seconds 

}

void send_rf_data()
{
  rf12_sleep(RF12_WAKEUP);                                   
  rf12_sendNow(0, &emontx, sizeof emontx);                           //send temperature data via RFM12B using new rf12_sendNow wrapper
  rf12_sendWait(2);
  if (!ACAC) rf12_sleep(RF12_SLEEP);                             //if powred by battery then put the RF module into sleep inbetween readings 
}


double calc_rms(int pin, int samples)
{
  unsigned long sum = 0;
  for (int i=0; i<samples; i++) // 178 samples takes about 20ms
  {
    int raw = (analogRead(0)-512);
    sum += (unsigned long)raw * raw;
  }
  double rms = sqrt((double)sum / samples);
  return rms;
}

// The interrupt routine - runs each time a falling edge of a pulse is detected
void onPulse()                  
{  
  if ( (millis() - pulsetime) > min_pulsewidth) {
    pulseCount++;         //calculate wh elapsed from time between pulses
    pulsetime=millis(); 
  } 
}

int get_temperature(byte sensor)                
{
  float temp=(sensors.getTempC(allAddress[sensor]));
  if ((temp<125.0) && (temp>-55.0)) return(temp*10);            //if reading is within range for the sensor convert float to int ready to send via RF
}

Mmm, looks like the RFM card might have died. @TrystanLea @Robert.Wall any suggestions?

That’s than to bad.
Is it possible to check it with a 433 MHz all kind of receivers spare parts, i.e. like this: 433Mhz RF transmitter en receiver link kit - 433MKIT.

Or is a RFM69Pi necceary?

@Bill.Thomson I think mentioned that rtl_433 has a decoder for emonTX, but I might have been wrong. rtl_433 also has an MQTT publishing mechanism.

What hardware do you have? Is it an emonPi or an emonBase? If it is an emonBase, what is the Radio on it (pictures of the different modules that we have used over time are here: Learn | OpenEnergyMonitor

As above. I think it must be recent but good to check.

It seems to be the The RFM69CW - 433 MHz module.

That’s OK. If you had the old RFM12B radio, that would never work as the software for the RFM69 is totally different. As it is, the modern update should work.

The RFM69Pi board isn’t shorting onto the header pins?

@emontxv3 if re sitting the rfm69pi board on the pi doesnt make any difference and the antennae is not shorting to the pi header pins, drop us an email at [email protected] and we’d be happy to send a replacement

Thank you.
What is written by “if re sitting”?

Push it back on, check for corrosion on the pins. Clean if you can.

Nope. You were right. There is indeed a rtl_433 decoder for emonTx data.

Ref: Receiving emonTX transmissions with rtl_433 | Archived Forum

From: GitHub - merbanan/rtl_433: Program to decode radio transmissions from devices on the ISM bands (and other frequencies)

Not sure how it works, but does it assume the older data format?