Bindings fail after Pi general software upgrade
Posted: 16 Feb 2024 16:23
I use a Fibaro FGMS-001 PIR multi-sensor to turn on the heating in an area of my house when someone is detected in there. I have written my own Python system so no third party app is involved (such as Home Assistant). This has been working for several years, using Zway on a Raspberry Pi 3. I now use a Razberry 7 on my Pi, as of last July (2023). I use Raspian Bullseye on the Pi, and version 4.1.0 of Zway (build date 25/07/2023). I don't know when I last did a Pi Upgrade but possibly last May (2023). I ran an upgrade a week or so ago, as follows:
sudo apt update
sudo apt upgrade
This ran for around 20 minutes, so a lot of upgrades went on. Afterwards, the Fibaro PIR no longer triggered my Python program to activate the heating.
I had saved an SD Card image file before the upgrade, so restored that and everything worked again. The problem is re-producible.
This is what I did after the Upgrade to try to de-bug it (this comes from notes I made a while ago). Note that I have a second Fibaro PIR which also didn't work. Also note that the PIR changes, temperatures etc were coming though on the App and also to the Smarthome website, but not the bindings activation:
_____________________________________________________________
SETTING UP FIBARRO MOTION SENSOR:
Check that:
.syscommands is in /opt/z-way-server/automation. Check permissions are owner root, View Anyone, Change Only Owner, Excecute Nobody.
Check both Fibaro_Bindings_1.js and Fibaro_Bindings_2.js are in /opt/z-way-server/automation/MyFolder/.
Check their premissions are: Pi, Pi, Anyone, Only Owner, Only Owner. Can also be owned by root.
Check the following python files are in the Pi Documents folder:
Code_PIR_Action.py (Activates the heating on PIR detection)
Code_PIR2_Action.py
Code_Save_Fibaro_Sensor_Data.py (Logs temperature, luminescence, battery, tamper alarm)
Code_Save_Fibaro_Sensor2_Data.py
with permissions: pi, pi, Anyone, Only owner, Only owner (I don't think in fact that the Execute needs to be set).
On Windows, go to ZWay UI
http://192.168.1.xx:8083/smarthome/#/apps/instance
and under Load Custom Javascript File, check there are two entries with file name to be executed:
/MyFolder/Fibaro_Bindings_2.js
/MyFolder/Fibaro_Bindings_1.js
In Expert UI, under Configuration / Association, check the associations for devices 3 and 8 (being the Fibaro devices) are as per the screenshots in C:\Users\donal\Documents\Raspberry Pi-3a\Setup House Control.
___________________________________________________________________
Everything checked out OK, so no changes appear to have been made to the setup.
I can carry on without the Upgrade, but I think this needs investigation.
sudo apt update
sudo apt upgrade
This ran for around 20 minutes, so a lot of upgrades went on. Afterwards, the Fibaro PIR no longer triggered my Python program to activate the heating.
I had saved an SD Card image file before the upgrade, so restored that and everything worked again. The problem is re-producible.
This is what I did after the Upgrade to try to de-bug it (this comes from notes I made a while ago). Note that I have a second Fibaro PIR which also didn't work. Also note that the PIR changes, temperatures etc were coming though on the App and also to the Smarthome website, but not the bindings activation:
_____________________________________________________________
SETTING UP FIBARRO MOTION SENSOR:
Check that:
.syscommands is in /opt/z-way-server/automation. Check permissions are owner root, View Anyone, Change Only Owner, Excecute Nobody.
Check both Fibaro_Bindings_1.js and Fibaro_Bindings_2.js are in /opt/z-way-server/automation/MyFolder/.
Check their premissions are: Pi, Pi, Anyone, Only Owner, Only Owner. Can also be owned by root.
Check the following python files are in the Pi Documents folder:
Code_PIR_Action.py (Activates the heating on PIR detection)
Code_PIR2_Action.py
Code_Save_Fibaro_Sensor_Data.py (Logs temperature, luminescence, battery, tamper alarm)
Code_Save_Fibaro_Sensor2_Data.py
with permissions: pi, pi, Anyone, Only owner, Only owner (I don't think in fact that the Execute needs to be set).
On Windows, go to ZWay UI
http://192.168.1.xx:8083/smarthome/#/apps/instance
and under Load Custom Javascript File, check there are two entries with file name to be executed:
/MyFolder/Fibaro_Bindings_2.js
/MyFolder/Fibaro_Bindings_1.js
In Expert UI, under Configuration / Association, check the associations for devices 3 and 8 (being the Fibaro devices) are as per the screenshots in C:\Users\donal\Documents\Raspberry Pi-3a\Setup House Control.
___________________________________________________________________
Everything checked out OK, so no changes appear to have been made to the setup.
I can carry on without the Upgrade, but I think this needs investigation.