Yeelight Plugin Development ?

Wow, you must be getting bored of this now !

Eco Switch[474] : Lua Engine Failed to Load
WiFi UDP Switch Controller : Lua error

It is what it is…

new version…

*** SUPERSEDED ATTACHMENT REMOVED ***

Installs OK again but no response from Switch or Dimmer

yet again…

*** SUPERSEDED ATTACHMENT REMOVED ***

Nearly there…

Slider now works, and switch does turn it on, but doesn’t update to show the status so cannot turn it back off if that makes sense ?

Cheers

and yet another version…

So… Discover is done… Configuration is done… Sending commands is done…

Just processing responses and status messages left…

Try this version… Once the LuaUPnP engine has loaded, please do the following

  1. Turn the bulb on with the on/off toggle
  2. Set the brightness to >80% with the slider
  3. Set the brightness to 0% with the slider
  4. Set the brightness to >80% with the slider
  5. pick a color temperature
  6. pick a color
  7. turn the bulb off with the on/off toggle

and post logs. Thanks.

*** SUPERSEDED ATTACHMENT REMOVED ***

OK so did that except for the colour part, the Device doesn’t have colour setting, it’s just a dimmable light.

Cheers

Ok. more progress.

This version should fix the device type and fix some more of the status processing.

NOTE: The dimmable bulb will change to a dimmable RGB bulb… Once the LuaUPnP engine has finished restarting, you MUST refresh your browser (F5 or CTRL-F5).

Please retest and post log.

*** SUPERSEDED ATTACHMENT REMOVED ***

So… With data provided by previous logs, I was able to run some test using actual data…

This version should be functional and more error resistant.

Note: I was wrong… The device create for the bulb will not automatically change to an RGB device. You will need to use the configuration page to remove the device then add it again.

Thats’s it, you got it !

All working perfectly…

Many, many thanks.

PM me your email address, I’ll Paypal you a couple of beers.

Cheers

Quick note, in line 1532 of L_ECO_Switch.lua there’s a typo “Discoving” instead of “Discovering”

Sorry, just my OCD…

So, updated from the original post to v1.60 and now my device has gone and it won’t discover it.

See attached my logs.

Cheers

Uninstalled and then manually deleted the lua files.

Reinstall gives:

Eco Switch[478] : Lua Engine Failed to Load
WiFi UDP Switch Controller : Lua error

This is the last L_ECO_Switch1.lua I had. It will startup with this but doesn’t discover any devices