Fixed GPIO assignation and curl command

This commit is contained in:
2022-10-22 20:57:07 -04:00
parent 718ed410f0
commit 88bfe9851d
2 changed files with 11 additions and 6 deletions

2
lightSwitch.sh Normal file → Executable file
View File

@@ -1,3 +1,3 @@
#!/bin/bash
curl -k -X POST - "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIwYWRkMGMxZmFlNWQ0YWNmYThjNTdmMDRhNWIwODBjNiIsImlhdCI6MTY2NjQ2NzMzMCwiZXhwIjoxOTgxODI3MzMwfQ.Egk1vDF0LC_WRlorhCHLPihkPICIEwz6nbfJR7Y1Prs" -H "Content-Type: application/json" -d '{"entity_id": "switch.lamp_plug"}' http://192.168.0.196:8123/api/services/switch/toggle
curl -k -X POST -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIwYWRkMGMxZmFlNWQ0YWNmYThjNTdmMDRhNWIwODBjNiIsImlhdCI6MTY2NjQ2NzMzMCwiZXhwIjoxOTgxODI3MzMwfQ.Egk1vDF0LC_WRlorhCHLPihkPICIEwz6nbfJR7Y1Prs" -H "Content-Type: application/json" -d '{"entity_id": "switch.lamp_plug"}' http://192.168.0.196:8123/api/services/switch/toggle