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

Hue Emulation missbehavior #5849

Closed
chillje opened this issue May 23, 2019 · 89 comments · Fixed by #5890
Closed

Hue Emulation missbehavior #5849

chillje opened this issue May 23, 2019 · 89 comments · Fixed by #5890
Labels
awaiting feedback Action - Waiting for response or more information troubleshooting Type - Troubleshooting

Comments

@chillje
Copy link

chillje commented May 23, 2019

Hello,
I run 3x "Sonoff S20 plugs" and 6x Shelly1 with tasmota.
The " Sonoff S20 Plugs " are running with "Hue Emu", the Shelly1 with "Belkin WeMo".
All are learned and used with Amazons "Alexa".

Since yesterday the Sonoff devices don't react correctly anymore when using Alexa commands. Only one Sonoff device reacts to the voice commands for all three Sonoff devices.

Short scenario:
Alexa, switch on Sonoff1 -> Sonoff 1 switches on
Alexa, switch off Sonoff2 -> Sonoff 1 switches off
Alexa, switch on Sonoff3 -> Sonoff 1 switches on

I have already removed all Sonoff devices from Alexa and added them again.
Nothing has changed in the behaviour, only Sonoff2 now reacts to all commands for the different Sonoff devices.

I updated Sonoff1 via tasmota OTA via the website to a new tasmota version, but that didn't help either.

Changing Sonoff1 from "Hue Emu" to "Belkin WeMo" was not possible. Alexa doesn't find the device with the Belkin emulation.

I guess there is a problem with the "Hue Emulation".
Maybe an update in the protocol that Alexa is already aware of?

@ihavenonick
Copy link

Same Problem here, I think Amazon have something changes on the HUE detection.
This problem ist exist with all Tasmota versions wen use the HUE emulator.

@ascillato2 ascillato2 added awaiting feedback Action - Waiting for response or more information template missing/incomplete Action - Template Missing or incomplete (issue will be closed) troubleshooting Type - Troubleshooting labels May 23, 2019
@ascillato2
Copy link
Collaborator

Please, could you be so kind on completing the troubleshooting template in order to have more information so as to properly help you?

Remember to read the Contributing Guideline and Policy. Thanks.


Support Information (Guide)

See Wiki for more information.
See FAQ for common questions/answers and links if none of your question is in the list.
See Chat for more user experience.
See Community for forum.
See Code of Conduct

@wernerk63
Copy link

wernerk63 commented May 23, 2019

Over 20 Sonoff Devices,
works perfect with the Workarounds (Hue brightness) before,
and then with Master 6.5.0.0 since publish for over 45 days.

now - same Problem with HueBridgeEmu after Alexa search Devices, since ca. 24h in Germany.

2x 4chpro and 2x T1EU with HueBridgeEmu and Tasmota Master 6.5.0.0 reacts false on Alexa.
Last night i do some Troubleshooting, it seams that Alexa only adresses/recognize one Hue Bridge.
With one HueBridgeEmu all is working, after adding the second one, a false Device switch..

The weblog's (Level 4) shows:

  1. Alexa Search Devices, found and enumarate Hue Light's :
    /LastcharMac/light1 to light4 eg. light2 for each/all Devices
    (all correct, with different 'LastCharMac'/light x)

  2. After adding the Second Device with HueBridgeEmu and switch a 'Light' a wrong Device switch...
    Weblog of the wrong switched Device show's the 'LastcharMac'/light x of the wrong Device,
    and not the 'HueAdress' (LastCharMac/light x) of the per VoiceCommand adressed Device

Maybe, it should works further, if i had not do a 'Search Devices'..... ( because of NetworkChanges)
I think, there is something changes on the Alexa HUE Support.

24.05 Edit TROUBLSHOOTING INFORMATION :
File Upload, same behavior as max0412 -> a lot of UDP: Packet (199) in between.
Hue Emulation missbehavior (#5849).txt

@Max0412
Copy link

Max0412 commented May 23, 2019

Same problem here, i´ve added 2x H801 and enabled the Hue Emulation.
Both are found in the Alexa App but they both only switch the same H801.

Edit - i´ve just tried some variations.
switching a Shelly1 via App doesn´t work but with the Alexa Voice command it does work,

@s-hadinger
Copy link
Collaborator

This is strange, when you manually change the configuration of the light via the Tasmota console, the change is well reflected in Alexa. However when sending the commands from Alexa, it looks like it's sending UDP packets to try to discover which Hue bridge it should send to.

Will need to add more logs to troubleshoot.

@rherriage
Copy link

I'm running into the same issue as well. I noticed it this morning. I'm running 6 x Sonoff ifan02s with Tasmota 6.5. The status will change if I manually change the lights/fans on/off, but the app nor verbal commands with an echo will turn them off/on.

@ascillato
Copy link
Contributor

Please, complete the troubleshooting template in order to have more debug information. Thanks

@Max0412
Copy link

Max0412 commented May 24, 2019

ISSUE DESCRIPTION - TROUBLESHOOTING

Phillips Hue Emulation activated for 2 H801 with LED Strips
Phillips Hue Emulation activated for 1 Shelly1 as I/O Device

The H801 devices are both found in Alexa (Fernsehtisch and COUCH), but both(in-app and with voice command) just switch COUCH in the alexa app. Alexa does seem to recognize the current state/color of both H801 individually. - COUCH was set up first. -
The Shelly 1 does switch with voice command but doesn´t in-app. It does recognize the current state of the Shelly.

STATUS 0 of COUCH

20:56:56 MQT: stat/Wohnzimmer/STATUS = {"Status":{"Module":20,"FriendlyName":["COUCHLED"],"Topic":"Wohnzimmer","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}} 20:56:56 MQT: stat/Wohnzimmer/STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"sonoffs","OtaUrl":"http://thehackbox.org/tasmota/release/sonoff.bin","RestartReason":"Software/System restart","Uptime":"1T01:15:15","StartupUTC":"2019-05-23T18:41:41","Sleep":50,"CfgHolder":4617,"BootCount":9,"SaveCount":109,"SaveAddress":"F7000"}} 20:56:56 MQT: stat/Wohnzimmer/STATUS2 = {"StatusFWR":{"Version":"6.5.0.9(sonoff)","BuildDateTime":"2019-05-18T12:56:57","Boot":31,"Core":"2_5_0","SDK":"3.0.0-dev(c0f7b44)"}} 20:56:56 MQT: stat/Wohnzimmer/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["TP-Link_B33E",""],"TelePeriod":300,"Resolution":"55C180C0","SetOption":["00008009","280500000100000000000000000000000000","00000000"]}} 20:56:56 MQT: stat/Wohnzimmer/STATUS4 = {"StatusMEM":{"ProgramSize":600,"Free":400,"Heap":19,"ProgramFlashSize":1024,"FlashSize":1024,"FlashChipId":"1440EF","FlashMode":3,"Features":["00000809","0FDAE394","000783A0","23B617CE","01003BC0"]}} 20:56:56 MQT: stat/Wohnzimmer/STATUS5 = {"StatusNET":{"Hostname":"Wohnzimmer-4859","IPAddress":"192.168.0.107","Gateway":"192.168.0.1","Subnetmask":"255.255.255.0","DNSServer":"193.31.25.87","Mac":"3C:71:BF:31:92:FB","Webserver":2,"WifiConfig":4}} 20:56:56 MQT: stat/Wohnzimmer/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.0.100","MqttPort":1883,"MqttClientMask":"COUCH_%06X","MqttClient":"COUCH_3192FB","MqttUser":"maxl","MqttCount":37,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}} 20:56:56 MQT: stat/Wohnzimmer/STATUS7 = {"StatusTIM":{"UTC":"Fri May 24 19:56:56 2019","Local":"Fri May 24 20:56:56 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":"+01:00","Sunrise":"04:58","Sunset":"20:36"}} 20:56:56 MQT: stat/Wohnzimmer/STATUS10 = {"StatusSNS":{"Time":"2019-05-24T20:56:56"}} 20:56:56 MQT: stat/Wohnzimmer/STATUS11 = {"StatusSTS":{"Time":"2019-05-24T20:56:56","Uptime":"1T01:15:15","Vcc":3.405,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":24,"POWER":"OFF","Dimmer":61,"Color":"9B91000000","HSBColor":"56,100,61","Channel":[61,57,0,0,0],"CT":153,"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"TP-Link_B33E","BSSId":"0C:80:63:E5:B3:3E","Channel":6,"RSSI":90,"LinkCount":18,"Downtime":"0T00:01:12"}}}

STATUS 0 of the Shelly1

20:58:32 CMD: status 0 20:58:32 SRC: WebConsole from 192.168.0.101 20:58:32 RSL: Received Topic /status, Data Size 1, Data 0 20:58:32 RSL: Group 0, Index 1, Command STATUS, Data 0 20:58:32 MQT: stat/Wohnzimmer/STATUS = {"Status":{"Module":46,"FriendlyName":["Deckenlicht Wohnzimmer"],"Topic":"Wohnzimmer","ButtonTopic":"0","Power":1,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}} 20:58:32 MQT: stat/Wohnzimmer/STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"sonoffs","OtaUrl":"http://thehackbox.org/tasmota/release/sonoff.bin","RestartReason":"Software/System restart","Uptime":"2T01:55:39","StartupUTC":"2019-05-22T18:02:53","Sleep":50,"CfgHolder":4617,"BootCount":13,"SaveCount":147,"SaveAddress":"F9000"}} 20:58:32 MQT: stat/Wohnzimmer/STATUS2 = {"StatusFWR":{"Version":"6.5.0.9(sonoff)","BuildDateTime":"2019-05-11T04:03:33","Boot":31,"Core":"2_5_0","SDK":"3.0.0-dev(c0f7b44)"}} 20:58:32 MQT: stat/Wohnzimmer/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":4,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["TP-Link_B33E",""],"TelePeriod":300,"Resolution":"55C180C0","SetOption":["00008009","280500000100000000000000000000000000","00000000"]}} 20:58:32 MQT: stat/Wohnzimmer/STATUS4 = {"StatusMEM":{"ProgramSize":600,"Free":400,"Heap":18,"ProgramFlashSize":1024,"FlashSize":2048,"FlashChipId":"1540EF","FlashMode":3,"Features":["00000809","0FDAE394","000783A0","23B617CE","01003BC0"]}} 20:58:32 MQT: stat/Wohnzimmer/STATUS5 = {"StatusNET":{"Hostname":"Wohnzimmer-4064","IPAddress":"192.168.0.104","Gateway":"192.168.0.1","Subnetmask":"255.255.255.0","DNSServer":"193.31.25.87","Mac":"B4:E6:2D:55:EF:E0","Webserver":2,"WifiConfig":4}} 20:58:32 MQT: stat/Wohnzimmer/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.0.100","MqttPort":1883,"MqttClientMask":"WZ_Deckenleuchte_%06X","MqttClient":"WZ_Deckenleuchte_55EFE0","MqttUser":"maxl","MqttCount":44,"MAX_PACKET_SIZE":1000,"KEEPALIVE":15}} 20:58:32 MQT: stat/Wohnzimmer/STATUS7 = {"StatusTIM":{"UTC":"Fri May 24 19:58:32 2019","Local":"Fri May 24 20:58:32 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":"+01:00","Sunrise":"04:58","Sunset":"20:36"}} 20:58:32 MQT: stat/Wohnzimmer/STATUS10 = {"StatusSNS":{"Time":"2019-05-24T20:58:32","Switch1":"ON"}} 20:58:32 MQT: stat/Wohnzimmer/STATUS11 = {"StatusSTS":{"Time":"2019-05-24T20:58:32","Uptime":"2T01:55:39","Vcc":3.502,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"ON","Wifi":{"AP":1,"SSId":"TP-Link_B33E","BSSId":"0C:80:63:E5:B3:3E","Channel":6,"RSSI":82,"LinkCount":10,"Downtime":"0T00:00:41"}}}

weblog4 of Shelly:
20:59:42 WIF: Checking connection... 20:59:42 WIF: Connected 21:00:01 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:00:01 HTP: Hue Result ({"state":{"on":true,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Deckenlicht Wohnzimmer","modelid":"LCT007","uniqueid":"b4:e6:2d:55:ef:e0:00:11-1","swversion":"5.50.1.19085"}) 21:00:02 WIF: Checking connection... 21:00:02 WIF: Connected 21:00:07 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:00:07 HTP: Hue Result ({"state":{"on":true,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Deckenlicht Wohnzimmer","modelid":"LCT007","uniqueid":"b4:e6:2d:55:ef:e0:00:11-1","swversion":"5.50.1.19085"}) 21:00:13 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:00:13 HTP: Hue Result ({"state":{"on":true,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Deckenlicht Wohnzimmer","modelid":"LCT007","uniqueid":"b4:e6:2d:55:ef:e0:00:11-1","swversion":"5.50.1.19085"}) 21:00:16 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:00:16 HTP: Hue Result ({"state":{"on":true,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Deckenlicht Wohnzimmer","modelid":"LCT007","uniqueid":"b4:e6:2d:55:ef:e0:00:11-1","swversion":"5.50.1.19085"}) 21:00:19 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:00:19 HTP: Hue Result ({"state":{"on":true,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Deckenlicht Wohnzimmer","modelid":"LCT007","uniqueid":"b4:e6:2d:55:ef:e0:00:11-1","swversion":"5.50.1.19085"}) 21:00:22 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:00:22 HTP: Hue Result ({"state":{"on":true,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Deckenlicht Wohnzimmer","modelid":"LCT007","uniqueid":"b4:e6:2d:55:ef:e0:00:11-1","swversion":"5.50.1.19085"}) 21:00:22 WIF: Checking connection... 21:00:22 WIF: Connected 21:00:25 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:00:25 HTP: Hue Result ({"state":{"on":true,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Deckenlicht Wohnzimmer","modelid":"LCT007","uniqueid":"b4:e6:2d:55:ef:e0:00:11-1","swversion":"5.50.1.19085"})
with a lot of 20:59:34 UDP: Packet (199) in between.

weblog 4 of COUCH
21:02:20 CMD: weblog 4 21:02:20 MQT: stat/Wohnzimmer/RESULT = {"WebLog":4} 21:02:21 CFG: Saved to flash at F6, Count 110, Bytes 3584 21:02:26 WIF: Checking connection... 21:02:26 WIF: Connected 21:02:30 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:02:30 HTP: Hue Result ({"state":{"on":false,"bri":155,"colormode":"hs","xy":[0.44658,0.52597],"hue":10223,"sat":254,"ct":153,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"COUCHLED","modelid":"LCT007","uniqueid":"3c:71:bf:31:92:fb:00:11-1","swversion":"5.50.1.19085"}) 21:02:32 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1/state) 21:02:32 HTP: Hue POST args () 21:02:32 HTP: Hue POST args ({"on": true}) 21:02:32 SRC: Hue 21:02:32 MQT: stat/Wohnzimmer/RESULT = {"POWER":"ON"} 21:02:32 MQT: stat/Wohnzimmer/POWER = ON 21:02:32 HTP: Hue Result ([{"success":{"/lights/1/state/on":true}}]) 21:02:33 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:02:33 HTP: Hue Result ({"state":{"on":true,"bri":155,"colormode":"hs","xy":[0.44658,0.52597],"hue":10223,"sat":254,"ct":153,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"COUCHLED","modelid":"LCT007","uniqueid":"3c:71:bf:31:92:fb:00:11-1","swversion":"5.50.1.19085"}) 21:02:33 CFG: Saved to flash at F5, Count 111, Bytes 3584 21:02:36 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:02:36 HTP: Hue Result ({"state":{"on":true,"bri":155,"colormode":"hs","xy":[0.44658,0.52597],"hue":10223,"sat":254,"ct":153,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"COUCHLED","modelid":"LCT007","uniqueid":"3c:71:bf:31:92:fb:00:11-1","swversion":"5.50.1.19085"}) 21:02:38 UDP: Packet (199) 21:02:39 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:02:39 HTP: Hue Result ({"state":{"on":true,"bri":155,"colormode":"hs","xy":[0.44658,0.52597],"hue":10223,"sat":254,"ct":153,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"COUCHLED","modelid":"LCT007","uniqueid":"3c:71:bf:31:92:fb:00:11-1","swversion":"5.50.1.19085"}) 21:02:42 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:02:42 HTP: Hue Result ({"state":{"on":true,"bri":155,"colormode":"hs","xy":[0.44658,0.52597],"hue":10223,"sat":254,"ct":153,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"COUCHLED","modelid":"LCT007","uniqueid":"3c:71:bf:31:92:fb:00:11-1","swversion":"5.50.1.19085"}) 21:02:45 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:02:45 HTP: Hue Result ({"state":{"on":true,"bri":155,"colormode":"hs","xy":[0.44658,0.52597],"hue":10223,"sat":254,"ct":153,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"COUCHLED","modelid":"LCT007","uniqueid":"3c:71:bf:31:92:fb:00:11-1","swversion":"5.50.1.19085"}) 21:02:46 WIF: Checking connection... 21:02:46 WIF: Connected 21:02:48 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:02:48 HTP: Hue Result ({"state":{"on":true,"bri":155,"colormode":"hs","xy":[0.44658,0.52597],"hue":10223,"sat":254,"ct":153,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"COUCHLED","modelid":"LCT007","uniqueid":"3c:71:bf:31:92:fb:00:11-1","swversion":"5.50.1.19085"}) 21:02:51 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:02:51 HTP: Hue Result ({"state":{"on":true,"bri":155,"colormode":"hs","xy":[0.44658,0.52597],"hue":10223,"sat":254,"ct":153,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"COUCHLED","modelid":"LCT007","uniqueid":"3c:71:bf:31:92:fb:00:11-1","swversion":"5.50.1.19085"}) 21:02:54 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:02:54 HTP: Hue Result ({"state":{"on":true,"bri":155,"colormode":"hs","xy":[0.44658,0.52597],"hue":10223,"sat":254,"ct":153,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"COUCHLED","modelid":"LCT007","uniqueid":"3c:71:bf:31:92:fb:00:11-1","swversion":"5.50.1.19085"}) 21:02:57 HTP: Hue API (/OD4gGlAzzyzQGfFrCZ59qPYYAFsDlNEPvFiNjQZZ/lights/1) 21:02:57 HTP: Hue Result ({"state":{"on":true,"bri":155,"colormode":"hs","xy":[0.44658,0.52597],"hue":10223,"sat":254,"ct":153,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"COUCHLED","modelid":"LCT007","uniqueid":"3c:71:bf:31:92:fb:00:11-1","swversion":"5.50.1.19085"})

hope that did help.

@s-hadinger

This comment has been minimized.

@s-hadinger
Copy link
Collaborator

I added some logs and I can confirm that Alexa sends a UDP UPNP discover just before sending the command to Tasmota. I guess this is a check to make sure the device hasn't change IP address since last discover. This is where something must be wrong, and Alexa gets confused by the Tasmota answer.

09:22:30 UDP Packet received m-search*http/1.1host:239.255.255.250:1900man:"ssdp:discover"mx:3st:ssdp:all
09:22:32 Packet 1 HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
EXT:
LOCATION: http://192.168.1.203:80/description.xml
SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.17.0
hue-bridgeid: 840D8EFFFE59313E
ST: upnp:rootdevice
USN: uuid:f6543a06-da50-11ba-8d8f-840d8e59313e::upnp:rootdevice


09:22:32 Packet 2 HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
EXT:
LOCATION: http://192.168.1.203:80/description.xml
SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.17.0
hue-bridgeid: 840D8EFFFE59313E
ST: uuid:f6543a06-da50-11ba-8d8f-840d8e59313e
USN: uuid:f6543a06-da50-11ba-8d8f-840d8e59313e


09:22:32 Packet 3 HTTP/1.1 200 OK
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=100
EXT:
LOCATION: http://192.168.1.203:80/description.xml
SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.17.0
hue-bridgeid: 840D8EFFFE59313E
ST: urn:schemas-upnp-org:device:basic:1
USN: uuid:f6543a06-da50-11ba-8d8f-840d8e59313e


09:22:32 UPP: Hue 3 response packets sent to 192.168.1.43:50000
09:22:32 HTP: Hue setup
09:22:32 Send XML description <?xml version="1.0"?><root xmlns="urn:schemas-upnp-org:device-1-0"><specVersion><major>1</major><minor>0</minor></specVersion><URLBase>http://192.168.1.203:80/</URLBase><device><deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType><friendlyName>Amazon-Echo-HA-Bridge (192.168.1.203)</friendlyName><manufacturer>Royal Philips Electronics</manufacturer><modelDescription>Philips hue Personal Wireless Lighting</modelDescription><modelName>Philips hue bridge 2012</modelName><modelNumber>9290002
09:22:46 HTP: Main Menu

@ascillato2 ascillato2 removed the template missing/incomplete Action - Template Missing or incomplete (issue will be closed) label May 25, 2019
@rherriage
Copy link

rherriage commented May 25, 2019

an update.... i tried 6.5.0.12 and now the echo dot voice is working, but the app still isn't working. It will return status, but it won't change status.

another update... I walked through my house this morning and alexa voice works on some of my 6.5.0 IFAN02s, but the app still isn't working. Looks like Amazon is changing stuff...

and I added some more weblogs for one of the ones that's not working via voice on 6.5.0 build 3-29. Although you may not want to spend too much time on it since that seems to be resolved with 6.5.0.12.

here is the template:

ISSUE DESCRIPTION - TROUBLESHOOTING

Alexa stopped working with hue emulation a couple of days ago. This happened all at the same time on 6 x Sonoff IFAN02s running 6.5.0. The alexa app nor echo dots could change the status of the switch; however, the app couldsee what the current status is (can see if the switch is on or off if changed manually). I updated one to 6.5.0.12 and now voice command works from echo, but the IOS app does not

STATUS 0 OUTPUT HERE:
14:48:59 CMD: status 0
14:48:59 RSL: STATUS = {"Status":{"Module":44,"FriendlyName":["Play Room lights"],"Topic":"Play Room","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
14:48:59 RSL: STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"sonoffs","OtaUrl":"http://thehackbox.org/tasmota/020501/sonoff.bin","RestartReason":"Software/System restart","Uptime":"0T00:10:00","StartupUTC":"2019-05-25T13:38:59","Sleep":50,"CfgHolder":4617,"BootCount":274,"SaveCount":283,"SaveAddress":"F8000"}}
14:48:59 RSL: STATUS2 = {"StatusFWR":{"Version":"6.5.0.12(4d070bf-sonoff)","BuildDateTime":"2019-05-24T16:02:07","Boot":7,"Core":"2_5_1","SDK":"2.2.1(cfd48f3)"}}
14:48:59 RSL: STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["rustytoo",""],"TelePeriod":300,"Resolution":"55C180C0","SetOption":["00008001","280500000100000000000000000000000000","00000000"]}}
14:48:59 RSL: STATUS4 = {"StatusMEM":{"ProgramSize":574,"Free":428,"Heap":25,"ProgramFlashSize":1024,"FlashSize":1024,"FlashChipId":"144051","FlashMode":3,"Features":["00000809","0FDAE394","001783A0","23B617CC","01003BC0"]}}
14:48:59 RSL: STATUS5 = {"StatusNET":{"Hostname":"Play Room-7970","IPAddress":"192.168.5.57","Gateway":"192.168.5.1","Subnetmask":"255.255.255.0","DNSServer":"208.67.222.222","Mac":"DC:4F:22:DB:9F:22","Webserver":2,"WifiConfig":4}}
14:48:59 RSL: STATUS7 = {"StatusTIM":{"UTC":"Sat May 25 13:48:59 2019","Local":"Sat May 25 14:48:59 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":"+01:00","Sunrise":"04:57","Sunset":"20:37"}}
14:48:59 RSL: STATUS10 = {"StatusSNS":{"Time":"2019-05-25T14:48:59"}}
14:48:59 RSL: STATUS11 = {"StatusSTS":{"Time":"2019-05-25T14:48:59","Uptime":"0T00:10:00","SleepMode":"Dynamic","Sleep":50,"LoadAvg":23,"POWER1":"OFF","FanSpeed":0,"Wifi":{"AP":1,"SSId":"rustytoo","BSSId":"58:AC:78:F8:F0:B1","Channel":6,"RSSI":84,"LinkCount":1,"Downtime":"0T00:00:04"}}}
14:49:03 APP: Serial logging disabled

  • [ x] Provide the output of console when you experience your issue if apply :
    (Please use weblog 4 for more debug information)
CONSOLE OUTPUT HERE:
this is from the app test.  You can see that it returns the state, but it will not make a change.


14:51:44 HTP: Hue Result ({"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Play Room lights","modelid":"LCT007","uniqueid":"dc:4f:22:db:9f:22:00:11-1","swversion":"5.50.1.19085"})
14:51:48 WIF: Checking connection...
14:51:48 WIF: Connected
14:52:08 WIF: Checking connection...
14:52:08 WIF: Connected
14:52:10 HTP: Information
14:52:13 HTP: Hue API (/o61z9UvSfD2xIFxfM2iVhuo4xHz4XlpUseCkrfY0/lights/1)
14:52:13 HTP: Hue Result ({"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Play Room lights","modelid":"LCT007","uniqueid":"dc:4f:22:db:9f:22:00:11-1","swversion":"5.50.1.19085"})
14:52:28 WIF: Checking connection...
14:52:28 WIF: Connected
14:52:44 UDP: Packet (199)
14:52:44 UDP: Packet (199)
14:52:44 UDP: Packet (199)
14:52:44 UDP: Packet (199)
14:52:44 UDP: Packet (199)
14:52:44 UDP: Packet (199)
14:52:44 UDP: Packet (199)
14:52:44 UDP: Packet (199)
14:52:48 WIF: Checking connection...
14:52:48 WIF: Connected
14:52:57 UDP: Packet (199)
14:52:57 UDP: Packet (199)
14:52:57 UDP: Packet (199)
14:52:58 UDP: Packet (199)
14:52:59 UDP: Packet (199)
14:53:00 UDP: Packet (199)
14:53:00 UDP: Packet (199)
14:53:00 UDP: Packet (199)
14:53:00 UDP: Packet (199)
14:53:01 UDP: Packet (199)
14:53:02 UDP: Packet (199)
14:53:03 UDP: Packet (199)
14:53:03 UDP: Packet (199)
14:53:03 UDP: Packet (199)
14:53:03 UDP: Packet (199)
14:53:04 UDP: Packet (199)
14:53:05 UDP: Packet (199)
14:53:08 WIF: Checking connection...
14:53:08 WIF: Connected
14:53:14 HTP: Hue API (/o61z9UvSfD2xIFxfM2iVhuo4xHz4XlpUseCkrfY0/lights/1)
14:53:14 HTP: Hue Result ({"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Play Room lights","modelid":"LCT007","uniqueid":"dc:4f:22:db:9f:22:00:11-1","swversion":"5.50.1.19085"})
CONSOLE OUTPUT HERE:
seems it won't turn on the fan, but it will turn on the light after turning it off and on manually several times.

5:06:45 RSL: POWER1 = ON
15:06:45 CFG: Saved to flash at F7, Count 693, Bytes 3584
15:06:46 HTP: Hue API (/or876gUfZOBgm0TZMU1DB0shnwI2lYpMhtzirWY6/lights/1)
15:06:52 WIF: Checking connection...
15:06:52 WIF: Connected
15:07:12 WIF: Checking connection...
15:07:12 WIF: Connected
15:07:13 HTP: Hue API (/or876gUfZOBgm0TZMU1DB0shnwI2lYpMhtzirWY6/lights/1/state)
15:07:13 HTP: Hue POST args ()
15:07:13 HTP: Hue POST args ({"on": false})
15:07:13 SRC: Hue
15:07:13 RSL: RESULT = {"POWER1":"OFF"}
15:07:13 RSL: POWER1 = OFF
15:07:13 CFG: Saved to flash at F6, Count 694, Bytes 3584
15:07:13 HTP: Hue API (/or876gUfZOBgm0TZMU1DB0shnwI2lYpMhtzirWY6/lights/1)
15:07:32 WIF: Checking connection...
15:07:32 WIF: Connected

(Please, remember to close the issue when the problem has been addressed)

@s-hadinger
Copy link
Collaborator

I've been spending some time on it. I confirm that voice control works but app or on-screen control (Echo Spot) does not work. It does not seem linked to Tasmota. But still digging.

@s-hadinger
Copy link
Collaborator

Interestingly, when you use the app, it looks like the commands are always dispatched to the Tasmota device with the smallest IP address. Though it works ok when using voice commands.
I have tweaked a lot of parameters in Tasmota (BridgeIDs...) with no change. I will contact Alexa support.

@wongnam
Copy link

wongnam commented May 26, 2019

@s-hadinger Please note that Echo Show, Echo Spot, Sonos One do not have the capability to discovery devices locally, in case it will work if one or more Echo gen1; Echo dot gen1/gen2 mix into one network with it.

@Supermicha81
Copy link

I have the same problem. But my issues only appear, if I try to switch Sonoffs in Groups.
All devices were listed correctly in the app and react fine, if I anounce them directly.
If I try to switch a Alexa group, the result is unpredictable.
Sometimes only on device or only on channel of an 4ch device react, sometimes a different multichannel device react. After deleting the devices from Alexa and search again, the behavior is newly different and other devices react on the same command.

Looks for me, that Amazon make some strage changes...

maybee off-topic:
Last night Alexa was not able to find a Sonoff Basic (WeMo-Emu). Only if I tried to search after televisons in the Alexa-App, the missing Basic was found... really strange...

I use only Echo-Dots (2.Gen) and all my Tasmota-Devices runs on 6.4.1.9-mod-1.43.9, the multichannel devices with Hue-Emu, the singlechannel with WeMo-Emu...

I'm sorry, today I'm out of time to create some logs...
If nessaccary, I will do later...

Update: My wife approved 5 Minutes ago, that at least one Alexa-Group with a multichannel-device works fine... I will observe.

@Cemal32
Copy link

Cemal32 commented May 26, 2019

I have the same problem since two days.

I think the issue is caused by Phillips end of support of the Hue Bridge V1.

I’ve installed Yonomi to test, if Yonomi can detect my Sonoff 3CH Switches.

Yonomi detects them as Hue Bridges V1 and controls them perfectly.

So my assumption is, that Amazon also ended their support for Hue Bridges V1 and supports only the V2. As Tasmota seems to emulate Hue Bridge V1, Alexa can’t control the Switches correctly.

@arendst
Copy link
Owner

arendst commented May 26, 2019

@Cemal32 you're right considering the Philips Hue Bridge V1 support see https://www2.meethue.com/en-gb/hue-bridge-upgrade

It ends in April 2020 but starting from April 2019

Voice control unavailable

Voice assistants that function via cloud connection, such as Amazon Alexa and the Google Assistant, will not work with the Hue Bridge v1.

So either Amazon has to be convinced that many users with Hue V1 hardware still need support or we have to find a way to emulate Hue V2.

The above quote from Philips does not make me buy Hue hardware any time soon considering the simple fact that they stop (and force others) support for it and using security as the main reason also force others to stop support. If I was Hue V1 owner I would force Philips to send me V2 hardware for free.

@Jason2866
Copy link
Collaborator

Happy that i never bought Hue hardware. Not the first time Philips left customers standing in the rain.
I can remember the stopped support services for TVs in the past which where included...

@altelch
Copy link
Contributor

altelch commented May 26, 2019

If it's true that this is caused by a switch to v2 API then we have a problem: https://daenney.github.io/2019/04/09/emulating-philips-hue-bridge
After initial Handshake SSL is required to talk to the bridge. Tasmota would have to implement SSL as HTTP endpoint but with which ressources...hopefully it's only a minor incompatibility after an API change. Is the same behaviour detected by other emulation projects like Homeassistant or EspAlexa (https://github.com/Aircoookie/Espalexa)?

@arendst
Copy link
Owner

arendst commented May 26, 2019

That's an easy one: Aircoookie/Espalexa#71

Same problem. Nice future.

@s-hadinger
Copy link
Collaborator

I did change the advertised device name in Tasmota to "Philips hue bridge 2015" instead of "Philips hue bridge 2012" and it does not change anything. Alexa doesn't care about the model and uses the well documented Philips Hue API: https://developers.meethue.com/develop/hue-api/

I'm confident it has no link to the depreciation of Philips hardware nor linked to HTTP/HTTPS protocol. This would not explain why it still works on Voice Control.

It really looks like Alexa is confusing multiple Hue bridges on the same network. I'll contact Alexa on Monday to see if it's a bug on Alexa side.

@rherriage
Copy link

what's weird is it is now voice control is intermittently working. I can find no rhyme or reason. My devices are not changing IPs (host DHCP lease), so it's not a discovery thing. One device that was working yesterday is not working today. I've got two devices on the 5/24 build, and one works, the other doesn't. I've tried to force updates on all my echo dots (none needed them). I've even tried to just turn them off, and try them one by one. I've got echo, echo dot 2nd (like 4 of them) and echo dot 3rd gen..

Again, it'll detect status, but won't change on/off.

I'm not sure why this would be related to the lack of support on V1, since support ended 4/20, and this just stopped working a few days ago. It's definitely possible, but seems weird that even if it's not supported by phillips they would just nix that code in echo.

@clabnet
Copy link

clabnet commented May 26, 2019

Me too. Only for tracKing thread.

@wernerk63
Copy link

With one HueBridge Alexa App+Voice works correct for me. ( -> delete all other devices !)
After add a Second Bridge App+ Voice works also, but Alexa seams to be confused about HueID and switches the false Bridge Device. (-> also delete all other not used Devices in this scenario)
(m.E. it switches the last configured -> s-hadinger say this with the lowest IP) .
With more Bridges/Multichannel Devices in Alexa it gets very confused, the Status in App hangs or errors occur, voice switches or not.
Be patiently, wait for Alexa feedback.

@znanev
Copy link
Contributor

znanev commented May 26, 2019

I was using WeMo emulation for all my Tasmota devices until a week ago. Alexa had no troubles finding or controlling the Tasmota devices individually or in groups.
Then I decided that Philips Hue emulation is the way forward so I updated the firmwares of all Tasmota devices to latest dev. version available and changed the emulation to Philips Hue. Since then controlling the devices in groups from Alexa has unpredictable results. Controlling the devices individually works with no troubles, but switching groups of devices on/off is impossible when more that one device is in Hue emulation mode.
So if it turns out that Amazon did something on their end related to the old Philips V1 devices, this will be a deal breaker for me. I'll have to either live with WeMo emulation (although partially broken and deprecated), or if this doesn't work - changing the voice assistant to some DIY one...

@altelch
Copy link
Contributor

altelch commented May 27, 2019

Ok, just compiled a 6.5.0.12(sonoff)-2_5_2 and flashed it on a D1 mini, activated HUE and did a device search. Device was detected by Alexa and I can still switch my old Hue emulated devices or the new one without problems. I only have Echo and Echo-Dot Gen.1 devices on firmware 637566720 (Dot) and 635556820 (Echo). Maybe this is related to Gen.2 or later devices.

@s-hadinger
Copy link
Collaborator

Can you please set log to level 4 and share the logs? Including logs when Alexa is doing the discovery? We'll be able to identify if Alexa sends the right lightId back.

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

Log When I try to switch third device:

:35:32 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/82838643/state)
07:35:32 HTP: Hue POST args ()
07:35:32 HTP: Hue POST args ({"on": true})
07:35:32 SRC: Hue
07:35:32 RSL: RESULT = {"POWER1":"ON"}
07:35:32 RSL: POWER1 = ON
07:35:32 HTP: Hue Result ([{"success":{"/lights/1/state/on":true}}])
07:35:32 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/82838643)
07:35:32 HTP: Hue Result ({"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Passage Light","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-3","swversion":"5.50.1.19085"})

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

Discovery Log:

07:41:06 UDP: Packet (107)
07:41:06 UDP: Packet (122)
07:41:06 UDP: Packet (107)
07:41:06 UDP: Packet (122)
07:41:06 UDP: Packet (122)
07:41:06 UDP: Packet (107)
07:41:06 UDP: Packet (122)
07:41:06 UDP: Packet (107)
07:41:07 UPP: Hue 3 response packets sent to 192.168.0.192:50000
07:41:07 HTP: Hue setup
07:41:08 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights)
07:41:08 HTP: Hue Result ({"82838641":{"state":{"on":true,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Bedroom Bathroom","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-1","swversion":"5.50.1.19085"},"82838642":{"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Common Bathroom","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-2","swversion":"5.50.1.19085"},"82838643":{"state":{"on":false,"bri"
07:41:10 WIF: Checking connection...

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

Same behavior with the IP address based Light ID. Log for discovery and when I try to switch second device out of 4:

08:55:59 HTP: Hue setup
08:55:59 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights)
08:55:59 HTP: Hue Result ({"3089":{"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Bedroom Bathroom","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-1","swversion":"5.50.1.19085"},"3090":{"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Common Bathroom","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-2","swversion":"5.50.1.19085"},"3091":{"state":{"on":false,"bri":254,"alert
08:56:00 UDP: Packet (137)
08:56:03 UDP: Packet (137)
08:56:04 WIF: Checking connection...
08:56:04 WIF: Connected
08:56:04 DNS: MDNS.update
08:56:06 UDP: Packet (137)
08:56:09 UDP: Packet (137)
08:56:12 UDP: Packet (137)
08:56:15 UDP: Packet (137)
08:56:43 SRC: WebGui from 192.168.0.128
08:56:43 RSL: RESULT = {"POWER1":"ON"}
08:56:43 RSL: POWER1 = ON
08:56:43 CFG: Saved to flash at F9, Count 43, Bytes 3584
08:56:44 SRC: WebGui from 192.168.0.128
08:56:44 RSL: RESULT = {"POWER1":"OFF"}
08:56:44 RSL: POWER1 = OFF
08:56:45 CFG: Saved to flash at F8, Count 44, Bytes 3584
08:56:54 SRC: WebGui from 192.168.0.128
08:56:54 RSL: RESULT = {"POWER2":"ON"}
08:56:54 RSL: POWER2 = ON
08:56:54 CFG: Saved to flash at F7, Count 45, Bytes 3584
08:56:56 SRC: WebGui from 192.168.0.128
08:56:56 RSL: RESULT = {"POWER2":"OFF"}
08:56:56 RSL: POWER2 = OFF
08:56:57 CFG: Saved to flash at F6, Count 46, Bytes 3584
08:57:14 UDP: Packet (174)
08:57:15 UDP: Packet (174)
08:57:16 UDP: Packet (174)
08:57:17 UDP: Packet (174)
08:57:23 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/3090)
08:57:23 HTP: Hue Result ({"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Common Bathroom","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-2","swversion":"5.50.1.19085"})
08:57:25 WIF: Checking connection...
08:57:25 WIF: Connected
08:57:25 DNS: MDNS.update
08:57:26 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/3090)
08:57:26 HTP: Hue Result ({"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Common Bathroom","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-2","swversion":"5.50.1.19085"})
08:57:29 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/3090)
08:57:29 HTP: Hue Result ({"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Common Bathroom","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-2","swversion":"5.50.1.19085"})
08:57:32 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/3090)
08:57:32 HTP: Hue Result ({"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Common Bathroom","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-2","swversion":"5.50.1.19085"})
08:57:35 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/3090)
08:57:35 HTP: Hue Result ({"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Common Bathroom","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-2","swversion":"5.50.1.19085"})
08:57:37 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/3090/state)
08:57:37 HTP: Hue POST args ()
08:57:37 HTP: Hue POST args ({"on": true})
08:57:37 SRC: Hue
08:57:37 RSL: RESULT = {"POWER1":"ON"}
08:57:37 RSL: POWER1 = ON
08:57:37 HTP: Hue Result ([{"success":{"/lights/1/state/on":true}}])
08:57:37 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/3090)
08:57:37 HTP: Hue Result ({"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Common Bathroom","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-2","swversion":"5.50.1.19085"})
08:57:37 CFG: Saved to flash at F5, Count 47, Bytes 3584

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

I tried using the API directly via Postman and found that state changes only when you send 1,2,3 or 4 as the light Id and not the one advertised:
http://192.168.0.193/api/lights/2/state -- works
http://192.168.0.193/api/lights/3090/state -- switches on the first device but should have switched second

I guess changes are missing in the POST request part and light Id is only implemented in Alexa advertising

@s-hadinger
Copy link
Collaborator

Are you able to add logging in xdrv_20_hue.ino line 580? I wonder if atoi() is generating an overflow.
Logging the output of atoi() and the value of 'device' would be useful.

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

I am going through the code and I guess that the function HueLights() will need to be changed to accept larger device Ids . There is a check to set deviceId to 1 if it exceeds maxhue value..can you have a look?

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

I removed the device < maxhue check and logged atoi value, not correct. atoi() maxes out at max integer value 65,535

@s-hadinger
Copy link
Collaborator

Too bad. We could revert to sscanf() to convert from str to int.

@arendst
Copy link
Owner

arendst commented Jun 2, 2019

Don't use scanf! It raises code size to much being the first time it is used.

Simply use strtol as being used by most functions in tasmota.

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

My bad I took unsigned 16 bit...its just that value needs to be decoded before saving to device variable.
line 422-428 : (Decode added at 425..rest all is fine)

else if (path->endsWith("/state")) {               // Got ID/state
    path->remove(0,8);                               // Remove /lights/
    path->remove(path->indexOf("/state"));           // Remove /state
    device = DecodeLightId(atoi(path->c_str()));
    if ((device < 1) || (device > maxhue)) {
      device = 1;
    }

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

atoi() is ok

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

Also encode again at 437 to give correct response. Doesnt seem to matter but I guess response should be correct.

       response += FPSTR(HUE_LIGHT_RESPONSE_JSON);
        response.replace("{id", String(EncodeLightId(device)));
        response.replace("{cm", "on");

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

Working fine..Log:

14:02:38 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/82838644/state)
14:02:38 HTP: Hue POST args ()
14:02:38 HTP: Hue POST args ({"on": true})
14:02:38 SRC: Hue
14:02:38 RSL: RESULT = {"POWER4":"ON"}
14:02:38 RSL: POWER4 = ON
14:02:38 HTP: Hue Result ([{"success":{"/lights/82838644/state/on":true}}])
14:02:38 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/82838644)
14:02:38 HTP: Hue Result ({"state":{"on":true,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Geyser","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-4","swversion":"5.50.1.19085"})
14:02:38 CFG: Saved to flash at F9, Count 27, Bytes 3584
14:02:52 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/82838644/state)
14:02:52 HTP: Hue POST args ()
14:02:52 HTP: Hue POST args ({"on": false})
14:02:52 SRC: Hue
14:02:52 RSL: RESULT = {"POWER4":"OFF"}
14:02:52 RSL: POWER4 = OFF
14:02:52 HTP: Hue Result ([{"success":{"/lights/82838644/state/on":false}}])
14:02:53 HTP: Hue API (/eBdSjoPzohggo2Zv6ZGOAx96VipsvbjpWgEOlnc/lights/82838644)
14:02:53 HTP: Hue Result ({"state":{"on":false,"bri":254,"alert":"none","effect":"none","reachable":true},"type":"Extended color light","name":"Geyser","modelid":"LCT007","uniqueid":"60:01:94:4f:00:47:00:11-4","swversion":"5.50.1.19085"})
14:02:53 CFG: Saved to flash at F8, Count 28, Bytes 3584

@s-hadinger
Copy link
Collaborator

Thanks, good catch.

@Jason2866
Copy link
Collaborator

PR? 😊

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

Flashed the updated code on 5 tasmota devices. 17 switches in total. I can confirm everything working fine from voice and alexa app. Group, and routines functionality also restored.

Everything seems a littile faster maybe because all lights now have unique Ids so there less searching involved or caus I was on version 5 something before

@arendst
Copy link
Owner

arendst commented Jun 2, 2019

Great.

So pls either document your patches here (again) or provide a PR

@Pawand15
Copy link

Pawand15 commented Jun 2, 2019

Following are the two patches:
Line 425:
device = DecodeLightId(atoi(path->c_str()));

Line 437:
response.replace("{id", String(EncodeLightId(device)));

Alexa gives the encoded ID in post request url which was overflowing when returned by atoi to device variable. Further as the value of device was more than maxhue it was being set to 1 again. The device I'd needs to be decoded switched and then encoded again for response.

@arendst
Copy link
Owner

arendst commented Jun 2, 2019

Thx.

arendst added a commit that referenced this issue Jun 2, 2019
Fix Hue Emulation (#5849)
@znanev
Copy link
Contributor

znanev commented Jun 2, 2019

Just tested with the latest dev firmware (bb3fb7c) - now everything works as expected: Alexa (and wife!) are finally happy :)

Thanks @Pawand15 for the thorough investiagation and also @arendst for the quick patch!

@luislorenzo
Copy link

I tested also. It works

@wernerk63
Copy link

I tested also with one 2channel and two 4channel devices (sonoffs T1EU + 4chpro)
It works ! Thanks at all

@wongnam
Copy link

wongnam commented Jun 3, 2019

RF Bridge does not seem to be supported?

@s-hadinger
Copy link
Collaborator

No, Philips Hue protocol is only for smart-lights and Wemo only for switches (or on/off lights).

To manage your RF Bridge from Alexa, you will need to create an Alexa skill. I'm working on connecting Tasmota to AWS IoT so it should be quite easy to do. Stay tuned.

@s-hadinger
Copy link
Collaborator

I just got information back from Alexa team. This issue should be fixed now.

However I suggest we keep the distinct lightIds and leave code as it is now, it does not do any harm.

@arendst
Copy link
Owner

arendst commented Jun 11, 2019

Agree.

Thx for your tenacity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Action - Waiting for response or more information troubleshooting Type - Troubleshooting
Projects
None yet