I think with the latest driver the status shouldn’t get muddles up any more. You will need to remove your devices and re add them to get the latest device profile though.
Also, I have implemented a fix so devices come online after a hub reboot and the open/close icons shouls no longer be reveresed. Let me know how you go.
The status of the shades is still an issue. After deleting the device and then rediscovering, the status is “open” when the device comes up and the icon is the one with the shades up. The actual shade position was closed (retracted or in the up position). When pressing the close button the status remains “open” even though the shades are closed. When pressing the open button the shades move to the open position (extended) and the status changes to “closing…”. After this the status remains “closing….” and it never changes again regardless of the shade position. On the device overview, the icon shows the shades in the down position and the status is also “closing…”. The behaviour applies to all shades and I did try the deleting and rediscovery several times. I also tried the discovery with the shades in the open (extended) position. The reported status when it comes up in this case is also “open” and it changes to “closing…” when the shades are moved but then remains with this status as described above regardless of the shade position.
I also tried the reboot of the Somfy hub but the devices still remain off-line until I remove them and rediscover them on the SmartThings app. This has become rather annoying because the Somfy hub reboots every month when there is a software update and after rediscovery I have to go through all my routines to name the devices. To remedy this I have turned automatic updating off on the Somfy hub.
Thanks anyway for trying to fix these issues. I hope that you can get to the bottom of it. Don’t hesitate to ask if you need any more information or testing from me.
Would it be possible to temporarily put the old driver back while you fix the issue with the new one, if it’s not too much trouble. The reason is that I noticed today that the history log of the shades change of position is a bit hit and miss while this appeared quite reliable with the old driver. Also, the status reporting of the old driver was better. Thanks in advance.
Thanks for that but unfortunately the testing still shows some issues. After discovery all devices come up with the status “Connected”. After some time the sun sensors show the lux value that they detect and the values are logged in history. The shades however always remain in the “Connected” status. The open, pause and close control buttons don’t work. The preset position button does work but shade position and status do not change (remain -% and Connected) when the shades move to a new position. I also tried changing the position of the shades with the remote control but also those changes are not detected.
I rebooted the Somfy hub but after the hub was up all devices remained off-line until I deleted and rediscovered them.
Sorry for all the bad news. The good thing is that all my routines still appear to work (did not fully test but in the edit mode the routine test worked). If you want to take your time to figure this out would it be possible to put the 2024-06-01 driver back if it’s not too much trouble? If you no longer have this or if it’s a lot of work, don’t worry about it (I can still use the pesky Somfy app).
There was one more issue I forgot to mention: with the preset setting the scale is reversed (with respect to the Somfy app and logic). What I mean is if you set it to 1% for example, the shades actually open to 99%. This might also be of interest for the shade status.
The release that I was testing is version 2024-09-06T11:33:23.967691656 not the one you mentioned. Perhaps that is the problem. The 2024-09-06 version is still the one available to me now. Should I wait until the newer version becomes available and retest or do you want the logs anyway?
To limit API calls, Somfy recommends calling the endpoints /setup/devices when starting the application to retrieve information from each device and then use the events. Is this what we are trying to do?
During my last test, the initialization was still complicated:
devices disconnected as long as a Somfy event is not present
a device with the connected status (the one I deleted/recreated after the driver update)
Yes, I am calling the endpoint /setup/devices to retrieve the initial state. I dont think that was the problem. There was a timing issue here actually. It seems the devices would initialise before the Smartthings hub had joined the network meaning the somfy hub was unreachable.
I have been doing some testing of different scenarios:
Somfy Hub reboot
Smartthings hub reboot
I have implemented more robust:
Health Checking - Devices are polled every 5 minutes (reccommended time inteval in smarttings documentation) to check if they are online. This will also be useful for devices that need battery replacement.
Handling of connection errors when API calls are made - If there is an error the driver will now refresh the connection to the somfy hub.
Initialisation - Devices should come online after smartthings hub reboots now. Ive implemented a connection retry every 30 seconds until connection is established. Device initial states should be retrieved by calling the endooint /setup/devices
Device Refresh - If you suspect a device is not responding, drag down with your finger to refresh it. This will check that its online and retrieve latest values.
My testing seems to show its working well. Let me know how you go though.
I removed all devices and added them again this morning with the driver version 2024-09-08T07:26:07.701470716. The issues all appear to be the same (I did not however reboot the Somfy hub this time). I captured the log as per your instructions and have copied the result into a text file that you can access via the link below. I did not know for sure how long you wanted the log to run but I left it for about 1 minute when it appeared to be repeating. If you need more input just let me know, I will be available the whole week.
Can you provide some more detail on the test you performed for the smartthings hub reboot where your shutter position wasn’t retrieved? I dont understand. Perhaps also provide the logs if you can.
Thanks, I just got the 2024-09-13 version this afternoon. The controls of the shades still don’t work (except the Preset position button) and the shade position does not show. I did reboot the Somfy hub this time and the devices all connected (great!). I ran another log for you which you can find with the link below.
Thanks for the update but unfortunately the issues are still the same for me. I captured a new log for you which you can find with the link below. I’m sorry that this is proving to be so tricky.