SinricPro_Generic SDK to add support to nRF52, SAMD, Teensy, DUE, STM32, etc.

How To Install Using Arduino Library Manager

Current Release

Why do we need this library

Many of us are using SinricPro SDK, which is so far written only for ESP8266/ESP32 boards, to connect to Alexa via SinricPro skills.

This SinricPro_Generic SDK library is based on and modified from SinricPro SDK library to provide support to many boards such as Arduino SAMD21, Adafruit SAMD21/SAMD51, nRF52, Teensy, SAM DUE, STM32, etc. and enable those boards to use SinricPro services, including voice-control Alexa along with Blynk. The SinricPro_Generic SDK library can be used with ESP's WiFi, WiFiNINA, W5x00 and ENC28J60 Ethernet.

Releases v2.4.0

  1. Add support to :
  • Teensy 4.1, 4.0, 3.6, 3.5, 3.2/3.1, 3.0.
  • Arduino SAMD21 (ZERO, MKR, NANO_33_IOT, M0, M0 Pro, AdaFruit CIRCUITPLAYGROUND_EXPRESS, etc.).
  • Adafruit SAM21 (Itsy-Bitsy M0, Metro M0, Feather M0, Gemma M0, etc.).
  • Adafruit SAM51 (Itsy-Bitsy M4, Metro M4, Grand Central M4, Feather M4 Express, etc.).
  • AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B30_ublox, etc.
  • STM32F (Nucleo-144, Nucleo-64, Nucleo-32, Discovery, STM32F1, STM32F3, STM32F4, STM32H7, STM32L0, etc.).
  • SAM DUE

For more information, please have a look at

  1. SinricPro
  2. SinricPro Documentation
  3. SinricPro API Documentation
  4. How to use Alexa with SinricPro
  5. SinricPro Quick Start
  6. SinricPro Android APP
  7. SinricPro Apple APP

Example Generic_Ethernet_Light

Debug Terminal Output when running SAMD_Ethernet_TV

Starting SAMD_Ethernet_TV on ADAFRUIT_ITSYBITSY_M4_EXPRESS
12 channels configured
Index = 7
_pinCS = 0
W5100 init, using SS_PIN_DEFAULT = 10, new ss_pin = 10, W5100Class::ss_pin = 10
W5100::init: W5500, SSIZE =4096
Connected!
[Ethernet]: IP-Address is 192.168.2.79
Connected to SinricPro
TV turned on
TV turned off
TV turned on
TV turned off
TV turned on
Volume set to:  65
TV volume is muted
TV volume is unmuted
TV turned off
TV turned on
TV turned off
TV turned on
TV turned off
TV turned on
TV volume is muted
Skip channel: 1 (number: 1 / name: "CTV"
TV volume is unmuted
TV volume is muted
Volume set to:  36
Skip channel: -1 (number: 0 / name: "A/V"
Volume set to:  59

Releases v2.5.1

  1. Add support to :
  • STM32F/L/H/G/WB/MP1 (Nucleo-64 L053R8,Nucleo-144, Nucleo-64, Nucleo-32, Discovery, STM32Fx, STM32H7, STM32Lx, STM32Gx, STM32WB, STM32MP1, etc.) having 64K+ Flash program memory.
  • Seeeduino SAMD21/SAMD51 boards (SEEED_WIO_TERMINAL, SEEED_FEMTO_M0, SEEED_XIAO_M0, Wio_Lite_MG126, WIO_GPS_BOARD, SEEEDUINO_ZERO, SEEEDUINO_LORAWAN, SEEED_GROVE_UI_WIRELESS, etc.)
  1. Add support to :
  • W5x00's Ethernet2, Ethernet3, EthernetLarge Libraries.
  1. Add sample Packages_Patches for STM32 stm32 (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8)
  2. Add Ethernet Library Patches to support new WebSockets headers.
  3. Add more Packages' Patches.
  4. Bump up to sync with v2.5.1 of original SinricPro library to add Speaker SelectInput and ESP32 Camera.
  5. Restructure examples.
  6. Add Packages' Patches for Arduino SAMD21 to fix compiler error issue for Nano-33-IoT, ZERO, MKR, etc.
  7. Fix Teensy compiler issue for Teensy core 1.53+

Terminal Debug Output when running Generic_Ethernet_Blinds example on Seeeduino SEEED_XIAO_M0 with W5500 Ethernet using "fixed" Ethernet3 Library

Starting Generic_Ethernet_Blinds on SEEED_XIAO_M0
[SRP] =========== USE_ETHERNET3 ===========
[SRP] Default SPI pinout:
[SRP] MOSI: 10
[SRP] MISO: 9
[SRP] SCK: 8
[SRP] SS: 4
[SRP] =========================
[SRP] Use default CS/SS pin :  1
Index = 11

Ethernet3 W5500 init, using SPI_CS = 1, number of sockets = 4
Ethernet Connected!. IP-Address is: 192.168.2.164
[SRP] Creating new device. No Device=  _deviceID
[SRP] add(): Adding device with id=  _deviceID
[SRP] Websocket: Connecting to WebSocket Server:  ws.sinric.pro
[SRP] Websocket: headers:
 appkey:APP_KEY
deviceids:_deviceID
restoredevicestates:false
ip:192.168.2.164
mac:DE:AD:BE:EF:BE:0C
platform:SEEED_XIAO_M0
version:2.5.1
[SRP] Websocket: connected
Connected to SinricPro
[SRP] Websocket: receiving data
[SRP] handleReceiveQueue(): Message(s) in receiveQueue=  1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp=  1596499807
[SRP] Websocket: receiving data
[SRP] handleReceiveQueue(): Message(s) in receiveQueue=  1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp=  1596501026
[SRP] handleRequest(): handling request
{
  "header": {
    "payloadVersion": 2,
    "signatureVersion": 1
  },
  "payload": {
    "action": "setPowerState",
    "clientId": "sinricpro-web",
    "createdAt": 1596501026,
    "deviceAttributes": [],
    "deviceId": "_deviceID",
    "replyToken": "_replyToken",
    "type": "request",
    "value": {
      "state": "On"
    }
  },
  "signature": {
    "HMAC": ****"
  }
}[SRP] 
[SRP] SinricProDevice::handleRequest()
Device _deviceID power turned on
[SRP] handleSendQueue(): Sending Number of Message(s) in sendQueue=  1
{
  "header": {
    "payloadVersion": 2,
    "signatureVersion": 1
  },
  "payload": {
    "action": "setPowerState",
    "clientId": "sinricpro-web",
    "createdAt": 1596501026,
    "deviceId": "_deviceID",
    "message": "OK",
    "replyToken": "replyToken",
    "success": true,
    "type": "response",
    "value": {
      "state": "On"
    }
  },
  "signature": {
    "HMAC": "****"
  }
}
[SRP] handleSendQueue: Sending to websocket
[SRP] handleSendQueue(): Message sent.
[SRP] Websocket: receiving data
[SRP] handleReceiveQueue(): Message(s) in receiveQueue=  1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp=  1596501061
[SRP] handleRequest(): handling request
{
  "header": {
    "payloadVersion": 2,
    "signatureVersion": 1
  },
  "payload": {
    "action": "setPowerState",
    "clientId": "sinricpro-web",
    "createdAt": 1596501061,
    "deviceAttributes": [],
    "deviceId": "_deviceID",
    "replyToken": "replyToken",
    "type": "request",
    "value": {
      "state": "Off"
    }
  },
  "signature": {
    "HMAC": "****"
  }
}[SRP] 
[SRP] SinricProDevice::handleRequest()
Device _deviceID power turned off
[SRP] handleSendQueue(): Sending Number of Message(s) in sendQueue=  1
{
  "header": {
    "payloadVersion": 2,
    "signatureVersion": 1
  },
  "payload": {
    "action": "setPowerState",
    "clientId": "sinricpro-web",
    "createdAt": 1596501061,
    "deviceId": "_deviceID",
    "message": "OK",
    "replyToken": "replyToken",
    "success": true,
    "type": "response",
    "value": {
      "state": "Off"
    }
  },
  "signature": {
    "HMAC": "****"
  }
}
[SRP] handleSendQueue: Sending to websocket
[SRP] handleSendQueue(): Message sent.