I configured a Endpoint.Tv group and a Switch to turn my tv on. The switch is bound to
the “power on” channel of my Samsung TV and I used alexa=“Switchable” [category="TV].
In the alexa app I created a room and added the lights of the room and the TV to it.
Now when I say “Alexa, turn the light in on” the TV gets turned on too.
I thought maybe [category=“TV”] does not overload what is set by “Switchable”.
Therefore I tried alexa=“PowerController.powerState” [category=“TV”].
But the behavior still remains. Even after deleting the device from the alexa app
and getting it recognized by alexa again.
If I tell alexa to turn the TV on or off it works perfect.
I can not find another reason why alexa does mistake my TV for a light.
(BTW it does the same with the power switch of my receiver)
Removing the TV from the room would work. Drawback is that I have alexa and tv in the same
room and it makes it convenient, because I don’t need to say turn TV in Livingroom on.
My TV looks like this now:
Switch TV_Power “TV Power” (TV) {channel=“samsungtv:tv:0eab0dd8_a540_4459_b66c_70a3e925bded:power”, alexa=“PowerController.powerState” [category=“TV”]}
My lights are not defined as alexa items at all in openhab. I use the hue alexa skill to control them through alexa.
Did you add an Alexa-enabled echo device to your “room” Alexa group? The room awareness feature based on specific display categories seems to only work that way. Otherwise, it will revert back to turn on/off any PowerController device linked to your account.
Yes, I did. Like you said otherwise the room awareness does not work.
For now the solution recommended by H102, to remove the TV from the group, does the job.
But actually I would love to find out what the technical reason is that alexa mistakes my TV
for a light. Or better said turns it on together with the lights. Because in the alexa app the TV is
listed as of category TV.
So Alexa seems to not think it’s a light, at least from the point of view of the app.
This is my configuration for the speaker:
Group Spotify “Musik im Wohnzimmer” (Entertainment) {alexa=“Endpoint.Speaker”}
Switch Spotify_LivingRoomPower “Musik im Wohnzimmer Power” (Spotify) {alexa=“PowerController.powerState” [category=“Speaker”]}
This for my lights:
Color LivingRoom_CeilingLamp “Wohnzimmer Deckenlampe” (LivingRoomLamps) [“Light”] {channel=“hue:0220:0017882a05d0:11:brightness”}
As you can see I don’t use Alexa to control my lights in openhab. On the Alexa side I use the Hue skill to control the lights. In the screenshots that I attached to another post you can see that the speaker is registered as Lautsprecher (speaker) in the Alexa app.
If your not planning to use Alexa to control the lights you can remove the [“Light”] tag as it is incorrect. If you wanted to use Alexa the proper tag would be [“Lighting”] for v2 and {alexa=“BrightnessController.brightness,PowerController.powerState,ColorController.color”} for v3 syntax. Please note that [“Lighting”] as a tag for color item may not work as expected so v3 syntax is preferred.
Then there is a rule that should fire when the tv i turned on:
> //TV schalten
> rule "TV schalten"
> when
> Item dummy_tv received command
> then
> if (receivedCommand == ON && networkTV.state == OFF){
> sendHttpGetRequest("https://maker.ifttt.com/trigger/.......")
> logInfo("Wohnzimmer.rules", "Send command for TVON to IFTTT!")
> }
> else if (receivedCommand == OFF && networkTV.state == ON){
> sendHttpGetRequest("https://maker.ifttt.com/trigger/.......")
> logInfo("Wohnzimmer.rules", "Send command for TVOFF to IFTTT!")
> }
> end
>
> rule "TV maneull"
> when
> Item networkTV received command
> then
> if (receivedCommand == ON){
> dummy_tv.postUpdate(ON)
> }
> else if (receivedCommand == OFF){
> dummy_tv.postUpdate(OFF)
> }
> end
>
> rule "Fire TV scene"
> when
> Item firetv_scene received command
> then
> if (receivedCommand == ON){
> sendHttpGetRequest("https://maker.ifttt.com/trigger.......")
> logInfo("Wohnzimmer.rules", "Scene Fire TV ON")
> firetv_scene.postUpdate(OFF)
> }
> end
But Alexa says “device not responding”.
A similar setup for my entry lamps is working (also via Switchbot and IfTTT).