Hey, I have a question about the new telnet switch added in 0.54.0.
Basically, I want to know if it’s possible to send >1 command in the command_on and command_off sections. In order for my telnet to work properly, I need to first unlock everything (by sending unlock) then I can change the status and finally I should lock it back (using lock). So basically it looks like this:
unlock
setstatus:on
lock
Is this possible in it’s current state? Also just for full disclosure I’m running hass.io
I have question as well, without creating a new topic.
Main question how is the authentication handled as this is not documented.
And also how would I get the command/status of the following I step I need to perform on/off/status:
ambiOff.sh = { sleep 1; echo “lock”; echo “setstatus:off”; echo “unlock”; } | telnet 0,0,0,0 3636
Going to look in to using the state for the switch tomorrow.
Can you Telnet in to the device before trying to run the script?
Have you unticketed the local only box in experimental?
Do you have an api key set? as that would need to be added to the script if you do.
Also from running this for a bit it seems that if i reboot the “experimental feature” disables it self and renders the script useless.
Yup, I can telnet in just fine at all times using putty really. That doesn’t seem to be a problem.
No idea what the local only box is in experimental.
No api key, just been using telnet.
Thanks for the above suggestions, it allowed me to integrate my Lightpack (Prismatik) into my HASS.io instance.
However, I adjusted the commands to also exit gracefully otherwise the connection hangs for too long and further requests are not responded to until the first connection is dropped. I also added the command to get the current state of the lightpack.
Since these are simple lines of code, I prefer using command_line instead of shell scripts so that things like API keys can stay secrets while still be able to share the code.
That component almost works perfectly! I’m using Ambibox for its better performance. And the api is very similar other than not needing an api key (I just commented those lines out) but I seem to be having troubles with it recognizing when the status changes outside of HA. So if I manually turn it on/off it stays its state. Do you know how often it updates? Or if there is something I’m missing…
I’ve been trying to make it work with my nas to shut down.
The question is how you make sh file executable?
After adding busybox extras I can execute run sh file in terminal but I can’t make it work from command line switch.