Having just set up an emonpi from the latest downloaded emonscripts generated image, I wanted to know if the front end FW had been updated (I can’t recall if I maybe played with it at some point), quickest way to see the emonpi FW version is (or so I thought) to restart emonhub whilst watching the log . . .
It seems I’m now running FW version “OK” and the emonpi’s rfm settings (baseid, group, freq and quiet mode) are “5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)”.
2021-01-27 00:27:26,987 INFO MainThread RFM2Pi device firmware version: OK
2021-01-27 00:27:26,988 INFO MainThread RFM2Pi device current settings: 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
Somethings not quite right there!
I haven’t looked that deep into yet it as it’s late but wanted to note the issue for debugging.
I have run updates more than once, this is the last log. It shows I had “emonpi” FW selected for an update “all”. It shows the emonpi repo is upto date with emonpi/master, it shows a successful flash of “compiled/latest.hex” FW, so I would expect to have version 2.9.3 DS FW going by the changelog page.
LAST ENTRIES ON THE LOG FILE
Starting update via service-runner-update.sh (v3.0) >
- emonSD version: emonSD-24Jul20
- supported images: emonSD-24Jul20 emonSD-02Oct19 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
Already up to date.
-------------------------------------------------------------
Main Update Script
-------------------------------------------------------------
Date: Wed 27 Jan 00:45:49 GMT 2021
EUID: 1000
openenergymonitor_dir: /opt/openenergymonitor
type: all
firmware: emonpi
Reading package lists...
Building dependency tree...
Reading state information...
python3-pip is already the newest version (18.1-5+rpt1).
The following package was automatically installed and is no longer required:
rpi-eeprom-images
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 81 not upgraded.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: redis in /home/pi/.local/lib/python3.7/site-packages (3.5.3)
Hardware detected: EmonPi
Stopping emonPiLCD service
Display update message on LCD
Running apt-get update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists...
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
Already up to date.
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
Already up to date.
Start emonhub update script:
-------------------------------------------------------------
emonHub update
-------------------------------------------------------------
git fetch --all --prune -v
Fetching origin
From https://github.com/openenergymonitor/emonhub
= [up to date] stable -> origin/stable
= [up to date] MQTTSubscriberInterfacer -> origin/MQTTSubscriberInterfacer
= [up to date] emon-pi -> origin/emon-pi
= [up to date] env_example -> origin/env_example
= [up to date] fix_reply_http_interfacer -> origin/fix_reply_http_interfacer
= [up to date] include_serial_number -> origin/include_serial_number
= [up to date] lanip-status -> origin/lanip-status
= [up to date] master -> origin/master
= [up to date] redis_config_interface -> origin/redis_config_interface
= [up to date] sdm120_check_keys -> origin/sdm120_check_keys
= [up to date] sdm120_datafield_config -> origin/sdm120_datafield_config
= [up to date] unitless_decoder -> origin/unitless_decoder
git status
On branch stable
Your branch is up to date with 'origin/stable'.
Untracked files:
(use "git add ..." to include in what will be committed)
src/src
nothing added to commit but untracked files present (use "git add" to track)
git pull origin stable
From https://github.com/openenergymonitor/emonhub
* branch stable -> FETCH_HEAD
Already up to date.
Running emonhub install & update script emonSD_pi_env:1
--------------------------------------------------------------------
Reading package lists...
Building dependency tree...
Reading state information...
python3-configobj is already the newest version (5.0.6-3).
python3-pymodbus is already the newest version (2.1.0+dfsg-1).
python3-serial is already the newest version (3.4-4).
bluetooth is already the newest version (5.50-1.2~deb10u1+rpt2).
libbluetooth-dev is already the newest version (5.50-1.2~deb10u1+rpt2).
python3-pip is already the newest version (18.1-5+rpt1).
The following package was automatically installed and is no longer required:
rpi-eeprom-images
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 81 not upgraded.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: paho-mqtt in /usr/local/lib/python3.7/dist-packages (1.5.0)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.21.0)
Requirement already satisfied: pybluez in /usr/local/lib/python3.7/dist-packages (0.23)
Requirement already satisfied: py-sds011 in /usr/local/lib/python3.7/dist-packages (0.9)
Requirement already satisfied: sdm_modbus in /usr/local/lib/python3.7/dist-packages (0.4.4)
Requirement already satisfied: pyserial in /usr/lib/python3/dist-packages (from py-sds011) (3.4)
Requirement already satisfied: pymodbus>=2.3.0 in /usr/local/lib/python3.7/dist-packages (from sdm_modbus) (2.4.0)
Requirement already satisfied: six>=1.15.0 in /usr/local/lib/python3.7/dist-packages (from pymodbus>=2.3.0->sdm_modbus) (1.15.0)
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: RPi.GPIO in /usr/lib/python3/dist-packages (0.7.0)
The user `emonhub' is already a member of `gpio'.
Unit /etc/systemd/system/[email protected] is masked, ignoring.
useradd: user 'emonhub' already exists
- installing emonhub.service
- 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
Start emoncms update:
-------------------------------------------------------------
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
* branch stable -> FETCH_HEAD
Already up to date.
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.2.4-4-g7c5f348
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
------------------------------------------
Updating /var/www/emoncms/Modules/config module
------------------------------------------
- git branch: stable
- git tags: 2.0.5-6-gd28ff1e
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
------------------------------------------
Updating /var/www/emoncms/Modules/dashboard module
------------------------------------------
- git branch: stable
- git tags: 2.0.8-9-gdc07d12
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
------------------------------------------
Updating /var/www/emoncms/Modules/device module
------------------------------------------
- git branch: stable
- git tags: 2.0.7
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
------------------------------------------
Updating /var/www/emoncms/Modules/graph module
------------------------------------------
- git branch: stable
- git tags: 2.0.9-3-g6c18b0c
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
------------------------------------------
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
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.3
- no local changes
- running: git pull origin stable
Fetching origin
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.2.6
- no local changes
- running: git pull origin stable
Already up to date.
Already on 'stable'
Your branch is up to date with 'origin/stable'.
------------------------------------------
Updating /opt/emoncms/modules/demandshaper module
------------------------------------------
- git branch: stable
- git tags: 2.1.2-3-ga216b3d
- no local changes
- running: git pull origin stable
Already up to date.
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.4
- no local changes
- running: git pull origin stable
Already up to date.
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.5-3-g109816f
- no local changes
- running: git pull origin stable
Already up to date.
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
Already up to date.
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
- /var/opt/emoncms/backup already exists
- /var/opt/emoncms/backup/uploads already exists
- restarting apache
Update Emoncms database
[]
-------------------------------------------------------------
EmonPi LCD Update
-------------------------------------------------------------
Reading package lists...
Building dependency tree...
Reading state information...
i2c-tools is already the newest version (4.1-1).
python3-smbus is already the newest version (4.1-1).
python3-gpiozero is already the newest version (1.5.1).
python3-rpi.gpio is already the newest version (0.7.0-0.1~bpo10+4).
The following package was automatically installed and is no longer required:
rpi-eeprom-images
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 81 not upgraded.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: redis in /home/pi/.local/lib/python3.7/site-packages (3.5.3)
Requirement already satisfied: paho-mqtt in /usr/local/lib/python3.7/dist-packages (1.5.0)
Requirement already satisfied: xmltodict in /home/pi/.local/lib/python3.7/site-packages (0.12.0)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.21.0)
- reinstalling emonPiLCD.service
Removed /etc/systemd/system/emonPiLCD.service.
Removed /etc/systemd/system/multi-user.target.wants/emonPiLCD.service.
- installing emonPiLCD.service
Created symlink /etc/systemd/system/multi-user.target.wants/emonPiLCD.service → /opt/openenergymonitor/emonpi/lcd/emonPiLCD.service.
Created symlink /etc/systemd/system/emonPiLCD.service → /opt/openenergymonitor/emonpi/lcd/emonPiLCD.service.
- Service ActiveState=active
Stopping emonPiLCD service
Display update message on LCD
-------------------------------------------------------------
EmonPi Firmware Update (Discrete Sampling)
-------------------------------------------------------------
Start ATmega328 serial upload using avrdude with latest.hex
chmod: cannot access '/var/log/emoncms/firmware.log': No such file or directory
Attempt: 1
avrdude -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 115200 -U flash:w:/opt/openenergymonitor/emonpi/firmware/compiled/latest.hex
Note: progress written to logfile /var/log/emoncms/firmware.log
avrdude-original: Using autoreset DTR on GPIO Pin 7
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
avrdude-original: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude-original: Device signature = 0x1e950f (probably m328p)
avrdude-original: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude-original: erasing chip
avrdude-original: reading input file "/opt/openenergymonitor/emonpi/firmware/compiled/latest.hex"
avrdude-original: input file /opt/openenergymonitor/emonpi/firmware/compiled/latest.hex auto detected as Intel Hex
avrdude-original: writing flash (18526 bytes):
Writing | ################################################## | 100% 2.64s
avrdude-original: 18526 bytes of flash written
avrdude-original: verifying flash memory against /opt/openenergymonitor/emonpi/firmware/compiled/latest.hex:
avrdude-original: load data flash data from input file /opt/openenergymonitor/emonpi/firmware/compiled/latest.hex:
avrdude-original: input file /opt/openenergymonitor/emonpi/firmware/compiled/latest.hex auto detected as Intel Hex
avrdude-original: input file /opt/openenergymonitor/emonpi/firmware/compiled/latest.hex contains 18526 bytes
avrdude-original: reading on-chip flash data:
Reading | ################################################## | 100% 2.05s
avrdude-original: verifying ...
avrdude-original: 18526 bytes of flash verified
avrdude-original done. Thank you.
SUCCESS: flash verifed
waiting for emonpi to stop controlling LCD
Starting emonPi LCD service..
-------------------------------------------------------------
emonPi update done: Wed 27 Jan 00:48:44 GMT 2021
-------------------------------------------------------------
restarting service-runner
and yet if I do a full shutdown and power cycle the lcd screen still says v2.9.2, the emonpi screen says (using the reset or rebooting doesn’t bring up the FW version screen).
Is the emonpi repo readme correct? is there a new hex for 2.9.3? has 2.9.3 FW been told it’s updated by editing the number in the sketch? These questions I will explore tomorrow maybe. Along with, why doesn’t the FW version and current status no longer work? Is it the FW or emonhub?
[Edit -So to answer my own question, it seems whilst 2.9.3 was added to the chancellor 21 days ago, the compiled hex files haven’t changed in 6mths, one mystery solved I guess]