probonopd / ESP8266HueEmulator

Emulate a Philips Hue bridge running on an ESP8266 using the Arduino IDE.
MIT License
411 stars 93 forks source link

Latest build with up-to-date libraries not discoverable #94

Open galorin opened 6 years ago

galorin commented 6 years ago

I am compiling on Windows, with the latest of all libraries, with the exception of the NeoPixel lib, as described in the documentation. However, I have not yet hooked up a NeoPixel to the board.

I am using a WEMOS D1 mini V2.2.0 clone, that had previously hosted Micropython.

After flashing and resetting, while watching the serial monitor, I get

MySSID
myPSK
.Starting HTTP at 192.168.1.7:80
Starting SSDP...
SSDP Started
FS Starting
initializeGroupSlots()
initializeSceneSlots()

I can go to 192.168.1.7/description.xml and I get

'''

1 0 http://192.168.1.7:80/ urn:schemas-upnp-org:device:Basic:1 Philips hue (192.168.1.7) Royal Philips Electronics http://www.philips.com Philips hue Personal Wireless Lighting Philips hue bridge 2012 929000226503 http://www.meethue.com 5ccf7f59f496 uuid:2f402f80-da50-11e1-9b23-5ccf7f59f496 index.html image/png 48 48 24 hue_logo_0.png image/png 120 120 24 hue_logo_3.png

''' For http://192.168.1.7/api/me/config I get

''' {"name":"hue emulator","swversion":"81012917","bridgeid":"5CCF7FFFFE59F496","portalservices":false,"linkbutton":true,"mac":"5C:CF:7F:59:F4:96","dhcp":true,"ipaddress":"192.168.1.7","netmask":"255.255.255.0","gateway":"192.168.1.1","apiversion":"1.3.0","localtime":"2017-12-03T12:07:32","timezone":"Europe/London","whitelist":{"api":{"name":"clientname#devicename"}},"swupdate":{"text":"","notify":false,"updatestate":0,"url":""}} '''

Now, the time is wrong. It was 12:13 when I made that request. On subsequent resets or reflashes, the localtime field is not always even present.

I made an edit in the setup() code

''' // We'll get the time eventually ... while (timeStatus() != timeSet) { Serial.println("Waitig for NTP..."); delay(1000); } '''

to force it to wait for NTP time, even after this every hue detector app I have tried can't see the emulated bridge.

What should I try next?

probonopd commented 6 years ago

Please try older commits to identify the last one that was working for you. Thanks.

Quanghoster commented 6 years ago

I would suggest turning on debug in the ssdp module and look for indication that ssdp is working for you On 3 Dec 2017 12:59, Sarah notifications@github.com wrote:I am compiling on Windows, with the latest of all libraries, with the exception of the NeoPixel lib, as described in the documentation. However, I have not yet hooked up a NeoPixel to the board. I am using a WEMOS D1 mini V2.2.0 clone, that had previously hosted Micropython. After flashing and resetting, while watching the serial monitor, I get MySSID myPSK .Starting HTTP at 192.168.1.7:80 Starting SSDP... SSDP Started FS Starting initializeGroupSlots() initializeSceneSlots()

I can go to 192.168.1.7/description.xml and I get '''

1 0

http://192.168.1.7:80/

urn:schemas-upnp-org:device:Basic:1 Philips hue (192.168.1.7) Royal Philips Electronics http://www.philips.com Philips hue Personal Wireless Lighting Philips hue bridge 2012 929000226503 http://www.meethue.com 5ccf7f59f496 uuid:2f402f80-da50-11e1-9b23-5ccf7f59f496 index.html

image/png 48 48 24 hue_logo_0.png

image/png 120 120 24 hue_logo_3.png

''' For http://192.168.1.7/api/me/config I get ''' {"name":"hue emulator","swversion":"81012917","bridgeid":"5CCF7FFFFE59F496","portalservices":false,"linkbutton":true,"mac":"5C:CF:7F:59:F4:96","dhcp":true,"ipaddress":"192.168.1.7","netmask":"255.255.255.0","gateway":"192.168.1.1","apiversion":"1.3.0","localtime":"2017-12-03T12:07:32","timezone":"Europe/London","whitelist":{"api":{"name":"clientname#devicename"}},"swupdate":{"text":"","notify":false,"updatestate":0,"url":""}} ''' Now, the time is wrong. It was 12:13 when I made that request. On subsequent resets or reflashes, the localtime field is not always even present. I made an edit in the setup() code ''' // We'll get the time eventually ... while (timeStatus() != timeSet) { Serial.println("Waitig for NTP..."); delay(1000); } ''' to force it to wait for NTP time, even after this every hue detector app I have tried can't see the emulated bridge. What should I try next?

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

galorin commented 6 years ago

Well, let's park this one... The clone board just died on me, and I don't know if it took the ESP with it. 5v->3.3v step-down got really hot and kinda melty so there is a good possibility that this was a weird hardware issue rather than software.

Quanghoster commented 6 years ago

Oh no. Atleast this stuff isn't expensive :)On 4 Dec 2017 16:09, Sarah notifications@github.com wrote:Well, let's park this one... The clone board just died on me, and I don't know if it took the ESP with it. 5v->3.3v step-down got really hot and kinda melty so there is a good possibility that this was a weird hardware issue rather than software.

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

piotrekcrash commented 6 years ago

I have same problem as @galorin on my NodeMCU:

'Starting SSDP... SSDP Started FS Starting initializeGroupSlots() initializeSceneSlots() ' Any sugestion? How can I help with debuging this problem? Other info:

probonopd commented 6 years ago

Please find out the last release where it still worked, and the first release where it does not work anymore. Thanks!

piotrekcrash commented 6 years ago

Do You have some releases list? Because theres no entries in github relesases section.

probonopd commented 6 years ago

https://github.com/probonopd/ESP8266HueEmulator/commits/master

Quanghoster commented 6 years ago

Curious, have you tried the HueSwitcher app? I've just run a test and it discovered my nodemcu 1.0 unit ok.

piotrekcrash commented 6 years ago

In my case it was problem with network connection. Seems to ESP was connected to network but it was not visible. I restarted router and tried one more time (before use older builds) and now works propertly withh Android app and also with my Philips TV. Thanks and sorry for calling not existing issue.

probonopd commented 6 years ago

Thanks for letting us know @piotrekcrash.