-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
OpenHAB items can't be used a starters in routines #509
Comments
Hi, as already mentioned in the linked openHAB Community thread, I am convinced that the unavailability of the openHAB devices for starters is connected to the current limitation that we are not able to actively push the devices' states to the Google Home Graph, which is required to trigger such routines. The way the current integration is working does only use a "pull" way of getting information. So only if you actively request a device's state, it is requested by the integration from your personal OH instance. What would be required to do is a complete new solution that runs inside a user's OH instance and actively pushes state changes of items into the personal Google Home Graph of the user. I did some experiments with dirty hacks that kinda work in that direction using rules and custom scripts, which actually made devices appear as starters as desired For some insights of what I did in my experiments... Calling a custom Python script on state changes like:
The script then does a call to the local OH REST API to get the full item state and sends it to an endpoint of a modified version of this integration that has support for updating the Google Home graph. The Python script can be accessed at: https://github.com/michikrug/openhab-google-assistant/blob/itemname-rework/stateReporter.py The modifications made to talk to the Home Graph can be seen in (probably not including all changes): |
I actually set up a test routine just now and it indeed did work with my dirty hacks :D |
That's great to hear you've been able to make it work. With that investigation - what's the feasibility of adding it into the Binding? I think this would add significant functionality to the integration. |
Into what binding? Currently, there is none taking care of such interaction. I myself do not feel able to create one. |
Having gotten OpenHAB and Google Assistant / Home integrated, I'm trying to have Switches or Lights triggered within OpenHAB become triggers for Google Home Routines.
It appears you should be able to do this. Google Home app (Android) now has the ability to create routines with Starters labelled "When a device does something" and shows Displays / Lights / Speakers / TVs (at least in my GH).
Unfortunately, even with bi-directional updating working for a Light or Switch OH Item within Google Home these Items never appear as options in Routines / Starters. If they could, this would significantly improve the functionality of the binding by providing a way to trigger events within the Google Home ecosystem from OpenHAB.
Also mentioned in https://community.openhab.org/t/issue-commands-to-ga/141423
The text was updated successfully, but these errors were encountered: