Skip to content

Instantly share code, notes, and snippets.

@kevin39
Forked from yoimbert/apilist.txt
Created April 17, 2018 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevin39/8383781b32d62c068dcb7a41aa29e026 to your computer and use it in GitHub Desktop.
Save kevin39/8383781b32d62c068dcb7a41aa29e026 to your computer and use it in GitHub Desktop.
list api Fibaro HC2
Signification des variables :
<LOGIN> = L'utilisateur autorisé à effectuer l'action (ex: admin)
<PASS> = Votre mot de passe
<IP> = L'adresse IP de votre Home Center, il est donc nécessaire de lui attribuer une IP fixe (via la rédervation de bail de votre box / routeur Internet)
<ID> = identifiant du module Z-Wave (comment trouver l'ID d'un module ?)
name = action (ex: turnOff, turnOn, setValue)
<Value> = valeur (ex: niveau de variation à 39 % --> arg1=39 )
Exemples :
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=setValue&arg1=<VALUE>
... devient :
http://admin:mot_de_passe@192.168.1.5/api/callAction?deviceID=4&name=turnOff
http://admin:mot_de_passe@192.168.1.5/api/callAction?deviceID=7&name=setValue&arg1=39
LISTE DES API
Variateurs
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=setValue&arg1=<VALUE>
ON/OFF (ex: Wall Plug, micro-modules FGS211, FGS221, etc.)
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=turnOn
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=turnOff
Volets roulants
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=setValue&arg1=<VALUE>
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=setAjar
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=stop
Module FG-RGBW
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=turnOff
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=turnOn
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=setColor&arg1=<VALUE>&arg2=<VALUE>&arg3=<VALUE>&arg4=<VALUE>
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=startProgram&arg1=<PROGRAM ID>
Modules virtuels
ID = device ID
arg1 = button ID
arg2 = slider value (only for slider)
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=pressButton&arg1=<BUTTON ID>
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=setSlider&arg1=<SLIDER ID>&arg2=<VALUE>
Scenes
ID = SceneID
http://<LOGIN>:<PASS>@<IP>/api/sceneControl?id=<SCENE ID>&action=start
http://<LOGIN>:<PASS>@<IP>/api/sceneControl?id=<SCENE ID>&action=stop
Têtes thermostatiques Danfoss Living Connect
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=setTargetLevel&arg1=<TEMP VALUE>
http://<LOGIN>:<PASS>@<IP>/api/callAction?deviceID=<ID>&name=setTime&arg1=<TIME VALUE>
Notifications
ID = Device (Iphone, e-mail et cetera)
arg1 = Notification template
http://<LOGIN>:<PASS>@<IP>/api/callActiondeviceID=9&name=sendDefinedPushNotification&arg1=1
Panneau "Energie"
http://<LOGIN>:<PASS>@<IP>/api/energy/now-3600/now/single/devices/power/58
Récupérations d'états et de valeurs par requettes JSON :
http://<LOGIN>:<PASS>@<IP>/api/rooms
http://<LOGIN>:<PASS>@<IP>/api/scenes
http://<LOGIN>:<PASS>@<IP>/api/devices
http://<LOGIN>:<PASS>@<IP>/api/devices?id=316 # Specific value of a device
http://<LOGIN>:<PASS>@<IP>/api/virtualDevices
http://<LOGIN>:<PASS>@<IP>/api/globalVariables
http://<LOGIN>:<PASS>@<IP>/api/weather
http://<LOGIN>:<PASS>@<IP>/api/sections
http://<LOGIN>:<PASS>@<IP>/api/users
http://<LOGIN>:<PASS>@<IP>/api/energy/now-3600/now/single/devices/power/58
etc.
Modification / création de variables
curl -X PUT -d '{"name": "Test", "value": "122"}' http://admin:admin@192.16...globalVariables
curl -X POST -d 'name=newvariable&value=0' .....
curl -X PUT -d '{"name":"newvariable", "value":"0", "isEnum":true, "enumValues":["0", "1"]}' .....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment