Google Home connection problem

I am trying to use Openhab and MQTT to turn on and off an Switch using an ESP8266 device flashed with Tasmota (to be more helpfull for others with the same device and problem it is an smart device from the Action named LSC).

Super basic, just to understand how everything works and it works but… now i want to go a step further and connect the Switch to Google Home so I can control the device with my voice. But now i get stuck because the switch doesn’t show up in Google Home app.

I’ve successfully added the test switch and said “hey google, sync my devices” and this device show up.

Switch TestSwitch "Test Switch" [ "Switchable" ]

So it seems like everything is connected correctly.

In the myopenhab i can also control my device via the sitemap, but unfortunately it doesn’t show up in device list, but i found out this wasn’t necessarily, unless you use IFTT, which i don’t.

In the map .\conf\items i have created the file mqtt.items

Switch sVentilator "Ventilator" {channel="mqtt:topic:swVentilator:power"}

In the map .\conf\things i have created the file mqttdevices.things

Thing mqtt:topic:swVentilator "Ventilator" (mqtt:broker:MosquittoMqttBroker) {
	Channels:
		Type switch : power "Power Switch" [ 
			commandTopic="cmnd/swVentilator/POWER", 
			stateTopic="stat/swVentilator/POWER",
			on="ON",
			off="OFF"          
		]
}

For the sitemap i’ve used the following code and this switch is working correctly.

sitemap default label="Home" {  
    Frame label="Slaapkamer" {  
        Switch item=sVentilator label="Ventilator On/Off"
    }  
}  

Can anyone help me out? Where does it go wrong? What did i missed?

So it does work? Or is TestSwitch something else?

The TestSwitch is literally a TestSwitch. So it is not really functionally, but it does show up in Google Home.

OK, that’s good! Can we see the definition of the item(s) which is/are not showing up?

EDIT: I see you’ve edited your OP with the info - good stuff!

So I don’t use Google stuff, but the main difference I see is that the test switch that works has [ "Switchable" ] attached to it.

I have noticed that to, so i tried to edit the test switch to

Switch sVentilator "Test Switch" [ channel="mqtt:topic:swVentilator:power" ]

but this don’t work either, the test switch will be removed automaticly after “Hey Google, sync my devices”.

There is maybe one thing i did not configured elsewhere, but i don’t think this will be the problem, since the sitemap switch is working correctly.

To connect and edit theTasmota device via my browser, i have to fill in an username and password, can this be the problem? And if so, how do i fix this, without removing the password :slight_smile:

I was more thinking:

Switch sVentilator "Ventilator" ["Switchable"] {channel="mqtt:topic:swVentilator:power"}

Again, though, I don’t use this binding so don’t know how it works - just looking at differences!

If you can control the switch from openHAB itself, then this shouldn’t be a problem. I presume the Google binding attaches to the openHAB Item, not the Tasmota device itself.

YOU ARE MY HERO !!!

This works for me!

Switch sVentilator "Ventilator" ["Switchable"] {channel="mqtt:topic:swVentilator:power"}

Problem solved, case closed :slight_smile:

Edit the subject with [SOLVED] please. :slight_smile:

@Freestyler has already marked the solution by ticking the post: this also shows up as a tick next to the title to show it is solved.

The newer way is to use meta tags

Switch Genio1_Switch "Lamp" { ga="Light", channel="mqtt:topic:myMQTTBroker:Genio1:PowerSwitch" }
Dimmer Fan_1 "Lounge Fan" { ga="Fan" [ speeds="0=away:zero,50=default:standard:one,100=high:two", lang="en", ordered=true ] }

You can change what you say for each control level.

Link to Instructions

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.