Just stuck At starting openhab runtime now
Thought you said docker was easy
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 useropenhab' ... Adding new user
openhabâ (9001) with groupopenhab' ... 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 useropenhab' to group
dialoutâ âŠ
Adding user openhab to group dialout
Done. - adduser openhab uucp
Adding useropenhab' to group
uucpâ âŠ
Adding user openhab to group uucp
Done. - adduser openhab uucp2
Adding useropenhab' to group
uucp2â âŠ
Adding user openhab to group uucp2
Done. - adduser openhab dialout2
Adding useropenhab' to group
dialout2â âŠ
Adding user openhab to group dialout2
Done. - adduser openhab dialout3
Adding useropenhab' to group
dialout3â âŠ
Adding user openhab to group dialout3
Done. - adduser openhab uucp3
Adding useropenhab' to group
uucp3â âŠ
Adding user openhab to group uucp3
Done. - adduser openhab gpio
Adding useropenhab' to group
gpioâ âŠ
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
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 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
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
Just to let youâs know, Iâve persisted and managed to get the execv2 binding working - god knows how
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
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
I added some extra logic to check for several bad responses including null. I also saw âunauthorisedâ every so often for example so when it catches that it runs the rule to refresh the tokens. Not much can be done about null but at least if you catch it you can log it, not run the rest of the rule and throw all the errors and then try again after a pause.
Iâve done some testing, seems the api can only handle every 6 seconds or more.