Google Assistant / activate homematinc items configured with Paper UI

  • Platform information:
    • Hardware: Pi4 booting to SSHD over USB. 4gb RAM
    • OS: RASPBERRYMATIC
    • Java Runtime Environment: all latest
  • Issue of the topic:

What works…

  • after reading alot, I was able to activate Google Assistant for all my Sonoff /Sonoss and Shelly devices. Respectively all mqtt v1 devices
  • below you see an example of a working *.item

Switch y_og_gang_licht “Licht OG Gang oben” (gy2, gLicht, gLichtOG,gLichtAllAus) {ga=“Switch”, mqtt=">[broker:cmnd/y_og_fabian_gang/POWER1:command:*:MAP(sonoff.map)],<[broker:stat/y_og_fabian_gang/POWER1:state:MAP(sonoff.map)]"}

I can turn lights on and off and dim them, thanks to the fact I never switched to mqtt bridge 2.

What did not work…
Now I want to integrate homematic items, which were created by PaperUI into google assistant and am surprized how complicated this is due to paper UI.
=> I tried to do it trough rest api but there you can only add tags and not add “ga=“Switch”,”

Luckily I never switched to PaperUI setup comepletely, but why is it so complicated to add items to configure google assitant?
=> Is there really no step by step easy howto around or an easy way to activate all openhab2 items for google assistant?

What I tried…
I extracted from REST API my working item to learn from it…

{
“link”: “http://xxx.xxx.xxx.xxx:8080/rest/items/y_og_gang_licht”,
“state”: “OFF”,
“editable”: false,
“type”: “Switch”,
“name”: “y_og_gang_licht”,
“label”: “Licht OG Gang oben”,
“tags”: [],
“groupNames”: [
“gy2”,
“gLicht”,
“gLichtOG”,
“gLichtAllAus”
]
}

But it does not even show the; “ga=“Switch”,”

At the end I even wanted to find a way to get rid of the jonsondb (export to *.item files), but it seems that you need to manually redo item by item the *.item file.
=> I must have overlooked something, as I hardly can believe that the integration of Alexa or Google Assistant can be so complicated? Even for a guy who programs since 40 years?
=> Is there at least some kind of interface existing to change jonsondb items?

Did anyone successfully setup google assistant and did a step by step howto?

Thanks

That’s not true.

It’s not complicated if you use item files. If you must use REST, there are instructions in the documentation.

Paper is balls I avoid it like covid19

Here is a MQTT v2 thing using ga.

Bridge mqtt:broker:myMQTTBroker [ host ="192.168.1.148", secure =false, username ="please", password ="work" , clientID ="myMQTTClient" ]
{
    Thing topic fan2 "Anabel FAN" [ availabilityTopic="AIFAN/tele/LWT", payloadAvailable="Online", payloadNotAvailable="Offline"] {
    Channels:
        Type switch : Power1   "Anabel Light "  [ stateTopic ="AIFAN/stat/POWER", commandTopic ="AIFAN/cmnd/POWER", on="ON", off="OFF" ]
        Type dimmer : fanspeed "Anabel Fan"     [ stateTopic ="AIFAN/stat/FANSPEED", transformationPattern ="JSONPATH:$.FanSpeed", commandTopic ="AIFAN/cmnd/FANSPEED", 0="OFF", 1="LOW", 2="MED", 3="HIGH", 2=100  ]
      }
}
Switch Anabel_light "Anabel Light" { ga="Light", synonyms="Anabelle Light", channel="mqtt:topic:myMQTTBroker:fan2:Power1" }
Dimmer Anabel_fan "Anabel Fan" { ga="Fan" [ speeds="0=off:zero,1=slow:low:one:on,2=medium:two,3=high:three:100", lang="en", ordered=true, roomHint="Dining" ], channel="mqtt:topic:myMQTTBroker:fan2:fanspeed" }

Yes I replaced normal ceiling fan controller with IFAN03

In the new openhab3 you just add it here

Here is the new way to enter a MQTT thing into openhab3


Or you can use the friendly UI to enter it in.

@denominator
Many thanks! This was the missing link to use MQTT v2 and ITEMS file!
=> It will help me to migrate from MQTT v1 to v2. I started to do it once, but gave then up quite fast.
=> I probably also need to have a look at OH3. Seems really worthwile trying…

@rpwong
Thanks, I will then do it via console that looks easy.
=> On the long run I will probably move away from PaperUI jonsonDB items towards *.items. Luckily I have only homematic items to move.
If only PaperUI would create *.items files…