Lightwave RF Integration (UK)

:arrow_up:️ This.

Not this :arrow_down:

With one exception: the official “smart lighting” smart app is allowed to run locally on the hub itself, but only if all of the device types are official device types limited to some specific devices.

So that lets out both the custom code and the custom device type.

There has been much discussion for a very long time about allowing community created code to run locally, and supposedly they keep looking into it, but under the present architecture anything which could run locally has to be pushed out to every customer on the system in a firmware update, and they just don’t want to get into that.

So there is definitely a bit of additional lag. And it definitely varies not just from person to person, but from day to day and hour to an hour.

As far as UDP, SmartThings continues to tell us officially that this protocol is not supported. What is expected to be a two-way communication will be a one-way, and results can be different than what you would expect if protocol were supported. See the Milight forum topics for more discussion of this issue. It’s another one of those “one day, someday,” feature requests for now. However, you can certainly try it and see if what you get is good enough for your particular needs.

1 Like

Looking useful :smiley:

I’m very interested in this as I really like the LWRF double UK mains sockets, since they’re much less obtrusive than the ‘plug in’ type that Smartthings (and Belkin) do.

If it’s any help, there is a CPAN Perl module for talking to LWRF via UDP at http://cpansearch.perl.org/src/GRIM/LightWaveRF-0.04/lib/LightWaveRF.pm

Adam

Im new to this forum and smartthings, but have been using lightwaverf for a year or so.
Did you manage to get the dimming working as I could not see the update on GitHub?
Thanks again as your current code for on/off works well

Thanks

Peter

2 Likes

And before I forget, this is the community topic on UDP in case that’s of interest, although it sounds like you’re going another direction:

1 Like

Tried a couple of the different UDP methods listed in the forums. None seemed to work properly, used WireShark to monitor network activity and no UDP requests were being sent. Think it might have to hold on until smartthings officially produce some documentation for it.

1 Like

Hi Peter,

Haven’t yet, as have been trying the UDP stuff. Will try to do an update this week for it.

Adam

1 Like

@JDRoberts - This has to go via the lightwaveRF server, which is why there is lag. If at some stage UDP becomes possible, then it will just be local and the lag will be much reduced.

1 Like

Hi All

Hope you can help, been looking into setting up some home automation and am a complete novice at the moment. I was originally put off of LWRF as by far the best looking on the market in the UK, however put off due to not being compatible with any other kit,

Great work Adam and thanks for taking the time to get things working with ST.

Before I go out and by loads of kit, im wondering do you still need to have the LWRF hub to connect the devices onto the network which then links to ST, or can you connect LWRF devices direct to ST using your code above.

Thanks

Hi Mike,

You will need the LWRF hub because the LWRF hub operates on different frequencies and protocols to the ones compatible with the SmartThings hub currently.

@adamclark_dev integration uses the cloud integration to communicate with the LWRF hub directly in your house so you will need it.

In an ideal world SmartThings could talk directly to the LWRF hub on the LAN but that hasn’t been cracked yet. I’m personally experimenting with a Raspberry PI and custom devices in SmartThings to connect up to LWRF, SmartThing talks to RaspberryPi which relays the message to LWRF.

thanks

3 Likes

Hello All,

Firstly thanks to the work done to get the LightwaveRF stuff working with smartthings

My stuff is working well with one strange exception.

LightwaveRF ‘Things’ controlled from the Things page work perfectly, on is on and off is off (and the same is reported in the activity feed)
My issue comes when using SmartApps to control these LightwaveRF devices, items listed in the ‘on’ section of apps are turned off and vice versa (the activity feed reports the same as the device is physically doing)

So for some reason, all my LightwaveRF things behave backwards when being called from any SmartApp (I’ve tried at least 5 different types of apps for control)

If it makes any difference, I’m using 3 RF sockets (plug in ones) and 1 single-gang RF light switch

Any help would be appreciated
(its not a big problem as I have inverted my SmartApp rules to make the stuff work, but its rather odd)

PS - any update to any ‘local’ controlling of the LightwaveRF stuff would be brillant!

many Thanks
Chris

1 Like

Hi Chris,

Like you I’ve followed Adam’s instructions and am trying to connect my Lightwave RF equipment to Smartthings Hub, however as my LightwaveRF WIFI link was registered just recently and I don’t use a PIN to connect to my Lightwave RF account, whereas this seems to be required for this set-up to work.

I’ve seen your separate post on the subject on the LightwaveRF community website where you mentioned the same issue. I did however request my PIN number from LightwaveRF via http://lightwaverfhost.co.uk/forgot/ which did provide a PIN but this doesn’t seem to work - either through Alan’s coder, or directly on the LightwaveRF management portal.

Did you have this issue, and if so, how’d you work around it?

Thanks,

Kevin

Hi Kevin,

Sorry for the late reply.

The PIN that I got from that web page and also via a support ticket worked for me when following the instructions from Adam.

My lightwaveRF stuff is setup VERY simply in the lightwaveRF app (all in one room called “1”) and then numerically 1-9 for example so they are easy to reference using Adams method above.

not sure that will really help…

Thanks Chris.

My set-up is also simple… actually only couple of devices so far. But I like the LightwaveRF devices for the UK so was looking to add more.

Anyhow the PIN I got from the link was 5 digits long, whereas the PIN I need is meant to be 4 digits long so doesn’t work. I tried the support desk but they told me not to use the management portal as mine was a newer install.

Looks like I may have to wait until they update their Management portal.

Kevin

Hi Kevin,

OK I guess I might have been lucky, mine was what seems to be the ‘normal’ 4 digit PIN

For my support ticket they provided my PIN for me, It might be worth asking them again to see if they can help, they replied in a few days to mine, not super-quick but got a solid ‘correct’ response never the less.

Thanks
Chris

It doesn’t appear that they can. Apparently new installs such as mine have been set-up on a new server which is password based. Older installs are on a separate server and have access via a PIN.

Looks like I’m stuck for now :frowning:

1 Like

Hi Adam,

Thanks for the instructions - I’ve been using ST for a few months now and have just ordered a few of the LW components to test out. I was wondering if you ever got the dimming function to work?

Thanks
Ciaran

1 Like

Morning Adam

So ive decided to take the plunge and in going to get some LWRf products to integrate . . .

Specifically:
4x 1gang dimmer
1x 2gang dimmer

But just want to clear up a few last things:

1.) are 2 gang switches/dimmers integratable like 1 gang

2.) when you click on in the smartthings app for a switch does it guess the state is on from the click and when you click it again sends an off command like a st bulb usually would . . . (Ideal if so as ill hardly use the actual wall switches)

3.) is the PIN issue going to be an issue for all new customers as some report they have 5 letter pins not 4 and is this fixable

4.) do u just need a lwrf hub on the lightwave side of things of the link for mobile use hub aswell - what hardware is required other than the devices for ideal lightwave side of things :slight_smile:

Cheers mate - your a real legend !!!

Hey,

There has been no coms from the original Dev for a while. Just wondering if this has been abandoned?

It certainly is possible to communicate with devices on the local network from the hub. Belkin WeMo devices use UDP, where the commands are sent from the local hub. The same goes for local http requests such as GET and POST. (Look at my post on Raspberry Pi relay integration)

Does the lightwaverf local hub expose a local REST server? If so I imagine it’s fairly straight forward to build the device type.

1 Like

I’ve been tinkering with getting a full Raspberry Pi/Windows service integration but it is too early to share as I haven’t got the SmartThings Device driver/SmartApp service discovery bit done to talk to the RaspBerry Pi.

Unfortunately LightWaveRF does not have a REST interface locally it only has a UDP port on the Lightwave link that takes relatively simple commands but quite specific. SmartThings UDP support isn’t really there, there are reports of people getting it working but I failed when I tried like many. I suspect if it was working it wasn’t communicating through the hub and trying to connect in the cloud.

I’ve used Adam’s integration as I have LightWaveRF throughout my house but really it is too slow because the Cloud integration from LightWaveRF is very slow. Connecting directly to the Lightwave Link much like the LightWave mobile app is the only way to go in my opinion.

Once I have something more I’ll post on the forums but work does get in the way of my fun :smile:

1 Like

Cool stuff. Have you tried looking at the Belkin WeMo device types in the SmartThings IDE? They must use UDP. I’m guessing you are using the Raspberry Pi as a proxy… So:

SmartThings Cloud -> SmartThings Local Hub -> REST -> Pi -> UDP -> LightwaveRF ?

I’m also guessing that the SmartApp for discovery will work in the reverse order for device discovery.