yep... just checked and it does that indeed. There are actually multiple duplicate calls in de capture, but....
I have had it 2 times that when switching to the APP after having it closed by using the back key, the switching didn't work anymore and had to stop the APP and start it again.
So while trying to sort this out what the condition is, it seems that you have a race condition in the logic. The 2 initial API REST calls are:
In case the getauth call returns last things work fine, but when returned first, the switches are disabled. So this happens when getauth gets (0xCE02) assigned in the below packet capture dump.
This are the packet capture details of the 3 capture sequences... 2 working and the last one failing.
Code: Select all
--- Start 1 -- working
192.168._Android 52740 (0xCE04) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=getauth
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=logincheck&username=&password=d41d8cd98f00b204e9800998ecf8427e
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52740 (0xCE04) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=getconfig
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=getconfig
192.168._Android 52740 (0xCE04) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=users
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52740 (0xCE04) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=users
192.168._Android 52740 (0xCE04) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=deletemobiledevice&uuid=ebbc8ba28d52ded7
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52740 (0xCE04) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52742 (0xCE06) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=plans
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=addmobiledevice&uuid=ebbc8ba28d52ded7&senderid=-snip-&name=SM-G9
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52742 (0xCE06) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=devices&filter=all&used=true&favorite=1&plan=2
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=switchlight&idx=449&switchcmd=On&passcode=
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=devices&filter=all&used=true&favorite=1&plan=2
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=switchlight&idx=449&switchcmd=Off&passcode=
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=devices&filter=all&used=true&favorite=1&plan=2
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
--- Start 2 -- working
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=logincheck&username=&password=d41d8cd98f00b204e9800998ecf8427e
192.168._Android 52740 (0xCE04) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=getauth
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52740 (0xCE04) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=getconfig
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=getconfig
192.168._Android 52740 (0xCE04) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=users
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52740 (0xCE04) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=users
192.168._Android 52740 (0xCE04) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=deletemobiledevice&uuid=ebbc8ba28d52ded7
192.168._Android 52742 (0xCE06) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=plans
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52740 (0xCE04) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52742 (0xCE06) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=addmobiledevice&uuid=ebbc8ba28d52ded7&senderid=-snip-&name=SM-G9
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=devices&filter=all&used=true&favorite=1&plan=2
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=switchlight&idx=449&switchcmd=On&passcode=
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=devices&filter=all&used=true&favorite=1&plan=2
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=switchlight&idx=449&switchcmd=Off&passcode=
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=devices&filter=all&used=true&favorite=1&plan=2
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
--- Start 3 -- NOT working
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=getauth
192.168._Android 52740 (0xCE04) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=logincheck&username=&password=d41d8cd98f00b204e9800998ecf8427e
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52740 (0xCE04) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=getconfig
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=getconfig
192.168._Android 52740 (0xCE04) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=users
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52740 (0xCE04) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=users
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52740 (0xCE04) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=deletemobiledevice&uuid=ebbc8ba28d52ded7
192.168._Android 52742 (0xCE06) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=plans
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52740 (0xCE04) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52742 (0xCE06) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=command¶m=addmobiledevice&uuid=ebbc8ba28d52ded7&senderid=-snip-&name=SM-G9
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=devices&filter=all&used=true&favorite=1&plan=2
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=devices&filter=all&used=true&favorite=1&plan=2
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
192.168._Android 52738 (0xCE02) 192.168.Domoticz 8080 (0x1F90) Request, GET /json.htm, Query:type=devices&filter=all&used=true&favorite=1&plan=2
192.168.Domoticz 8080 (0x1F90) 192.168._Android 52738 (0xCE02) Response, HTTP/1.1, Status: Ok, URL: /json.htm OK
I have been able to get this result now a couple of times with each time the same conclusion.