Ok…so I must admit I don’t really know what is going on…but I removed the ‘use strict’ from server.js to see if that makes a difference Can you try…it is on the branch ‘oldNodeVersions’
So…I just made the changes to fix the error that finalbillybong found to your branch as well…your special server.js is changed as well as the smart app and the device handler
OK ive updated the server, the DTH and the Smartapp from the master branch. It’s discovers the bulbs just fine but as soon as I click done the server craches with this output:
TypeError: obj.hasOwnProperty is not a function
at retProps (/home/pi/Desktop/yeelight/server.js:61:11)
at Server.httpRequestHandler (/home/pi/Desktop/yeelight/server.js:100:84)
at emitTwo (events.js:106:13)
at Server.emit (events.js:194:7)
at parserOnIncoming (_http_server.js:565:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
mmmh…Can you try the master branch. I will post an OldVersionServer.js to the main branch. It will be easier to keep them in step. give me 5 mins and it will be there.
OK awesome. The server is no longer craching once the bulbs are discovered. They hang on ‘turning on’ but now the IP, host and firmware fields are populated with info which I’ve not seen before. When I press the on/off button in the smartthings app I can see the server is reacting.
Ok…so progress…Unfortunately the server looks fine. We need some logs of yeelight connect and a bulb. Could you start live logging and then just switch one bulb on and off? perhaps also change brightness and color and then send the pastebin…
mmmh They look fine…Can you start a new live logging session and just power on/off a couple of times and paste those logs. Also, can you paste the server log as well (that includes those power on/offs).
When you say power on and off I assume you mean a blub? Doing just power on and off on a bulb the server does not react and nothing shows in the live log…
Edit: Hang on, nothingis showing in my logging for any of my device at all. I’ll restart my hub and try again.