openHAB Google Assistant: A new version is released

Good catch! I didn’t know that I have to sync the devices after adding the inverted option, now it works!
Thank’s

I noticed same change of behaviour today. Inverting and syncing did fix it as well.

And: Many thanks to michikrug for the openHAB Google Assistant integration!

Hmm. Thanks for the update. I will need to check what actually could have caused this…

Hi @michikrug, thank you for all your great work on openHAB Google Assistant, really appreciated!! I noticed that recently my shutters stopped working based on GA commands. It used to send UP and DOWN commands and now sends “0” or “100” which is not understood by (at least) the RFXCOM and KNX bindings. Could this be the result of changes to the GA integration? I did re-sync all items.

edit: I noticed a change in line 22 of “functions/commands/openclose.js” as part of pull request #319:

- return openPercent === 0 ? 'DOWN' : openPercent === 100 ? 'UP' : (100 - openPercent).toString();
+ return (100 - openPercent).toString();

Guess that this is causing the changed behavior. Let me know if there is something I can do or test. Thx!

Yes. This was changed due to the recent “check states” functionality. As openhab translates the command “DOWN” to 100 as the final state (in my tests) and I need the actual state for comparison.

As I do not run rullershutters at my end, I can also not judge if this is actually a correct behavior.

Would you be able to fix this with rules in your end, or do I need to adjust the integration with maybe some configuration options as yours might be a common issue?

I did write rules to make it work again, 2 rules per rollershutter, for me 20 in total, so not ideal. I use the RFXCOM binding to control my Somfy shutters, but I read in another tread that also users using KNX controlled shutters are affected (i.e. do not understand “0” and “100”, only “UP” and “DOWN”).

So if the GA integration could restore the old behavior this would be best, else several bindings (at least RFXCOM and KNX, likely more) will need to be adjusted.

Alright. Thanks. I will have a look in the next days… :sunglasses:

3 Likes

@michikrug while you are at it, in a recent update Google added support for Ikea Shutters, with control buttons inside the app.
Is there a way to make shutters from openHab look like Ikea ones, so we get the in-app controls?

I guess this will come with the reworked Google Home app and has nothing to do with specific configurations of the devices.

See Bring back UP & DOWN for open close devices by michikrug · Pull Request #331 · openhab/openhab-google-assistant · GitHub

Will run some tests and release this asap…

2 Likes

What I still do not understand is that for some users the inverted option had to be set after the last release, as I did not changed the logic of that as far as I am aware of…

I wonder why the values for UP and DOWN have been treated different from the values between 1 to 99. To me its seems that you removed the special handling for UP and DOWN (see comment from mvbergen):

I noticed a change in line 22 of “functions/commands/openclose.js” as part of pull request #319:
	- return openPercent === 0 ? 'DOWN' : openPercent === 100 ? 'UP' : (100 - openPercent).toString();
	+ return (100 - openPercent).toString();


In “# Blinds issue #133” scavenrage commented on 21 Jan 2020

Ok, so I will continue to use a rule to invert only the values from 1 to 99% :D. Thank you very much for your work and your support!

Ah. Thanks for that reminder.

Still, there is no different treatment of UP/DOWN.
Google only tells openPercent values that are “translated” into commands for openHAB.
openPercent=0 will mean DOWN (100 as state) in the OH world. And if the user inverts all values, 0 will be 100 and thus become UP (0 as state).

What we could do is actually introducing different treatment and exclude UP/DOWN from the inversion…

Dear community,

a new release was just deployed.

This is basically just a fix for the last version where the UP/DOWN commands for opening and closing were no longer sent.

:bug: Bug Fixes

:toolbox: Maintenance

  • See GitHub :smiley:
3 Likes

and with this new release I had to remove the inverted option to have the rollershutter working again

Could you share some more insights of your setup so that I can get a better understanding of the relations between open/close, up/down and the inverted option?!

Sure, I have a z-wave fibaro roller shutter 3 control and this is the config

Rollershutter   Avvolgibile "Avvolgibile [%d %%]"     <avvolgibile>   (gAvvolgibili)    { synonyms="Avvolgibile letto",   ga="Shutter" [ name="Avvolgibile sinistro" ], channel="zwave:device:1:node3:blinds_control1" }

Let me know if you need more info

Yes, a bit more on the actual usage would be cool.
How do you interact with the device? What states and commands are you using? Why did you need the inverted option in between?

I command the device through google mini, I say “open/close the rollershutter” and then the binding do is magic.

Between the latest 2 release I had to add the inverted option because when I asked to open the shutters closes and vice versa

Hello Michael Krug,

First, thank you very much for that great support and immense work you did on Google Assistant.

For me, the latest Release (v3.4.1) works perfect(ly) now.

I did the following tests:

Rollershutter Shutter_FF_Bed “Schlafzimmer Storen [%d %%]” {ga=“Shutter” [checkState=true]}

OK Google: Öffne die Storen im Schlafzimmer

16:58:38.070 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘Shutter_FF_Bed’ received command UP

16:58:38.081 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Shutter_FF_Bed’ changed from 100 to 0

Google Response: In Ordnung, Storen wird geöffnet

OK Google: Schliesse die Storen im Schlafzimmer

17:04:47.579 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘Shutter_FF_Bed’ received command DOWN

17:04:47.589 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Shutter_FF_Bed’ changed from 0 to 100

Google Response: Gerne, Storen wird geschlossen

OK Google: Öffne die Storen im Schlafzimmer auf 20%

17:21:20.942 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘Shutter_FF_Bed’ received command 80

17:21:20.952 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Shutter_FF_Bed’ changed from 100 to 80

Google Response: Alles klar, Storen wird auf 20% geöffnet

OK Google: Öffne die Storen im Schlafzimmer auf 20%

Google Response: Storen ist bereits geöffnet

What initially confused me, was that openHAB displays and logs the opposite of the given percentage number in the «OK Google» command and both commands to Google:

  • OK Google: Öffne die Storen im Schlafzimmer auf 20%
  • OK Google: Schliesse die Storen im Schlafzimmer auf 20%

lead to the same result.

Many thanks and best regards

Erich

1 Like