Hey folks,
i want to toggle a pimatic-button via shell script.
Any ideas how to do this?
Regards,
n3ro
toggle button from shell
Hey folks,
i want to toggle a pimatic-button via shell script.
Any ideas how to do this?
Regards,
n3ro
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro
@n3ro
Would suggest a curl command with an api call.
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebook
make it so !
create a sh with
sudo nano switch.sh
insert
#!/bin/sh
## swich on ##
curl http://<user>:<password>@<ip>/api/device/<buttonname>/turnOn >> /dev/null
…to turn the button on
or
#!/bin/sh
## swich off ##
curl http://<user>:<password>@<ip>/api/device/<buttonname>/turnOff >> /dev/null
…to turn the button off
or change the switch-state from 0 to 1 or 1 to 0 dependend on the currently state you are.
#!/bin/sh
## toggle ##
curl http://<user>:<password>@<ip>/api/device/<buttonname>/toggle >> /dev/null
pimatic + MySensors + Homeduino + z-way
https://github.com/n3roGit/MySensors_n3ro
The api supports also “toggle”
pimatic rocks!!!
Nice to know, but where can I find this in the docu?
nowhere only insiders know that… lol
you will found only a few http-api-things here: https://pimatic.org/guide/api/ and here: https://pimatic.org/api/actions/
perhaps it makes sense to add a curl-api-schema like the example above to the api guide
Or an nice API How-To.
Eventually some one with good API experience can write it. @leader21
pimatic rocks!!!
I think updating the doku under https://pimatic.org/guide/api/ would be best.
@Icesory said:
Or an nice API How-To.
Eventually some one with good API experience can write it. @leader21
would have don e it already if i had the neccesary knowledge sorry, api things are beyond me.
but @slix has very good knowledge and did a good job in api things with his pimatic-to-kodi addon. maybe he has some spare time for writing some basics about howto use the api?
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebook
make it so !
sure, I ccan do that
Had something similiar in mind, but did not know this was appreciated
Would start with some basics next week!