|
1 | 1 |
|
2 | 2 | # SinricPro (ESP8266 / ESP32 SDK) |
| 3 | +## Installation |
| 4 | +This library is designed for use with [platform.io](https://platformio.org/platformio-ide). |
| 5 | +We recommend using [VS Code](https://code.visualstudio.com/) as code editor. |
3 | 6 |
|
4 | | -## usage |
5 | | -#### include SinricPro-Library (SinricPro.h) and SinricPro-Device-Libraries (eg. SinricProSwitch.h) |
| 7 | +1. Install [VS Code](https://code.visualstudio.com/) |
| 8 | +2. Install [platform.io](https://platformio.org/platformio-ide) |
| 9 | +3. Install library by using [Library Manager](https://docs.platformio.org/en/latest/librarymanager/) |
| 10 | +4. Follow Quickstart Instructions on [SinricPro](https://help.sinric.pro/pages/quickstart.html) |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## Dependencies |
| 15 | +[ArduinoJson](https://github.com/bblanchon/ArduinoJson)<br> |
| 16 | +[WebSocketsClient](https://github.com/Links2004/arduinoWebSockets)<br> |
| 17 | +[NTPClient](https://github.com/arduino-libraries/NTPClient) |
| 18 | + |
| 19 | +--- |
| 20 | +## Usage |
| 21 | +#### Include SinricPro-Library (SinricPro.h) and SinricPro-Device-Libraries (eg. SinricProSwitch.h) |
6 | 22 | ```C++ |
7 | 23 | #include <SinricPro.h> |
8 | 24 | #include <SinricProSwitch.h> |
|
13 | 29 | #define signingKey "your-signing-key" |
14 | 30 | #define myDeviceId "your-device-id" |
15 | 31 | ``` |
16 | | -#### define callback routine(s) |
| 32 | +#### Define callback routine(s) |
17 | 33 | ```C++ |
18 | 34 | bool onPowerState(const String deviceId, bool &state) { |
19 | 35 | Serial.printf("device %s turned %s\r\n, deviceId.c_str(), state?"on":"off"); |
@@ -863,8 +879,3 @@ bool sendVolumeEvent(int volume, String cause = "PHYSICAL_INTERACTION") |
863 | 879 | Devices: | [TV](#tv) | [Speaker](#speaker) | |
864 | 880 |
|
865 | 881 | --- |
866 | | -
|
867 | | -## Dependencies / Needed libraries |
868 | | -[ArduinoJson](https://github.com/bblanchon/ArduinoJson)<br> |
869 | | -[WebSocketsClient](https://github.com/Links2004/arduinoWebSockets)<br> |
870 | | -[NTPClient](https://github.com/arduino-libraries/NTPClient) |
|
0 commit comments