i try to follow the sample how-to-get-power-on-a-tv-connected-to-hdmi-with-exec-binding-and-update-the-status-automatically from the github website Samples Binding Config.
I created the shell-script script /usr/local/bin/samsungTvCheck.sh.
Now I have to change [OPENHAB_URL], [OPENHAB_USER], [OPENHAB_PASS], [OPENHAB_ITEM] according to myinstallation.
My problem is:
[OPENHAB_URL] = I don’t know what to write in here. I installed openhab with apt-get on a Raspberry Pi.
[OPENHAB_USER] = I think the user is openhab by default. (apt-get installation).
[OPENHAB_PASS] = I don’t know what to write in here.I didn’t give a password to the user openhab.
[OPENHAB_ITEM] = My item is wohnen_tvonoff
At the moment it looks like this:
Can anybody tell me the missing openhab_url and openhab_pass? Thanks!
That script is assuming OH 1 with security configured. It will not work as written of OH 2.
I think you can make it work pretty easily though.
OH_URL=http://<ip address of openhab>:8080
This is the same thing you would enter into your browser to bring up your launch page.
Remove USER and PASS as OH 2 does not yet support user authentication.
In the script, remove the
--user $OH_USER:$OH_PASS part of the curl commands.
Oh…, sorry. I didn’t write that I use oh 1.8.3. Do you know which password I should use with oh1?
By the way. I’m thinking about using oh2, because I can’t get razberry and oh1 running together. (see my other topic)
But that’s another story.
What ever you set up in your users.cfg file. If you are running with security=EXTERNAL or security=OFF then you don’t need a username or password and can remove them as described above.
Thank you, for taking me one step closer to my goal.
But, sorry, another (maybe) stupid question.
In the example, they say:
and you can add a line to your cron (in linux systems)
*/1 * * * * /usr/local/bin/samsungTvCheck.sh
Where do I find this cron?
Ok, shame on me.
It’s just a command that I have to type in the putty-console. (Like they say in the example.)
This link has been helpful to me: https://wiki.ubuntuusers.de/Cron/
@rlkoshak: Thank you, spending your time with newbies like me.