Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 2.01 KB

README.md

File metadata and controls

57 lines (47 loc) · 2.01 KB

ArduinoFritzApi

An arduino Library for Automation of Fritz!Box, Fritz!DECT and FRITZ!Powerline devices

Implemented Functions

Following functions have been implemented:

setSwitchOn
Switch actor on, return new switch state (true=on, false=off)
setSwitchOff
Switch actor off, return new switch state (true=on, false=off)
setSwitchToggle
Toggle switch state, return new switch state (true=on, false=off)
getSwitchState
Retrieve current switch state (true=on, false=off)
getSwitchPresent
Check for presence of a switch with the given ain (true=present, false=offline)
getSwitchPower
Get current power consumption in Watt
getSwitchEnergy
Get total energy since last reset in Wh
getTemperature
Get temperature in °C
getSwitchName
Get name of an actor
getThermostatNominalTemperature
Get nominal temperature of thermostat (8: <= 8°C, 28: >= 28°C, 100: max, 0: off)
getThermostatComfortTemperature
Get comfort temperature of thermostat (8: <= 8°C, 28: >= 28°C, 100: max, 0: off)
getThermostatReducedTemperature
Get reduced temperature of thermostat (8: <= 8°C, 28: >= 28°C, 100: max, 0: off)
setThermostatNominalTemperature
Set nominal temperature of thermostat (8: <= 8°C, 28: >= 28°C, 100: max, 0: off)

Error handling

In case something went wrong one of following error codes will be thrown:

   FRITZ_ERR_HTTP_COMMUNICATION  -1001
   FRITZ_ERR_NO_CHALLENGE        -1002
   FRITZ_ERR_NO_SID              -1003
   FRITZ_ERR_EMPTY_SID           -1004
   FRITZ_ERR_INVALID_SID         -1005
   FRITZ_ERR_VALUE_NOT_AVAILABLE -1006

In Addition one of the following HTTP STATUS Codes may be thrown:

   Bad Request                    400 
   Forbidden                      403
   Internal Server Error          500