- Platform information:
- Hardware: armv7l
- OS: Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
- Java Runtime Environment: openjdk version “11.0.3” 2019-04-16 LTS
OpenJDK Runtime Environment Zulu11.31+16-CA (build 11.0.3+7-LTS)
OpenJDK Client VM Zulu11.31+16-CA (build 11.0.3+7-LTS, mixed mode)
- openHAB version: 3.1.0 - Release Build
- Issue of the topic:
Hey, I would like to use my Google Home and Nest devices as speakers and microphones. For some applications, I would like to set-up a voice command that would trigger a rule.
For example, Ok Google: I’m leaving home → Hallway lights would turn on IF its night time.
Is there a way of achieving that?
A proxy item is the way to go here. Just crate an item that is not linked to any device but give it the google assistant switch metadata (google won’t know the difference). You can now control that item via google commands either direct commands or as part of scenes.
On the OH side you just need to establish whatever rules you want that respond to changes in the proxy item. Then using google to change the proxy item triggers any OH actions that you wish.
That’s a great idea! I’ve done that and it works now
I have a few more questions/issues:
- When the rule is done, I would like to notify using the Google Home’s speaker. But currently it doesn’t work (I have an audio action that’s supposed to say “something” when the action is done on my Google Home’s speaker, but it does not work).
- Is it possible to only use OH and only use Google Home and Nest as speakers/microphones? I would like to manage my Smart Home at one place instead of having to have “Items” in both applications.
- Is it possible to choose philips hue scenes from OH?
Thanks a lot for the help!
as for me, there is a huge flaw, while using chromecast binding (and it is not a flaw of the binding, but Google Home’s) - whenever you’re sending any message to your Google Home devices, if there was any streaming, it will gonna cancel and will not restore after the message, that’s the reason, I’ve utilized assistant-relay
proper naming of the items and reading this thread should give you a lot of answers.
In short, I name all of my items as Room_Device_SpecificItem
So I can actually use something like:
rule "Presense Changed - Light"
Member of MotionPresense changed
val room = triggeringItem.name.split("_").get(0)
val pause = LightMotionControls.members.findFirst[ p | p.name == room + "_Motion_Pause" ]
val override = LightMotionOverride.members.findFirst[ ov | ov.name == room + "_Manual_Override"]
to get the actual location of the triggering item and to be able to control other items in that room.
Also with such approach, you just need to write the rule once and can add more and more same devices without need to append rules.
P.S. this response was written, before I’ve seen latest message
- So, the only chromecast that you have, would be TV?
- It really depends, how seriously do you rely on Google Home’s stuff, I’ve heard a lot of good stuff about sonoff’s
- If you want to work with your home automation beyond just switching on and off lights, you’ll need to start learning basics, as well as start learing properly reading documentation/googling.
That’s pretty cool! I’ll use that
- Wow, That was really insightful! I didn’t know that. So basically you’re saying that ChromeCast is a protocol that is ALSO located on Google Home and Nest Mini among other google devices? I’ll look into it!
- Well, I’m not really sure what my intents are yet, I would know them when I know the technologies I have laid out for me (or not?), but basically, yes, I want everything local, everything cheap and everything customizable.
- It actually might be a good idea. I’ll try that also.
Thanks for the reply it was super helpful!
In OH 3 you don’t need to include the location in the Item name any more. You can use the semantic model and one of the new semantic model Actions to determine which location an Item is in. Actions | openHAB. The same can be done for equipment.
just for a clarification, if we’re talking about Google Home devices, we’re having:
- Chromecast - video device
- Chromecast - audio device
- Chromecast - audio group
right, if you don’t stick with all the configuration in the text files, or am I missing something?
I don’t recommend it as it’s just too much work and looking things up, but it is very possible and many people do set up a semantic model in .items files. It’s just Group memberships and Item tags. Nothing more really.
ok, let’s not overflood this thread with off-topic, but I’d definitely like to talk with you and others about that, since I prefer all the configuration to be text based
You’re right, it is off-topic. But I really think there’s a place for this discussion in another thread. Could you maybe open one and have this discussion there and link it to this thread? I would love to read your thoughts on this matter.