Page 1 of 2

Somfy device has no status update in Domoticz

Posted: Tuesday 01 August 2023 14:53
by Rik60
I am using 6 Somfy IO devices, 3 RollerShutter, 2 ExtoriorScreen and 1 Awning. These devices are controlled by a handheld remote, Tahoma box with app on mobile phone and Domoticz with Somfy plugin. The 3 Roller Shutter and 2 Extorior Screens are working fine, every command is executed and status is updated in Tahoma box and Domoticz. Only the Awning has a problem, the commands are executed but as the device has finished the status in Domoticz is not updated (it is in Tahoma box). I have deleted this device in Domoticz and Tahoma box and add it again, same problem. I am using a Raspberry 3B with Bullseye 32 bit and Domoticz 20232. I've had the same problem with Buster and earlier versions of Domoticz. I can't find a problem, are there more users with this problem and is there a solution? Attatched is a Somfy and Domoticz log.
Thanks.

Re: Somfy device has no status update in Domoticz

Posted: Friday 11 August 2023 21:26
by Rik60
Update:
Found a closed issue on Github (#53), and edited utils.py and plugin.py. It solved the awning update problem but with those 2 changes the 2 exterior screens are continius updating and status are inverted. If only the utils.py is edited the awning is updating but open/close commands are inverted.
Has anyone a clou?

Re: Somfy device has no status update in Domoticz

Posted: Saturday 12 August 2023 8:25
by madpatrick
Rik60 wrote: Friday 11 August 2023 21:26 Update:
Found a closed issue on Github (#53), and edited utils.py and plugin.py. It solved the awning update problem but with those 2 changes the 2 exterior screens are continius updating and status are inverted. If only the utils.py is edited the awning is updating but open/close commands are inverted.
Has anyone a clou?
You can reverse the postion or state in domoticz if you edit the switch

Re: Somfy device has no status update in Domoticz

Posted: Saturday 12 August 2023 8:28
by madpatrick
Rik60 wrote: Friday 11 August 2023 21:26 Update:
Found a closed issue on Github (#53), and edited utils.py and plugin.py.
What have you changed
In the Beta and Master both has the issue#53 adopted

Re: Somfy device has no status update in Domoticz

Posted: Saturday 12 August 2023 8:28
by madpatrick
madpatrick wrote: Saturday 12 August 2023 8:28
Rik60 wrote: Friday 11 August 2023 21:26 Update:
Found a closed issue on Github (#53), and edited utils.py and plugin.py.
What have you changed
In the Beta and Master both has the issue#53 adopted
Are you using the latest version?

Re: Somfy device has no status update in Domoticz

Posted: Saturday 12 August 2023 10:28
by Rik60
madpatrick wrote: Saturday 12 August 2023 8:28
madpatrick wrote: Saturday 12 August 2023 8:28
Rik60 wrote: Friday 11 August 2023 21:26 Update:
Found a closed issue on Github (#53), and edited utils.py and plugin.py.
What have you changed
In the Beta and Master both has the issue#53 adopted
Are you using the latest version?
I can't find the changes in utils.py and plugin.py (both on Github) as destribed in #53 on Github, so it did this myself. If i try to update the plugin by 'git pull' (i have to use 'sudo git pull') -> allready up to date. I am using 4.2.16. The last changes on github are 7 months (plugin.py) and 6 months (utils.py) ago? I have followed the link in the plugin to get on Github. I think there is still a problem somewhere because every 20 seconds i see updates from the exterior screens when they are not moving. I have no experience with programming in Python but i can do some small changes in the textfiles.

Re: Somfy device has no status update in Domoticz

Posted: Saturday 12 August 2023 18:24
by madpatrick
Rik60 wrote: Saturday 12 August 2023 10:28
madpatrick wrote: Saturday 12 August 2023 8:28
madpatrick wrote: Saturday 12 August 2023 8:28
What have you changed
In the Beta and Master both has the issue#53 adopted
Are you using the latest version?
I can't find the changes in utils.py and plugin.py (both on Github) as destribed in #53 on Github, so it did this myself. If i try to update the plugin by 'git pull' (i have to use 'sudo git pull') -> allready up to date. I am using 4.2.16. The last changes on github are 7 months (plugin.py) and 6 months (utils.py) ago? I have followed the link in the plugin to get on Github. I think there is still a problem somewhere because every 20 seconds i see updates from the exterior screens when they are not moving. I have no experience with programming in Python but i can do some small changes in the textfiles.
Beta branch is 4.2.18b and has the changes incorporated

Re: Somfy device has no status update in Domoticz

Posted: Sunday 13 August 2023 21:50
by Rik60
How can i install the beta, have i first to remove the master, or can i simply replace the 3 modified py files in the current plugin?

Re: Somfy device has no status update in Domoticz

Posted: Monday 14 August 2023 20:36
by madpatrick
Rik60 wrote: Sunday 13 August 2023 21:50 How can i install the beta, have i first to remove the master, or can i simply replace the 3 modified py files in the current plugin?
You can easlitly change between branches back and forth

Code: Select all

git checkout beta

Re: Somfy device has no status update in Domoticz

Posted: Thursday 17 August 2023 11:23
by Rik60
I switched to the beta, the plugin is not starting now. In the hardware list i can't select the type "Somfy Tahoma or Connexoon plugin", it is not in the list after a restart of Domoticz service. If i type "git show" in a terminal window (putty) it is showing that the beta is active (4.2.18b).
Switching back to the master version of the plugin and restart of Domoticz the "Somfy Tahoma or Connexoon plugin" is back in the list and the plugin is starting without problems.

Re: Somfy device has no status update in Domoticz

Posted: Thursday 17 August 2023 15:13
by madpatrick
Rik60 wrote: Thursday 17 August 2023 11:23 I switched to the beta, the plugin is not starting now. In the hardware list i can't select the type "Somfy Tahoma or Connexoon plugin", it is not in the list after a restart of Domoticz service. If i type "git show" in a terminal window (putty) it is showing that the beta is active (4.2.18b).
Switching back to the master version of the plugin and restart of Domoticz the "Somfy Tahoma or Connexoon plugin" is back in the list and the plugin is starting without problems.
Ok. I’ll check

Re: Somfy device has no status update in Domoticz

Posted: Saturday 19 August 2023 12:53
by Rik60
I did a clean software install on a raspberry pi 2B (Bullseye 32 bit, Domoticz 2023_2, Plugin manager and Somfy plugin), i can control the somfy devices with the master version of the plugin. If i switch to the beta version, i have the same problem with selecting the hardware type on the "Hardware" tab. Just to be shure it's not a problem on my side. I also have the same problems with the awning status update.

Re: Somfy device has no status update in Domoticz

Posted: Saturday 19 August 2023 14:08
by madpatrick
Beta is fixed.
Somewhere a typo. Now working

Re: Somfy device has no status update in Domoticz

Posted: Saturday 19 August 2023 16:35
by Rik60
Thanks for the update.
I updated the beta and switched to it. The plugin is now starting but in the Domoticz log i see some problems and the devices are not working...

Re: Somfy device has no status update in Domoticz

Posted: Wednesday 23 August 2023 21:18
by Rik60
I have tried some modifications in the beta plugin.py file, if i remove the b in the version number in line 8, so 4.2.20b into 4.2.20 the plugin is starting and i can control the blinds. However every 20 seconds the 2 exterior screens have a status update, even when they are not moving. I think there is still an issue with the plugin, i have too little knowlegde of the software to see what is where going wrong. Hopefully you can find the problem.
Thanks for your help and time you spent on this.

Re: Somfy device has no status update in Domoticz

Posted: Thursday 24 August 2023 22:31
by Rik60
I have made some changes in plugin.py version 4.2.20d. First i removed in line 8 the d in Version="4.2.20d" The plugin is starting now (workaround). I also added line 389, this stopped the continious updating of the 2 exterior screens.
I discovered an other problem with the awning, When giving the command "out" the awning is going out and the status is updating. When finished the status was ok. After the command "In" the awning was moving in, after the first update the updates stopt, there was an error in the Somfy app on my mobile phone and couldn't control the awning with the Somfy app. At this moment the awning was "in". After a second "In" command with the Domoticz there was a status update and the error was gone.

Re: Somfy device has no status update in Domoticz

Posted: Friday 25 August 2023 20:35
by madpatrick
Can you post your change as text with code brackets.
That make is readable and i can copy your changes

Re: Somfy device has no status update in Domoticz

Posted: Saturday 26 August 2023 10:40
by Rik60
Find the main change in the attatched text file Wijziging.txt. This change worked for me for the continious updating of the 2 exterior screens. I am not sure that this is the real solution, it is a bit strange but it worked.
This change will not solve the plugin start problem and the awning problem in the Somfy app.

If you like i can test a new version of the plugin.

Re: Somfy device has no status update in Domoticz

Posted: Saturday 26 August 2023 13:35
by madpatrick
Thanks for sharing.

Code: Select all

Change:

if (state["name"] == "core:DeploymentState"):
     level = int(state["value"]) #Don't invert awning open/close percentage
     status_num = 1


in:

if (state["name"] == "core:DeploymentState"):
    level = int(state["value"]) 
    level = 100 - level #invert open/close percentage.
    status_num = 1
I cannot test this since i do not have this device.

Re: Somfy device has no status update in Domoticz

Posted: Saturday 26 August 2023 17:41
by Rik60
madpatrick wrote: Saturday 26 August 2023 13:35 Thanks for sharing.

Code: Select all

Change:

if (state["name"] == "core:DeploymentState"):
     level = int(state["value"]) #Don't invert awning open/close percentage
     status_num = 1


in:

if (state["name"] == "core:DeploymentState"):
    level = int(state["value"]) 
    level = 100 - level #invert open/close percentage.
    status_num = 1
I cannot test this since i do not have this device.
I updated the beta and running now 4.2.20. The plugin is starting and the 2 exterior screens are not updating if they are not moving. So, the 3 rollingshutters and 2 exterior screens are working fine now, status updating is ok. The only problem now is the awning. I have to understand how the software works, maybe i can find a problem.
Thanks.