Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hueemulation] Some Alexa devices do not discover all tags #4293

Closed
5iver opened this issue Nov 29, 2018 · 76 comments
Closed

[hueemulation] Some Alexa devices do not discover all tags #4293

5iver opened this issue Nov 29, 2018 · 76 comments
Labels
won't fix Invalid Issues and requests that do not fit the specified add-on

Comments

@5iver
Copy link

5iver commented Nov 29, 2018

I updated from 1415 to 1445, excited to test #4216, and lost control of most of my items. None of my Items tagged as Switchable are being discovered. Sorry if this is not enough information, but I'm guessing this should be easily reproducible. If any more detail is required, please let me know. I am in the US and use 2nd gen Dots. This is also being reported outside the US.

community discussion

@gdgeist
Copy link

gdgeist commented Nov 30, 2018

build 1446 and same experience. Items tagged with "Switchable" not discovered. "ColorLight" discovered as a light but Alexa marks it as a Color Capabilities = None. All items show up in API.

Example of the color light from API:

{"state":{"hue":8373,"sat":139,"xy":[0.0,0.0],"alert":"none","effect":"none","transitiontime":0,"colormode":"ct","bri":254,"ct":500,"on":true,"reachable":true},"type":"Extended color light","modelid":"LCT010","uniqueid":"8790e48e-7152-4795-9b5b-39ec9620fdc8-66","manufacturername":"Philips","swversion":"1.15.2_r19181","swconfigid":"F921C859","productid":"Philips-LCT010-1-A19ECLv4","friendsOfHue":true,"colorGamut":"C","hascolor":true,"name":"Kitchen Desk Lamp Color"}

Example Switchable Item:

{"state":{"on":true,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"8790e48e-7152-4795-9b5b-39ec9620fdc8-52","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Kitchen Sink Lamp"}

Also Null pointer exceptions for items that are not reachable during Alexa discovery (Hue bulbs exposed through the hue emulation)
Example:
2018-11-30 06:09:14.626 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /api/ji2WsId63e9X33ub4QqCgguJZkxSUVDMDa2N1LVA/lights/33

java.lang.NullPointerException: nullNo tagged groups

@davidgraeff
Copy link
Member

davidgraeff commented Nov 30, 2018

Alexa marks it as a Color Capabilities = None

Alexa does not natively (within the local network) support coloured hue bulbs. This is only possible via skills unfortunately. Try with hue compatible apps and it should be presented as a coloured bulb.

Switchable Item

It works with my alexa (German firmware, which usually lacks behind the US version).
It may help to fake another device and not the OSRAM plug for a broader compatibility.

Null pointer exceptions

That should not happen. What do you mean by "item that is not reachable"? An item does not have a reachable state. Did I miss something?

@gdgeist
Copy link

gdgeist commented Nov 30, 2018

Thanks. The null pointer exceptions are for real world hue bulbs things that are "unreachable" i.e. hue bulb switched off by a hard wired light switch.

@dainosan
Copy link

dainosan commented Dec 1, 2018

BUILD 1446 I have similar issues. reduced to 1 THING, 1 ITEM and still not being discoverable by the 3rd Gen echo Dot.

ITEM:
Switch Luce_disimpegno_bagno "Disimpegno Bagno" (gLivingRoom) ["Lighing"] { channel="openwebnet:bus_on_off_switch:mybridge:Luce_disimpegno_bagno:switch" }

rest API :
[{"link":"http://192.168.1.22/rest/items/Luce_disimpegno_bagno","state":"OFF","editable":false,"type":"Switch","name":"Luce_disimpegno_bagno","label":"Disimpegno Bagno","category":"light","tags":["Lighing"],"groupNames":["gLivingRoom"]}]

@dainosan
Copy link

dainosan commented Dec 1, 2018

this could help (or not)but i noticed that every time i change the configuration in paperUI
the config file

/var/lib/openhab2/config/org/openhab/hueemulation.config

contains a "B" in the string

pairingEnabled=B"true"

@davidgraeff
Copy link
Member

That is correct behaviour @dainosan. If you enable pairing mode a "boolean" value "true" is stored in the configuration and about 60 seconds later this is overwritten with a "false" value again.

@dainosan
Copy link

dainosan commented Dec 1, 2018

thanks. whatever it is the discovery is not working. i am trying to debug but i cannot see anything that could be going wrong but when the discovery completes there are no devices

@davidgraeff
Copy link
Member

davidgraeff commented Dec 1, 2018

You can use a REST addon for your favourite browser and verify that the xmls generated by the hue emulation are correct. Alexa is also picky about the port nowadays, openhab should be running on port 80, or a reverse proxy forwards traffic from :80 to :8080.

With the rest plugin in your browser you do a GET request on http://your-openhab:80/api/config as a start and http://your-openhab:80/description.xml while discovery is enabled.

@dainosan
Copy link

dainosan commented Dec 1, 2018

aware of the port forwarding and that is in place. 80 to 8080 via Iptables.

i get data back from both :
http://192.168.1.22/api/config
AND
http://192.168.1.22/api/description.xml

@gdgeist
Copy link

gdgeist commented Dec 1, 2018

BUILD 1446 I have similar issues. reduced to 1 THING, 1 ITEM and still not being discoverable by the 3rd Gen echo Dot.

ITEM:
Switch Luce_disimpegno_bagno "Disimpegno Bagno" (gLivingRoom) ["Lighing"] { channel="openwebnet:bus_on_off_switch:mybridge:Luce_disimpegno_bagno:switch" }

rest API :
[{"link":"http://192.168.1.22/rest/items/Luce_disimpegno_bagno","state":"OFF","editable":false,"type":"Switch","name":"Luce_disimpegno_bagno","label":"Disimpegno Bagno","category":"light","tags":["Lighing"],"groupNames":["gLivingRoom"]}]

@dainosan Lighting is mispelled.

@dainosan
Copy link

dainosan commented Dec 1, 2018

no that was probably one of the latest copy and paste. this is how the item appears in rest API

[{"link":"http://192.168.1.22/rest/items/Luce_disimpegno_bagno","state":"NULL","editable":false,"type":"Switch","name":"Luce_disimpegno_bagno","label":"Disimpegno Bagno","tags":["Lighting"],"groupNames":["gLivingRoom"]}]

@gdgeist
Copy link

gdgeist commented Dec 1, 2018

@dainosan I was hoping it was an easy fix for you ;)

@gdgeist
Copy link

gdgeist commented Dec 1, 2018

Alexa marks it as a Color Capabilities = None

Alexa does not natively (within the local network) support coloured hue bulbs. This is only possible via skills unfortunately. Try with hue compatible apps and it should be presented as a coloured bulb.

@davidgraeff This one stumps me as I have a Hue hub and have never used the Hue cloud account i.e. Alexa/Echo has only ever been connected locally and before I deleted the pairing in order to use the hue emulation the color bulb worked just fine i.e. the only way Alexa would have discovered my color bulb was local discovery....

@davidgraeff
Copy link
Member

davidgraeff commented Dec 1, 2018

@gdgeist Maybe in non European firmware versions? I read about non color support in various forums and that Amazon is never intending to add support to the local hue support. The hue emulation is emulating a A14 extended color bulb from 2014, I think. My alexa is not recognising it as color bulb (eg "change color to red"). If anybody knows what to emulate to make this work, I'd happy to make the necessary changes.

@davidgraeff
Copy link
Member

davidgraeff commented Dec 1, 2018

no that was probably one of the latest copy and paste. this is how the item appears in rest API

It doesn't help to post the OH rest response. Alexa is using the hue emulation rest API under /api. You need to generate an api-key and then post the contents of /api/[api-key]/lights. I have no time to explain the details, please google that up, please.

@dainosan
Copy link

dainosan commented Dec 1, 2018

we can figure this out.

here is the long output of the /api/[api-key]/lights

api key is created but nothing is returned to alexa

{"1":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-1","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Disimpegno Bagno"},"2":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-2","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Bagno Ospiti"},"3":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-3","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Lavanderia"},"4":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-4","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Camera"},"5":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-5","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Cameretta"},"6":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-6","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Cabina Armadio"},"7":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-7","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Specchio Cabina Armadio"},"8":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-8","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Cucina"},"9":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-9","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Bagno Notte"},"10":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-10","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Specchio Bagno Notte"},"11":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-11","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Divano"},"12":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-12","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Tavolo Sala"},"13":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-13","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Led Divano"},"14":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-14","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Ingresso"},"15":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-15","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Disimpegno Scala"},"16":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-16","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Studio"},"17":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-17","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Balcone Studio"},"18":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-18","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Scala"},"19":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-19","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Corridoio"},"20":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-20","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Balcone Sala"},"21":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-21","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Balcone Cucina"},"22":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-22","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Balcone Bagno"},"23":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-23","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Balcone Bagno Notte"},"24":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-24","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Balcone Cameretta"},"25":{"state":{"on":false,"reachable":true},"type":"On/Off plug-in unit","modelid":"Plug 01","uniqueid":"a27e0501-03e1-4671-8a80-487d5cabc93f-25","manufacturername":"OSRAM","swversion":"66012040","friendsOfHue":true,"hascolor":false,"name":"Balcone Camera"}}

@ScottKinSF
Copy link

ScottKinSF commented Dec 2, 2018

I too have existing rules and items that use group items to control dimmer items in the same area. As noted by @5iver, the updated version of Hue Emulation breaks that functionality.

I have also noted that the commands ON and OFF when issued from Alexa to my dimmer items, no longer function the way they did before this update. The devices now receive a '1' or a '0' respectively, which my devices see as 1% and 0%, which is certainly not the desired behavior. Setting these dimmer items to a percentage value from 0 to 100% does work. <-- I determined that this behavior is unrelated to the HueEmulation binding.

@davidgraeff
Copy link
Member

Please everyone test if switchables work for you with #4312 and #4313 applied. Please also perform the test with different Alexas (voice command in English might be something like: Alexa, discover new devices). I have the strong feeling that different Echo types support different sets of hue devices.

@gdgeist
Copy link

gdgeist commented Dec 5, 2018

2.4.0.201812042313 │ Hue Emulation Service

No devices discoverable at all. I cleared the discovered devices in Alexa. Cleared cache, upgraded, device pairing mode multiple times.

Ran out of time tonight. Will see if anything useful can come from the logs

@davidgraeff
Copy link
Member

davidgraeff commented Dec 5, 2018

One of the commits made the main api endpoint (/api/user-name/lights) a 404. Therefore the hue emulation development version does not work. I'm on this right now.

@davidgraeff
Copy link
Member

I have created PR #4324 to fix this and added a test bundle as well for catching breaking commits next time.

For Alexas that are not able to identify an OSRAM plug as a switchable, I have this workaround:

Go to the service configuration on Paper UI and change the tag for white lights to "Lighting, Switchable". This emulates all switchables as white lights, like the former code did.

@davidgraeff
Copy link
Member

bildschirmfoto vom 2018-12-08 20-34-29

This is a screenshot from the Alexa app. You see devices appear two times. The echo dot finds them as "Royal Philips Electronics intelligentes Gerät" including switches. The echo finds them as as "Dimmable Light" and "Color Light" without switches. Summing this up: The local hue support is a mess, somehow.

davidgraeff pushed a commit to davidgraeff/openhab2-addons that referenced this issue Dec 9, 2018
…, group items

Fixes:
* Fix user creation without a proposed username in the request. Incl. test
* Fix: The hue value was wrongly applied to the saturation field. Incl. test
* Fix usage of StorageService: Set the classloader
* Set the saturation to 0 if a ct (color temperature) value is set.
  This is because Alexa only sets "ct" if you command her to turn the light white.
* Only call writeToFile in LightItems once, after all items have been
  loaded up from the registry.
* Don't load items twice from the registry.
* Reload items whenever the tags configuration has changed.
* Allow group items

Tests:
* Add LightItems class unit tests for adding/updating items and group items
  by category and tags.

Refactor:
* Move UserAuth class out of DataStore into own HueUserAuth class

Fixes openhab#4293
Fixes openhab#4307

Signed-off-by: David Graeff <david.graeff@web.de>
davidgraeff pushed a commit to davidgraeff/openhab2-addons that referenced this issue Dec 9, 2018
…, group items

Fixes:
* Fix user creation without a proposed username in the request. Incl. test
* Fix: The hue value was wrongly applied to the saturation field. Incl. test
* Fix usage of StorageService: Set the classloader
* Set the saturation to 0 if a ct (color temperature) value is set.
  This is because Alexa only sets "ct" if you command her to turn the light white.
* Only call writeToFile in LightItems once, after all items have been
  loaded up from the registry.
* Don't load items twice from the registry.
* Reload items whenever the tags configuration has changed.
* Allow group items

Features:
* Add troubleshoot section to readme.
  Allow a pretty printed output for /api/{username}/lights?debug=true.

Tests:
* Add LightItems class unit tests for adding/updating items and group items
  by category and tags.
* Add tests for setting the hue and saturation and turn a light from color to white

Refactor:
* Move UserAuth class out of DataStore into own HueUserAuth class

Fixes openhab#4293
Fixes openhab#4307

Signed-off-by: David Graeff <david.graeff@web.de>
davidgraeff pushed a commit to davidgraeff/openhab2-addons that referenced this issue Dec 9, 2018
…, group items

Fixes:
* Fix user creation without a proposed username in the request. Incl. test
* Fix: The hue value was wrongly applied to the saturation field. Incl. test
* Fix usage of StorageService: Set the classloader
* Set the saturation to 0 if a ct (color temperature) value is set.
  This is because Alexa only sets "ct" if you command her to turn the light white.
* Only call writeToFile in LightItems once, after all items have been
  loaded up from the registry.
* Don't load items twice from the registry.
* Reload items whenever the tags configuration has changed.
* Allow group items

Features:
* Add troubleshoot section to readme.
  Allow a pretty printed output for /api/{username}/lights?debug=true.

Tests:
* Add LightItems class unit tests for adding/updating items and group items
  by category and tags.
* Add tests for setting the hue and saturation and turn a light from color to white

Refactor:
* Move UserAuth class out of DataStore into own HueUserAuth class

Fixes openhab#4293
Fixes openhab#4307

Signed-off-by: David Graeff <david.graeff@web.de>
davidgraeff pushed a commit to davidgraeff/openhab2-addons that referenced this issue Dec 9, 2018
…, group items

Fixes:
* Fix user creation without a proposed username in the request. Incl. test
* Fix: The hue value was wrongly applied to the saturation field. Incl. test
* Fix usage of StorageService: Set the classloader
* Set the saturation to 0 if a ct (color temperature) value is set.
  This is because Alexa only sets "ct" if you command her to turn the light white.
* Only call writeToFile in LightItems once, after all items have been
  loaded up from the registry.
* Don't load items twice from the registry.
* Reload items whenever the tags configuration has changed.
* Allow group items

Features:
* Add troubleshoot section to readme.
  Allow a pretty printed output for /api/{username}/lights?debug=true.
* Add REST API POST support on /api/{username}/groups.

Tests:
* Add LightItems class unit tests for adding/updating items and group items
  by category and tags.
* Add tests for setting the hue and saturation and turn a light from color to white

Refactor:
* Move UserAuth class out of DataStore into own HueUserAuth class

Fixes openhab#4293
Fixes openhab#4307

Signed-off-by: David Graeff <david.graeff@web.de>
kaikreuzer pushed a commit that referenced this issue Dec 9, 2018
…, group items (#4339)

Fixes:
* Fix user creation without a proposed username in the request. Incl. test
* Fix: The hue value was wrongly applied to the saturation field. Incl. test
* Fix usage of StorageService: Set the classloader
* Set the saturation to 0 if a ct (color temperature) value is set.
  This is because Alexa only sets "ct" if you command her to turn the light white.
* Only call writeToFile in LightItems once, after all items have been
  loaded up from the registry.
* Don't load items twice from the registry.
* Reload items whenever the tags configuration has changed.
* Allow group items

Features:
* Add troubleshoot section to readme.
  Allow a pretty printed output for /api/{username}/lights?debug=true.
* Add REST API POST support on /api/{username}/groups.

Tests:
* Add LightItems class unit tests for adding/updating items and group items
  by category and tags.
* Add tests for setting the hue and saturation and turn a light from color to white

Refactor:
* Move UserAuth class out of DataStore into own HueUserAuth class

Fixes #4293
Fixes #4307

Signed-off-by: David Graeff <david.graeff@web.de>
@davidgraeff
Copy link
Member

Amazon is not officially supporting Hue bridges locally, are they?

@cee-dee
Copy link

cee-dee commented Dec 20, 2018

I've checked discovery with all of my Echo devices: The large Amazon Echo discovers only those devices which are directly exposed through the Hue Bridge, all other Echo Dots discover all devices, including those exposed by openHAB. The web version via alexa.amazon.com discovers all devices, too. (Tests have been performed using the tags "Lighting,Switchable" configured in the binding.

@davidgraeff
Copy link
Member

Tests have been performed using the tags "Lighting,Switchable" configured in the binding.

Can you assign "Lighting" to the Coloured bulb and test if coloured bulbs are supported by your Echos?
And test "Switchable" as well with the different Echos, that would help.

@5iver
Copy link
Author

5iver commented Dec 20, 2018

Amazon is not officially supporting Hue bridges locally, are they?

Yes, without a skill, which is how hueemulation is possible. And also why it is so handy, because you do not need a command word to use it, like when using a skill.

Here is an Amazon support article on it. There is also note in the Hue Skill that alludes to this.

I just reread you post, and don't think I answered your question (probably info you are very wel aware of 🙄 ). I don't think Alexa does anything locally yet.

@cee-dee
Copy link

cee-dee commented Dec 20, 2018

@davidgraeff : Can you elaborate on the exact scenario which I shall test? I assume you want this:
a) remove the configuration "Switchable" from the white tags setting
b) editing one my items-file to assign the tag "Lighting" to a single light
c) re-discover the items with web service, Echo and Echo Dot separately
d) verify if the adjusted item is discovered with a certain tag

Is this basically what you want? If so, which tags should be reported?

I don't have a clue what I should test regarding Switchable, since step a) will cause the items to be not discovered.

@davidgraeff
Copy link
Member

davidgraeff commented Dec 20, 2018

@cee-dee Exactly. I like to know if any/some devices of your setup support colors and switches and with what label the discovered devices are reported. The label differs for me depending on the discovery-performing device.

@openhab-5iver Regarding to the Amazon document

Philips Hue devices can connect to Alexa with the V1 Hue Bridge (circle-shaped). To connect these devices, say, "Discover devices," and then press the button on the bridge.

I'm emulating a 2nd gen bridge and it works for me and for you.

Note: Your Echo device can only be associated with one Phillips Hue bridge at a time.

I have two emulated bridges and both are recognised. But maybe they mean, that each Echo can associate to one bridge.

Phillips Hue devices with the V1 Hue Bridge can only turn on/off or brighten lights on compatible Echo devices.

Color and switches are working for me. But that document might be for the US market of course. In the German help center there is no such document at all.

All in all I think this is a relict and nobody noticed that the document is outdated by now. It would be really good to know where Amazon is heading to and what their plans are for local protocols.

@5iver
Copy link
Author

5iver commented Dec 20, 2018

I'm emulating a 2nd gen bridge and it works for me and for you.

That stands out to me. It was my understanding that a v2 bridge required the Hue skill to work with Alexa. Is this just a configuration setting (like firmware version), or would changes be needed in the API calls to emulate a v1? I ask, because I could try making the changes and testing it out to see if this helps at all.

@ScottKinSF
Copy link

5iver, the following statement from the 2nd link you provided above contradicts the statement from your 1st link about Alexa local control only being available for Philips Hue V1 bridges:

Note: Basic lighting functionality (on / off / dimming) is available without the Smarthome skill and is compatible with Philips Hue V1 (round) and V2 (square) bridges.

I think David is right, the information in the 1st link is out-of-date.

@5iver
Copy link
Author

5iver commented Dec 20, 2018

the following statement from the 2nd link you provided above contradicts the statement from your 1st link

I guess I can see that, but I was taking it to mean that this functionality is only available/compatible with a v1 bridge. But this is must be outdated (or incorrect), if hueemulation is emulating a v2 bridge.

I called Alexa support and they said that the Hue skill is required to discover devices on the v2 Hue bridge, but the skill is not required for the v1 bridge. 😕

@davidgraeff
Copy link
Member

davidgraeff commented Dec 21, 2018

The Alexa support team is required to say whatever the company policy is. And if the tech team is slowly starting to fade out local protocol support, the support will always tell you to use the skill of course.

We need to find out what still works. I have already learned to add a section to the readme telling people to try all different Alexa devices to perform discovery and to add all tags to the dimmable bulb if color and plugs are not recognized.

@ScottKinSF
Copy link

Update on the SYLVANIA SMART+ Smart Plug:

I received the device this afternoon and have tried numerous times to pair it with my Hue Hub V1 without success. It appears to use a ZigBee HA 1.2 profile rather than the ZLL profile required for compatibility with a Hue Hub.

I would still like to hear from anyone in the US who has one of the older SYLVANIA Lightify versions of this device paired with their Hue Hub. I think I will post an inquiry on one of the Hue Developers forums.

@gdgeist
Copy link

gdgeist commented Dec 23, 2018

So trying to understand where I could instrument this in order to cure my ColorLight issue and this Switchable thing.
The discovery exchange questions i have:

  1. Initiate discovery from web/app/device
  2. Since there isn't a "skill" involved - discovery must ask the Hue hub for a current list of devices.
    2a. web/app initiated:do all devices devices ask the known hue bridge for the list or is one chosen randomly, ranked?
    2b. device initiated: does it still call amazon and ask for the hue token/url for the action or does it have this stored locally?

Answers here would help me understand where to start sniffing the exchange.

@davidgraeff
Copy link
Member

2a. web/app initiated:do all devices devices ask the known hue bridge for the list or is one chosen randomly, ranked?

One random device.

2b. device initiated: does it still call amazon

An Echo stores its Hue bridge API key locally. It is not stored anywhere at Amazon. Each Echo creates its own Api Key. That's why you usually need to put your bridge into pairing mode if you have multiple Echos even if you have performed a discovery before. A random Echo that does not have an API key yet, could be chosen to perform the request to the Hue bridge.

limdul79 pushed a commit to limdul79/openhab2-addons that referenced this issue Dec 23, 2018
…, group items (openhab#4339)

Fixes:
* Fix user creation without a proposed username in the request. Incl. test
* Fix: The hue value was wrongly applied to the saturation field. Incl. test
* Fix usage of StorageService: Set the classloader
* Set the saturation to 0 if a ct (color temperature) value is set.
  This is because Alexa only sets "ct" if you command her to turn the light white.
* Only call writeToFile in LightItems once, after all items have been
  loaded up from the registry.
* Don't load items twice from the registry.
* Reload items whenever the tags configuration has changed.
* Allow group items

Features:
* Add troubleshoot section to readme.
  Allow a pretty printed output for /api/{username}/lights?debug=true.
* Add REST API POST support on /api/{username}/groups.

Tests:
* Add LightItems class unit tests for adding/updating items and group items
  by category and tags.
* Add tests for setting the hue and saturation and turn a light from color to white

Refactor:
* Move UserAuth class out of DataStore into own HueUserAuth class

Fixes openhab#4293
Fixes openhab#4307

Signed-off-by: David Graeff <david.graeff@web.de>
limdul79 pushed a commit to limdul79/openhab2-addons that referenced this issue Dec 23, 2018
…, group items (openhab#4339)

Fixes:
* Fix user creation without a proposed username in the request. Incl. test
* Fix: The hue value was wrongly applied to the saturation field. Incl. test
* Fix usage of StorageService: Set the classloader
* Set the saturation to 0 if a ct (color temperature) value is set.
  This is because Alexa only sets "ct" if you command her to turn the light white.
* Only call writeToFile in LightItems once, after all items have been
  loaded up from the registry.
* Don't load items twice from the registry.
* Reload items whenever the tags configuration has changed.
* Allow group items

Features:
* Add troubleshoot section to readme.
  Allow a pretty printed output for /api/{username}/lights?debug=true.
* Add REST API POST support on /api/{username}/groups.

Tests:
* Add LightItems class unit tests for adding/updating items and group items
  by category and tags.
* Add tests for setting the hue and saturation and turn a light from color to white

Refactor:
* Move UserAuth class out of DataStore into own HueUserAuth class

Fixes openhab#4293
Fixes openhab#4307

Signed-off-by: David Graeff <david.graeff@web.de>
@Jitterer
Copy link

Same issue here for another german person. I'm running different echo dot v2 and v3. Workaround with hue emulation config does work, but only for switchs. I couldnt manage my roller shutter to work with percentages like "alexa, open roller shutter 60%"... that's very disappointing that such changes got implemented in stable releases :/

chaton78 pushed a commit to chaton78/openhab-addons that referenced this issue Jan 1, 2019
…, group items (openhab#4339)

Fixes:
* Fix user creation without a proposed username in the request. Incl. test
* Fix: The hue value was wrongly applied to the saturation field. Incl. test
* Fix usage of StorageService: Set the classloader
* Set the saturation to 0 if a ct (color temperature) value is set.
  This is because Alexa only sets "ct" if you command her to turn the light white.
* Only call writeToFile in LightItems once, after all items have been
  loaded up from the registry.
* Don't load items twice from the registry.
* Reload items whenever the tags configuration has changed.
* Allow group items

Features:
* Add troubleshoot section to readme.
  Allow a pretty printed output for /api/{username}/lights?debug=true.
* Add REST API POST support on /api/{username}/groups.

Tests:
* Add LightItems class unit tests for adding/updating items and group items
  by category and tags.
* Add tests for setting the hue and saturation and turn a light from color to white

Refactor:
* Move UserAuth class out of DataStore into own HueUserAuth class

Fixes openhab#4293
Fixes openhab#4307

Signed-off-by: David Graeff <david.graeff@web.de>
Signed-off-by: Pascal Larin <plarin@gmail.com>
@VitoDeCarlo
Copy link

I'm also unable to use Alexa to control the color of my lights (here in the U.S.). I cannot use a direct connection between Alexa and Hue, as I need Alexa to control my Z-Wave devices as well (and I use Google Home to control my Hue lights, also). So this puts me in the situation of not being able to control the color with Alexa for my 60 or so Hue lights on two Hue bridges. Of of my Alexa devices are the Echo Dot v2.

@davidgraeff
Copy link
Member

Google Home supports local Hue bridges (and hue emulation therefore) as well. Was a bit more tricky if I remember correctly, they also prefer the cloud connection of course.

There is nothing we can do if Amazon is not supporting certain features like color on all their devices.

@ersingencturk
Copy link

I'm using misc-hueemulation - 2.4.0

item defined as:

Rollershutter LivingRoom_Shutter3 "Kitchen Curtain" <rollershutter>(LivingRoom, gShutter) ["Switchable"] { channel="knx:device:bridge:generic:LivingRoom_Shutter3" }

But It's not visible in http://192.168.1.100/api/discovery hence alexa not finding it.

Is there a workaround ?

@davidgraeff
Copy link
Member

Yes. Using OH 2.5M1 :)

@ersingencturk
Copy link

Yes. Using OH 2.5M1 :)

fair enough :) is it possible to just enable this add on for 2.5M1 ? or have to change the whole setup ?

@davidgraeff
Copy link
Member

There is not much that happened from OH2.4 to OH2.5M1. It is relatively safe to just upgrade.

But you can always just download the "Milestone Add-ons" offline bundle and extract the kar file (it's a normal zip file) and and put the correct .jar file into your addons directory. Up to you.

@Jitterer
Copy link

Workaround is to setup the item as dimmer instead of rollershutter

@ersingencturk
Copy link

thanks for your fast responses.will try both

@davidgraeff davidgraeff added the won't fix Invalid Issues and requests that do not fit the specified add-on label Feb 9, 2019
@davidgraeff
Copy link
Member

Closing, because we have no control over Amazon and their Echo support for local Hue bridges.

@5iver
Copy link
Author

5iver commented Feb 9, 2019

For completeness, Amazon claims to only support V1 Hue hubs without a skill. This service was "upgraded" to emulate a V2 hub, but the features that were added are unusable. Previously, the Switchable and Lighting tags did the same thing. That was changed, and the Switchable tag no longer works. ColorLight will turn on/off the light, but color and temperature cannot be changed. Currently, only the Lighting tag works properly.

ne0h pushed a commit to ne0h/openhab-addons that referenced this issue Sep 15, 2019
…, group items (openhab#4339)

Fixes:
* Fix user creation without a proposed username in the request. Incl. test
* Fix: The hue value was wrongly applied to the saturation field. Incl. test
* Fix usage of StorageService: Set the classloader
* Set the saturation to 0 if a ct (color temperature) value is set.
  This is because Alexa only sets "ct" if you command her to turn the light white.
* Only call writeToFile in LightItems once, after all items have been
  loaded up from the registry.
* Don't load items twice from the registry.
* Reload items whenever the tags configuration has changed.
* Allow group items

Features:
* Add troubleshoot section to readme.
  Allow a pretty printed output for /api/{username}/lights?debug=true.
* Add REST API POST support on /api/{username}/groups.

Tests:
* Add LightItems class unit tests for adding/updating items and group items
  by category and tags.
* Add tests for setting the hue and saturation and turn a light from color to white

Refactor:
* Move UserAuth class out of DataStore into own HueUserAuth class

Fixes openhab#4293
Fixes openhab#4307

Signed-off-by: David Graeff <david.graeff@web.de>
Signed-off-by: Maximilian Hess <mail@ne0h.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
won't fix Invalid Issues and requests that do not fit the specified add-on
Projects
None yet
Development

No branches or pull requests