-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST-API sends fake status updates when scene switch is clicked #5574
Comments
@Smanar is this a duplicate? |
I don't think, first time I m seing that. But I don't understand what happen on his situation.
Can you show the request send by the API, if you know how to see websocket notification ? (Can use http://phoscon.de/pwabeta in help / api information) |
I believe this is the exact same issue as @tommydejong reported here:
So it could be a duplicate issue. If verified to be same, we can close this issue. |
Can I get this without using the phoscon.de/pwabeta website? |
For me it's the easier way, it s not working on your side ? (Yeah it can be bugged too) But I have the line I need on the tommydejong post. As I m not able to find how create a group that disable the braodcast request, the better solution can be to disable the group entry creation in the API.
But it s only group notification ? the values returned by the device are good no ? Can just ignore the group request for the moment ?
|
@Smanar local phoscon also have the help api info. No need for the bet a |
Lol, yes, first time I see it on local, finally :) |
I'm afraid I don't know what this means. I did not create any group or disable any group. All I did was:
I may miss a key piece of knowledge, because I'm not sure I understand. Is there a secret hidden group that everything is a member of? I never added a group, and I don't think I can control what is ignored in phoscon and openhab as they both use the output from the REST API as far as I understand. I have found the help API info button. I'll get back to you when I am physically there so I can use the hardware switch. I just copy everything that appears in API Events after I press the button? |
Don't worry, need to be done on deconz side.
Websocket notifications are differents, if I m right you have one for group (with "all_on" and "any_on") and one for the device itself (with "buttonevent") |
@Smanar I hope the following is useful. Let me know if I provided the proper data. To reiterate, this Tuya 12 scene switch can be connected in two ways. This is the second way (by pressing the reset button directly after connecting). None of the lights turn on or off for real in this mode (good) but in the API they still do. Pressing button marked {
"23:01:59:341": {
"e": "changed",
"id": "30",
"r": "sensors",
"state": {
"buttonevent": 1002,
"lastupdated": "2021-12-14T22:01:59.319"
},
"t": "event",
"uniqueid": "84:71:27:ff:fe:0a:87:6e-01-1000"
},
"23:01:59:342": {
"e": "changed",
"id": "65520",
"r": "groups",
"state": {
"all_on": true,
"any_on": true
},
"t": "event"
},
"23:01:59:343": {
"e": "changed",
"id": "6",
"r": "groups",
"state": {
"all_on": true,
"any_on": true
},
"t": "event"
},
"23:01:59:344": {
"e": "changed",
"id": "8",
"r": "groups",
"state": {
"all_on": true,
"any_on": true
},
"t": "event"
},
"23:01:59:346": {
"e": "changed",
"id": "2",
"r": "groups",
"state": {
"all_on": true,
"any_on": true
},
"t": "event"
}
} Pressing button marked {
"23:06:07:290": {
"e": "changed",
"id": "30",
"r": "sensors",
"state": {
"buttonevent": 2002,
"lastupdated": "2021-12-14T22:06:07.261"
},
"t": "event",
"uniqueid": "84:71:27:ff:fe:0a:87:6e-01-1000"
},
"23:06:07:291": {
"e": "changed",
"id": "65520",
"r": "groups",
"state": {
"all_on": false,
"any_on": false
},
"t": "event"
},
"23:06:07:292": {
"e": "changed",
"id": "1",
"r": "groups",
"state": {
"all_on": false,
"any_on": false
},
"t": "event"
},
"23:06:07:293": {
"e": "changed",
"id": "3",
"r": "groups",
"state": {
"all_on": false,
"any_on": false
},
"t": "event"
},
"23:06:07:294": {
"e": "changed",
"id": "6",
"r": "groups",
"state": {
"all_on": false,
"any_on": false
},
"t": "event"
},
"23:06:07:295": {
"e": "changed",
"id": "8",
"r": "groups",
"state": {
"all_on": false,
"any_on": false
},
"t": "event"
},
"23:06:07:296": {
"e": "changed",
"id": "2",
"r": "groups",
"state": {
"all_on": false,
"any_on": false
},
"t": "event"
}
} |
So all seem fine.
The ZHAswitch entry, id 30 When you use the switch it still sending order to his group, but you have no device inside, just ignore the group notification. |
@Smanar I think you misunderstand. All those events that follow (id 2, 3, 4, 6 and 8) turn all the lights off in Phoscon or anything else attached to the API. They are caused by the button press. Those events should not be sent. That is the bug I am reporting. |
This one concern the sensor.
Those one concern the group. In your third app you need to use only the first one, the one that use the parameter buttonevent. But something strange is why it update so much group ? Only group with
(if 30 is the switch ID) need to be updated. And even the "65520" react at switch command. IDK if it s possible to get log during the button press, with "info", "info_l2" and "APS" ? Because I think you will have a big amount of lines in a short time. |
But one of my "third" apps is Phoscon. I'm using the deCONZ RaspBee image. I don't have control over what Phoscon should ignore.
Exactly! I think all groups turn on because all lights turn on, so the groups get status
Let's see if we can figure it out.
Can I do this over ssh without x server? |
So you need to use the switch editor, not the light group, but depend of what you want to do. Make a group with the device you want to command, then try with the switch editor and add this one.
Yep it s possible too using command line, but need to restart to use command line https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/deCONZ-debug-flags But you can at least check all your groups just using
And with the switch ID For information the group "65520" is a group "All devices". |
Ah, this makes a lot of sense.
Perhaps, but I don't think Phoscon is the problem. Please correct me if I'm wrong in this thought process:
To illustrate, in master pairing mode (step 1 and 2 in issue description), both the physical and the virtual are correct (but unwanted). In non-master pairing mode (step 4 and 5 in issue description), the physical is correct but the virtual is incorrect: (V for expected "no-change" and X for unexpected "change" behavior.)
I have no such group. I will attach an abbreviated copy/paste below. I will get the logs with the button when I am home.
{
"1": {
"devicemembership": [],
"id": "1",
"lights": ["1"],
"type": "LightGroup"
},
"2": {
"devicemembership": [],
"id": "2",
"lights": ["6"],
"type": "LightGroup"
},
"3": {
"devicemembership": [],
"id": "3",
"lights": ["7", "4", "11", "3"],
"type": "LightGroup"
},
"4": {
"devicemembership": ["18"],
"id": "4",
"lights": [],
"type": "LightGroup",
},
"5": {
"devicemembership": ["19"],
"id": "5",
"lights": [],
"type": "LightGroup"
},
"6": {
"devicemembership": [],
"id": "6",
"lights": ["5", "10"],
"type": "LightGroup"
},
"7": {
"devicemembership": ["20"],
"id": "7",
"lights": [],
"type": "LightGroup"
},
"8": {
"devicemembership": [],
"id": "8",
"lights": ["8"],
"type": "LightGroup"
},
"9": {
"devicemembership": ["27"],
"id": "9",
"lights": [],
"type": "LightGroup"
}
} |
No I m agree, there is a problem with group, but you can just ignore them to use this switch. To use it you need to use the "buttenvent" value in the sensors list and not the group state value in the group lists. Deconz is able to see "zigbee group request" in the network and update the API according to them. So IDK if this reaction is provoked by the device sending a "group zigbee request", or something caused by the API code that impact again the zigbee group stuff |
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs. |
I forgot that there were more tasks. I had to read back to find out. I believe this is it:
I will look into the last one when I'm at the location. |
I have exactly the same problem with a (LIDL) Livarno HG06323 (modelid: TS1001) 4-button wireless switch. It worked fine when first added to the API about a year ago. After an update a few months ago it started to behave like the Tuya of Redsandro. I used it with Domoticz. Now it's unusable. Like Redsandro describes: Only 2 buttons do something. One switches the status (but not the lights) of all lights to ON, the other button switch the status to OFF. Other 2 buttons do nothing. |
You don't remember wich one update ? |
Sorry, I don't remember. But nothing has changed at this side otherwise, so I'm pretty sure it was after an update. I also have a (LIDL) Silvercrest remote Zigbee doorbell HG06668, "modelid": "TS0211"
} |
Don't have idea ... |
One more observation, maybe it's relevant I don't know. I use the Phoscon stable and Beta. Both use the same config. So both switches are visible in Phoscon stable and Beta. If I push any of the 4 buttons on the remote switch TS1001 nothing happens in Phoscon stable and Beta. |
You are sure all use the same database ? TS1001 > not result on beta and stable |
How do I check if they use the same database? TS1001 > not result on beta and stable. Domoticz deCONZ bridge: Discovered but only changes status of lights (but does not switch them) I just follow the releases as published in the beta- and stable channels, no self builds. I see now the Domoticz deCONZ-bridge is also your work. Thank you for this! |
Ha yes, so you are speaking about phoscon beta/stable, and they use the same deconz installation. And yes, for the domoticz deconz bridge there is https://github.com/Smanar/Domoticz-deCONZ/issues For the TS0211 just can make a fast test on domoticz, on the plugin hardware enable "debug info only" and press a button you need to see a log with "websoocket", if realy nothing move in domoticz was the python plugin fault (but strange it have worked before) For the TS1001 will take a look this WE, someone is able to recompile code to make tests ? (Need a full/real OS) |
Perfect
You can try the new code.
I have used 0x01 because it s the first byte of the payload "010000640000"
So yes, something is not working here, need to check better. |
Yes, the doorbell TS0211 is now working in Domotcz. It is represented as an 8 button multi switch, and button B1 is now active when pushed. So Kudos to you! Let me know when you need more testing for the TS1001 light selection problem. One more question. Does the version I compiled now also contains your work for the LIDL SilverCrest Smart Radiator Thermostat #5349 ? |
When the door bell TS0211 is pushed I do see this in the Domoticz log from deCONZ-bridge: 022-01-17 19:00:23.089 Error: Zgateway: Can't Update Unit > 19 (sensors) : {'nValue': 0, 'sValue': 'Off'} |
It's because it use a generic widget, can use a specific one but it's a domoticz issue, not a deconz one ^^
Nope, but this one will be merged, it s in the timestone.
But immedialty after, the plugin is asking information to add this sensor, nope ? You are not blocking new device detection in domoticz ? For the group issue, I realy don't see the issue, so I have added some more debug line. |
I'm happy with the door bell representation. It IS probably an 8 button switch. I opened it up and there are multiple contacts for switches, but only 1 is used for the push button. Will this change also be merged in the next beta? About the error. New device detection is not blocked. But I just checked again and when I push the door bell button it's not in the log anymore. So it's fine now. When I do a 'git pull' I get 'Already up to date' You're sure you updated the code? |
Wich one beta ? the deconz one ? I Need tro make the PR, but I m tring to solve the "bind issue" in same time.
Oups, nope, forget to press a button, you can retry pls ? |
Since I have 40+ devices the log is filling up pretty quick. So no guarantee this is from the right device. Debug switch 1 |
Not sure if you changed anything else besides the debug line, but as far as I can see now the switch works as it should in Domoticz. |
Hu ? on your precedent test (the first one), you have re-included the device ? |
Yes I did. For this test I did the same, deleted it from Phoscon and included it again. |
Cache maybe? |
Strange, perhaps something have missing during the init. |
Btw, I see now the switch is in group 12 ? This is the json from TS1001 in Domoticz deCONZ: { This is the group 12 json from TS1001 in Domoticz deCONZ: |
Yep, there is a "special stuff" for this device But lot of remote have their own group, like the ikea one. |
Sorry I haven't been back to physical access to the button. The manufacturer seems anonymous but I can get {
"30": {
"config": {
"battery": 100,
"group": "65520",
"on": true,
"reachable": true
},
"ep": 1,
"lastannounced": "2022-01-09T13:59:46Z",
"lastseen": "2022-01-09T23:36Z",
"manufacturername": "_TZ3000_xabckq1v",
"mode": 1,
"modelid": "TS004F",
"name": "Switch Quad 1",
"state": {
"buttonevent": 2002,
"lastupdated": "2021-12-15T22:41:38.341"
},
"type": "ZHASwitch"
}
} |
Perfect, and have found another issue with exaclty the same device. So have removed debug line and added the _TZ3000_xabckq1v if someone is able to test the code for this one ? |
If you have time can you have a look at my question at #5493 ? |
To be clear, the 4 button Lidl TS1001 remote switch works nows as it should. The Lidl smart extention lead (#5493) is a different device. |
Mimix have reopened it. |
As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs. |
As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again. |
@Smanar I'm willing to test for _TZ3000_xabckq1v, though I'm not sure whether I'm equipped for this, since I'm running deconz in docker |
Ha yes, I don't remember if the PR was tested for the _TZ3000_xabckq1v since the last time. And yes, the procedure on docker is not easy, if you don't know how work dockers, for exemple https://github.com/franciscogouveia/docker-deconz-rest-plugin-test |
I have my Also, I'm still curious to understand how it can happen that something (in this case the quad button) can turn on/off all the light indicators on the Phoscon-GW control page, without physically toggling the actual lights. Are both actions (update the light and update the indicator) handled by different plugins? |
Switch from stable to beta is easy, and you can stay with beta, but just don't update next beta version https://phoscon.de/en/conbee2/install#raspbian
This is more complex, it s no a beta or stable branch but a special one. To speed the process, when you send an order using the API, deconz update the state, send the request and wait for return to update the sate and correct it. |
Describe the bug
I connected a TS004F aka Tuya ZigBee Wireless 12 Scene Switch found here on Aliexpress to the Raspbee 2.
deconz-rest-plugin/bindings.cpp
Line 3072 in 39099c0
Without assigning the button to any group, button 1 and 2 toggled every single connected light on and off respectively.
A deCONZ user with an Aqara Opple Switch instructed me to reset the switch again, and upon establishing the connection with deCONZ, quickly hit the reset button one more time to "disable 'master' mode". I never heard this before, but indeed it works.
The buttons no longer physically switch everything attached to deCONZ on or off.
The problem is that the REST-API still sends state updates as if everything is switched off and on. Then within half a minute or so, REST-API realizes nothing was changed, and updates the statuses back to the old value.
This causes problems when further processing is done by anything consuming the REST-API, such as OpenHAB or other domotics solutions. For example, if you use deCONZ to switch on a Zigbee light, and use deCONZ > REST-API > OpenHAB to switch on a Wifi light when the Zigbee light turns on, the result is now that only the Wifi light erroneously turns on while the Zigbee light properly stays off.
Steps to reproduce the behavior
Expected behavior
REST-API follows deCONZ behavior exactly.
Screenshots
Environment
deCONZ Logs
Additional context
I don't know this behavior. I don't know if this feature is related to the button itself, to Zigbee or to the deCONZ software. I tried to explain it as best as I could, but if I understood what was going on, I would probably explain it better.
The text was updated successfully, but these errors were encountered: