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

Offline zedrally

  • Hero Member
  • *****
  • Posts: 1082
  • Karma: +5/-4
  • Black Cat Control Systems
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #105 on: December 15, 2017, 05:52:34 pm »
We might have to start a Black Market in exchanging files!  ;D
Living in the Land of Oz, give me a vegemite sandwich. Home Seer, Vera Lite & Edge, Popp, Black Cat Smart Hub & Vera G, Black Cat Lite 1 & 2's a Black Cat Dimmer or 2, Fantem Tec and then some  Black Cat Cat's Eye PIR's & Door-Window Sensors, RFXComm, Broadlink RMPro & Mini plus a Z-UNO or 2.

Offline PrincessCleavage

  • Full Member
  • ***
  • Posts: 208
  • Karma: +3/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #106 on: December 15, 2017, 06:05:45 pm »
http://forum.micasaverde.com/index.php/topic,51779.0.html
I cannot see any conflict in that thread? Perhaps if we all offer to buy him beer $ this might give him motivation to continue supporting?

Offline zedrally

  • Hero Member
  • *****
  • Posts: 1082
  • Karma: +5/-4
  • Black Cat Control Systems
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #107 on: December 15, 2017, 06:13:55 pm »
Don't know about you, but I'd buy him a Slab...(for anyone why isn't from Oz, a slab = 24 bottles, cans or what ever...name your poison).
Living in the Land of Oz, give me a vegemite sandwich. Home Seer, Vera Lite & Edge, Popp, Black Cat Smart Hub & Vera G, Black Cat Lite 1 & 2's a Black Cat Dimmer or 2, Fantem Tec and then some  Black Cat Cat's Eye PIR's & Door-Window Sensors, RFXComm, Broadlink RMPro & Mini plus a Z-UNO or 2.

Offline PrincessCleavage

  • Full Member
  • ***
  • Posts: 208
  • Karma: +3/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #108 on: December 15, 2017, 06:57:31 pm »
Don't know about you, but I'd buy him a Slab...(for anyone why isn't from Oz, a slab = 24 bottles, cans or what ever...name your poison).
Indeed! It?s just a figure of speech and a method to offer a ?donation ? to mitigate complications

Offline cokeman

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #109 on: December 16, 2017, 03:17:32 am »
I'm also in.

have a shitload of Yeelight on my way in, but I havent downloaded the plugin.... :-(

so I need it badly
Vera 3 in the summerhouse, Vera Plus at home
@Denmark

Offline nirgal

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #110 on: December 20, 2017, 01:25:15 pm »
Does anyone know why the plug-in was removed ?


Offline Jim McGhee

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #111 on: December 22, 2017, 05:49:00 pm »
Does anyone know why the plug-in was removed ?

Can't speak to why, but it appears CYBRMAGE has removed ALL of his plug-ins including Wink.
I suspect either Vera offended him or else health issues.  He would NOT be the first developer that left because of the way Vera treats its volunteer developers.

Offline PrincessCleavage

  • Full Member
  • ***
  • Posts: 208
  • Karma: +3/-1
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #112 on: December 22, 2017, 06:24:41 pm »
Does anyone know why the plug-in was removed ?

Can't speak to why, but it appears CYBRMAGE has removed ALL of his plug-ins including Wink.
I suspect either Vera offended him or else health issues.  He would NOT be the first developer that left because of the way Vera treats its volunteer developers.
Does Smartthings have a more developer friendly environment?

Offline StarDestroyer

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #113 on: December 26, 2017, 02:20:19 pm »
Was the plugin open source? Does anybody have the source code? I just got a tp-link device for Christmas and I'd really prefer to use it integrated into Vera than as an independent device doing its own thing.

I have some very basic coding knowledge, but have never done anything for Vera... so I'd much rather have something that already works :).

Offline Majimus

  • Full Member
  • ***
  • Posts: 103
  • Karma: +24/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #114 on: January 03, 2018, 01:11:00 am »
Quite a situation going on here, was looking to get some tp-link bulbs....guess folks will have to step up and write some code.

http://wiki.mios.com/index.php/Luup_Somfy_Walkthrough


It get's easier after the first time....

Offline ninkasi

  • Full Member
  • ***
  • Posts: 195
  • Karma: +10/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #115 on: January 03, 2018, 01:52:38 am »
Was the plugin open source? Does anybody have the source code? I just got a tp-link device for Christmas and I'd really prefer to use it integrated into Vera than as an independent device doing its own thing.

I have some very basic coding knowledge, but have never done anything for Vera... so I'd much rather have something that already works :).

When apps/plugins are developed and published they should - apparently - be either GPL3, BSD, or proprietary (http://wiki.micasaverde.com/index.php/Apps.mios_Developer's_Guide)

cybrmage didn't put any license info in the code itself, but making it available for others to use did not mean he lost intellectual ownership. 'Worse case' it is proprietary in which case it can't be used to develop future code *unless* the existing code took advantage of someone else's work. Perhaps it could now be termed 'abandonware' (https://en.wikipedia.org/wiki/Abandonware) but for the moment I prefer not to go down that particular rabbit hole, so have simply removed it from my Vera as he explicitly contacted me to say he did not want the code published. Having said that, removing the plugins has also got rid of a number of errors - possibly coincidental, don't know - that was causing luup to crash.

I think it's probably better to leave this now and look at other ways of controlling these devices.
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 Yelnoc

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #116 on: January 03, 2018, 07:26:36 pm »
Well, I got my new toys and found my here   ;D  Only to see the bad news.  :(

So, it is what it seems then... Somebody published code to interface Vera with a TP-Link, only to then take said code away?  And it can be considered proprietary because publishing readable code without a license does not imply that it can be used? Wonderful.

I may take this up as a hobby... What is the best way to get started on figuring out how to write a plug-in?  I don't suppose TP-Link publishes an API or something like that, so how the heck does one figure out how it works? Especially given that it so nicely uses encrypted communication?



Offline nayr14

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: PLUGIN: Wifi/UDP Switch Controller
« Reply #117 on: January 08, 2018, 07:51:09 pm »
I may take this up as a hobby... What is the best way to get started on figuring out how to write a plug-in?  I don't suppose TP-Link publishes an API or something like that, so how the heck does one figure out how it works? Especially given that it so nicely uses encrypted communication?

I'm a programmer.  I work with a lot of web/API development and the XML plugin config file setup that Vera uses give me a headache.  Plugin development isn't well documented on the wiki and the example plugin documentation is complete trash and extremely difficult to follow.  It's like they don't want people to create plugins.

I'm going to look into this more at some point in time.  I have a LIFX bulb and don't want to use the API.  Luckily it uses simple UDP commands that can be sent in a LUA scene.

This will turn a specific LIFX light off...

Code: [Select]
function string.fromhex (str)
  return (str:gsub ('..', function (cc)
    return string.char (tonumber (cc,16))
  end))
end

function SetLIFXOff (pIPAddress,pPort,pPacket)
  local socket = require ("socket")
  local udp = socket.udp()
  udp:sendto (pPacket:fromhex(),pIPAddress,pPort)
end

SetLIFXOff ("192.168.1.213",56700,"240000340000000000000000000000000000000000000000000000000000000075000000000000000000")

It's bare bones, right, but you can do anything with the right packet (I'm keeping the 'source' as a hex chunk right now as it's easier to spot the necessary changes)... but the responsiveness is all there. Happier doing this than going via the LIFX Cloud.

All that's in here is the length of the packet, a constant value, loads of zeroes, the message type for power, some more zeroes... 0 power = completely off.

On would be: 240000340000000000000000000000000000000000000000000000000000000075000000FFFF00000000 = completely on / maximum brightness.