Xiaomi Yeelight RGBW E27

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’

https://github.com/davidcreager/yeelight-smartthings/tree/OldNodeVersions

just the one file server.js has changed

1 Like

No worries, buddy. I’m just grateful someone is working on it and I’m happy to help.

Logs to follow once I have the children in bed and some work cleard up.

One of the bulb logs: https://pastebin.com/uK9ipwE0

The Yeelight connect log: https://pastebin.com/1wEduftd

Ok…stupid error…I have pushed again…care to use the master branch. I have changed server.js, the smart app and devicehandler.

here is the link for the changed code


(master branch!)

1 Like

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)

Sorry to be a pain…but could you give me 10 lines before that error from the server log

Yes no problem at all. When I’m home from work I’ll fire up the server and post it.

Here you go: https://pastebin.com/1nnntemJ

Ok…fI’ve pushed a new release…just server.js has changed

I’m about to try again. Shall I use the “old” version you provided higher up in the thread? Just want to make sure I’m using the right files

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.

1 Like

Ok…its posted…just use ‘node OldNodeServer.js’ rather than ‘node server.js’

1 Like

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.

He is the output: https://pastebin.com/BDa2e5vF

Thanks again for you work on this @Davec

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…

Sure thing, buddy.

Bulb log: https://pastebin.com/WB01m9s5

Smartapp log: https://pastebin.com/bfecseyS

Let me know if you need anything else :slight_smile:

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).

Have to say we MUST be getting close.

I suggest you wait until finallybillabong’s bugs are fixed…not sure I can cope with two sets of problems in parallel:slight_smile:

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.