-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[nikohomecontrol] Ability to add virtual flags without the need for a basic action #11740
Comments
Do you see Niko events in the OH log when the device gets Triggered? This looks like the device definition, but not an actual trigger event. And I don’t see properties that would convey a state in it. |
I'm not entirely sure if I understand where you want me to look. In the openhab.log file, it looks like the following (I included the event from a thermostat as well, to show that they are not that different, but still the OpenHAB binding reacts to it):
|
Yes, that’s what I needed. Do you find somewhere in the log where it changes to false? could you try creating another type of action with only a virtual output? I would like to see if this behaviour is specific to a virtual flag connected to a PIR, or also other actions. |
Yes, it also sends a False message:
I can also confirm that a virtual flag being turned on by a scene is also received, without the need for that virtual flag to have a basic action 🙂 |
I need to think this through a bit, but I could probably create a sensor type channel for these virtual flags (an OH contact). I expect you cannot control the virtual flag from the API, only receive status updates. |
That would suffice. The reason I am trying to achieve this, is because in two different rooms in my house, the Niko sensors can't quite seem to catch a person in time, so I wanted to move the actual switch on/off functionality out of Niko and into OpenHAB, so I can add a Philips Hue motion sensor to the mix. This way I can have both sensors trigger the same rule that runs a script with a timer to turn off lights again. Whenever either one of the sensors triggers motion, the script will reschedule. I have already tested this and it's working. Now I just need the inputs, without having a weird switch in Niko Home app and Google Home – achievable with a virtual flag without an action. Let me know if I should test something. I will make sure to test it thoroughly 💯 👍 |
I just downloaded the latest version of the API doc. The version I had was a bit older. In this new version, the virtual flag is documented. And according to the doc, it can be controlled as well. As I can’t establish if it can, or cannot be controlled from the device definition, I will expose it as a switch. The one specific is that values are True or False, while other devices state values are On or Off. But I can take care of that inside the binding. |
A new jar for your testing. The virtual flag should be detected as a switch type. I would be very interested in all use cases you have. I am probably able to replace some free actions in my installation with this. |
It's working, but for a virtual flag that I had added as a thing and created a channel for before, but then removed that channel and thing again, I now see in the logs when that virtual flag (that has been removed as thing) is triggered:
I can find the Uuid in my Inbox and I have checked that there are no leftover channels or items. |
I see. This is nothing to be worried about, and would happen with any thing you remove. I need to check if there is a cleanup missing, or it is just a timing issue. |
Expected behavior
The ability to add virtual devices without the need for a basic action to be assigned.
Current behavior
When having a PIR device added in OpenHAB, that PIR does not emit motion events. It's only possible to control as a push button. The PIR in Niko Home Control requires a device to control. So because the PIR, that is available in the OpenHAB binding, does not emit motion events, then one need to add the device that the PIR controls. When one sets this to a virtual flag, without a basic action, because one does not want this to show up as a switch in either the Niko Home App or Google Home, then it is not possible to add this virtual flag to OpenHAB.
Proposed solution
Allow the virtual flag to be added from the inbox.
The virtual flag, that has no basic action, seems to be available in the
received topic hobby/control/devices/evt
:And according to the logs, the binding does in fact receives updates from the virtual flag with no basic action, when in this example motion is detected by the PIR and it turns on the virtual flag:
I have tried manually adding the device and refer to the Uuid in the Action ID, but the binding says
Configured action ID does not match an action in controller
@mherwege
The text was updated successfully, but these errors were encountered: