Author Topic: PLUGIN: Wifi/UDP Switch Controller  (Read 9113 times)

Offline ninkasi

  • Full Member
  • ***
  • Posts: 188
  • Karma: +10/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #30 on: October 21, 2017, 03:58:33 am »
OK - uninstalled, rebooted everything, waited a while, reinstalled and now no error. Sadly, however, although there are no errors no - it also isn't seeing anything, and isn't saving logs..... sigh...
Home Automation veteran. Rolled own, then MisterHouse and X10, now Vera - mysensor arduino and ESP8266 network - zwave lights, locks, switches - milights - yeelights - google home(s) - Broadlink RM - raspberry pi(s) with various scripts for power and weather station - Logitech Harmony - Imperihome

Offline Majimus

  • Full Member
  • ***
  • Posts: 103
  • Karma: +24/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #31 on: October 21, 2017, 11:50:56 pm »
using the plugin with a pair of TPLINK HS105. I noticed the following in the logs:

Quote
function PollSwitchs failed [string "local VERSION = "v1.82"..."]:2692: bad argument #1 to 'pairs' (table expected, got nil)

Offline holdmade

  • Sr. Newbie
  • *
  • Posts: 40
  • Karma: +0/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #32 on: October 22, 2017, 04:23:09 am »
Yes I only tried it on PC to make sure the bulb was reachable.

Tried the Network Device Poll but no go.

In the end I removed the discover part of your Lua script and pasted this in the advanced, discovered section of the WIFI/UDP device:

{"1": {"TYPE": "color","PORT": "55443","is_color": true,"is_tunable": true,"is_dimmable": true,"Name": "Living Room Lamp","Version": "52","ID": "0x000000000xxxxxxx","PROTOCOL": "YEELIGHT","IP": "192.168.1.xxx","AreaCode": ""}}

Once restarted I was able to add the light.

I got the id from the Packet Sender software response.

Works great now !

Ninkasi - this worked for me

Offline ninkasi

  • Full Member
  • ***
  • Posts: 188
  • Karma: +10/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #33 on: October 22, 2017, 07:07:37 am »
Holdmade - thanks for the suggestion, will give it a go if I have a chance. I suspect the lack of logs may be a symptom of a greater issue though.... In case I was having issues with UDP discovery because of my switch/AP I enabled wi-fi on the Vera and connected the lights to that, but it didn't help.....
Home Automation veteran. Rolled own, then MisterHouse and X10, now Vera - mysensor arduino and ESP8266 network - zwave lights, locks, switches - milights - yeelights - google home(s) - Broadlink RM - raspberry pi(s) with various scripts for power and weather station - Logitech Harmony - Imperihome

Offline ninkasi

  • Full Member
  • ***
  • Posts: 188
  • Karma: +10/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #34 on: October 25, 2017, 09:42:56 pm »
OK - update
I uninstalled the app, rebooted Vera, and started again from scratch. I also ssh'd onto the Vera to monitor the activity in the log file (/tmp/log/cmh) directly

After re-installing I found I got the error appearing in the Vera GUI "Error executing function configuration(): Unexpected token u in JSON at position 0"

I waited and watched the log file, by doing a "cat LuaUPnP.log |grep UDP" every now and then. I could see that although there was that error appearing on the gui, things were still happening in the background. When I saw in the log "(WIFI_UDP_Controller::PollSwitchs) Polling for switch status completed." followed by "(WIFI_UDP_Controller::PollSwitchs) ************************************ " I suspected that it had completed whatever it needed to do and I found that the error went away AND I could then enable debug mode AND enable network device poll.

I then initiated a ReScan. From the log file I could see that things were happening, so I waited. It took a while as it got the arp table and then scanned each discovered device for ECO, then get arp table and Wemo, then arp table and TPlink, then arp table and sengled, then arp table and lifx, then finally arp table and yeelight. It took well over five minutes to complete the scan. The great news is it actually discovered my two yeelights

Code: [Select]
02 10/26/17 10:58:45.117 luup_log:253: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery)    Sending command to [192.168.0.104:1900]... 1 of 1 attempts <0x75353520>
50 10/26/17 10:58:45.219 luup_log:253: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery)    WAITING for response (1 of 1) <0x75353520>
50 10/26/17 10:58:45.219 luup_log:253: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery)      Received response from [192.168.0.104:49158]... <0x75353520>
50 10/26/17 10:58:45.344 luup_log:253: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery)      Discovered YEELIGHT device - hex [

00000000  48 54 54 50 2F 31 2E 31  20 32 30 30 20 4F 4B 0D  HTTP/1.1 200 OK.
00000010  0A 43 61 63 68 65 2D 43  6F 6E 74 72 6F 6C 3A 20  .Cache-Control:
00000020  6D 61 78 2D 61 67 65 3D  33 36 30 30 0D 0A 44 61  max-age=3600..Da
00000030  74 65 3A 20 0D 0A 45 78  74 3A 20 0D 0A 4C 6F 63  te: ..Ext: ..Loc
00000040  61 74 69 6F 6E 3A 20 79  65 65 6C 69 67 68 74 3A  ation: yeelight:
00000050  2F 2F 31 39 32 2E 31 36  38 2E 30 2E 31 30 34 3A  //192.168.0.104:
00000060  35 35 34 34 33 0D 0A 53  65 72 76 65 72 3A 20 50  55443..Server: P
00000070  4F 53 49 58 20 55 50 6E  50 2F 31 2E 30 20 59 47  OSIX UPnP/1.0 YG
00000080  4C 43 2F 31 0D 0A 69 64  3A 20 30 78 30 30 30 30  LC/1..id: 0x0000
00000090  30 30 30 30 30 33 36 31  63 38 30 63 0D 0A 6D 6F  00000361c80c..mo
000000A0  64 65 6C 3A 20 73 74 72  69 70 65 0D 0A 66 77 5F  del: stripe..fw_
000000B0  76 65 72 3A 20 33 34 0D  0A 73 75 70 70 6F 72 74  ver: 34..support
000000C0  3A 20 67 65 74 5F 70 72  6F 70 20 73 65 74 5F 64  : get_prop set_d
000000D0  65 66 61 75 6C 74 20 73  65 74 5F 70 6F 77 65 72  efault set_power
000000E0  20 74 6F 67 67 6C 65 20  73 65 74 5F 62 72 69 67   toggle set_brig
000000F0  68 74 20 73 74 61 72 74  5F 63 66 20 73 74 6F 70  ht start_cf stop
00000100  5F 63 66 20 73 65 74 5F  73 63 65 6E 65 20 63 72  _cf set_scene cr
00000110  6F 6E 5F 61 64 64 20 63  72 6F 6E 5F 67 65 74 20  on_add cron_get
00000120  63 72 6F 6E 5F 64 65 6C  20 73 65 74 5F 63 74 5F  cron_del set_ct_
00000130  61 62 78 20 73 65 74 5F  72 67 62 20 73 65 74 5F  abx set_rgb set_
00000140  68 73 76 20 73 65 74 5F  61 64 6A 75 73 74 20 73  hsv set_adjust s
00000150  65 74 5F 6D 75 73 69 63  20 73 65 74 5F 6E 61 6D  et_music set_nam
00000160  65 0D 0A 70 6F 77 65 72  3A 20 6F 66 66 0D 0A 62  e..power: off..b
00000170  72 69 67 68 74 3A 20 31  30 30 0D 0A 63 6F 6C 6F  right: 100..colo
00000180  72 5F 6D 6F 64 65 3A 20  31 0D 0A 63 74 3A 20 34  r_mode: 1..ct: 4
00000190  30 30 30 0D 0A 72 67 62  3A 20 32 35 35 0D 0A 68  000..rgb: 255..h
000001A0  75 65 3A 20 30 0D 0A 73  61 74 3A 20 31 30 30 0D  ue: 0..sat: 100.
000001B0  0A 6E 61 6D 65 3A 20 42  65 63 20 6C 69 67 68 74  .name: Bec light
000001C0  0D 0A                                             ..

] processed [TYPE: stripe
PORT: 55443
is_color: TRUE
is_tunable: TRUE
is_dimmable: TRUE
Name: Bec light
Version: 34
ID: 0x000000000361c80c
PROTOCOL: YEELIGHT
IP: 192.168.0.104
AreaCode:
]. <0x75353520>
50 10/26/17 10:58:45.347 luup_log:253: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery:getDiscoveryData)   target [192.168.0.107 retry [1] receive [1] udp [0]... <0x75353520>
02 10/26/17 10:58:45.348 luup_log:253: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery)    Sending command to [192.168.0.107:1900]... 1 of 1 attempts <0x75353520>
50 10/26/17 10:58:45.449 luup_log:253: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery)    WAITING for response (1 of 1) <0x75353520>
50 10/26/17 10:58:45.449 luup_log:253: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery)      Received response from [192.168.0.107:49154]... <0x75353520>
50 10/26/17 10:58:45.542 luup_log:253: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery)      Discovered YEELIGHT device - hex [

00000000  48 54 54 50 2F 31 2E 31  20 32 30 30 20 4F 4B 0D  HTTP/1.1 200 OK.
00000010  0A 43 61 63 68 65 2D 43  6F 6E 74 72 6F 6C 3A 20  .Cache-Control:
00000020  6D 61 78 2D 61 67 65 3D  33 36 30 30 0D 0A 44 61  max-age=3600..Da
00000030  74 65 3A 20 0D 0A 45 78  74 3A 20 0D 0A 4C 6F 63  te: ..Ext: ..Loc
00000040  61 74 69 6F 6E 3A 20 79  65 65 6C 69 67 68 74 3A  ation: yeelight:
00000050  2F 2F 31 39 32 2E 31 36  38 2E 30 2E 31 30 37 3A  //192.168.0.107:
00000060  35 35 34 34 33 0D 0A 53  65 72 76 65 72 3A 20 50  55443..Server: P
00000070  4F 53 49 58 20 55 50 6E  50 2F 31 2E 30 20 59 47  OSIX UPnP/1.0 YG
00000080  4C 43 2F 31 0D 0A 69 64  3A 20 30 78 30 30 30 30  LC/1..id: 0x0000
00000090  30 30 30 30 30 33 32 62  37 61 39 33 0D 0A 6D 6F  0000032b7a93..mo
000000A0  64 65 6C 3A 20 64 65 73  6B 6C 61 6D 70 0D 0A 66  del: desklamp..f
000000B0  77 5F 76 65 72 3A 20 35  32 0D 0A 73 75 70 70 6F  w_ver: 52..suppo
000000C0  72 74 3A 20 67 65 74 5F  70 72 6F 70 20 73 65 74  rt: get_prop set
000000D0  5F 64 65 66 61 75 6C 74  20 73 65 74 5F 70 6F 77  _default set_pow
000000E0  65 72 20 74 6F 67 67 6C  65 20 73 65 74 5F 63 74  er toggle set_ct
000000F0  5F 61 62 78 20 73 65 74  5F 62 72 69 67 68 74 20  _abx set_bright
00000100  73 74 61 72 74 5F 63 66  20 73 74 6F 70 5F 63 66  start_cf stop_cf
00000110  20 73 65 74 5F 73 63 65  6E 65 20 63 72 6F 6E 5F   set_scene cron_
00000120  61 64 64 20 63 72 6F 6E  5F 67 65 74 20 63 72 6F  add cron_get cro
00000130  6E 5F 64 65 6C 20 73 65  74 5F 61 64 6A 75 73 74  n_del set_adjust
00000140  20 73 65 74 5F 70 73 20  67 65 74 5F 70 73 20 73   set_ps get_ps s
00000150  65 74 5F 6E 61 6D 65 0D  0A 70 6F 77 65 72 3A 20  et_name..power:
00000160  6F 66 66 0D 0A 62 72 69  67 68 74 3A 20 33 30 0D  off..bright: 30.
00000170  0A 63 6F 6C 6F 72 5F 6D  6F 64 65 3A 20 32 0D 0A  .color_mode: 2..
00000180  63 74 3A 20 32 37 30 30  0D 0A 72 67 62 3A 20 30  ct: 2700..rgb: 0
00000190  0D 0A 68 75 65 3A 20 30  0D 0A 73 61 74 3A 20 30  ..hue: 0..sat: 0
000001A0  0D 0A 6E 61 6D 65 3A 20  44 65 73 6B 20 4C 61 6D  ..name: Desk Lam
000001B0  70 0D 0A                                          p..

] processed [TYPE: desklamp
PORT: 55443
is_color: TRUE
is_tunable: TRUE
is_dimmable: TRUE
Name: Desk Lamp
Version: 52
ID: 0x00000000032b7a93
PROTOCOL: YEELIGHT
IP: 192.168.0.107
AreaCode:
]. <0x75353520>

So that looks really positive. But although it appears to be discovering all the info needed, it just isn't adding it into the "DISCOVERED_DEVICES" variable. Maybe this is related to it not being able to display the logs under "Options"? Not sure.

I might try adding the info in manually, but for what it's worth am attaching the log info. The last message I see in the log that appears to be relevant is:
Code: [Select]
50 10/26/17 10:59:19.101 luup_log:253: (WIFI_UDP_Controller::task) Clearing... <0x75353520>
Cheers
Home Automation veteran. Rolled own, then MisterHouse and X10, now Vera - mysensor arduino and ESP8266 network - zwave lights, locks, switches - milights - yeelights - google home(s) - Broadlink RM - raspberry pi(s) with various scripts for power and weather station - Logitech Harmony - Imperihome

Offline ninkasi

  • Full Member
  • ***
  • Posts: 188
  • Karma: +10/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #35 on: October 25, 2017, 11:31:18 pm »
...and just for the heck of it, uninstalled the app again, then rebooted Vera. Reinstalled the app and again it came up with the json error - but by now I have learned patience, my young padawan.  I waited until the 'polling for switch status completed' message appeared in the log, and then the json error was gone.

Manually added in the config for the first yeelight (options/advanced/variables and plug the info into "Discovered_Devices"), and it appeared in the list of discovered devices in the "configure" section. Clicked on add device and waited a while (this is important - need to allow it to do whatever it needs to do) and it appeared in the list of devices in Vera and could be controlled. Repeated for my second light, and it also appeared. Yay.

Notes so far - keeping in mind that I've manually added in these devices so may very well have broken something in doing so - can turn both lights (an LED strip and a 'smart' desk lamp) on/off, and dim/brighten. Response to light on/off etc is super quick.

Minor issues:
* Reporting the actual status (on or off) for my desk lamp has issues ie I can turn it on by clicking on the 'on' toggle but it reports as still being off. In the log it is getting (eventually) a message along the lines of:
Code: [Select]
50 10/26/17 14:14:17.286 luup_log:257: (WIFI_UDP_Controller::YEELIGHT::getStatus) Error getting status of device with ID 0x00000000032b7a93. <0x74807520>
If the lamp is showing as being off but is actually on, to turn it off I need to drag the dimmer control to 100% then 0%. If the lamp is showing as being on but is actually off, to turn it on I need to use the dimmer control again. The lamp is really close to the wifi AP so network issues shouldn't be a problem. Might be something specific with the light itself.
* Colour control does not appear to change anything on either device via the Vera web interface. Works just fine via ImperiHome app though, and sort of ok via the Vera app.
* Whilst the app is scanning and/or starting up, control of devices is impacted - given the list of supported systems is growing, maybe an option to enable/disable automatic scanning for new devices on startup might be a thought?

All in all, really promising! Thanks again for the work on this.
« Last Edit: October 25, 2017, 11:41:08 pm by ninkasi »
Home Automation veteran. Rolled own, then MisterHouse and X10, now Vera - mysensor arduino and ESP8266 network - zwave lights, locks, switches - milights - yeelights - google home(s) - Broadlink RM - raspberry pi(s) with various scripts for power and weather station - Logitech Harmony - Imperihome

Offline PrincessCleavage

  • Full Member
  • ***
  • Posts: 200
  • Karma: +3/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #36 on: October 30, 2017, 07:16:22 am »
Hey @cybrmage,

Still can't get this working with Yeelight, I've installed v1.73 from the app store.

We tried and got it working:

http://forum.micasaverde.com/index.php/topic,50373.msg329613.html#msg329613

It won't discover any devices, I tried discover with "Packet Sender" software "M-SEARCH * HTTP/1.1\r\n MAN: "ssdp:discover"\r\n ST: wifi_bulb" and gets the following response:

HTTP/1.1 200 OK\r\nCache-Control: max-age=3600\r\nDate: \r\nExt: \r\nLocation: yeelight://192.168.1.xxx:55443\r\nServer: POSIX UPnP/1.0 YGLC/1\r\nid: 0x000000000xxxxxx\r\nmodel: color\r\nfw_ver: 52\r\nsupport: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb set_hsv set_adjust set_music set_name\r\npower: on\r\nbright: 100\r\ncolor_mode: 2\r\nct: 4000\r\nrgb: 16711680\r\nhue: 359\r\nsat: 100\r\nname: \r\n

HTTP/1.1 200 OK\r\nCache-Control: max-age=3600\r\nDate: \r\nExt: \r\nLocation: yeelight://192.168.1.xxx:55443\r\nServer: POSIX UPnP/1.0 YGLC/1\r\nid: 0x000000000xxxxxx\r\nmodel: color\r\nfw_ver: 52\r\nsupport: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb set_hsv set_adjust set_music set_name\r\npower: on\r\nbright: 100\r\ncolor_mode: 2\r\nct: 4000\r\nrgb: 16711680\r\nhue: 359\r\nsat: 100\r\nname: \r\n

Hopefully you could sort it ? Shame as this was working before !

Thanks

Simon
How do you use packet sender to gather the ID of the device? I have added Yeelight RGB LED to my home wifi and also to vera edge wifi and also turned on network polling and rebooted vera but nothing discovered. Can any one else discover Yeelight RGB LED? Running plugin v1.82
Thanks
« Last Edit: October 30, 2017, 07:43:27 am by PrincessCleavage »

Offline holdmade

  • Sr. Newbie
  • *
  • Posts: 40
  • Karma: +0/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #37 on: October 30, 2017, 09:51:14 am »
If you use:

M-SEARCH * HTTP/1.1\r\n MAN: "ssdp:discover"\r\n ST: wifi_bulb

You'll get a reply that has the id in it.

Offline PrincessCleavage

  • Full Member
  • ***
  • Posts: 200
  • Karma: +3/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #38 on: October 30, 2017, 04:03:51 pm »
If you use:

M-SEARCH * HTTP/1.1\r\n MAN: "ssdp:discover"\r\n ST: wifi_bulb

You'll get a reply that has the id in it.
I noticed this from your previous post m. Can you explain steps to ?use? the above e.g where in packet sender do I enter this value? Do I still enter I.p address and port details?

Offline ninkasi

  • Full Member
  • ***
  • Posts: 188
  • Karma: +10/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #39 on: October 30, 2017, 04:57:54 pm »
If you use:

M-SEARCH * HTTP/1.1\r\n MAN: "ssdp:discover"\r\n ST: wifi_bulb

You'll get a reply that has the id in it.
I noticed this from your previous post m. Can you explain steps to ?use? the above e.g where in packet sender do I enter this value? Do I still enter I.p address and port details?

For what it's worth, I described above how I got this info *without* using the packet sender software. I found that the app actually was discovering the yeelights, it just wasn't adding them into the list automatically. Basically:
1. From the GUI, I enabled debug mode and network device poll (in the UDP device controller options)
2. Used "ssh" to log onto the Vera directly (I have a mac so the 'ssh' client is included - if you have a windows pc then you may need to do a quick hunt to find a utility that has that). The command should be something like "ssh 192.168.n.nnn -l root" (where the 192.168.n.nnn is the ip address of your Vera, and the "-l" is a lower case "L"). When prompted for a password, put in the password that is on the label on the vera itself.
3. Once logged on, change directory to where the log files are - normally  "cd /tmp/log/cmh"
4. From the GUI, I initiated a ReScan
5. From ssh I typed "cat LuaUPnP.log |grep UDP" and watched what happened (basically, type that once and then every now and then hit the up arrow key to repeat the command - after 5 or 6 minutes you should see a line saying "Polling for switch status completed").
6. Anyhow, after waiting patiently for more than five minutes, type "cat LuaUPnP.log" and scroll up and with luck you will see the info for your yeelight(s). In my case, for example, I could see:
Code: [Select]
] processed [TYPE: desklamp
PORT: 55443
is_color: TRUE
is_tunable: TRUE
is_dimmable: TRUE
Name: Desk Lamp
Version: 52
ID: 0x00000000032b7a93
PROTOCOL: YEELIGHT
IP: 192.168.0.107
AreaCode:
]. <0x75353520>
6. I then took out from that the necessary info to plug into the GUI as suggested by holdmade ie the Type, Name, Version, ID, and the IP address
Code: [Select]
{"1": {"TYPE": "nnnn","PORT": "55443","is_color": true,"is_tunable": true,"is_dimmable": true,"Name": "nnnn","Version": "nn","ID": "0x000000000xxxxxxx","PROTOCOL": "YEELIGHT","IP": "nnn.nnn.nnn.xxx","AreaCode": ""}}
In my case I have two yeelights, so I put this info for the first light into the discovered section in the GUI, and configured that first. Once that was all done I then added the second in and repeated. Note that my LED strip was reported as a version 34, whilst my "desklamp" was a version 52 ie make sure you confirm that *all* the settings are correct for your specific device.

Word of advice - it is mentioned elsewhere, but make sure you reserve the IP addresses (via your router/dhcp server) used by your yeelights as if they change then things will stop working.
Home Automation veteran. Rolled own, then MisterHouse and X10, now Vera - mysensor arduino and ESP8266 network - zwave lights, locks, switches - milights - yeelights - google home(s) - Broadlink RM - raspberry pi(s) with various scripts for power and weather station - Logitech Harmony - Imperihome

Offline ninkasi

  • Full Member
  • ***
  • Posts: 188
  • Karma: +10/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #40 on: October 31, 2017, 12:41:30 am »
....and just added in another yeelight strip. I basically made sure the strip was in 'developer mode', then enabled both debug mode and network device poll, and initiated a network scan. Then I ssh'd onto the vera and checked the log and found the details for the new LED strip, and added that into the 'discovered' section as before.

Note that the Yeelight app on android has been updated - to find the developer mode enable/disable option you now need to go into the app, select the light, click on the icon that looks like an eject button, and click on 'lan control'.
Home Automation veteran. Rolled own, then MisterHouse and X10, now Vera - mysensor arduino and ESP8266 network - zwave lights, locks, switches - milights - yeelights - google home(s) - Broadlink RM - raspberry pi(s) with various scripts for power and weather station - Logitech Harmony - Imperihome

Offline PrincessCleavage

  • Full Member
  • ***
  • Posts: 200
  • Karma: +3/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #41 on: October 31, 2017, 03:39:42 am »
If you use:

M-SEARCH * HTTP/1.1\r\n MAN: "ssdp:discover"\r\n ST: wifi_bulb

You'll get a reply that has the id in it.
I noticed this from your previous post m. Can you explain steps to ?use? the above e.g where in packet sender do I enter this value? Do I still enter I.p address and port details?

For what it's worth, I described above how I got this info *without* using the packet sender software. I found that the app actually was discovering the yeelights, it just wasn't adding them into the list automatically. Basically:
1. From the GUI, I enabled debug mode and network device poll (in the UDP device controller options)
2. Used "ssh" to log onto the Vera directly (I have a mac so the 'ssh' client is included - if you have a windows pc then you may need to do a quick hunt to find a utility that has that). The command should be something like "ssh 192.168.n.nnn -l root" (where the 192.168.n.nnn is the ip address of your Vera, and the "-l" is a lower case "L"). When prompted for a password, put in the password that is on the label on the vera itself.
3. Once logged on, change directory to where the log files are - normally  "cd /tmp/log/cmh"
4. From the GUI, I initiated a ReScan
5. From ssh I typed "cat LuaUPnP.log |grep UDP" and watched what happened (basically, type that once and then every now and then hit the up arrow key to repeat the command - after 5 or 6 minutes you should see a line saying "Polling for switch status completed").
6. Anyhow, after waiting patiently for more than five minutes, type "cat LuaUPnP.log" and scroll up and with luck you will see the info for your yeelight(s). In my case, for example, I could see:
Code: [Select]
] processed [TYPE: desklamp
PORT: 55443
is_color: TRUE
is_tunable: TRUE
is_dimmable: TRUE
Name: Desk Lamp
Version: 52
ID: 0x00000000032b7a93
PROTOCOL: YEELIGHT
IP: 192.168.0.107
AreaCode:
]. <0x75353520>
6. I then took out from that the necessary info to plug into the GUI as suggested by holdmade ie the Type, Name, Version, ID, and the IP address
Code: [Select]
{"1": {"TYPE": "nnnn","PORT": "55443","is_color": true,"is_tunable": true,"is_dimmable": true,"Name": "nnnn","Version": "nn","ID": "0x000000000xxxxxxx","PROTOCOL": "YEELIGHT","IP": "nnn.nnn.nnn.xxx","AreaCode": ""}}
In my case I have two yeelights, so I put this info for the first light into the discovered section in the GUI, and configured that first. Once that was all done I then added the second in and repeated. Note that my LED strip was reported as a version 34, whilst my "desklamp" was a version 52 ie make sure you confirm that *all* the settings are correct for your specific device.

Word of advice - it is mentioned elsewhere, but make sure you reserve the IP addresses (via your router/dhcp server) used by your yeelights as if they change then things will stop working.
Thanks for the detailed steps!
When I follow your process all I can find in the logs relevant to the static i.p address I assigned to the yeeelight RGB LED is:
02      10/31/17 17:25:06.731   luup_log:138: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery)    Sending command to [192.168.1.60:1900]... 1 of 1 attempts <0x74312520>
50      10/31/17 17:25:06.832   luup_log:138: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery)    WAITING for response (1 of 1) <0x74312520>
50      10/31/17 17:25:06.833   luup_log:138: (WIFI_UDP_Controller::YEELIGHT::DoDiscovery:getDiscoveryData)   target [192.168.1.62 retry [1] receive [1] udp
  • ... <0x74312520>


Offline ninkasi

  • Full Member
  • ***
  • Posts: 188
  • Karma: +10/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #42 on: October 31, 2017, 06:10:07 am »
...and you have definitely enabled development mode for the yeelight, and both debug & network device polling?
Home Automation veteran. Rolled own, then MisterHouse and X10, now Vera - mysensor arduino and ESP8266 network - zwave lights, locks, switches - milights - yeelights - google home(s) - Broadlink RM - raspberry pi(s) with various scripts for power and weather station - Logitech Harmony - Imperihome

Offline PrincessCleavage

  • Full Member
  • ***
  • Posts: 200
  • Karma: +3/-1
PLUGIN: Wifi/UDP Switch Controller
« Reply #43 on: October 31, 2017, 06:21:13 am »
...and you have definitely enabled development mode for the yeelight, and both debug & network device polling?
Network device polling is enabled and also debugging l. I can also browse the two yeelight rob led bulbs through the app but nowhere can I see development mode
(https://uploads.tapatalk-cdn.com/20171031/49882a8c600c47bcd4b6ef1d0b7a1199.jpg)
(https://uploads.tapatalk-cdn.com/20171031/b8827b8bfd0a771a9b0d982a58379dda.jpg)
Perhaps I should use the packet sender?
« Last Edit: October 31, 2017, 06:23:54 am by PrincessCleavage »

Offline ninkasi

  • Full Member
  • ***
  • Posts: 188
  • Karma: +10/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #44 on: October 31, 2017, 06:35:15 am »
Ah. If the bulbs are not in developer mode, they definitely will neither be able  to be discovered or controlled directly over the lan (rather than via the cloud). Assuming using the latest yeelight app, it is as described above:

Note that the Yeelight app on android has been updated - to find the developer mode enable/disable option you now need to go into the app, select the light, click on the icon that looks like an eject button, and click on 'lan control'.

Cheers
Home Automation veteran. Rolled own, then MisterHouse and X10, now Vera - mysensor arduino and ESP8266 network - zwave lights, locks, switches - milights - yeelights - google home(s) - Broadlink RM - raspberry pi(s) with various scripts for power and weather station - Logitech Harmony - Imperihome