Lightwaverf via Wifi link

Hi Pembo, just a quick question,does the rfxtrx control lightwave switches directly or do you need a remote control ?

At the moment i have 1 lightwave lightswitch but i dont have a remote , was wondering if i need to get one or just the rfxtrx box will do ??

Thanks
Lee

It can control the switches directly, without the LWRF hub or remote as it transmits the RF signal that the switch receives. You can add the config for a switch yourself and pair the RFTRX device to the switch. If you’ve got a remote or LWRF hub it’ll pick up the RF transmission from the remote/hub and can use that as the transmission

Thank you very much

I am a newbie to Home Assistant (a couple of weeks) and am just getting to grips with its power. I hope I am not going over old ground for those with ore experience.

I am running hassio on a Raspberry Pi 3. I have integrated my lightwaverf equipment using IFTTT and the lightwaverf link.

It works. It is slow, it takes between 3 and 5 seconds for a z-wave door switch to turn on a lamp. My automation in HA:

  • action:
    • alias: Porch Lamp On
      data:
      event: PorchLamp
      value1: ‘’
      service: ifttt.trigger
      alias: Front Door Opened
      condition: []
      id: ‘1504956199673’
      trigger:
    • entity_id: sensor.front_door_access_control
      from: ‘23’
      platform: state
      to: ‘22’

I then set up a trigger “PorchLamp” on IFTTT and use the lightwaverf actions available to turn on the required lamp.

Not stunning performance but it is possible without too much knowledge.

I hope this may help somebody like myself who does not have the knowledge to put together the required code to bridge the two systems.

Hi Jono,

Unfortunately I cant get your script to work.
I am new to all of this and learning as I go.
Could you possibly post a copy of your script in plain text?
I keep getting:

-bash: /home/homeassistant/.homeassistant/Scripts/lightwaverf.sh R3D1 ON: No such file or directory

also if I navigate to the location of the script in putty and run lightwaverf.sh R3D1 ON

-bash: lightwaverf.sh: command not found

I get:

Cheers,

Richie

Hi Richie,

If i read the thread you responded to the script name is different to yours as is the path. If you do a “ls -l” in yur script directory do you have a lightwaverf.sh?

If you do does the script have execute permissions?

Regards

Matt

Hi all,

First time posting here, thought I’d contribute back my version of the script that allows you to dim lights.

#!/bin/bash
LWHOST=<YOUR IP ADDRESS>
LWPORT=9760
ROOM_DEVICE=$1
COMMAND=$2
BRIGHTNESS=$3
LWCOM=NOTSET

get_command ()
{
case "$COMMAND" in
"DIM")
    LWCOM=FdP$BRIGHTNESS
;;
"ON") LWCOM=F1 
;;
"OFF") LWCOM=F0 
;;
"LOCK") LWCOM=F. 
;;
"STOP") LWCOM=F. 
;;
esac
}

run_command ()
{
echo ${LWHOST}
echo ${LWPORT}
echo ${ROOM_DEVICE}
echo -ne ",!${ROOM_DEVICE}${LWCOM}|" | nc --wait=1 -u ${LWHOST} ${LWPORT}
}

get_command
run_command

You can then run the script with ctrl_lwrf.sh R3D1 DIM 0 for 0% up to ctrl_lwrf.sh R3D1 DIM 32 for 100% as documented at https://api.lightwaverf.com/lighting_power.html

Hope that’s of some help,

Matt

Hey, here’s my script http://d.pr/f/p8UfZ5

So I started to scratch this particular itch and try to bring LWRF support to HomeAssistant natively.

My efforts so far are at Starting work on LightwaveRF Native Support - anyone else interested in helping? and https://github.com/proffalken/python-lwrf

I’d love your input on this.

Cheers,

Matt

I have lightwaverf runnning via wifi link using home assistant. Happy to share the code if it helps.

That would be great - are you using bash scripts as above, or have you written a “proper” plugin for this?

Hey jono,proffalken
i tried your scripts:

  • downloaded and replaced ip address
  • placed it on my raspberry pi
  • run it like this from the OSX terminal:
    bash ha_lightwaverf.sh R1D1 ON

Script runs with the following output and no errors:
192.168.1.110
9760
R1D1

However, lights do not switch on and lightwaverf link doesn’t start blinking.

I wonder what am i doing wrong. Appreciate any help/ideas.

Thanks,
Alex

Did you link the LightwaveRF Link (hub) to your Mac or Raspberry Pi before trying the scripts?

Try running this in Terminal on your Mac or Raspberry Pi, and see if the green light on the LightwaveRF hub flashes (so you can press the button and link the hub to your Mac/Pi).

echo -ne "100,\!F*p." | nc -u -w1 192.168.1.110 9760

1 Like

Great! I Was missing this bit indeed. It works now. Thanks a lot!

Alex

Glad to hear it :+1:t3:

I’ve written a proper plugin. Will get the code in order and put on github soon.

1 Like

That would be amazing, thanks - I’ve not had anywhere near as much time to spend on this as I would have liked :frowning:

@mhaylock @jono @glen @pembo @litfoo @CaptainComedy @grooml @SCCMOG @alexbell

I’ve made my integration available for you. It’s a bit crude, but should work. Any questions let me know.

If there’s demand for this then I’ll spend time making it better.

C

This really is a great piece of code…!
Only issue I have is turn on multiple.
Have you managed to get round this issue?

For example…
Create a group in Alexa… using 2 of the lights created by your component (or by my CMD line switches).
Then ask Alexa to turn on the group…
Boom only ONE turns on…
First idea… create an automation… issue solved right? No, how do you then DIM multiple lights by for example.

If you’ve found a way round give me a shout mate, I have been messing with this with my scripts and now yours and just cant get multiple to turn on…

Cheers,
Richie

Thanks! I’m glad it was useful for you.

I didn’t have a lot of time to make the multiple work, but I did find a work around in scripts.

I am currently using scripts where turn on / turn off / dim EACH light ONE BY ONE.
You have to wait a second between each light as the hub doesn’t like receiving multiple commands at once.

It’s not elegant or efficient, but it does the job.

I’m not near my home assistant install at the moment so I can’t show you my script, but next time I am near, I’ll upload a snippet for you to look at. Let me know how you get on.

C