Java Runtime Environment: which java platform is used and what version
openHAB version: OH 3.1
Hi There,
i have installed two Shelly Bulb duo. I want to expose them to Google Assistant but i dont get it to work.
I configured a new item group with the items described in documentation:
First of all the OH GUI did not suggest a Google tag named “lightPower”. So i used just the Light tag.
In Google there is only a light bulb with white spectrum visible but no color configuration.
I have also an internal group “all_lights” which is not exposed to google. To realize this i created two items for the shelly bulb.
But these items are not synchronized:
@michikrug Nice one for clearing this up re assistant and “specialcolorlight”, do you know if there is a function within GA to invert the colour temperature function when taking it as a %?
Currently, by default GA 0%=COOL 100%=WARM the bulbs I have are the opposite 0%=WARM 100%=COOL. This makes more sense in my head as the warmer the colour temper the lower the number.
I wanted to see if this is something I can get GA to output before I go down the rabbit hole of converting in OH.
Thanks in advance!
Google internally always uses Kelvin for color temperatures, which also explains the percentage conversion you observed.
See Cloud-to-cloud | Google Home
Thanks for getting back @michikrug I’ve just been looking into this again and still think that surely it makes more logical sense to make the GA % scale lower=warmer higher=cooler as per the kelvin scale?
In the GA colour temperature range it states MinK 2000 for example which would be very warm and MaxK 9000 very cold
“colorTemperatureRange”: {
“temperatureMinK”: 2000,
“temperatureMaxK”: 9000
}
I had a look and do not see an issue (currently) in changing the behavior towards what you requested.
I still wonder why it was implemented like this in the first place. There need to be some reason I will try to figure out.
Thanks for the reply @michikrug , it does seem a little odd, I have stopped trying to make a workaround for now. Hopefully, something will come to “light” in the future.
TLDR: Can someone send me a working example with using the colorUnit being set to percent?
I have a problem getting the color temperature to work. I got a channel for brightness, one for color and one for color temperature. The first two work as expected however I have problems getting the temperature to work.
The temperature item wants to recieve a number between 0 (cold) and 100 (warm). Thus I thought to use colorUnit=percent as seen below however than google doesn’t accept the item (it doesn’t show up in the home app)
Group Licht_Badezimmer_Spiegellampe_Gruppe "Spiegellampe" {ga="SpecialColorLight" [colorUnit="percent" , roomHint="Badezimmer"]}
Color Licht_Badezimmer_Spiegellampe_Farbe "Farbe" <spiegel> (Licht_System_Allem, Licht_Badezimmer_Spiegellampe_Gruppe) {channel="zigbee:device:System_Zigbee_Coordinator:a4c1381e075a21a5:A4C1381E075A21A5_1_color", ga="lightColor"}
Number Licht_Badezimmer_Spiegellampe_Farbtemperatur "Farbtemperatur" <spiegel> (Licht_Badezimmer_Spiegellampe_Gruppe) {channel="zigbee:device:System_Zigbee_Coordinator:a4c1381e075a21a5:A4C1381E075A21A5_1_colortemperature", ga="lightColorTemperature"}
Dimmer Licht_Badezimmer_Spiegellampe_Helligkeit "Helligkeit [%d]" <spiegel> (Licht_Badezimmer_Spiegellampe_Gruppe) {channel="zigbee:device:System_Zigbee_Coordinator:a4c1381e075a21a5:A4C1381E075A21A5_1_color", ga="lightBrightness"}
If I add the colorTemperatureRange it always sends the value 100, no matter the temperature I choose in the app.
Group Licht_Badezimmer_Spiegellampe_Gruppe "Spiegellampe" {ga="SpecialColorLight" [colorUnit="percent", colorTemperatureRange="0,100", roomHint="Badezimmer"]}
If I switch the colorUnit to kelvin and set my available range (2500K-6500) google uses the item however it send number between 2500 and 6500 to my item which it can’t convert since it wants a percentage.
I certainly could build a rule which maps a number in 0-100 from 2500-6500, however I thought this should work without, right?
Could you please set the temperature range in kelvin.
So “2500,6500” instead of “0,100” (which obviously does not make much sense as everything below 500 kelvin is probably just pure red).
For the first part of your question… If using percent for the temperature, you always have to set a range. Otherwise, the system can not calculate what e.g. 20% are in kelvin.
This is why the device did not appear in the configuration shown.
This makes sense…^^ That has fixed it, so the combo with percent and setting the temperature range solved it.
Now I understand why the PR is needed, running into the same issue now. Thanks!
@michikrug Can you tell me how? Is there a .jar somewhere to download (didn’t find any in the github releases) or how can I update the integration. I wasn’t able to find any information on how to do this.
There is nothing to do for you.
There is a piece of code running in the web that is called by Google Assistant and the openHAB connection, which is updated automatically on every release.
So if you still are facing an issue, please again share your setup and observed behaviour, so that I can do another round of investigation.
At least I thought I fixed the issue you saw.
I have exactly copied our item code (without the channels ofc.) into my system and synced with GA.
Everything works as expected.
Telling GA to turn to warm white ends up in 12.5 on the Farbtemperatur item
Telling to turn to cold white results in 37.5
Same is reflected in the Google Home app.
Selecting the most warm color → 0 is sent to the Farbtemperatur item
Selecting the most cold one → 87.5 is sent
Could you share what your items are receiving in the mentioned cases?
EDIT: I still have to mention I run and use a slightly different version of the GA integration and not the official one