Nope, works fine here without issues.
How about trying with just a test switch?
Switch TestSwitch "Test Switch" [ "Switchable" ]
Make sure to ask google to sync your devices: “OK Google, sync my devices”, which should result in a reply like “Ok, syncing your devices for OpenHAB”.
Then add the switch to Habpanel or BasicUI to monitor if you can switch the test switch
When I was facing a similar problem, I removed all other items from my file and only tried with the problematic one. Once you get it working, start adding more items (that are Google Home or Home Kit related).
Also, make sure your quotes are simple " and nothing fancy like “ ”, which seems to be the case with your code.
FIXED. Yay. Thanks for your advice RolfV. It works now and here is my string:
Switch Deck_Lights “Deck Lights” [ “Switchable” ] {mqtt=">[broker:/cmnd/sonoff-gpo4/POWER:command:ON:ON],>[broker:/cmnd/sonoff-gpo4/POWER:command:OFF:OFF]"}
I’m new on OpenHAB and trying to integrate KNX and Google Assistant.
Lighting and switches are working, but for thermostat, I have some problems.
I can read the ambient temperature, but mode, and set point as well is not operating.
here is items code:
yes, it’s working fine thru sitemap, paper-ui and Android app (openhab app)
as I understand, [“homekit:HeatingCoolingMode”] will change the mode by string, but in KNX mode will control by 1 bit object. 0 = cooling and 1 = heating mode and for switching on and off the thermostat, there is another 1 bit data point.
I guess I have to find a way to transform [“homekit:HeatingCoolingMode”] from string to number as explained.
I found the way
we should make one Item in order to read and store the status of thermostat thru HomeKit, and two rules to apply the homeKit to KNX and reverse.
this is my Item codes:
as you can see the mode_f is not linked to any KNX GA, and this is only to read and write from and to HomeKit
and here is rule to read data from homeKit and write it to KNX:
rule "thermostat from mobile"
when
Item mode_f received command
then
if (receivedCommand == "cool")
{
sendCommand (power, ON)
sendCommand (mode, OFF)
}
if (receivedCommand == "heat")
{
sendCommand (power, ON)
sendCommand (mode, ON)
}
if (receivedCommand == "off")
{
sendCommand (power, OFF)
}
if (receivedCommand == "on")
{
sendCommand (power, ON)
}
end
and rule to read From KNX and update HomeKit
rule "thermostat to mobile"
when
System started or
Item power received update or
Item mode received update
then
if (power.state == ON)
{
if (mode.state == ON)
{
postUpdate (mode_f, "heat")
}
else
{
postUpdate (mode_f, "cool")
}
}
else
{
postUpdate (mode_f, "off")
}
end