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

Offline PrincessCleavage

  • Full Member
  • ***
  • Posts: 105
  • Karma: +2/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #15 on: October 09, 2017, 08:32:18 pm »
Thanks @cybrmage for your work on this! Installed straight from the apps catalogue, and seems to be running fine. I have some Yeelight kit so hopefully can get them to appear. Have put them into developer mode so can be controlled locally, but nothing yet. Suspect may be an issue with udp discovery on my wifi network - will see! Will let it run for a while. Cheers.
What app name did you search for in UI7 app catalogue? I get noting with : wifi/Udp switch controller

Offline ninkasi

  • Full Member
  • ***
  • Posts: 138
  • Karma: +7/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #16 on: October 09, 2017, 08:51:06 pm »
Ah. Just search for 'UDP'.
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: 105
  • Karma: +2/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #17 on: October 09, 2017, 10:04:49 pm »

Offline Jim McGhee

  • Jr. Member
  • **
  • Posts: 86
  • Karma: +1/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #18 on: October 09, 2017, 10:07:45 pm »
Thanks @cybrmage for your work on this! Installed straight from the apps catalogue, and seems to be running fine. I have some Yeelight kit so hopefully can get them to appear. Have put them into developer mode so can be controlled locally, but nothing yet. Suspect may be an issue with udp discovery on my wifi network - will see! Will let it run for a while. Cheers.

I've noticed that when I can't discover a SENGLED or TPLINK light that moving it temporarily closer to the wifi hub will help.  After it's been added, you can move it back to where you want to use it and it will still work fine.
I don't have any Yeelights but it's working great on all my SEGLED lights, my TPLINK lights and swistches, and my ECO Switches

Offline PrincessCleavage

  • Full Member
  • ***
  • Posts: 105
  • Karma: +2/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #19 on: October 09, 2017, 10:11:07 pm »
Thanks @cybrmage for your work on this! Installed straight from the apps catalogue, and seems to be running fine. I have some Yeelight kit so hopefully can get them to appear. Have put them into developer mode so can be controlled locally, but nothing yet. Suspect may be an issue with udp discovery on my wifi network - will see! Will let it run for a while. Cheers.

I've noticed that when I can't discover a SENGLED or TPLINK light that moving it temporarily closer to the wifi hub will help.  After it's been added, you can move it back to where you want to use it and it will still work fine.
I don't have any Yeelights but it's working great on all my SEGLED lights, my TPLINK lights and swistches, and my ECO Switches
Great tip,
I have some yeelights arriving soon and will report back on their integration

Offline holdmade

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #20 on: October 10, 2017, 08:08:49 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
« Last Edit: October 11, 2017, 08:38:33 am by holdmade »

Offline cybrmage

  • Hero Member
  • *****
  • Posts: 1068
  • Karma: +107/-5
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #21 on: October 10, 2017, 07:44:50 pm »
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:

Did you run "Packet Sender" on your Vera??? No? Didn't think so...

So, your computer can find the bulb... Vera can't... not uncommon...

I actually have a Yeelight bulb now... The plugin will (sometimes) find it, but once found it work well... If it doesn't find it, enable "Network Device Poll" and restart the LuaUPnP engine.
EVL3Vista - Wink Connect - Caseta Connect - Venstar Colortouch - WiFi UDP Switch Controller - Broadlink RM - MyQGateway

Offline holdmade

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #22 on: October 11, 2017, 08:37:21 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 !

Offline jmedemar

  • Jr. Member
  • **
  • Posts: 98
  • Karma: +0/-0
  • Vera 3
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #23 on: October 12, 2017, 11:38:15 am »
I've been using this for my 3 Lifx+ bulbs for a few app versions now, and haven't really had any issues. Thanks!

I'm on version 1.73 currently and I'm trying to remove one of the installed bulbs because its defective and I need to return it. Clicking the "Remove" button under the "Configure" tab doesn't seem to do anything. The button physically changes to say "Removing" and I get the message that says to wait for the reload, but the reload never happens after 5 minutes or so. If I reload manually, the device is still there. Can you please look into this feature and see if something isn't working correctly? Thank you.

Offline biggsworld

  • Sr. Newbie
  • *
  • Posts: 22
  • Karma: +1/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #24 on: October 13, 2017, 10:46:22 am »
I have installed this and it sees my ECO switch and added it ok.  But the created device does not show any way to control it, just a blank icon.

Am I not understanding how to control it?  I'm happy to post logs if that helps.  See device 163 in the screenshot attached.


Offline jmedemar

  • Jr. Member
  • **
  • Posts: 98
  • Karma: +0/-0
  • Vera 3
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #25 on: October 13, 2017, 11:32:22 am »
I have installed this and it sees my ECO switch and added it ok.  But the created device does not show any way to control it, just a blank icon.

Am I not understanding how to control it?  I'm happy to post logs if that helps.  See device 163 in the screenshot attached.
The app does not create devices automatically for the bulbs found. You'll need to click the arrow to open the app, then click the configure tab. The app will show you a list of bulbs it found as shown in the screenshot. You will then be able to click a button next to each found bulb to create a control device for that bulb. This will have to be repeated for each bulb you want to add to your dashboard.

Offline Suecia

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #26 on: October 15, 2017, 12:04:47 pm »
I like to understand why my VeraPlus with Wifi/UDP Switch Controller, does not work with TP-link HS100(EU).
My VeraPlus is only connected to my router via LAN (Wireless is not activated), which then uses wifi to reach the TP-link.
It detects and I can add the device, but not turn on/off the switch.
Can anyone help me detect the problem.
I've attached a log file.

Offline MichuP

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #27 on: October 17, 2017, 07:42:31 am »
Hi, Yeelight Color works well with Wifi/UDP Switch Controller v. 1.82. (Veraplus)
Some patience needed during configuration :)

Big thanks.

Wysłane z mojego ONEPLUS A3003 przy użyciu Tapatalka


Offline Jim McGhee

  • Jr. Member
  • **
  • Posts: 86
  • Karma: +1/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #28 on: October 17, 2017, 08:53:50 pm »
i upgraded to V1.82 so I could use my Wemo switches but they don't show up in 'Discovered Devices'.  They show up and work OK in the Wemo app.  Enabling 'Network Device Poll' doesn't seem to help.
Is there something else I need do??

Please let me know if you need more log:
01   10/17/17 19:39:36.307   luup_log:3: (WIFI_UDP_Controller::EcoSwitch::DoDiscovery)   Discovery found [3] devices. <0x2cc78680>
50   10/17/17 19:39:36.308   luup_log:3: (WIFI_UDP_Controller::task) Found [3] EcoSwitch devices. <0x2cc78680>
50   10/17/17 19:39:36.309   luup_log:3: (WIFI_UDP_Controller::WEMO::DoDiscovery) Called DoDiscovery(nil). <0x2cc78680>
50   10/17/17 19:39:36.309   luup_log:3: (WIFI_UDP_Controller::task) Discovering WEMO devices <0x2cc78680>
50   10/17/17 19:39:36.325   luup_log:6: AltAppStore : starting... <0x2be78680>
06   10/17/17 19:39:36.363   Device_Variable::m_szValue_set device: 6 service: urn:upnp-org:serviceId:altui1 variable: DisplayLine1 was: AltAppStore now: AltAppStore #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2be78680>
06   10/17/17 19:39:36.364   Device_Variable::m_szValue_set device: 6 service: urn:upnp-org:serviceId:altui1 variable: DisplayLine2 was:  now:  #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x2be78680>
50   10/17/17 19:39:36.399   luup_log:3: (WIFI_UDP_Controller::getLocalNet): Found Local Network [192.168.202.0] <0x2cc78680>
50   10/17/17 19:39:36.399   luup_log:3: (WIFI_UDP_Controller::getLocalNet): Found network [192.168.202.0] <0x2cc78680>
50   10/17/17 19:39:36.400   luup_log:3: (WIFI_UDP_Controller::WEMO::DoDiscovery:getDiscoveryData)   target [239.255.255.250 retry [2] receive [6] udp [5]... <0x2cc78680>
02   10/17/17 19:39:36.401   luup_log:3: (WIFI_UDP_Controller::WEMO::DoDiscovery)    Sending command to [239.255.255.250:1900]... 1 of 2 attempts <0x2cc78680>
02   10/17/17 19:39:36.402   luup_log:3: (WIFI_UDP_Controller::WEMO::DoDiscovery)    Sending command to [239.255.255.250:1900]... 2 of 2 attempts <0x2cc78680>
50   10/17/17 19:39:36.403   luup_log:3: (WIFI_UDP_Controller::WEMO::DoDiscovery:getDiscoveryData)   Completed. <0x2cc78680>
50   10/17/17 19:39:36.403   luup_log:3: (WIFI_UDP_Controller::WEMO::DoDiscovery) Doing deep scan of devices. <0x2cc78680>
02   10/17/17 19:39:36.404   luup_log:3: (WIFI_UDP_Controller::getArpTable): Called <0x2cc78680>
50   10/17/17 19:39:36.594   luup_log:7: ALTUI: initstatus(7) starting version: v2.00 <0x2be78680>
03   10/17/17 19:39:37.005   JobHandler_LuaUPnP::m_bReloadCriticalOnly_set now 1 <0x2be78680>
03   10/17/17 19:39:37.006   JobHandler_LuaUPnP::m_bReloadCriticalOnly_set now 0 <0x2be78680>
50   10/17/17 19:39:37.007   luup_log:7: ALTUI: startupDeferred, called on behalf of device:7 <0x2d278680>
50   10/17/17 19:39:37.058   luup_log:7: ALTUI: Version upgrade => Reseting Plugin config to default <0x2d278680>

Should it be trying to send to 239.255.255.250?  That's not in my local network.
Thanks

Offline biggsworld

  • Sr. Newbie
  • *
  • Posts: 22
  • Karma: +1/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #29 on: October 20, 2017, 01:13:37 pm »
I've been trying to use this plugin with my Vera Edge.  It installs ok, it sees the ECO switch, but when I click on ADD to add the device, nothing happens.  I have attached the logs from my system.

I pressed the "ADD" button at 11:49 (I was watching the logs with tail -f) and there seemed to be no change.  I refreshed the screen (Shift F5) and pressed the add button again at 11:52, and didn't see any change.   I tried forcing a reload with:  http://[vera-ip]:3480/data_request?id=reload

It doesn't seem to recognize the ADD button.

I've attached a screenshot and Lua logs.

Help?