Help getting started – sending commands over UDP via Node-Lightwave

LightwaveRF Communi… > Forum > LightwaveRF Hackers > Help getting starte…

LightwaveRF Community: Welcome Forums LightwaveRF Hackers Help getting started – sending commands over UDP via Node-Lightwave

This topic contains 5 replies, has 4 voices, and was last updated by  mark harding 6 months, 3 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #22584
     Chilly says:

    Chilly
    Participant

    Hi guys, so I’ve been trying to get stuck into controlling lightwaveRF via this (seems deadish) package (https://github.com/ollieparsley/node-lightwaverf)… but I seem struck at the first hurdle!!

    It seem’s to communicate with the Wifilink I’ll need the device and room id. The only place I can find these is in the URL of the lightwaveRF webapp – however they don’t seem correct (73456 / 86723), as most tutorials use single digit IDs.

    Am I going mad? Where do I find these?

    Secondly – is this the recommended way? Is there a simpler way to do this?

    Thanks

    #22592
     jamieburchell says:

    jamieburchell
    Participant

    You’re not going mad; those IDs have nothing to do with the room and device numbers that are used in the UDP messages.

    If you can packet sniff the UDP broadcast traffic on your network, you can see the messages being sent when using the web app or phone app.

    Alternatively, you can just trial and error.

    They are usually allocated in the order in which they were paired to the LightwaveRF link. So your first paired device in the first room would have been R1D1 (Room 1, Device 1).

    There’s a no frills iOS app, if you have an iPhone, called UDP test tool which you can use to see the packets being broadcast. Wireshark is an excellent tool for this.

    Set any of these packet sniffers to listen on IP 255.255.255.255 port 9760.

    Don’t forget, you must send a registration command from the network device that will talk to the WifiLink before the WifiLink will react to the messages.

    #22593
     jamieburchell says:

    jamieburchell
    Participant

    That package works fine btw – it’s a dependency for homebridge-lightwaverf which I’m using without issue.

    It doesn’t support some commands though, such as lock, unlock, full lock and the heating stuff. You could probably fork the project and add them easily enough though.

    #23181
     mark harding says:

    mark harding
    Participant

    HI,

    i was looking at this last night but it’s the first time i have ever tried to really use nodeJS.

    how do you actually go about using it so to speak. i can do the npm install and get that on but then where do you go from there.

    if i go and type nodejs i get the > icon but then i type the first line and just get undeclared :(

    can any one help

    #23214
     davemee says:

    davemee
    Participant

    Mark, if you have homebridge and node.js set up, you can fire up home bridge by just running

    homebridge

    at the terminal (assuming you’re running a non-windows OS)

    Node.js is something generally you don’t run directly; packages tend to install executables somewhere else that you run instead. It’s a bit like python, bash, perl or (shudder) java, in that it’s a run-time for scripts or other programmes, which you run instead.

    #23343
     mark harding says:

    mark harding
    Participant

    Sorry. only just seen you had replied.

    i still never had much luck but after a little more looking about i found the UDP commands. as i was using node-red as the main control and then needed that to speak to home-bridge i then realised i could just send the commands straight from there and got it working fine :)

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.