Guide To Setting Up LightWaveRF With Home & Siri via Raspberry Pi

LightwaveRF Community: Welcome Forums LightwaveRF Hackers Guide To Setting Up LightWaveRF With Home & Siri via Raspberry Pi

This topic contains 30 replies, has 9 voices, and was last updated by  davemee 7 months, 1 week ago.

Viewing 15 posts - 1 through 15 (of 31 total)
  • Author
    Posts
  • #22022
     clixby says:

    clixby
    Participant

    Afternoon all,

    I’ve looked through the forums and can’t see a guide to what a few of you seem to be doing..

    I’m keen to control my LightWaveRF setup using Siri.

    I have a Raspberry Pi and have successfully install HomeBridge (I Think!)
    However from there, I don’t quite know where to go, there seem to be a few different ways to set it up.

    Any advise / directions to a guide really appreciated.

    Thanks in advance.

    #22023
     skiv71 says:

    skiv71
    Participant

    I have LWRF (and all the other tech’s I support) using the Amazon Echo.

    Will be making a video soon.

    The Smart Skill’s App is still a dev app, but it’ll be public access as soon as its approved.

    developer of BMS Link (http://linode.bmslink.co.uk). A cloud based Home Automation platform for LightwaveRF, Z-Wave, RFXCOM.
    #22029
     jamieburchell says:

    jamieburchell
    Participant

    I’ve recently managed to figure this out after barking up the wrong tree with several broken projects like Siri proxy.

    How far have you got, I might be able to help.

    If you can get a recent version of Node installed on the Pi you basically need this: https://www.npmjs.com/package/homebridge-lightwaverf

    #22030
     jamieburchell says:

    jamieburchell
    Participant

    Here’s a step by step for setting this up on a Raspberry Pi running Raspian / OSMC. Note that you will need to prefix most of these commands with “sudo” if you are not already running as the root user or a user with the appropriate access level.

    SSH in to the Pi you want to install this on and let the fun begin!

    Update the package list and install packages required to build and install the required Node modules:

    apt-get update
    apt-get install libavahi-compat-libdnssd-dev git make g++

    Install the latest Node binaries

    cd ~ && wget https://nodejs.org/dist/v6.7.0/node-v6.7.0-linux-armv6l.tar.xz
    cd /usr/local && tar --strip-components 1 -xf ~/node-v6.7.0-linux-armv6l.tar.xz
    rm ~/node-v6.7.0-linux-armv6l.tar.xz

    Verify that Node is installed:

    node -v

    Install the Node packages; this will take a while.

    npm -g install npm
    npm -g install homebridge
    npm -g install homebridge-lightwaverf

    Create a user for running the Homebridge services:

    useradd --system homebridge

    Create a homebridge folder for storing the config and persistence info:

    mkdir /var/homebridge
    chown homebridge:homebridge /var/homebridge

    Create config file for homebridge at /var/homebridge/config.json using the config.json_.txt sample attached
    Create a file at /etc/default/homebridge from attached homebridge.txt
    Create a file at /etc/systemd/system from attached homebridge.service.txt

    Enable and start the homebridge service:

    systemctl enable homebridge
    systemctl start homebridge

    You should now be able to open the “Home” app on iOS 10 and find and pair the “Homebridge” accessory. From there, you can access all of the LightwaveRF accessories, assign them to rooms, create automation tasks and of course, interface with it via Siri.

    Attachments:
    You must be logged in to view attached files.
    #22035
     jamieburchell says:

    jamieburchell
    Participant

    For more info and alternative setup options (including automatically downloading your LightwaveRF config from the Lightwave servers) see here:

    https://github.com/rooi/homebridge-lightwaverf

    #22037
     clixby says:

    clixby
    Participant

    Perfect, thanks Jamie.

    I’d got as far as installing the Node packages.
    So wasn’t a million miles away.

    Thanks for the files also, that makes much more sense now!

    I’ll have a go this evening and let you know how I get on.

    Thanks for the details, really appreciated.

    #22047
     davemee says:

    davemee
    Participant

    Jamie, Thanks for all this. I’d come to the same conclusions, but not had any joy in getting my wifi link to recognise the pairing packet from the box I’d set up to drive all this.

    Are there special tricks I should know? Does the MAC address of the wifi link need to go into the bridge section? (as far as I could tell, this was an internal thing for Homebridge, rather than the homebridge-to-lightwaverf communications)?

    Or is there a special trick to getting the wifi link to accept the pairing packet? I’ve tried sending the packet within seconds of the link turning on (before it settled into ‘normal’ mode), as well as after it’s been operational a while. I’ve tried clicking the wifi link pairing button then issuing the packet, again to no avail. Nothing from Homebridge seems to make it to the device (it may well have paired invisibly, but as far as I can tell, it hasn’t – and I’ve tried pretty much every open system offering lightwaverf integration out of the box, including the one that makes it take 13 hours to get a kettle to boil)

    #22048
     jamieburchell says:

    jamieburchell
    Participant

    Hey. You need to register the MAC address of the Pi (not Homebridge) and you can do this using nc and those details are on the homebridge-lightwaverf node project page. I think I had to apt-get install something to get a more recent netcat version before I could do it

    #22049
     davemee says:

    davemee
    Participant

    Thanks Jamie, but still no joy. I cleared out homebridge’s persist folders, started it anew, and issued

    davem@hutch:~$ echo -ne ’100,!F*p’ | nc -u -v 192.168.1.5 9760
    Connection to 192.168.1.5 9760 port [udp/*] succeeded!
    ^C

    in a different terminal. I’m running on an Ubuntu 14 box, so fairly confident netcat is up-to-date.

    I’m completely stumped. Are there any ways to find out what devices *are* authenticated to talk to a wifi link? I’m starting to wonder if the problem lies elsewhere.

    #22050
     jamieburchell says:

    jamieburchell
    Participant

    Do you have the new WifiLink without the LCD screen? With the older one a registration message appears so it’s more obvious what’s happening. Maybe the limit of devices has been reached for registering with the WifiLink? In the old one you can deregister all devices.

    How about sending a command like 100,!R1D1F1 to turn Room 1 Device 1 on and see if the Pi is talking to the WifiLink.

    #22051
     davemee says:

    davemee
    Participant

    It’s a new one – I assumed *improved*, not reduced component cost! :)

    I tried the reset button on the back before issuing the commands. Nada. I believe they’ve magically changed the API too, so the R1 needs to be taken from the web interface – my first room has an ID of 91114 (I hope their security is good!)

    I’m going to look into hard resetting everything and driving the initial pairing from the Ubuntu box (rather than any devices). I’m glad these things can be driven locally with a little UDP packet, but they don’t make it easy!

    Thanks for all your suggestions though, Jamie – I can at least be sure I’m not doing anything obviously wrong. It means I must be doing something outrageously stupid somewhere… but that’s a fight for tomorrow!

    #22052
     jamieburchell says:

    jamieburchell
    Participant

    I’ve heard others saying about a new API, but I’ve not seen anything new – the official LightwaveRF app on the iPhone still sends the original UDP message types – I “sniffed” them with Wireshark to work out what they were.

    #22248
     mole says:

    mole
    Participant

    It’s a new one – I assumed *improved*, not reduced component cost!

    I tried the reset button on the back before issuing the commands. Nada. I believe they’ve magically changed the API too, so the R1 needs to be taken from the web interface – my first room has an ID of 91114 (I hope their security is good!)

    I’m going to look into hard resetting everything and driving the initial pairing from the Ubuntu box (rather than any devices). I’m glad these things can be driven locally with a little UDP packet, but they don’t make it easy!

    Thanks for all your suggestions though, Jamie – I can at least be sure I’m not doing anything obviously wrong. It means I must be doing something outrageously stupid somewhere… but that’s a fight for tomorrow!

    ——————————————————————————————–

    I’m having trouble controlling the Wifi Link with UDP packets which means that the HomeBridge plugin isn’t working.

    I can see everybody referencing R1D1 etc… but as above it looks as though on the manager.lightwaverf.com site my device and room IDs are more like device_id=”31186″ – does that sound right?

    I’ve sent the registration packet and accepted it on my wifi link but every command I send after that does nothing whatsoever.

    Anybody got any further?

    #22252
     lonebaggie says:

    lonebaggie
    Participant

    I had the same issue registering raspberry Pi for HA Bridge see previous post

    http://lightwaverfcommunity.org.uk/forums/topic/amazon-echo-dot/

    trick is issuing the following UDP command

    udp://192.168.0.22:9760/001,!F*p (replace IP address with IP for WIFI Link)

    9760 is the UDP port to talk to the WIFI Link
    001 is just a command sequence
    !F*p sends the registration command to WIFI LInk

    If the above works the WIFIlink should flash, pressing the button should register the PI

    Hopes this helps

    #22255
     mole says:

    mole
    Participant

    I had the same issue registering raspberry Pi for HA Bridge see previous post

    http://lightwaverfcommunity.org.uk/forums/topic/amazon-echo-dot/

    trick is issuing the following UDP command

    udp://192.168.0.22:9760/001,!F*p (replace IP address with IP for WIFI Link)

    9760 is the UDP port to talk to the WIFI Link
    001 is just a command sequence
    !F*p sends the registration command to WIFI LInk

    If the above works the WIFIlink should flash, pressing the button should register the PI

    Hopes this helps

    Thanks for the help. This part works, I have registered my Homebridge machine (currently my MacBook) with the wifi link OK.

    But subsequent commands do nothing other than make the wifilink screen go blank for a few seconds.

    Eg. echo -ne ’001,!R11607D31190F1|’ | nc -u 192.168.1.101 9760

    I think this is why the Lightwaverf plugin is not working – I can see it issuing commands but nothing happening.

Viewing 15 posts - 1 through 15 (of 31 total)

You must be logged in to reply to this topic.