Replies: 4 comments 5 replies
-
Sorry, but I don't understand the problem yet. You mean, if somebody opens or closes the door with a remote (not via Google), you send the new state of the door into the Google device, but the new state is not shown in the app? |
Beta Was this translation helpful? Give feedback.
-
No. When I send a new state it is show in the app. The problem is that when I close the door using the Home app, the state moves immediately to close without waiting for the sensor event. After analysing the debug log I think I have to change the state during the command processing to override the state returned in the response to Google right ? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the clarification. Something similar was discussed in #474. For each command (such as "Unlock the door") Google waits for confirmation from our side. Currently, we confirm each command as successful, which leads to the state change in the app. Google also allows different return codes such as "Door not unlocked, motor is stuck". But this is currently not implemented in our module and there is no schedule on when (or if) it will be done.
After we handled a command, we immediately report the new state back to Google. Technically, this is not necessary, as our state would not be that different from the state Google sent us a few milliseconds ago. But that is how it's currently implemented. However, you cannot change this state that is reported immediately after the command (at least not without changing the source code). You can always send another new state report with the correct state right that, though. |
Beta Was this translation helpful? Give feedback.
-
No, proposal 2 is not that simple. It is not our state reporting that changes the state display in the app. The process is as follows:
As you see, Google displays the new state with step 5. This happens before we even reported our state in step 6. Disabling step and 6 and 7 with an option would not change anything, the new state is already visible in the app with step 5. With the changes discussed in #474, this would change to:
With this changes it would be possible to do what you want. You can delay the response until you got an answer from your sensor. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I try to automate my entry gate. I'm having issues with the state management.
I defined a gate type device and connected input and output to MQTT topics. One topic is used to send commands (switch) and the second one to report state (input sensor). Everything almost work except that the state of the gate in Google home is toggled automatically. I want to use a sensor to report the state of the gate because it can be opened with remotes as well. And it's nice to have continuous report of the state of an entry door, especially when I'm away.
So my question is : is there any way to fully control the state of an OpenClose trait ?
Beta Was this translation helpful? Give feedback.
All reactions