|
1 | 1 | # ArduinoFritzApi |
2 | 2 | An arduino Library for Automation of Fritz!Box, Fritz!DECT and FRITZ!Powerline devices |
| 3 | + |
| 4 | +# Implemented Functions |
| 5 | + |
| 6 | +Following functions have been implemented: |
| 7 | + |
| 8 | +<dl> |
| 9 | + <dt>setSwitchOn</dt> |
| 10 | + <dd>Switch actor on, return new switch state (true=on, false=off)</dd> |
| 11 | + <dt>setSwitchOff</dt> |
| 12 | + <dd>Switch actor off, return new switch state (true=on, false=off)</dd> |
| 13 | + <dt>setSwitchToggle</dt> |
| 14 | + <dd>Toggle switch state, return new switch state (true=on, false=off)</dd> |
| 15 | + <dt>getSwitchState</dt> |
| 16 | + <dd>Retrieve current switch state (true=on, false=off)</dd> |
| 17 | + <dt>getSwitchPresent</dt> |
| 18 | + <dd>Check for presence of a switch with the given ain (true=present, false=offline)</dd> |
| 19 | + <dt>getSwitchPower</dt> |
| 20 | + <dd>Get current power consumption in Watt</dd> |
| 21 | + <dt>getSwitchEnergy</dt> |
| 22 | + <dd>Get total energy since last reset in Wh</dd> |
| 23 | + <dt>getTemperature</dt> |
| 24 | + <dd>Get temperature in °C</dd> |
| 25 | + |
| 26 | +# Error handling |
| 27 | + |
| 28 | +In case something went wrong one of following error codes will be thrown: |
| 29 | + |
| 30 | +``` |
| 31 | + FRITZ_ERR_HTTP_COMMUNICATION -1001 |
| 32 | + FRITZ_ERR_NO_CHALLENGE -1002 |
| 33 | + FRITZ_ERR_NO_SID -1003 |
| 34 | + FRITZ_ERR_EMPTY_SID -1004 |
| 35 | + FRITZ_ERR_INVALID_SID -1005 |
| 36 | + FRITZ_ERR_VALUE_NOT_AVAILABLE -1006 |
| 37 | +``` |
| 38 | + |
| 39 | +In Addition one of the following HTTP STATUS Codes may be thrown: |
| 40 | + |
| 41 | +``` |
| 42 | + Bad Request 400 |
| 43 | + Forbidden 403 |
| 44 | + Internal Server Error 500 |
| 45 | +``` |
| 46 | + |
| 47 | + |
0 commit comments