LightwaveRF Binding Updated

First one, the items file is just to activate the rule, you can activate it however you wish just put it in to make easier, the rule file is the important one, and having the exec binding installed.

The items file just starts the processing of:
rule “Lightwave_Setup” when Item Authentication_Switch received command then

1 Like

Sorry only just got a chance to sit down and try this again…

2019-10-18 17:25:13.608 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘Lightwave_Setup_2019-05-11_1141.rules’
2019-10-18 17:25:13.610 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘Lightwave_Setup_2019-05-11_1141.rules’ is either empty or cannot be parsed correctly!
2019-10-18 17:25:17.825 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘Lightwave_Setup_2019-05-11_1141.rules’
2019-10-18 17:25:22.386 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘Lightwave_Setup_2019-05-11_1141.rules’

If I rename it to “Lightwave_Setup.rules”

2019-10-18 17:27:58.988 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘Lightwave_Setup.rules’
2019-10-18 17:28:03.457 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘Lightwave_Setup.rules’
2019-10-18 17:28:17.374 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Lightwave_Setup’: json string can not be null or empty
2019-10-18 17:28:17.377 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Lightwave_Setup’: json string can not be null or empty

You have the exec binding installed yes?
And you have the items file present?
I’m just doing a fresh openhab install atm so will test as soon as done tonight. Give me couple hours

Thank you…

Not sure if my problems are a Docker issue though… Although I should have some flows in NodeRed if any one wants them to get LightwaveRF working… all be it in a more clumsy fashion than your script which I am shamelessly copying bit of code out of :slight_smile:

Installed the following

How does it fair up in node red?
I’ve not used (although have installed), how are you integrating the lightwave… does it update both ways or are you just using to switch from the server side?

Damn this setup is taking forever, still loading the initial setup on my pi.

It’s been so long since I done the script/rule I can’t remember where I was at with the files :joy: prob given you the wrong one. The only thing I will say, the formatting of the json and other formulas has to be exactly how I had it (cr and lf s) otherwise it doesn’t work - don’t know if you may have changed to make it look nice which could have broken it

Kind of cheating with NodeRed.

Pull the whole lot and dump in a Global Set.Then pull the json into a function for turn off/on with my ZWave Sensors. Works well but I loose the polling where as your script is better for state.

Also as yours works in OpenHab, its better for all resouces…

Thats why I love Docker… 10 mins and your up and running :slight_smile:

Ah so you can’t do the state if you turn on the socket manually…
I just couldn’t get docker, not that I spent much time with it, tried running on my qnap but just couldn’t get it working. Maybe I’ll revisit as my pi is pretty much maxed out now as so many devices.
I love Zwave, flawless, just no sockets :weary:

I run most of my Dockers from my QNAP

use SSH

If you have a ZWave stick you need to run:
(You can add this to the start up of your QNAP)

insmod /usr/local/modules/cdc-acm.ko

then just get the USB Path to the ZWave and add to Docker i.e /dev/ttyACM0

lsusb #Check to see your USB Stick is listed
ls /dev/tty* #check the path

docker run --name=openhab-zwave -p 18080:8080 -p 18443:8443 /
-p 5555:5555 -v /share/Container/OpenHab/addons/:/openhab/addons /
-v /share/Container/OpenHab/userdata/:/openhab/userdata /
-v /share/Container/OpenHab/conf/:/openhab/conf /
–device=/dev/ttyACM0 --privileged --tty /
openhab/openhab:2.4.0-amd64-debian

That’s all too far over my head :joy:
I haven’t got a clue on any unix based systems, everything I know is self taught and that may aswell be Chinese :stuck_out_tongue_closed_eyes:
Do I need virtual switch…
Do you do everything from an ssh shell or use container station?

Thought it was taking a while:

Don’t think it’s ever installed first time

Resorting to installing as an app on the qnap for now, will try docker tomorrow

And damn… knew there was something I forgot to backup… habpanel :weary:

SSH

Install Container Station if you have not done it before but it should use a separate subnet for the virtual switch by default :slight_smile:

You can always copy the above into container station GUI if you prefer… then if using the ports from above access OpenHab on NASIP:18080 or which ever port you like

I never even knew there was a QNAP App :roll_eyes:

Cheers I’ll take a look.
Google qnap club and add the repo to the qnap, lots of decent apps

1 Like

Nice one. Will do.

I’ll have a look in more detail 2moro. What I’ve found so far:
Rule successfully generated files
Created Files were formatted wrong - \r\n left instead of new line, not sure if this is pi to qnap issue or exec binding update as of yet.
Successfully updated switch statuses after replacing \r\n with new Lines.

I’ll keep you posted. @Fixer do you think you could run the setup again (backup first) to eliminate the exec binding change please.

@delid4ve I’ll have a go tomorrow. Need to rediscover anyway as I’ve added some more LWRF kit.
Is there an updated version of the scripts or shall I just reuse the ones I have (which work ok)?

:+1: reuse what you have as you know they work, should be the last file I put up anyway. Your using a pi too are you not?
If it works then I know it’s docker and and I’ll have a look and add some conditions dependant on operating system, already an oversight on the paths so got to add some variables in anyway.

@anon99588902 I can’t get this Docker working. Can get as far as picking the package but that’s it, fails saying can’t download paperui etc… tried with network as host and as Nat, have you had the issue at all?

Are you using SSH or Contain Station?

Did you make a folder for the container to write to? I can talk you through doing this in SSH or GUI

I did this:

docker run \
    --name Openhab2.2 \
    --net=host \
    -p 18081:8080 \
    -p 18444:8443 \
    -v /share/Container/OpenHab/addons/:/openhab/addons \
    -v /share/Container/OpenHab/userdata/:/openhab/userdata \
    -v /share/Container/OpenHab/conf/:/openhab/conf \
    openhab/openhab:2.2.0-amd64-debian

In an ssh shell on my phone.
Also tried using the built in openhab docker in container station.
Every time it loads it, I go to web and select simple/standard/expert and then in openhab logs it’s failed. It’s like a component is missing. I have jre installed and normal openhab app works fine

Are you on a windows or Mac or iphone?

You have created the folder “Container” on your NAS? and in that you have a folder called “OpenHab”?
you can update the image to ```
openhab/openhab:2.4.0-amd64-debian

Yes the folders are there, it creates them for me under share\ as per the docker command

And using terminus on iphone

I’m just updating my qnap, so many updates so often :weary:

Just to rule out, mine is x86 not arm processor… right version? Would think so as it’s booting to web interface ok

So have updated everything, rebooted. Run the command again from ssh…
It did a lot more this time but seems to have hung on ‘launching openhab runtime’
Just gonna leave it for 10 to see if it starts. Container is visible and running in the gui

Oh God Dont… I updated mine to the 4.4.1 a few days ago, really wish I hadn’t .

I just learnt the lesson of going from 2.2. to 2.4 in OpenHAB with ZWave… Always read the breaking changes first :frowning:

You Docker run looks fine… yes its fine for your processer I use the TS-453A 8G

No Zwave USB Listed though…

You should have got the

On startup then go to the port you listed “18081” and have the

I Installed the PaperUI without any issues - check that you have write permission to the folders you can use the terminal from qnap.