[OBSOLETE] Lightwave RF Integration (UK)

Hey @CraigJohn / @Tim_Raynor . Can’t say that I am having the same issues, my routines seen to be working fine again. Do you reckon that there is any chance that you might be having network or connectivity issues?

@rbjames. Having a quick look at that article, it should be fine to run them alongside each other.

Cheers,
Adam

Hi @adamclark_dev
Routines are fine for me too . It’s just turning on and off of the lights and switches that I get issues with sometimes. I’m not sure whether the update on the ST hub has changed how it queues and handles events , possibly timing out quicker than it used to ? If I go into the Lightwaverf app and activate the device it usually clears the queue and everything works fine again for a while. Most mysterious !!

Hi there - I have exactly the same issue as you with the PIN and have spent a lot of money buying the lightwaverf hub and sockets recently only to find this issue when installing. Did you manage to get a fix? Thanks!

1 Like

Hi Adam - firstly great work as always. I have spent a fair bit of money in investing in the lightwaverf link and 6 sockets only to now find I am stuck with the PIN issue and only have a 5 digit PIN. Can you please advise whether there is a workaround? Many thanks

1 Like

Sorry Adam - should have read the thread more and now realise I had the old groovy file installed as a device handler! I now need to sort out issues with an error I am getting when running node server.js - error is

events.js:72
throw er; // Unhandled ‘error’ event

Not sure if anyone has any ideas?!

That’s sorted now too after a lot of reading up online! And hey presto, it now all works! Thanks again Adam for your help setting this up for everyone!

Just a report back - siri, smartthings and lightwave all working brilliantly together. Now just need to figure out how to get both node.js and server.js to restart automatically if the pi needs to be restarted.

Lots of material around to look up about that, though.

Thanks again to all.

@rbjames

You running all on the same Pi box, assume is was a fresh install?

I had a nightmare trying to get the Siri system to work for me and gave up through lack of free time :frowning:

Can you send me or post the link of the guide that you used as i found a couple in the past but seemed to have various sections missing etc.

Much appreciated, all the best

Craig

Hi,

It took me quite a while in the end because I also found guides with bits missing. I sort of happened on the solution based on info on this page:

https://www.npmjs.com/package/homebridge-smartthings

I couldn’t find the ‘Update from Repo’ and also found that putting

“polling_seconds”: 600,
“update_seconds”: 1

in the JSON file threw up errors. I did start with a fresh install so it is only running Adam’s code and this code.

Hi,

So i started my Pi from scratch, reinstalled everything and re-added my devices just to be sure and everything seems to be running lovely now…

Took another go at the Homebridge thing and after 5 hours of trying, I’ve given up now. All the guides just seem to differ so much that Im not sure what to use.

The link above seems great but obviously I am not doing something right, I seems to be having a lot of install issues with access rights even though I have “Sudo SU” and run as root user etc…
Never mind, maybe next time LOL

Well for what it’s worth - my home automation bliss was seemingly short lived and I’m now getting that ‘…length > 10) this.queue.clear();’ error you had so I have to restart the node server.js command if I ask the system to do too much.

I’ll persevere a little more but maybe I should spend a bit more time talking to my family rather than my lights - at least if they don’t listen then I don’t need a computer to wake them up…

…and I eventually found that if I installed ‘forever’ I can now run ‘forever server.js’ and if it crashes then it reloads again. I have an instruction ‘good night’ which turns off about 8 different devices. If there have already been a few instructions then it crashes. If I then issue the command again it’s fine. I wonder what will happen if I just change length > 10 to length > 100000000000000 in lwrf.js:181

@adamclark_dev @CraigJohn Embarrassing as though it is , I thought I better own up to you both that I think I have discovered the root cause of the issues I experienced previously.
I found out yesterday that the Raspberry Pi B+ has a red led which will not light up unless sufficient power to run the Pi is received . Whenever I booted my Pi I had seen the red led flash but then go dim and thought that this was normal. However whilst messing about with the micro USB cable yesterday I discovered that by changing it to a shorter cable the Red light comes on constantly and it turns out the USB cable I had been using is faulty.
Only one day in but I haven’t experienced any of the issues that I had seen previously.

I guess it just shows how you have to eliminate every possible point of failure !!

1 Like

@Tim_Raynor - Good to hear that it’s working.

2 Likes

Hi Adam and all,

I am having issues with some of my lightwave sockets turning on randomly when I have not executed a command on SmartThings. These devices also have no routines or smartapps on them, any ideas what might be causing this? I have done a clean reinstall of the Pi and same issues keep appearing. I have tried deleting the affected socket within the lightwave rf app and re-pairing it again and even change rooms and device orders within the lightwave rf app but no luck fixing it.

Thanks for your help in advance!

Hi @ajb16,

Haven’t experienced it myself and am afraid that is all I have to go on. I would have a run through of all of your settings and also give the server a restart.

Cheers,
Adam

1 Like

@adamclark_dev great work on your solutions, works a treat using a mac mini as the node js server too.
Just wondering have you tried or do you know if it would be possible to add the lock feature to sockets?
Dave

awesome work Adam, got this up and running tonight, with the new app and new hub its slightly challenging as when you delete a device it shifts all the device numbers! also have to click the link button once the hub starts flashing (on the newer hub)

Using homebridge on the same pi Ive got this working with Siri also which is great, you can also use homekit apps to create complex rules and scenes. Next on my list is getting it working with Alexa

Hey @ciscosurplus

What guidance or link did you use to get Homebridge working?

I have yet to get this working successfully and I have had 3 cracks at it but found the guides either missing something or just didn’t play ball.

Cheers

Hi Adam @adamclark_dev

Firstly, many thanks for all your work on this project.

I’ve a 25 year software development background so I thought setting this up would be a doddle. However it’s been over a week now and apart from managing to turn my kitchen into a temporary Disco due to the light switch being sent repeated on/off signals twice a second from the Raspberry Pi during a previous attempt to get the system working, I’ve not had much luck with this project!

I have a new style LightwaveRF Wifi Link (No PIN and no display) which has caused a few initial issues due to the differences with the old version that you appear to be using.

When I first tried to get this working I was using a Raspberry Pi 3 which slightly differs from your version due to inbuilt WiFi etc.

All seemed to install correctly on the Pi 3 but when I type “node server’js status” I get :-

events.js:72
throw er; // Unhandled ‘error’ event

Error: listen EADDRINUSE…

followed by a load of debug.

I’ve since tried switching to a Raspberry Pi 2 in case there was a clash of some sort with the new version, but it has the same issue.

I have very little experience with Raspbian/Linux and Node.js so I’m not sure if the above issue above is anything to be concerned about.

I’m also a little bit confused when it comes to clicking on “Register” when setting up the Device Handler Simulator, I click on the button but nothing seems to happen on the LightwaveRF WiFi link or in the App. I was expecting it to flash, or is that wrong?

The bottom line is I’ve been trying for about a week now, the LIghtwaveRF app can switch off lights from my tablet LightwaveRF app and from the web app, but Smartthings does nothing.

Do you or anyone else have any suggestions?

Many thanks

Mitch

Thanks for your reply Adam. I finally worked out what was causing this to happen! When I was attempting to register a device in graph.api and pressing the link button on the LightwaveRF hub, I had another smartapp which was running on the nodejs server on the Pi and I am thinking somehow the commands were getting confused as they were running at the same time? Does that make any sense? Cheers again!