[OBSOLETE] Lightwave RF Integration (UK)

Cool, that a good shout regarding the session storage / on and off buttons.

Realised that you can do UDP from the SmartThings hub to the LightwaveRF and completely skip out the (slow as hell) API and do it over your local network. So am working on that at the moment.

But will definitely implement changes with this revision.

3 Likes

I’m hopefully getting my ST hub soon, so was looking forward to moving from my Vera Lite to the ST. I have a lot of the Oregon Scientific sensors (cheap, reliable and batteries last forever), and LightwareRF door sensors (cheap!), used on the Vera via the awesome RFXtrx Controller that is connected via USB. I really know nothing about all these different protocols etc, but I am guessing I will not have any luck with my sensors as by the sound of it the door sensors are not supported, and I guess the Oregon Scientific sensors use a different protocol to the LightwaveRF stuff, even though they are on the same frequency ?

quick question on LWRF integration . . . if i have a LightWave RF light switch and i turn it off, will it update the state on smartthings or is this a no go ?

Is a no go, as the communication is one way and stateless.

1 Like

Hi Adam - First time poster!!

I would like to thank you for your efforts in doing this I managed to integrate various LightwaveRF devices last night (16 in total) including On/Off Dimmer switches, Plug-in sockets and wall sockets and

I did notice the delay that has been referred too which seemed to be highly variable so wondered on how the communication takes place.

I assume that from the ST app that sends the instruction to the ST server, which in turn sends the LWRF server. This instruction is then then sent to the LWRF WiFi link which finally passes the instruction to the device. So there appears to be at least 4 “hops” so no wonder that we could experience delays.

Out of interest does the ST app always go via the ST server directly and the ST hub is simply used to communicate to the ST devices or does the app ever talk directly to the ST hub when within range??

Also you mentioned the option to do UDP so wondered if you could explain how this will impact the flows outlined above.

Thanks again for helping us out with this!!

1 Like

: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