mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
# Command line test for the API
|
# Command line test for the API
|
||||||
#
|
#
|
||||||
|
|
||||||
emsesp_url="http://192.168.1.225"
|
emsesp_url="http://192.168.1.223"
|
||||||
|
|
||||||
# get the token from the Security page. This is the token for the admin user, unless changed it'll always be the same
|
# get the token from the Security page. This is the token for the admin user, unless changed it'll always be the same
|
||||||
emsesp_token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiYWRtaW4iOnRydWV9.2bHpWya2C7Q12WjNUBD6_7N3RCD7CMl-EGhyQVzFdDg"
|
emsesp_token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiYWRtaW4iOnRydWV9.2bHpWya2C7Q12WjNUBD6_7N3RCD7CMl-EGhyQVzFdDg"
|
||||||
@@ -22,6 +22,15 @@ curl -X POST \
|
|||||||
|
|
||||||
echo "\n"
|
echo "\n"
|
||||||
|
|
||||||
|
# This example will use the message command to get the locale (en)
|
||||||
|
curl -X POST \
|
||||||
|
-H "Authorization: Bearer ${emsesp_token}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"value":"system/settings/locale"}' \
|
||||||
|
${emsesp_url}/api/system/message
|
||||||
|
|
||||||
|
echo "\n"
|
||||||
|
|
||||||
# This example will export all values to a json file, including custom entities, sensors and schedules
|
# This example will export all values to a json file, including custom entities, sensors and schedules
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
-H "Authorization: Bearer ${emsesp_token}" \
|
-H "Authorization: Bearer ${emsesp_token}" \
|
||||||
@@ -34,7 +43,7 @@ echo "\n"
|
|||||||
# This example is how to call a service in Home Assistant via the API
|
# This example is how to call a service in Home Assistant via the API
|
||||||
# Which can be added to an EMS-EPS schedule
|
# Which can be added to an EMS-EPS schedule
|
||||||
|
|
||||||
ha_url="http://192.168.1.42:8123"
|
ha_url="http://192.168.1.86:8123"
|
||||||
ha_token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIwMzMyZjU1MjhlZmM0NGIyOTgyMjIxNThiODU1NDkyNSIsImlhdCI6MTcyMTMwNDg2NSwiZXhwIjoyMDM2NjY0ODY1fQ.Q-Y7E_i7clH3ff4Ma-OMmhZfbN7aMi_CahKwmoar"
|
ha_token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIwMzMyZjU1MjhlZmM0NGIyOTgyMjIxNThiODU1NDkyNSIsImlhdCI6MTcyMTMwNDg2NSwiZXhwIjoyMDM2NjY0ODY1fQ.Q-Y7E_i7clH3ff4Ma-OMmhZfbN7aMi_CahKwmoar"
|
||||||
|
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
|
|||||||
Reference in New Issue
Block a user