Light Manager to react to existing Somfy remotes

Benutzeravatar
jbmedia
Administrator
Beiträge: 4446
Registriert: Mi 17. Feb 2016, 13:42

Mi 7. Jul 2021, 13:14

genfersee hat geschrieben:
Di 6. Jul 2021, 12:59
Dear jbmedia team,
Did you manage to reproduce the issue on your side?
No, this is very strange. First please make a firmware update (with preselected option load from server) to make sure, that the latest version is installed. In the very first release of V10 the behaviour of consecutive commands was a little different. However, even with that firmware it would not explain the log entrys. It seems that the curl command is going crazy.

When a command comes in and the Light-Manager is busy, the HTTP GET will wait in the queue until the Light-Manager is available again. In the first firmware the HTTP GET was responded immediately even when busy, but the command was discarded. That's not nice, therefore it was changed to the previous method. However, both variants don't explain why the curl command is sent over and over again.

You can try it within the browser, just copy the GET into the adddress field and press return:

192.168.xxx.xxx/control?cmd=down,typ,som,did,98DC09,aid,11,acmd,0,seq,3,smk,0,0&id=11

Then press F5 to trigger the command several times. You will see that it takes 1-2 seconds until the command is processed and the next command accepted. There are only as many entries in the log as the browser has triggered the command succesfully.
Wir wünschen viel Spaß mit den Produkten und einen erfolgreichen Tag! Ihr jbmedia Team :)

Benutzeravatar
jbmedia
Administrator
Beiträge: 4446
Registriert: Mi 17. Feb 2016, 13:42

Mi 7. Jul 2021, 13:20

sparky hat geschrieben:
Do 10. Jun 2021, 20:40
Now I'm reading this, I realise that during a couple of update, I had also an issue with one of the sunscreens. We have 2 vertical screens and 1 horizontal, all Somfy RTS. After updating to early 9.x in that time, one of the vertical screens stopped working. When trying to do the pairing again, it only worked when I chose a new code.
After updating to 9.7 or 9.9 and also to X, the horizontal screen stopped working. Also after apairing with a new code, it worked again. I didn't try downgrading the firmware of the Lightmanager (Air), because I didn't mind doing the pairing again.
Somfy RTS uses a counter, which has to be synced between the transmitter and the recevier. If it gets out of sync, the command will not be accepted anymore. The counter state is preserved during firmware updates usually. There was once an update which might have screwed this in some cases, with the effect of the commands stopped working. However, this problem should not arrive anymore.

Note: When downgrading over multiple versions it could happen again. There is actually no reason to do that anyway and we don't recommend that.
Wir wünschen viel Spaß mit den Produkten und einen erfolgreichen Tag! Ihr jbmedia Team :)

genfersee
Beiträge: 55
Registriert: Fr 10. Mai 2019, 11:36
Wohnort: Switzerland

Mo 12. Jul 2021, 18:21

jbmedia hat geschrieben:
Mi 7. Jul 2021, 13:14
genfersee hat geschrieben:
Di 6. Jul 2021, 12:59
Dear jbmedia team,
Did you manage to reproduce the issue on your side?
No, this is very strange. First please make a firmware update (with preselected option load from server) to make sure, that the latest version is installed. In the very first release of V10 the behaviour of consecutive commands was a little different. However, even with that firmware it would not explain the log entrys. It seems that the curl command is going crazy.

When a command comes in and the Light-Manager is busy, the HTTP GET will wait in the queue until the Light-Manager is available again. In the first firmware the HTTP GET was responded immediately even when busy, but the command was discarded. That's not nice, therefore it was changed to the previous method. However, both variants don't explain why the curl command is sent over and over again.

You can try it within the browser, just copy the GET into the adddress field and press return:

192.168.xxx.xxx/control?cmd=down,typ,som,did,98DC09,aid,11,acmd,0,seq,3,smk,0,0&id=11

Then press F5 to trigger the command several times. You will see that it takes 1-2 seconds until the command is processed and the next command accepted. There are only as many entries in the log as the browser has triggered the command succesfully.
Hello!
I just updated Air Studio to version 9.9.5.4 to 10. Then I updated the FW (from server), from 9.9 to 10.0.
I still get the same crazy endless loop behaviour with curl as described in my previous messages.

I tried sending in a quick way 5 times the same command via Safari browser, as you suggested:

Code: Alles auswählen

http://192.168.33.21/control?cmd=down,typ,som,did,F34CCA,aid,12,acmd,0,seq,3,smk,1,0&id=12
... and checked the logs:

Code: Alles auswählen

18:13:00	
192.168.33.45 > down,som,did,F34CCA,aid,12,off,seq,3,smk,1,0
18:12:59	
192.168.33.45 > down,som,did,F34CCA,aid,12,off,seq,3,smk,1,0
18:12:58	
192.168.33.45 > down,som,did,F34CCA,aid,12,off,seq,3,smk,1,0
2 commands are missing, but the Light Manager remain responsive and does not enter in the endless crazy loop like with curl.

Why such behaviour difference between FW 9.9 and 10?
genfersee
Beiträge: 55
Registriert: Fr 10. Mai 2019, 11:36
Wohnort: Switzerland

Do 15. Jul 2021, 08:44

genfersee hat geschrieben:
Fr 21. Mai 2021, 11:20
No problem, this is not a major issue. Something be messed up in my Windows language configuration.
I will try to compare Windows language parameters on my old Windows PC on which the issue did no appear. :)
By the way, this one is fixed: I had some strange "English (Switzerland)" set for app display language in my Windows.
Now every GUI is displyed correctly.
genfersee
Beiträge: 55
Registriert: Fr 10. Mai 2019, 11:36
Wohnort: Switzerland

Mo 19. Jul 2021, 10:44

Dear jbmedia team,
Do you have some other suggestions or idea I could try to undestand the issue?
Did you also reproduce the issue with curl in a terminal? If you send 2 curl commands in a row in less than 1 sec in a terminal, you should see the Light manager enters in this never ending loop (with FW 10 only).
Kind regards!
genfersee hat geschrieben:
Mo 12. Jul 2021, 18:21
jbmedia hat geschrieben:
Mi 7. Jul 2021, 13:14
genfersee hat geschrieben:
Di 6. Jul 2021, 12:59
Dear jbmedia team,
Did you manage to reproduce the issue on your side?
No, this is very strange. First please make a firmware update (with preselected option load from server) to make sure, that the latest version is installed. In the very first release of V10 the behaviour of consecutive commands was a little different. However, even with that firmware it would not explain the log entrys. It seems that the curl command is going crazy.

When a command comes in and the Light-Manager is busy, the HTTP GET will wait in the queue until the Light-Manager is available again. In the first firmware the HTTP GET was responded immediately even when busy, but the command was discarded. That's not nice, therefore it was changed to the previous method. However, both variants don't explain why the curl command is sent over and over again.

You can try it within the browser, just copy the GET into the adddress field and press return:

192.168.xxx.xxx/control?cmd=down,typ,som,did,98DC09,aid,11,acmd,0,seq,3,smk,0,0&id=11

Then press F5 to trigger the command several times. You will see that it takes 1-2 seconds until the command is processed and the next command accepted. There are only as many entries in the log as the browser has triggered the command succesfully.
Hello!
I just updated Air Studio to version 9.9.5.4 to 10. Then I updated the FW (from server), from 9.9 to 10.0.
I still get the same crazy endless loop behaviour with curl as described in my previous messages.

I tried sending in a quick way 5 times the same command via Safari browser, as you suggested:

Code: Alles auswählen

http://192.168.33.21/control?cmd=down,typ,som,did,F34CCA,aid,12,acmd,0,seq,3,smk,1,0&id=12
... and checked the logs:

Code: Alles auswählen

18:13:00	
192.168.33.45 > down,som,did,F34CCA,aid,12,off,seq,3,smk,1,0
18:12:59	
192.168.33.45 > down,som,did,F34CCA,aid,12,off,seq,3,smk,1,0
18:12:58	
192.168.33.45 > down,som,did,F34CCA,aid,12,off,seq,3,smk,1,0
2 commands are missing, but the Light Manager remain responsive and does not enter in the endless crazy loop like with curl.

Why such behaviour difference between FW 9.9 and 10?
Benutzeravatar
jbmedia
Administrator
Beiträge: 4446
Registriert: Mi 17. Feb 2016, 13:42

Mo 19. Jul 2021, 16:11

Great that the translation issues has been fixed!

Concerning curl we can't reproduce the effect. See video.

Wir wünschen viel Spaß mit den Produkten und einen erfolgreichen Tag! Ihr jbmedia Team :)

genfersee
Beiträge: 55
Registriert: Fr 10. Mai 2019, 11:36
Wohnort: Switzerland

Mo 19. Jul 2021, 16:57

Many thanks for your funny video! Great music too :)
I also upgraded to FW10.1.

I saw you were using Windows for sending the curl commands, so I did the same and I also could not reproduce the issue when sending curl commands under Windows!

Then tried again on a terminal on Mac and reproduced the issue from first try....!
All the tests I did earlier were on a Mac.

So you may try sending the curl commands on a native terminal on Mac?
genfersee
Beiträge: 55
Registriert: Fr 10. Mai 2019, 11:36
Wohnort: Switzerland

Di 20. Jul 2021, 13:58

Sorry, one detail was missing in my description to reproduce the issue.
If you send the same command via the same terminal console many times, it looks like the issues does not appear.

You have in fact to open 2 terminal consoles (I used a Mac) and sent with 500ms difference 2 different commands like:

In terminal 1:

Code: Alles auswählen

curl -vs "http://192.168.33.21/control?cmd=down,typ,som,did,98DC09,aid,11,acmd,0,seq,3,smk,0,0&id=11"
In terminal 2:

Code: Alles auswählen

curl -vs "http://192.168.33.21/control?cmd=down,typ,som,did,FCCA,aid,12,acmd,0,seq,3,smk,1,0&id=12"
With this, I get the issue reproduced 100% of time!

Terminal 1 looks like:

Code: Alles auswählen

$ curl -vs "http://192.168.33.21/control?cmd=down,typ,som,did,98DC09,aid,11,acmd,0,seq,3,smk,0,0&id=11"
*   Trying 192.168.33.21...
* TCP_NODELAY set
* Connected to 192.168.33.21 (192.168.33.21) port 80 (#0)
> GET /control?cmd=down,typ,som,did,98DC09,aid,11,acmd,0,seq,3,smk,0,0&id=11 HTTP/1.1
> Host: 192.168.33.21
> User-Agent: curl/7.64.1
> Accept: */*
> 
Terminal 2 looks like:

Code: Alles auswählen

$ curl -vs "http://192.168.33.21/control?cmd=down,typ,som,did,F34CCA,aid,12,acmd,0,seq,3,smk,1,0&id=12"
*   Trying 192.168.33.21...
* TCP_NODELAY set
* Connected to 192.168.33.21 (192.168.33.21) port 80 (#0)
> GET /control?cmd=down,typ,som,did,F34CCA,aid,12,acmd,0,seq,3,smk,1,0&id=12 HTTP/1.1
> Host: 192.168.33.21
> User-Agent: curl/7.64.1
> Accept: */*
> 
The Light manager logs shows the infinite loop is ongoing... and as you can see the 2 terminals are getting stuck (no 200 ok answer) until I Ctrl^C one of them. Then the second ones finishes correctly and shows 200 ok answer.

Code: Alles auswählen

13:56:00	
192.168.33.45 > down,som,did,F34CCA,aid,12,off,seq,3,smk,1,0

*** I did CTRL^C ***

13:55:59	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:58	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:56	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:55	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:54	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:52	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:50	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:49	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:47	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:46	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:44	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:43	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:41	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:38	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:36	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:35	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
13:55:32	
192.168.33.45 > down,som,did,98DC09,aid,11,off,seq,3,smk,0,0
Benutzeravatar
jbmedia
Administrator
Beiträge: 4446
Registriert: Mi 17. Feb 2016, 13:42

Di 20. Jul 2021, 15:16

What it is the purpose of this? It seems you are trying to create a situation to overflow the webserver of the Light-Manager without good reason. Before we continue evaluating this "problem", please let us know what it is good for.
Wir wünschen viel Spaß mit den Produkten und einen erfolgreichen Tag! Ihr jbmedia Team :)

genfersee
Beiträge: 55
Registriert: Fr 10. Mai 2019, 11:36
Wohnort: Switzerland

Di 20. Jul 2021, 15:48

My real usecase is the following:
I have 4 Somfy blinds configured in the Light Manager. I am using an interface tool called Homebridge which allows me to pilot my 4 blinds in Apple Homekit on iOS. So Homebridge is just an interface between Homekit and Light Manager and send the commands to the Light Manager to pilot the 4 blinds.

I have some scenario "close all 4 blinds" and "open all 4 blinds". When launching for example scenario "open all 4 blinds" in Homekit, Homebridge translates and sends the 4 different "open" commands to the Light Manager. The 4 commands are sent one after the other with a little delay between them. This causes the issue to happen. Of course, if I open the 4 blinds one by one, waiting for 3 seconds between pressing each blind in Homekit, then issue does not appear.

In fact, it is not so causing overflow since the issue only appears when sending only 2 different commands with short delay between them.

Sending 2 different commands via 2 different terminals is just a way for you to reproduce the issue.

This was working great until FW 9.9, so it is a pity to have such issue which would force me to downgrade and remain stuck on FW 9.9...
Antworten