Official Google Assistant Integration for openHAB

@MARZIMA
Hi Mehmet…
Do you, (or anyone else) have any idea, if Google has made any changes today (or yesterday)…
I have a highly strange issue with Google responding with “Okay turning on 2 lamps” when I ask her to turn on a lamp… The lamp turns on, but it´s only one item. Yet Goggle resond with “2 lamps”.
And I cant seem to figure how the heck Google gets to the count of 2 lamps, when it´s only one.
Looking at Google Home app, there is only one device/lamp as well…
Google also respond with “turning off 2 lamps” when asking to turn the lamp of.

This happens to all my IHC items (IHC 2.5 binding). But not my modbus (openhab connected) or Philips Hue (google Home connected) devices.

I used the weekend to convert from the old IHC binding to this new 2.5 (not yet release).
I made several testing during the convertion of the bindings, after change of each item, making sure it worked. When I got home from work today, I noticed this strange issue in the Google respons.

Using REST Api to show items with the “Lighting” tag, this is what it shows:

[
{"link":"https://home.myopenhab.org:443/rest/items/bryggers_DimmerLys","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"bryggers_DimmerLys","label":"Bryggers Halogenlys","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/bryggers_Skablys","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"bryggers_Skablys","label":"Bryggers Skablys","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/lille_bad_OEV","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"lille_bad_OEV","label":"Lille Bad Lys","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/spise_halo_styrke","state":"0","stateDescription":{"pattern":"%s %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"spise_halo_styrke","label":"Spotlys ved spiseplads","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/kontor","state":"ON","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"kontor","label":"Loftlys i kontoret","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/koekken_underskablys_niv","state":"0","stateDescription":{"pattern":"%.0f %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"koekken_underskablys_niv","label":"Lyset under køkkenskabe","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/amanda_OEV","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"amanda_OEV","label":"Lampeudtag i Amandas værelse","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/amanda_OEH","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"amanda_OEH","label":"Spotlys i Amandas værelse","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/sove_lampeudtaglys","state":"OFF","stateDescription":{"readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"sove_lampeudtaglys","label":"Lampeudtag i soveværelset","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/garage_lys","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"garage_lys","label":"Garage Loftlys","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/garage_ydoer","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"garage_ydoer","label":"Garage lys konstant","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/aktivitetUBeboet","state":"ON","stateDescription":{"pattern":"","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"aktivitetUBeboet","label":"Ubeboet tilstand","category":"cu_switch","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/spise_bord_niv","state":"0","stateDescription":{"pattern":"%s %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"spise_bord_niv","label":"Lyset over spisebord","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/stue_sov_OEH","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"stue_sov_OEH","label":"Stue M2","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/lys_haven","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"lys_haven","label":"Lyset i haven","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/marc_OEH","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"marc_OEH","label":"Spotlys i Marcs værelse","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/marc_OEV","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"marc_OEV","label":"Lampeudtag i Marcs værelse","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/stue_sov_OEV","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"stue_sov_OEV","label":"Stue M1","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/sove_halogenlys_niv","state":"0","stateDescription":{"pattern":"%.0f %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"sove_halogenlys_niv","label":"Spotlys i soveværelset","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/casperDimmerLys","state":"ON","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"casperDimmerLys","label":"Loftlys i Caspers værelse","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/stort_badDimmerLys","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"stort_badDimmerLys","label":"Halogenlys i StortBad","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/aktivitetLysKonstant","state":"OFF","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"aktivitetLysKonstant","label":"Konstantlys i aktivitetrum","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/aktivitet_halo_styrke","state":"0","stateDescription":{"pattern":"%s %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"aktivitet_halo_styrke","label":"Spotlys i aktivitetrum","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/koekken_vasklys_niv","state":"30","stateDescription":{"pattern":"%.0f %%","readOnly":false,"options":[]},"editable":false,"type":"Dimmer","name":"koekken_vasklys_niv","label":"Lyset ved køkkenvask","category":"light","tags":["Lighting"],"groupNames":[]},
{"link":"https://home.myopenhab.org:443/rest/items/aktivitetBeboet","state":"OFF","stateDescription":{"pattern":"","readOnly":false,"options":[]},"editable":false,"type":"Switch","name":"aktivitetBeboet","label":"Beboet tilstand","category":"cu_switch","tags":["Lighting"],"groupNames":[]}
]

I have syncronized devices about a zillion times by now…

One thing though…
Last night when I was almost done with the changes… I made a typo mistake in one of the tagged items. I forgot a “[” in an item. This resulted in all devices dissapeared from the Google Home app.
When I corrected the typo error and made a syncronized, they all came back, but they didnt belong to any “home” or “room” anymore. So I had to replace them all back into their belonging “home” and “rooms”.

I wonder if this could have made the issue I´m discovering… It was pretty late when the typo mistake happened, so I cant remember if I did any testing afterwards. I believe I did, but I´m not sure…

If this is the cause if the issue I´m discovering now… How the heck do I fix it then?
I have tried restarting openhab, as well as clearing cache and tmp, and then restarting. It didn´t help…

All help highly appreciated!!

Btw… This is what happens in the tail log, when I ask google to turn on a specific light… Notice the ON twice…

2019-03-18 22:36:29.668 [ome.event.ItemCommandEvent] - Item 'casperDimmerLys' received command ON
2019-03-18 22:36:29.967 [ome.event.ItemCommandEvent] - Item 'casperDimmerLys' received command ON
2019-03-18 22:36:30.472 [vent.ItemStateChangedEvent] - casperDimmerLys changed from OFF to ON

And this happens when I ask google to turn OFF the specific lamp… Notice the OFF twice:

2019-03-18 23:28:57.115 [ome.event.ItemCommandEvent] - Item 'casperDimmerLys' received command OFF
2019-03-18 23:28:57.283 [ome.event.ItemCommandEvent] - Item 'casperDimmerLys' received command OFF

Perhaps it´s related.