LightwaveRF Binding Updated

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.

Just stuck At starting openhab runtime now :weary:
Thought you said docker was easy :joy::joy:

Sorry (Now where is that slink quitely away emoji)

Not gonna let it beat me, wanna see why that rule doesn’t work

try from a computer…

ssh username@ip_of_nas (assuming SSH is on)

docker ps

docker stop nameofexistingopenhab

(The new name has to be different from the existing)

docker run --name=openhab-zwave2 -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 openhab/openhab:2.4.0-amd64-debian

Unable to find image ‘openhab/openhab:2.4.0-amd64-debian’ locally
2.4.0-amd64-debian: Pulling from openhab/openhab
1c582437515d: Already exists
660b4ee393c5: Already exists
26ddf6358bdd: Pull complete
c20ac8ad849b: Pull complete
fe3444ffbaa6: Pull complete
b889c2d27e95: Pull complete
b3358876c556: Pull complete
Digest: sha256:6fa14cd04b500db31711734b8d45c8bf37b55d7c49805cd51f3b41999597776f
Status: Downloaded newer image for openhab/openhab:2.4.0-amd64-debian
++ test -t 0
++ echo true

  • interactive=true
  • set -euo pipefail
  • IFS=’
  • ‘[’ limited = unlimited ‘]’
  • rm -f /openhab/runtime/instances/instance.properties
  • rm -f /openhab/userdata/tmp/instances/instance.properties
  • NEW_USER_ID=9001
  • NEW_GROUP_ID=9001
  • echo ‘Starting with openhab user id: 9001 and group id: 9001’
    Starting with openhab user id: 9001 and group id: 9001
  • id -u openhab
    ++ getent group 9001
  • ‘[’ -z ‘’ ‘]’
  • echo ‘Create group openhab with id 9001’
    Create group openhab with id 9001
  • groupadd -g 9001 openhab
  • echo ‘Create user openhab with id 9001’
    Create user openhab with id 9001
  • adduser -u 9001 --disabled-password --gecos ‘’ --home /openhab --gid 9001 openhab
    Warning: The home dir /openhab you specified already exists.
    Adding user openhab' ... Adding new useropenhab’ (9001) with group openhab' ... The home directory/openhab’ already exists. Not copying from /etc/skel'. adduser: Warning: The home directory/openhab’ does not belong to the user you are currently creating.
  • groupadd -g 14 uucp2
  • groupadd -g 16 dialout2
  • groupadd -g 18 dialout3
  • groupadd -g 32 uucp3
  • groupadd -g 997 gpio
  • adduser openhab dialout
    Adding user openhab' to groupdialout’ …
    Adding user openhab to group dialout
    Done.
  • adduser openhab uucp
    Adding user openhab' to groupuucp’ …
    Adding user openhab to group uucp
    Done.
  • adduser openhab uucp2
    Adding user openhab' to groupuucp2’ …
    Adding user openhab to group uucp2
    Done.
  • adduser openhab dialout2
    Adding user openhab' to groupdialout2’ …
    Adding user openhab to group dialout2
    Done.
  • adduser openhab dialout3
    Adding user openhab' to groupdialout3’ …
    Adding user openhab to group dialout3
    Done.
  • adduser openhab uucp3
    Adding user openhab' to groupuucp3’ …
    Adding user openhab to group uucp3
    Done.
  • adduser openhab gpio
    Adding user openhab' to groupgpio’ …
    Adding user openhab to group gpio
    Done.
  • case ${OPENHAB_VERSION} in
  • initialize_volume /openhab/conf /openhab/dist/conf
  • volume=/openhab/conf
  • source=/openhab/dist/conf
    ++ ls -A /openhab/conf
  • ‘[’ -z ‘.DS_Store
    html
    icons
    items
    persistence
    rules
    scripts
    services
    sitemaps
    sounds
    things
    transform’ ‘]’
  • initialize_volume /openhab/userdata /openhab/dist/userdata
  • volume=/openhab/userdata
  • source=/openhab/dist/userdata
    ++ ls -A /openhab/userdata
  • ‘[’ -z ‘cache
    config
    .DS_Store
    etc
    habmin
    jsondb
    kar
    logs
    tmp
    zwave’ ‘]’
    ++ cmp /openhab/userdata/etc/version.properties /openhab/dist/userdata/etc/version.properties
  • ‘[’ ‘!’ -z ‘/openhab/userdata/etc/version.properties /openhab/dist/userdata/etc/version.properties differ: byte 182, line 4’ ‘]’
  • echo ‘Image and userdata versions differ! Starting an upgrade.’
  • tee /openhab/userdata/logs/update.log
    Image and userdata versions differ! Starting an upgrade.
    ++ date +%FT%H-%M-%S
  • backup_file=userdata-2019-10-19T17-26-36.tar
  • ‘[’ ‘!’ -d /openhab/userdata/backup ‘]’
  • mkdir /openhab/userdata/backup
  • tar --exclude=/openhab/userdata/backup -c -f /openhab/userdata/backup/userdata-2019-10-19T17-26-36.tar /openhab/userdata
    tar: Removing leading `/’ from member names
  • echo ‘You can find backup of userdata in /openhab/userdata/backup/userdata-2019-10-19T17-26-36.tar’
  • tee -a /openhab/userdata/logs/update.log
    You can find backup of userdata in /openhab/userdata/backup/userdata-2019-10-19T17-26-36.tar
  • exec /openhab/runtime/bin/update
  • tee -a /openhab/userdata/logs/update.log

################################################
openHAB 2.x.x Docker update script
################################################

The script will attempt to update openHAB to version 2.4.0
Please read the following notes and warnings:

Important notes for version 2.3.0:
Warning: Nest Binding: The ‘camera’ Thing Type now has channel groups. Add ‘camera#’ before the channel ID in the channel UID of existing camera channels. The ‘time_to_target_mins’ channel of the ‘thermostat’ Thing Type is renamed to ‘time_to_target’
Warning: Oceanic Binding: The ‘softener’ Thing Type no longer exists and is replaced by the ‘serial’ and ‘ethernet’ Thing Types
Warning: Yamaha Receiver Binding: The configuration parameter names now use lower camel case convention. Change ‘HOST’ to ‘host’, ‘PORT’ to ‘port’ etc

Important notes for version 2.4.0:
Warning: Astro Binding: The ‘kilometer’ and ‘miles’ channels have been replaced by a new ‘distance’ channel
Warning: Jeelink Binding: The ‘currentWatt’ and ‘maxWatt’ channels have been replaced with ‘currentPower’ and ‘maxPower’ channels
Warning: WeatherUnderground Binding: A bridge has been added on top of the current things, you need to add a bridge containing your api-key.
Warning: ZWave Binding: Major changes have been merged to support features such as security. All things must be deleted and re-added. Refer to ZWave binding updates for further information.
Warning: Synop Binding is now using UoM. ‘wind-speed-ms’ and ‘wind-speed-knots’ channels have been replaced by a single ‘wind-speed’ channel.
Warning: Amazonechocontrol Binding: The account thing does not have settings anymore. You have to login at amazon once again through the proxy server http(s):///amazonechocontrol
Warning: Milight Binding: The various available bulb types do not appear in the Paper UI Inbox anymore. The correct bulb need to be added manually. The bulb “zone” is now a configuration. Bulb Things need to be recreated to apply this change.
Warning: Hue emulation: The item to hue ID mapping is no longer stored in files, but in the openHAB storage service. You need to rediscover “devices” in all services that use the hue emulation (Amazon Echo, Google Home, etc).

Replacing userdata system files with newer versions…
Clearing cache…

Performing post-update tasks for version 2.3.0:
Deleting File: /openhab/userdata/etc/org.openhab.addons.cfg
Deleting Directory: /openhab/userdata/kar

SUCCESS: openHAB updated from 2.2.0 to 2.4.0

  • chown -R openhab:openhab /openhab

  • sync

  • ‘[’ -d /etc/cont-init.d ‘]’

  • sync

  • ‘[’ true == false ‘]’

  • exec gosu openhab tini -s ./start.sh
    Launching the openHAB runtime…

                        __  _____    ____      
    

    ____ ____ ___ ____ / / / / | / __ )
    / __ / __ / _ / __ / // / /| | / __ |
    / /
    / / // / __/ / / / __ / ___ |/ // /
    _/ ./_// /// /// |/_____/
    /_/ 2.4.0
    Release Build

Hit ‘’ for a list of available commands
and ‘[cmd] --help’ for help on a specific command.
Hit ‘’ or type ‘system:shutdown’ or ‘logout’ to shutdown openHAB.

openhab>

Now flick to a browser and go to the NASIP:18080 (it might take a few mins to come up

When your happy everything is running and working the way it should add --restart=always

docker stop openhab-zwave2
docker rm openhab-zwave2

docker run -d --name=openhab-zwave2 --restart=always -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 openhab/openhab:2.4.0-amd64-debian

Still wouldn’t have it, got to the package selection again and it hung on trying to install paperui and rest of the gui’s

Removing container station and reinstalling

add the --privileged and -tty flag to your command

And the Lightwave has started working???

Started working…
What on your system…
One thing I noticed with the app on my qnap… the system started rule didn’t fire, had to wait an hour for the cron timber to kick in to get the auth token

I had been rebuilding it two or three times to take screenshots and it just showed up…

hmmm… do you know what you did
Think I just got docker working too

Rebuild my Docker a few times - killed my zwave twice ???

Well done on the Docker - Once you start everything ends up running in it :slight_smile:

Wasn’t working again…
Then I had a brainwave…
Try https…
Working.
Doesn’t like http for some reason.

I’m in.

Very strange unless you have a confict of port i.e. --net-host then http should be fine

I would like to say… Thank you very much

Your script is fantastic and all the help and patence you have given, it is very much appreciated.

I just loaded it in and it worked first time.
The only thing me and fixer found is that at one point lightwave seemed to limit the json request so unless you need them take out this like upgrade/rgb colour etc from the refresh rule (make a backup first)

It’s a bit clunky and will use one of your rule/cron threads most of the time (can alter if your not worried about it updating openhab so quick - think it’s 10 seconds as default)

You may also see slightly freaky buttons aswell if it’s in the middle of the script when you change its state but it will rectify on its next pass.

the exec timing is 5 seconds (to execute and respond) so if you go lower on the cron make sure you lower it to less than the cron otherwise you’ll max your threads and blow up :joy: if it’s too low you won’t get the response back though - I run at 4 seconds and exec at 3500(3.5) and it’s fine - May want the lightwave in its own docker though depending on how much gear you got and have 2 instances talking to each other.

I’ll play about with docker a bit more when I have time, seemed slightly faster but seems like a pain in the backside atm.

If you got the knowledge then make a binding - I don’t so this was the best I could do :+1:
Oh and I did want to utilise execv2 but it wouldn’t accept the json - might want to have a play once you’ve got your head around how it works as it will free up the threads if you can get it in there

1 Like

@Fixer @anon99588902

Just to let you’s know, I’ve persisted and managed to get the execv2 binding working - god knows how :joy:

This will make it so much cleaner and will work so much better.
Give me a few days to implement and I’ll post it all up

1 Like

I’ve opened a ticket with lightwave btw as when doing a feature read I keep getting bad responses, openhab logs it as string null. Seems to be related to our problem before @Fixer.
May be that I’ve hit api request limits where I’ve been testing but I’ll wait and see what they say.
All other request are working though so seems to be an issue in the api