- Full user documentation
- Changelog
- Prerequisites
- Installation
- Packages' Patches
- 1. For Adafruit nRF52840 and nRF52832 boards
- 2. For Teensy boards
- 3. For Arduino SAM DUE boards
- 4. For Arduino SAMD boards
- 5. For Adafruit SAMD boards
- 6. For Seeeduino SAMD boards
- 7. For STM32 boards
- 8. For RP2040-based boards using Earle Philhower arduino-pico core
- 9. For Portenta_H7 boards using Arduino IDE in Linux
- 10. For RTL8720DN boards using AmebaD core
- 11. For SAMD21 and SAMD51 boards using ArduinoCore-fab-sam core
- 12. For Seeeduino RP2040 boards
- 13. For Seeeduino nRF52840 boards
- Libraries' Patches
- HOWTO Use analogRead() with ESP32 running WiFi and/or BlueTooth (BT/BLE)
- Important Notes
- Configuration Notes
- 1. How to select which built-in Ethernet or shield to use
- Important
- 2. How to select another CS/SS pin to use
- 3. How to use W5x00 with ESP8266
- 4. How to increase W5x00 TX/RX buffer
- 5. How to adjust sendContent_P() and send_P() buffer size
- 6. How to use SPI2 for ESP32 using W5x00 and Ethernet_Generic Library
- 7. How to use SPI1 for RP2040 using W5x00 and Ethernet_Generic Library
- Important Notes
- Examples
- HOWTO Usage
- HOWTO Add a device
- How to retrieve a device for sending an event?
- Example SAMD_WiFiNINA_Switch
- Debug Terminal Output Samples
- 1. SAMD_WiFiNINA_TV on NANO_33_IOT
- 2. SAMD_WiFiNINA_Light on NANO_33_IOT
- 3. Generic_Ethernet_Blinds on nRF52 NRF52840_ITSYBITSY with W5500 Ethernet
- 4. Generic_Ethernet_Blinds on Seeeduino SEEED_XIAO_M0 with W5500 Ethernet
- 5. Generic_Ethernet_Blinds on Arduino SAMD_NANO_33_IOT with WiFiNINA
- 6. Generic_Ethernet_Blinds on Adafruit nRF52 NRF52840_FEATHER with W5500 Ethernet
- 7. Generic_Ethernet_Blinds on STM32F7 Nucleo-144 NUCLEO_F767ZI with W5500 Ethernet
- 8. WIOT_MultiSwitch_LCD on SeeedStudio SAMD51 WIO Terminal
- 9. Generic_WiFiNINA_Blinds on MBED NANO_RP2040_CONNECT
- 10. RP2040_WiFiNINA_Blinds on MBED NANO_RP2040_CONNECT
- 11. Blinds on WT32-ETH01 with ETH_PHY_LAN8720
- 12. Generic_Ethernet_Light on RASPBERRY_PI_PICO
- 13. Generic_Ethernet_Light on PORTENTA_H7_M7
- Devices
- Debug
- Troubleshooting
- Releases
- Issues
- TO DO
- DONE
- Contributions and Thanks
- Contributing
- License
- Copyright
Please check Full User Documentation
-
ESP32 Core 2.0.5+
for ESP32-based boards. -
ESP8266 Core 3.0.2+
for ESP8266-based boards. . To use ESP8266 core 2.7.1+ for LittleFS. -
Arduino AVR core 1.8.6+
for Arduino (Use Arduino Board Manager) for AVR boards. -
Teensy core v1.57+
for Teensy (4.1, 4.0, 3.6, 3.5, 3,2, 3.1, 3.0) boards.. -
Arduino SAM DUE core v1.6.12+
for SAM DUE ARM Cortex-M3 boards. -
Arduino SAMD core 1.8.13+
for SAMD ARM Cortex-M0+ boards. -
Adafruit SAMD core 1.7.11+
for SAMD ARM Cortex-M0+ and M4 boards (Nano 33 IoT, etc.). -
Seeeduino SAMD core 1.8.3+
for SAMD21/SAMD51 boards (XIAO M0, Wio Terminal, etc.). -
Adafruit nRF52 v1.3.0+
for nRF52 boards such as Adafruit NRF52840_FEATHER, NRF52832_FEATHER, NRF52840_FEATHER_SENSE, NRF52840_ITSYBITSY, NRF52840_CIRCUITPLAY, NRF52840_CLUE, NRF52840_METRO, NRF52840_PCA10056, PARTICLE_XENON, NINA_B302_ublox, etc. -
Arduino Core for STM32 v2.3.0+
for STM32F/L/H/G/WB/MP1 boards. -
ArduinoCore-mbed mbed_rp2040, mbed_nano, mbed_portenta core 3.4.1+
for Arduino (Use Arduino Board Manager) Portenta_H7, RP2040-based boards, such as Nano_RP2040_Connect, RASPBERRY_PI_PICO. -
Earle Philhower's arduino-pico core v2.6.3+
for RP2040-based boards such as RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040, etc. -
WebSockets_Generic v2.16.1+
. To install. check -
For built-in LAN8742A Ethernet:
STM32Ethernet library v1.3.0+
for built-in LAN8742A Ethernet on (Nucleo-144, Discovery).LwIP library v2.1.2+
for built-in LAN8742A Ethernet on (Nucleo-144, Discovery).
- For W5x00 Ethernet:
Ethernet_Generic library v2.7.1+
for W5100, W5100S, W5200 and W5500/WIZ550io/WIZ850io/USR-ES1 with Wiznet W5500 chip.
- For ENC28J60 Ethernet:
EthernetENC library v2.0.3+
for ENC28J60. . New and BetterUIPEthernet library v2.0.12+
for ENC28J60.
-
WiFiNINA_Generic library v1.8.15-1+
. To install. check if using WiFiNINA for boards such as Nano 33 IoT, nRF52, Teensy, etc. -
Seeed_Arduino_rpcWiFi library v1.0.6+
for WIO-Terminal or boards using Realtek RTL8720DN WiFi. . To be used withSeeed_Arduino_rpcUnified library v2.1.4+
. . -
WebServer_WT32_ETH01 library v1.5.1+
to use WT32_ETH01 (ESP32 + LAN8720). To install, check .
The best and easiest way is to use Arduino Library Manager
. Search for SinricPro_Generic, then select / install the latest version.
You can also use this link for more detailed instructions.
Another way to install is to:
- Navigate to SinricPro_Generic page.
- Download the latest release
SinricPro_Generic-master.zip
. - Extract the zip file to
SinricPro_Generic-master
directory - Copy whole
SinricPro_Generic-master
folder to Arduino libraries' directory such as~/Arduino/libraries/
.
- Install VS Code
- Install PlatformIO
- Install SinricPro_Generic library by using Library Manager. Search for SinricPro_Generic in Platform.io Author's Libraries
- Use included platformio.ini file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples at Project Configuration File
To be able to compile, run and automatically detect and display BOARD_NAME on nRF52840/nRF52832 boards, you have to copy the whole nRF52 Packages_Patches directory into Adafruit nRF52 directory (~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0).
Supposing the Adafruit nRF52 version is 1.3.0. These files must be copied into the directory:
~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/platform.txt
~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/boards.txt
~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Udp.h
~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.h
~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Print.cpp
~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.h
~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/variants/NINA_B302_ublox/variant.cpp
~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.h
~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/variants/NINA_B112_ublox/variant.cpp
~/.arduino15/packages/adafruit/hardware/nrf52/1.3.0/cores/nRF5/Udp.h
Whenever a new version is installed, remember to copy these files into the new version directory. For example, new version is x.yy.z These files must be copied into the directory:
~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/platform.txt
~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/boards.txt
~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/cores/nRF5/Udp.h
~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/cores/nRF5/Print.h
~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/cores/nRF5/Print.cpp
~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B302_ublox/variant.h
~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B302_ublox/variant.cpp
~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B112_ublox/variant.h
~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/variants/NINA_B112_ublox/variant.cpp
~/.arduino15/packages/adafruit/hardware/nrf52/x.yy.z/cores/nRF5/Udp.h
To be able to compile and run on Teensy boards, you have to copy the files in Packages_Patches for Teensy directory into Teensy hardware directory (./arduino-1.8.19/hardware/teensy/avr/boards.txt).
Supposing the Arduino version is 1.8.19. These files must be copied into the directory:
./arduino-1.8.19/hardware/teensy/avr/boards.txt
./arduino-1.8.19/hardware/teensy/avr/cores/teensy/Stream.h
./arduino-1.8.19/hardware/teensy/avr/cores/teensy3/Stream.h
./arduino-1.8.19/hardware/teensy/avr/cores/teensy4/Stream.h
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz These files must be copied into the directory:
./arduino-x.yy.zz/hardware/teensy/avr/boards.txt
./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy/Stream.h
./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy3/Stream.h
./arduino-x.yy.zz/hardware/teensy/avr/cores/teensy4/Stream.h
To be able to compile and run on SAM DUE boards, you have to copy the whole SAM DUE directory into Arduino sam directory (~/.arduino15/packages/arduino/hardware/sam/1.6.12).
Supposing the Arduino SAM core version is 1.6.12. This file must be copied into the directory:
~/.arduino15/packages/arduino/hardware/sam/1.6.12/platform.txt
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz This file must be copied into the directory:
~/.arduino15/packages/arduino/hardware/sam/x.yy.zz/platform.txt
To be able to compile, run and automatically detect and display BOARD_NAME on Arduino SAMD (Nano-33-IoT, etc) boards, you have to copy the whole Arduino SAMD Packages_Patches directory into Arduino SAMD directory (~/.arduino15/packages/arduino/hardware/samd/1.8.13).
Supposing the Arduino SAMD version is 1.8.13. Now only one file must be copied into the directory:
~/.arduino15/packages/arduino/hardware/samd/1.8.13/platform.txt
Whenever a new version is installed, remember to copy this files into the new version directory. For example, new version is x.yy.zz
This file must be copied into the directory:
~/.arduino15/packages/arduino/hardware/samd/x.yy.zz/platform.txt
Supposing the Arduino SAMD version is 1.8.9. These files must be copied into the directory:
~/.arduino15/packages/arduino/hardware/samd/1.8.9/platform.txt
~/.arduino15/packages/arduino/hardware/samd/1.8.9/cores/arduino/Arduino.h
Whenever a new version is installed, remember to copy these files into the new version directory. For example, new version is x.yy.z
These files must be copied into the directory:
~/.arduino15/packages/arduino/hardware/samd/x.yy.z/platform.txt
~/.arduino15/packages/arduino/hardware/samd/x.yy.z/cores/arduino/Arduino.h
This is mandatory to fix the notorious Arduino SAMD compiler error. See Improve Arduino compatibility with the STL (min and max macro)
...\arm-none-eabi\include\c++\7.2.1\bits\stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
Whenever the above-mentioned compiler error issue is fixed with the new Arduino SAMD release, you don't need to copy the Arduino.h
file anymore.
To be able to compile, run and automatically detect and display BOARD_NAME on Adafruit SAMD (Itsy-Bitsy M4, etc) boards, you have to copy the whole Adafruit SAMD Packages_Patches directory into Adafruit samd directory (~/.arduino15/packages/adafruit/hardware/samd/1.7.11).
Supposing the Adafruit SAMD core version is 1.7.11. These files must be copied into the directory:
~/.arduino15/packages/adafruit/hardware/samd/1.7.11/platform.txt
~/.arduino15/packages/adafruit/hardware/samd/1.7.11/cores/arduino/Print.h
~/.arduino15/packages/adafruit/hardware/samd/1.7.11/cores/arduino/Print.cpp
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz These files must be copied into the directory:
~/.arduino15/packages/adafruit/hardware/samd/x.yy.zz/platform.txt
~/.arduino15/packages/adafruit/hardware/samd/x.yy.zz/cores/arduino/Print.h
~/.arduino15/packages/adafruit/hardware/samd/x.yy.zz/cores/arduino/Print.cpp
To be able to compile, run and automatically detect and display BOARD_NAME on Seeeduino SAMD (XIAO M0, Wio Terminal, etc) boards, you have to copy the whole Seeeduino SAMD Packages_Patches directory into Seeeduino samd directory (~/.arduino15/packages/Seeeduino/hardware/samd/1.8.3).
Supposing the Seeeduino SAMD core version is 1.8.3. These files must be copied into the directory:
~/.arduino15/packages/Seeeduino/hardware/samd/1.8.3/platform.txt
~/.arduino15/packages/Seeeduino/hardware/samd/1.8.3/cores/arduino/Arduino.h
~/.arduino15/packages/Seeeduino/hardware/samd/1.8.3/cores/arduino/Print.h
~/.arduino15/packages/Seeeduino/hardware/samd/1.8.3/cores/arduino/Print.cpp
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz These files must be copied into the directory:
~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/platform.txt
~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/cores/arduino/Arduino.h
~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/cores/arduino/Print.h
~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/cores/arduino/Print.cpp
For Generic STM32F4 series
boards, such as STM32F407VE
, using LAN8720
, please use STM32 core v2.2.0
as breaking core v2.3.0
creates the compile error.
To use LAN8720 on some STM32 boards
- Nucleo-144 (F429ZI, NUCLEO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG)
- Discovery (DISCO_F746NG)
- STM32F4 boards (BLACK_F407VE, BLACK_F407VG, BLACK_F407ZE, BLACK_F407ZG, BLACK_F407VE_Mini, DIYMORE_F407VGT, FK407M1)
you have to copy the files stm32f4xx_hal_conf_default.h and stm32f7xx_hal_conf_default.h into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/2.3.0/system) to overwrite the old files.
Supposing the STM32 stm32 core version is 2.3.0. These files must be copied into the directory:
~/.arduino15/packages/STM32/hardware/stm32/2.3.0/system/STM32F4xx/stm32f4xx_hal_conf_default.h
for STM32F4.~/.arduino15/packages/STM32/hardware/stm32/2.3.0/system/STM32F7xx/stm32f7xx_hal_conf_default.h
for Nucleo-144 STM32F7.
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz, these files must be copied into the corresponding directory:
~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/system/STM32F4xx/stm32f4xx_hal_conf_default.h
- `~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/system/STM32F7xx/stm32f7xx_hal_conf_default.h
To use Serial1 on some STM32 boards without Serial1 definition (Nucleo-144 NUCLEO_F767ZI, Nucleo-64 NUCLEO_L053R8, etc.) boards, you have to copy the files STM32 variant.h into STM32 stm32 directory (~/.arduino15/packages/STM32/hardware/stm32/2.3.0). You have to modify the files corresponding to your boards, this is just an illustration how to do.
Supposing the STM32 stm32 core version is 2.3.0. These files must be copied into the directory:
~/.arduino15/packages/STM32/hardware/stm32/2.3.0/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/NUCLEO_F767ZI/variant.h
for Nucleo-144 NUCLEO_F767ZI.~/.arduino15/packages/STM32/hardware/stm32/2.3.0/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/NUCLEO_L053R8/variant.h
for Nucleo-64 NUCLEO_L053R8.
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz, these files must be copied into the corresponding directory:
~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/NUCLEO_F767ZI/variant.h
~/.arduino15/packages/STM32/hardware/stm32/x.yy.zz/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/NUCLEO_L053R8/variant.h
8. For RP2040-based boards using Earle Philhower arduino-pico core
To be able to automatically detect and display BOARD_NAME on RP2040-based boards (RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040, GENERIC_RP2040, etc) boards, you have to copy the file RP2040 platform.txt into rp2040 directory (~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0).
Supposing the rp2040 core version is 1.4.0. This file must be copied into the directory:
~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0/platform.txt
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz This file must be copied into the directory:
~/.arduino15/packages/rp2040/hardware/rp2040/x.yy.zz/platform.txt
With core after v1.5.0, this step is not necessary anymore thanks to the PR Add -DBOARD_NAME="{build.board}" #136.
Some libraries, such as Adafruit DHT-sensor-library, require the definition of microsecondsToClockCycles(). To be able to compile and run on RP2040-based boards, you have to copy the files in RP2040 Arduino.h into rp2040 directory (~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0).
Supposing the rp2040 core version is 1.4.0. This file must be copied to replace:
~/.arduino15/packages/rp2040/hardware/rp2040/1.4.0/cores/rp2040/Arduino.h
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz This file must be copied to replace:
~/.arduino15/packages/rp2040/hardware/rp2040/x.yy.zz/cores/rp2040/Arduino.h
With core after v1.5.0, this step is not necessary anymore thanks to the PR Add defs for compatibility #142.
To be able to upload firmware to Portenta_H7 using Arduino IDE in Linux (Ubuntu, etc.), you have to copy the file portenta_post_install.sh into mbed_portenta directory (~/.arduino15/packages/arduino/hardware/mbed_portenta/3.4.1/portenta_post_install.sh).
Then run the following command using sudo
$ cd ~/.arduino15/packages/arduino/hardware/mbed_portenta/3.4.1
$ chmod 755 portenta_post_install.sh
$ sudo ./portenta_post_install.sh
This will create the file /etc/udev/rules.d/49-portenta_h7.rules
as follows:
# Portenta H7 bootloader mode UDEV rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="035b", GROUP="plugdev", MODE="0666"
Supposing the ArduinoCore-mbed core version is 3.4.1. Now only one file must be copied into the directory:
~/.arduino15/packages/arduino/hardware/mbed_portenta/3.4.1/portenta_post_install.sh
Whenever a new version is installed, remember to copy this files into the new version directory. For example, new version is x.yy.zz
This file must be copied into the directory:
~/.arduino15/packages/arduino/hardware/mbed_portenta/x.yy.zz/portenta_post_install.sh
To avoid compile error relating to PROGMEM, you have to copy the file Realtek AmebaD core pgmspace.h into Realtek AmebaD directory (~/.arduino15/packages/realtek/hardware/AmebaD/3.1.4/cores/ambd/avr/pgmspace.h).
Supposing the Realtek AmebaD core version is 3.1.4. This file must be copied into the directory:
~/.arduino15/packages/realtek/hardware/AmebaD/3.1.4/cores/ambd/avr/pgmspace.h
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz This file must be copied into the directory:
~/.arduino15/packages/realtek/hardware/AmebaD/x.yy.zz/cores/ambd/avr/pgmspace.h
To avoid compile error relating to SAMD21/SAMD51, you have to copy the file ArduinoCore-fab-sam core pgmspace.h into ArduinoCore-fab-sam
samd directory (~/.arduino15/packages/Fab_SAM_Arduino/hardware/samd/1.9.0/boards.txt).
Supposing the ArduinoCore-fab-sam
samd core version is 1.9.0. This file must be copied into the directory:
~/.arduino15/packages/Fab_SAM_Arduino/hardware/samd/1.9.0/boards.txt
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz This file must be copied into the directory:
~/.arduino15/packages/Fab_SAM_Arduino/hardware/samd/x.yy.zz/boards.txt
To be able to compile, run and automatically detect and display BOARD_NAME on Seeeduino RP2040 (XIAO RP2040, Wio RP2040 Mini) boards, you have to copy the whole Seeeduino RP2040 Packages_Patches directory into Seeeduino samd directory (~/.arduino15/packages/Seeeduino/hardware/rp2040/2.7.2).
Supposing the Seeeduino RP2040 core version is 2.7.2. These files must be copied into the directory:
~/.arduino15/packages/Seeeduino/hardware/rp2040/2.7.2/boards.txt
~/.arduino15/packages/Seeeduino/hardware/rp2040/2.7.2/variants/Seeed_XIAO_RP2040/pins_arduino.h
Whenever a new version is installed, remember to copy this file into the new version directory. For example, new version is x.yy.zz These files must be copied into the directory:
~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/boards.txt
~/.arduino15/packages/Seeeduino/hardware/samd/x.yy.zz/variants/Seeed_XIAO_RP2040/pins_arduino.h
To be able to compile and run on Xiao nRF52840 boards, you have to copy the whole nRF52 1.0.0 directory into Seeeduino nRF52 directory (~/.arduino15/packages/Seeeduino/hardware/nrf52/1.0.0).
Supposing the Seeeduino nRF52 version is 1.0.0. These files must be copied into the directory:
~/.arduino15/packages/Seeeduino/hardware/nrf52/1.0.0/platform.txt
~/.arduino15/packages/Seeeduino/hardware/nrf52/1.0.0/cores/nRF5/Print.h
~/.arduino15/packages/Seeeduino/hardware/nrf52/1.0.0/cores/nRF5/Print.cpp
~/.arduino15/packages/Seeeduino/hardware/nrf52/1.0.0/cores/nRF5/Udp.h
Whenever a new version is installed, remember to copy these files into the new version directory. For example, new version is x.yy.z These files must be copied into the directory:
~/.arduino15/packages/Seeeduino/hardware/nrf52/x.yy.z/platform.txt
~/.arduino15/packages/Seeeduino/hardware/nrf52/x.yy.z/cores/nRF5/Print.h
~/.arduino15/packages/Seeeduino/hardware/nrf52/x.yy.z/cores/nRF5/Print.cpp
~/.arduino15/packages/Seeeduino/hardware/nrf52/x.yy.z/cores/nRF5/Udp.h
If your application requires 2K+ HTML page, the current Ethernet library
must be modified if you are using W5200/W5500 Ethernet shields. W5100 is not supported for 2K+ buffer. If you use boards requiring different CS/SS pin for W5x00 Ethernet shield, for example ESP32, ESP8266, nRF52, etc., you also have to modify the following libraries to be able to specify the CS/SS pin correctly.
To fix Ethernet library
, just copy these following files into the Ethernet library
directory to overwrite the old files:
To fix EthernetLarge library
, just copy these following files into the EthernetLarge library
directory to overwrite the old files:
To fix Ethernet2 library
, just copy these following files into the Ethernet2 library
directory to overwrite the old files:
To add UDP Multicast support, necessary for the UPnP_Generic library:
- To fix
Ethernet3 library
, just copy these following files into theEthernet3 library
directory to overwrite the old files:
To be able to compile and run on nRF52 boards with ENC28J60 using UIPEthernet library, you have to copy these following files into the UIPEthernet utility
directory to overwrite the old files:
To fix ESP32 compile error
, just copy the following file into the ESP32
cores/esp32 directory (e.g. ./arduino-1.8.13/hardware/espressif/cores/esp32) to overwrite the old file:
To fix ESP8266 compile error
such as
error: 'class EthernetClass' has no member named 'init'
Ethernet.init (USE_THIS_SS_PIN);
just rename the following file in ./arduino-1.8.13/hardware/esp8266com/esp8266/libraries/Ethernet directory
- From
Ethernet.h
toEthernet_ESP8266.h
Please have a look at ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example to have more detailed description and solution of the issue.
- ADC1 controls ADC function for pins GPIO32-GPIO39
- ADC2 controls ADC function for pins GPIO0, 2, 4, 12-15, 25-27
Look in file adc_common.c
In ADC2, there're two locks used for different cases:
lock shared with app and Wi-Fi: ESP32: When Wi-Fi using the ADC2, we assume it will never stop, so app checks the lock and returns immediately if failed. ESP32S2: The controller's control over the ADC is determined by the arbiter. There is no need to control by lock.
lock shared between tasks: when several tasks sharing the ADC2, we want to guarantee all the requests will be handled. Since conversions are short (about 31us), app returns the lock very soon, we use a spinlock to stand there waiting to do conversions one by one.
adc2_spinlock should be acquired first, then adc2_wifi_lock or rtc_spinlock.
- In order to use ADC2 for other functions, we have to acquire complicated firmware locks and very difficult to do
- So, it's not advisable to use ADC2 with WiFi/BlueTooth (BT/BLE).
- Use ADC1, and pins GPIO32-GPIO39
- If somehow it's a must to use those pins serviced by ADC2 (GPIO0, 2, 4, 12, 13, 14, 15, 25, 26 and 27), use the fix mentioned at the end of ESP_WiFiManager Issue 39: Not able to read analog port when using the autoconnect example to work with ESP32 WiFi/BlueTooth (BT/BLE).
-
Code is restructured to provide flexibility to make it easy to support many more WiFi/Ethernet modules/shields in the future. Please delete the *.cpp files, replaced by *.hpp files, in the src directory, if *.cpp files still exist after installing new version.
-
For Adafruit nRF52, use the SPI's pin as follows:
- SS/CS = 10
- SPI_MOSI = MO(SI)
- SPI_MISO = MI(SO)
- SPI_SCK = SCK
- For Adafruit SAMD21/SAMD51, use the SPI's CS/SS pin as follows:
- Itsy-Bitsy M0/M4, Feather M0 (Express), Hallowing M0 Express, Zero, Metro M0 => use CS = 16 = pin A2
- Feather M4 (SAMD51) => use SS/CS = 9
- Grand Central M4 => use SS/CS = 53
- Hallowing M4 => use SS/CS = 10
- Metro M4 AirLift => use SS/CS = 36
To know the default CS/SS pins of not listed boards, check the related variant.h
files in
~/.arduino15/packages/adafruit/hardware/samd/x.y.zz/variants/board_name/variant.h
- For Arduino SAM DUE, use the SPI's pin as follows:
- SS/CS = 10
- SPI_MOSI = 75 ( pin 4 @
ICSP connector
) - SPI_MISO = 74 ( pin 1 @
ICSP connector
) - SPI_SCK = 76 ( pin 3 @
ICSP connector
)
The easiest way is to use
#define USE_ETHERNET_WRAPPER true
then select one and only one Ethernet library to use as follows:
- Standard W5x00 Ethernet_Generic library is used by default, in the sketch, just be sure to comment out or leave these #defines to be false :
// Only one if the following to be true
#define USE_UIP_ETHERNET false
#define USE_ETHERNET_PORTENTA_H7 false
#define USE_NATIVE_ETHERNET false
#define USE_QN_ETHERNET false
#define USE_ETHERNET_GENERIC false
#define USE_ETHERNET_ESP8266 false
#define USE_ETHERNET_ENC false
#define USE_CUSTOM_ETHERNET false
To use W5x00 Ethernet, for example using Ethernet_Generic library
// Only one if the following to be true
#define USE_UIP_ETHERNET false
#define USE_ETHERNET_PORTENTA_H7 false
#define USE_NATIVE_ETHERNET false
#define USE_QN_ETHERNET false
#define USE_ETHERNET_GENERIC true
#define USE_ETHERNET_ESP8266 false
#define USE_ETHERNET_ENC false
#define USE_CUSTOM_ETHERNET false
- To use ENC28J60 Ethernet, using EthernetENC library (NEW and Better)
// Only one if the following to be true
#define USE_UIP_ETHERNET false
#define USE_ETHERNET_PORTENTA_H7 false
#define USE_NATIVE_ETHERNET false
#define USE_QN_ETHERNET false
#define USE_ETHERNET_GENERIC false
#define USE_ETHERNET_ESP8266 false
#define USE_ETHERNET_ENC true
#define USE_CUSTOM_ETHERNET false
- To use ENC28J60 Ethernet, using UIPEthernet library:
// Only one if the following to be true
#define USE_UIP_ETHERNET true
#define USE_ETHERNET_PORTENTA_H7 false
#define USE_NATIVE_ETHERNET false
#define USE_QN_ETHERNET false
#define USE_ETHERNET_GENERIC false
#define USE_ETHERNET_ESP8266 false
#define USE_ETHERNET_ENC false
#define USE_CUSTOM_ETHERNET false
- To use another Ethernet library For example, EthernetLarge library
// Only one if the following to be true
#define USE_UIP_ETHERNET false
#define USE_ETHERNET_PORTENTA_H7 false
#define USE_NATIVE_ETHERNET false
#define USE_QN_ETHERNET false
#define USE_ETHERNET_GENERIC false
#define USE_ETHERNET_ESP8266 false
#define USE_ETHERNET_ENC false
#define USE_CUSTOM_ETHERNET true
//Must be placed before #include <EthernetWebServer.h>
#include <EthernetLarge.h>
...
#include <EthernetWebServer.h>
- Only for Teensy 4.1, to use NativeEthernet library
#if defined(__IMXRT1062__)
// For Teensy 4.1/4.0
#if defined(ARDUINO_TEENSY41)
#define BOARD_TYPE "TEENSY 4.1"
// Use true for NativeEthernet Library, false if using other Ethernet libraries
#define USE_NATIVE_ETHERNET true
#define USE_QN_ETHERNET false
#elif defined(ARDUINO_TEENSY40)
#define BOARD_TYPE "TEENSY 4.0"
#else
#define BOARD_TYPE "TEENSY 4.x"
#endif
#elif defined(__MK66FX1M0__)
....
- Only for Teensy 4.1, to use another Ethernet library, for example Ethernet_Generic library
#if defined(__IMXRT1062__)
// For Teensy 4.1/4.0
#if defined(ARDUINO_TEENSY41)
#define BOARD_TYPE "TEENSY 4.1"
// Use true for NativeEthernet Library, false if using other Ethernet libraries
#define USE_NATIVE_ETHERNET false
#define USE_QN_ETHERNET false
#elif defined(ARDUINO_TEENSY40)
#define BOARD_TYPE "TEENSY 4.0"
#else
#define BOARD_TYPE "TEENSY 4.x"
#endif
#elif defined(__MK66FX1M0__)
....
#define USE_UIP_ETHERNET false
// Only one if the following to be true
#define USE_ETHERNET_GENERIC true
#define USE_ETHERNET_ESP8266 false
#define USE_ETHERNET_ENC false
#define USE_CUSTOM_ETHERNET false
- Only for Teensy 4.1, to use QNEthernet library
#if ( defined(CORE_TEENSY) && defined(__IMXRT1062__) && defined(ARDUINO_TEENSY41) )
// For Teensy 4.1
#define BOARD_TYPE "TEENSY 4.1"
// Use true for NativeEthernet Library, false if using other Ethernet libraries
#define USE_NATIVE_ETHERNET false
#define USE_QN_ETHERNET true
#else
#error Only Teensy 4.1 supported
#endif
#define USE_ETHERNET_WRAPPER false
// Use true for ENC28J60 and UIPEthernet library (https://github.com/UIPEthernet/UIPEthernet)
// Use false for W5x00 and Ethernetx library (https://www.arduino.cc/en/Reference/Ethernet)
#define USE_UIP_ETHERNET false
#define USE_ETHERNET_GENERIC false
#define USE_ETHERNET_ESP8266 false
#define USE_ETHERNET_ENC false
#define USE_CUSTOM_ETHERNET false
#if USE_NATIVE_ETHERNET
#include "NativeEthernet.h"
#warning Using NativeEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error
#define SHIELD_TYPE "using NativeEthernet"
#elif USE_QN_ETHERNET
#include "QNEthernet.h"
using namespace qindesign::network;
#warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error
#define SHIELD_TYPE "using QNEthernet"
#endif
- The Ethernet_Shield_W5200, EtherCard, EtherSia libraries are not supported. Don't use unless you know how to modify those libraries.
- Requests to support for any future custom Ethernet library will be ignored. Use at your own risk.
The default CS/SS pin is GPIO4(D2) for ESP8266, GPIO22 for ESP32, 10 for all other boards.
If the default pin is not correct, the easiest way is to select the CS/SS pin (e.g. 22) to use as follows:
// To override the default CS/SS pin. Don't use unless you know exactly which pin to use
#define USE_THIS_SS_PIN 22
To avoid using the default but not-working Ethernet library of ESP8266, rename the Ethernet.h/cpp to Ethernet_ESP8266.h/cpp to avoid library conflict if you're using the Arduino Ethernet library. The Ethernet_Generic, Ethernet2, Ethernet3, EthernetLarge library can be used without conflict.
These pins are tested OK with ESP8266 and W5x00
// For ESP8266
// Pin D0(GPIO16) D1(GPIO5) D2(GPIO4) D3(GPIO0) D4(GPIO2) D8
// Ethernet 0 X X X X 0
// Ethernet2 X X X X X 0
// Ethernet3 X X X X X 0
// EthernetLarge X X X X X 0
// Ethernet_ESP8266 0 0 0 0 0 0
// D2 is safe to used for Ethernet, Ethernet2, Ethernet3, EthernetLarge libs
// Must use library patch for Ethernet, EthernetLarge libraries
//Ethernet.setCsPin (USE_THIS_SS_PIN);
Ethernet.init (USE_THIS_SS_PIN);
- For Ethernet_Generic library only, simply use as follows to have large buffer similar to EthernetLarge library
#define ETHERNET_LARGE_BUFFERS
- For Ethernet3 library only, use as follows
// Use MAX_SOCK_NUM = 4 for 4K, 2 for 8K, 1 for 16K RX/TX buffer
#ifndef ETHERNET3_MAX_SOCK_NUM
#define ETHERNET3_MAX_SOCK_NUM 4
#endif
Ethernet.setCsPin (USE_THIS_SS_PIN);
Ethernet.init (ETHERNET3_MAX_SOCK_NUM);
sendContent_P() and send_P() buffer size is set default at 4 Kbytes, and minimum is 256 bytes. If you need to change, just add a definition, e.g.:
#define SENDCONTENT_P_BUFFER_SZ 2048
Note that the buffer size must be larger than 256 bytes. See Sending GZIP HTML ~ 120kb+ (suggested enhancement).
- For Ethernet_Generic library only, to use
SPI2
for ESP32
#define USING_SPI2 true
Pin to use for SPI2
MOSI: 13
MISO: 12
SCK: 14
SS: 5
- For Ethernet_Generic library only, to use
SPI1
for RP2040 using arduino-pico core
#define USING_SPI2 true
Pin to use for SPI1
MOSI: 15
MISO: 12
SCK: 14
SS: 13
See Many examples on GitHub
- AirQualitySensor
- AirQualitySensor_GP2Y1014AU0F
- Blinds
- Camera
- ContactSensor
- DimSwitch
- DoorBell
- Fan
- GarageDoor
- Light
- Light_FastLED_WS2812. New.
- RGB_LED_Stripe_5050. New.
- Lock
- Lock_with_feedback
- MotionSensor
- PowerSensor
- Speaker
- MultiSwitch_advance
- MultiSwitch_beginner
- MultiSwitch_intermediate
- Switch
- WeMosD1_mini_relay_shield
- TemperatureSensor
- Thermostat
- TV
Each item is a directory containing many examples designed for different kinds of boards (SAMD, nRF52, STM32, SAM DUE, etc.) and shields/modules (Ethernet/WiFiNINA)
- AirQualitySensor
- Blinds
- ContactSensor
- DimSwitch
- DoorBell
- Fan
- GarageDoor
- Light
- Lock
- MotionSensor
- PowerSensor
- Speaker
- Generic_Ethernet_Switch
- Generic_WiFiNINA_Switch
- nRF52_Ethernet_Switch
- nRF52_WiFiNINA_Switch
- SAMD_Ethernet_Switch
- SAMD_WiFiNINA_Switch
- WIO_Terminal. <===== New from v2.7.4
- TemperatureSensor
- Thermostat
- TV
- Blinds
- GarageDoor
- Light
- Light_FastLED_WS2812.
- RGB_LED_Stripe_5050.
- Lock
- Lock_with_feedback
- MotionSensor
- PowerSensor
- Speaker
- Switch
- TemperatureSensor
- Thermostat
- TV
Include SinricPro-Library (SinricPro_Generic.h) and SinricPro-Device-Libraries (eg. SinricProSwitch.h)
#include <SinricPro_Generic.h>
#include <SinricProSwitch.h>
#define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx"
#define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx"
#define SWITCH_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx"
bool onPowerState(const String &deviceId, bool &state)
{
Serial.printf("device %s turned %s\r\n", deviceId.c_str(), state?"on":"off");
return true; // indicate that callback handled correctly
}
// create and add a switch to SinricPro
SinricProSwitch& mySwitch = SinricPro[SWITCH_ID];
// set callback function
mySwitch.onPowerState(onPowerState);
// startup SinricPro
SinricPro.begin(APP_KEY, APP_SECRET);
SinricPro.handle();
Syntax is
DeviceType& myDevice = SinricPro[DEVICE_ID];
SinricProSwitch& mySwitch = SinricPro["YOUR-SWITCH-ID-HERE"];
SinricProSwitch& mySwitch = SinricPro.add<SinricProSwitch>("YOUR-SWITCH-ID-HERE");
Syntax is
DeviceType& myDevice = SinricPro[DEVICE_ID];
SinricProDoorbell& myDoorbell = SinricPro["YOUR-DOORBELL-ID-HERE"];
myDoorbell.sendDoorbellEvent();
SinricPro["YOUR-DOORBELL-ID-HERE"].as<SinricProDoorbell>().sendDoorbellEvent();
Example SAMD_WiFiNINA_Switch
1. File SAMD_WiFiNINA_Switch.ino
2. File defines.h
1. SAMD_WiFiNINA_TV on NANO_33_IOT
This is the terminal output when running SAMD_WiFiNINA_TV on NANO_33_IOT
Starting SAMD_WiFiNINA_TV on SAMD NANO_33_IOT
SinricPro_Generic (v2.8.5)
12 channels configured
[Wifi]: Connecting
WiFi-begin: return1 = 3
WiFi-begin: return2 = 3
[WiFi]: IP-Address is 192.168.2.46
Connected to SinricPro
TV turned off
TV turned on
Volume set to: 50
TV volume is unmuted
TV volume is muted
TV turned on
Volume set to: 65
TV turned on
MediaControl: play
MediaControl: pause
TV turned off
TV turned on
TV turned on
TV volume is unmuted
TV turned off
2. SAMD_WiFiNINA_Light on NANO_33_IOT
This is the terminal output when running SAMD_WiFiNINA_Light on NANO_33_IOT
Starting SAMD_WiFiNINA_Light on SAMD NANO_33_IOT
SinricPro_Generic (v2.8.5)
Setup color temperature lookup table
colorTemperatureIndex[2200] = 0
colorTemperatureIndex[2700] = 1
colorTemperatureIndex[4000] = 2
colorTemperatureIndex[5500] = 3
colorTemperatureIndex[7000] = 4
[Wifi]: ConnectingWiFi-begin: return1 = 3
WiFi-begin: return2 = 3
[WiFi]: IP-Address is 192.168.2.46
Connected to SinricPro
Device **** turned on (via SinricPro)
Device **** turn off (via SinricPro)
Device **** brightness level changed to 70
Device **** brightness level changed to 25
Device **** color changed to 160, 112, 112(RGB)
Device **** color changed to 218, 23, 23(RGB)
Device **** color changed to 236, 214, 214(RGB)
Device **** turn off (via SinricPro)
Device **** turned on (via SinricPro)
Device**** brightness level changed to 65
3. Generic_Ethernet_Blinds on nRF52 NRF52840_ITSYBITSY with W5500 Ethernet
This is the terminal output when running terminal output when running Generic_Ethernet_Blinds on nRF52 NRF52840_ITSYBITSY with W5500 Ethernet using "patched" Ethernet2 Library
Starting Generic_Ethernet_Blinds on NRF52840_ITSYBITSY
SinricPro_Generic (v2.8.5)
[SRP] =========== USE_ETHERNET2 ===========
[SRP] Default SPI pinout:
[SRP] MOSI: 24
[SRP] MISO: 23
[SRP] SCK: 25
[SRP] SS: 5
[SRP] =========================
[SRP] Use default CS/SS pin : 10
Index = 0
Ethernet Connected!. IP-Address is: 192.168.2.165
[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.165
mac:DE:AD:BE:EF:FE:01
platform:NRF52840_ITSYBITSY
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= 1596497923
4. Generic_Ethernet_Blinds on Seeeduino SEEED_XIAO_M0 with W5500 Ethernet
This is the terminal output when running terminal output when running Generic_Ethernet_Blinds on Seeeduino SEEED_XIAO_M0 with W5500 Ethernet using "patched" Ethernet3 Library
Starting Generic_Ethernet_Blinds on SEEED_XIAO_M0
SinricPro_Generic (v2.8.5)
[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
5. Generic_Ethernet_Blinds on Arduino SAMD_NANO_33_IOT with WiFiNINA
This is the terminal output when running terminal output when running Generic_Ethernet_Blinds on Arduino SAMD_NANO_33_IOT with WiFiNINA using "patched" Arduino.h
Starting SAMD_WiFiNINA_Blinds on SAMD_NANO_33_IOT
SinricPro_Generic (v2.8.5)
[Wifi]: Connecting[WiFi]: IP-Address is 192.168.2.105
[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.105
mac:74:7A:C9:AE:11:4C
platform:SAMD_NANO_33_IOT
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= 1596518895
6. Generic_Ethernet_Blinds on Adafruit nRF52 NRF52840_FEATHER with W5500 Ethernet
This is the terminal output when running terminal output when running Generic_Ethernet_Blinds on Adafruit nRF52 NRF52840_FEATHER with W5500 Ethernet using EthernetLarge Library with (SRP_LOGLEVEL = 3)
Starting Generic_Ethernet_Blinds on NRF52840_FEATHER
SinricPro_Generic (v2.8.5)
[SRP] =========== USE_ETHERNET_LARGE ===========
[SRP] Default SPI pinout:
[SRP] MOSI: 25
[SRP] MISO: 24
[SRP] SCK: 26
[SRP] SS: 5
[SRP] =========================
[SRP] Use default CS/SS pin : 10
Index = 6
_pinCS = 0
W5100 init, using SS_PIN_DEFAULT = 10, new ss_pin = 10, W5100Class::ss_pin = 10
W5100::init: W5500, SSIZE =8192
Connected!
[Ethernet]: IP-Address is 192.168.2.97
[SRP] Creating new device. No Device = 123456789012345678901234
[SRP] add(): Adding DeviceId = 123456789012345678901234
[SRP] begin(): App-Key = 12345678-1234-1234-1234-123456789012
[SRP] begin(): App-Secret = 12345678-1234-1234-1234-123456789012-12345678-1234-1234-1234-123456789012
[SRP] Websocket: Connecting to WebSocket Server: ws.sinric.pro
Websocket: headers:
appkey:12345678-1234-1234-1234-123456789012
deviceids:123456789012345678901234
restoredevicestates:false
ip:192.168.2.87
mac:DE:AD:BE:EF:FE:0B
platform:NRF52840_FEATHER
version:2.7.0
Connected to SinricPro
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1601877066
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1601877184
[SRP] handleRequest(): handling request
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "sinricpro-web",
"createdAt": 1601877184,
"deviceAttributes": [],
"deviceId": "123456789012345678901234",
"replyToken": "1068f321-1ad6-4750-a089-f73e56502044",
"type": "request",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "/3hvMknpWRtzgNcD41s94YMLzPrA/gj1BIUihcRajjk="
}
}
Device 123456789012345678901234 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": 1601877184,
"deviceId": "123456789012345678901234",
"message": "OK",
"replyToken": "1068f321-1ad6-4750-a089-f73e56502044",
"success": true,
"type": "response",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "DS4Lby1xXXiM7OBe3cphs2G+1HaN6Z9T8crcRRA4avc="
}
}
[SRP] handleSendQueue: Sending to WebSocket
[SRP] handleSendQueue(): Message sent.
7. Generic_Ethernet_Blinds on STM32F7 Nucleo-144 NUCLEO_F767ZI with W5500 Ethernet
This is the terminal output when running terminal output when running Generic_Ethernet_Blinds on STM32F7 Nucleo-144 NUCLEO_F767ZI with W5500 Ethernet using Ethernet2 Library with (SRP_LOGLEVEL = 3)
Starting Generic_Ethernet_Speaker on NUCLEO_F767ZI
SinricPro_Generic (v2.8.5)
Index = 0
Connected!
[Ethernet]: IP-Address is 192.168.2.84
[SRP] Creating new device. No current DeviceId = 123456789012345678901234
[SRP] add(): Adding DeviceId = 123456789012345678901234
[SRP] begin(): App-Key = 12345678-1234-1234-1234-123456789012
[SRP] begin(): App-Secret = 12345678-1234-1234-1234-123456789012-12345678-1234-1234-1234-123456789012
[SRP] Websocket: Connecting to WebSocket Server: ws.sinric.pro
Websocket: headers:
appkey:12345678-1234-1234-1234-123456789012
deviceids:123456789012345678901234
restoredevicestates:false
ip:192.168.2.84
mac:DE:AD:BE:EF:FE:01
platform:NUCLEO_F767ZI
version:2.7.0
Connected to SinricPro
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1601879732
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1601879782
[SRP] handleRequest(): handling request
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setVolume",
"clientId": "sinricpro-web",
"createdAt": 1601879782,
"deviceAttributes": [],
"deviceId": "123456789012345678901234",
"replyToken": "7c989b3f-84aa-4462-8f3d-1a29c04c7df0",
"type": "request",
"value": {
"volume": 45
}
},
"signature": {
"HMAC": "J27eUYEZJ+pQyzG5uC1+w/2jz8SKGU4LcP5snSb0KF4="
}
}
Volume set to: 45
[SRP] handleSendQueue(): Sending Number of Message(s) in sendQueue = 1
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setVolume",
"clientId": "sinricpro-web",
"createdAt": 1601879782,
"deviceId": "123456789012345678901234",
"message": "OK",
"replyToken": "7c989b3f-84aa-4462-8f3d-1a29c04c7df0",
"success": true,
"type": "response",
"value": {
"volume": 45
}
},
"signature": {
"HMAC": "mYoFZxZ//yKd3BU/TWs56rKoM+lcdZsxVs1ql0/1XM4="
}
}
[SRP] handleSendQueue: Sending to WebSocket
[SRP] handleSendQueue(): Message sent.
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1601879790
[SRP] handleRequest(): handling request
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "sinricpro-web",
"createdAt": 1601879790,
"deviceAttributes": [],
"deviceId": "123456789012345678901234",
"replyToken": "0069ff67-31ee-4e6e-a647-a054617a2061",
"type": "request",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "kx6ZtXl1DUNMIXCmlcBO5ni8NN9w1CLaM8hSIESM9fM="
}
}
Speaker turned off
[SRP] handleSendQueue(): Sending Number of Message(s) in sendQueue = 1
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "sinricpro-web",
"createdAt": 1601879790,
"deviceId": "123456789012345678901234",
"message": "OK",
"replyToken": "0069ff67-31ee-4e6e-a647-a054617a2061",
"success": true,
"type": "response",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "qiI38SI0ulIJKXR/R/Zm9n6Uhd3HlNmX2vto9DkDah8="
}
}
[SRP] handleSendQueue: Sending to WebSocket
[SRP] handleSendQueue(): Message sent.
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1601879793
[SRP] handleRequest(): handling request
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "sinricpro-web",
"createdAt": 1601879793,
"deviceAttributes": [],
"deviceId": "123456789012345678901234",
"replyToken": "d4d1d50c-9c44-40fa-943c-84c40c0d7550",
"type": "request",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "49poW0mpG3CZUs8UJ48EF6eAw8mz09jcfGRy2Xob86w="
}
}
Speaker turned on
[SRP] handleSendQueue(): Sending Number of Message(s) in sendQueue = 1
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "sinricpro-web",
"createdAt": 1601879793,
"deviceId": "123456789012345678901234",
"message": "OK",
"replyToken": "d4d1d50c-9c44-40fa-943c-84c40c0d7550",
"success": true,
"type": "response",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "msDcqzA0tGgzJOB0uAeaiIEFvPSQ3ACTZPmk+lMty5o="
}
}
[SRP] handleSendQueue: Sending to WebSocket
[SRP] handleSendQueue(): Message sent.
8. WIOT_MultiSwitch_LCD on SeeedStudio SAMD51 WIO Terminal
This is the terminal output when running terminal output when running WIOT_MultiSwitch_LCD on SeeedStudio SAMD51 WIO Terminal with (SRP_LOGLEVEL = 3)
Starting WIOT_MultiSwitch_LCD on WIO_TERMINAL
SinricPro_Generic (v2.8.5)
[Wifi]: Connecting
[WiFi]: IP-Address is 192.168.2.150
Connected to SinricPro
SinricPro Connected
isSinricConnected Connected
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "sinricpro-web",
"createdAt": 1606952787,
"deviceAttributes": [],
"deviceId": "5ec47b****************",
"replyToken": "bbab5988-ffae-45ca-b1c2-fb13be4d0a48",
"type": "request",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "efnmLaucg7UvjHSZiUyv9U1pzbTJqwgBPnX+yziNPAg="
}
}
=======================================
Device 1 turned ON
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "sinricpro-web",
"createdAt": 1606952787,
"deviceId": "5ec47b****************",
"message": "OK",
"replyToken": "bbab5988-ffae-45ca-b1c2-fb13be4d0a48",
"success": true,
"type": "response",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "O0Hc0p2sxD5FzbOPCmw+Ex9NnjVxkMDo9HkNicChoZU="
}
}
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "sinricpro-web",
"createdAt": 1606952787,
"deviceAttributes": [],
"deviceId": "5ec47b****************",
"replyToken": "be743078-60ad-4eb8-a6f8-05b13e9509c5",
"type": "request",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "a9E1hS2dY7GDE+KCLZFXhcaMwZtMk5YH7yvsVDsPmoQ="
}
}
=======================================
Device 3 turned ON
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "sinricpro-web",
"createdAt": 1606952787,
"deviceId": "5ec47b****************",
"message": "OK",
"replyToken": "be743078-60ad-4eb8-a6f8-05b13e9509c5",
"success": true,
"type": "response",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "NouzX0HUbxAh2/ATHPMpqMrKGfydHEFScu7cU7Qboec="
}
}
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "sinricpro-web",
"createdAt": 1606952787,
"deviceAttributes": [],
"deviceId": "5ec47b****************",
"replyToken": "dcbe67e7-6add-44b9-820c-955c7efab625",
"type": "request",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "d2T7p0jEUbm0jLs8GOTmqvwpkwSBA27q0UhAVjZ7v28="
}
}
=======================================
Device 2 turned ON
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "sinricpro-web",
"createdAt": 1606952787,
"deviceId": "5ec47b****************",
"message": "OK",
"replyToken": "dcbe67e7-6add-44b9-820c-955c7efab625",
"success": true,
"type": "response",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "kFuxIwc5RZr1xAs5oLK66r1dYl4YrbDUcxS804cWQ+k="
}
}
Device 1 with deviceID :5ec47b9276b86a477f5df3d0turned OFF (manually via flashbutton)
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"cause": {
"type": "PHYSICAL_INTERACTION"
},
"createdAt": 1606952915,
"deviceId": "5ec47b****************",
"replyToken": "fc3e0648-7535-4765-85b4-f054bc3b2f01",
"type": "event",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "0A0OmM/2k6AtUhfb3358c2rohjVHQKOVpu/qid7+A7U="
}
}
and the LCD screenshots
9. Generic_WiFiNINA_Blinds on MBED NANO_RP2040_CONNECT
This is the terminal output when running terminal output when running Generic_WiFiNINA_Blinds on Arduino MBED NANO_RP2040_CONNECT
Starting Generic_WiFiNINA_Blinds on MBED NANO_RP2040_CONNECT
SinricPro_Generic (v2.8.5)
[Wifi]: Connecting[WiFi]: IP-Address is 192.168.2.153
Connected to SinricPro
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1622610381,
"deviceId": "123456789012345678901234",
"replyToken": "cef0abba-0fe3-44c1-9fad-426766e4c23e",
"type": "request",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "CBksKuwCU3WagwFP0xyqmUqnaEl1+PI91OvBwQnt7pw="
}
}Device 123456789012345678901234 power turned on
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1622610381,
"deviceId": "123456789012345678901234",
"message": "OK",
"replyToken": "cef0abba-0fe3-44c1-9fad-426766e4c23e",
"success": true,
"type": "response",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "0TTkm+eAa/QmnkiF1239idHJS/uYcwhWVmGQ+Yo+7Ag="
}
}
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1622610383,
"deviceId": "123456789012345678901234",
"replyToken": "059fa67e-1ecb-4378-8c49-83693441d9b6",
"type": "request",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "fx7mxcIADdO7/l/HnfiZtUwya+nC0B1+mXSKwIOevMs="
}
}Device 123456789012345678901234 power turned off
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1622610383,
"deviceId": "123456789012345678901234",
"message": "OK",
"replyToken": "059fa67e-1ecb-4378-8c49-83693441d9b6",
"success": true,
"type": "response",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "/LQtlMLeej6ev665US/o+USwaV/3lx81KX+AhHa/+Yw="
}
}
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setRangeValue",
"clientId": "portal",
"createdAt": 1622610386,
"deviceId": "123456789012345678901234",
"replyToken": "5e986c43-da36-40e0-83f7-a8ec4d4cac9f",
"type": "request",
"value": {
"rangeValue": 100
}
},
"signature": {
"HMAC": "VPDM+vx74ILz0OzKdjhKDr/E31s6Zztg/UrZgKLf+5w="
}
}Device 123456789012345678901234 set position to 100
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setRangeValue",
"clientId": "portal",
"createdAt": 1622610386,
"deviceId": "123456789012345678901234",
"message": "OK",
"replyToken": "5e986c43-da36-40e0-83f7-a8ec4d4cac9f",
"success": true,
"type": "response",
"value": {
"rangeValue": 100
}
},
"signature": {
"HMAC": "hrmCNpSS8X90FPmmJE86tHWYfCTqIpIGNE7JFoTpdVY="
}
}
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setRangeValue",
"clientId": "portal",
"createdAt": 1622610388,
"deviceId": "123456789012345678901234",
"replyToken": "b3af6342-bf52-4a7a-8919-c318bf9b9b3f",
"type": "request",
"value": {
"rangeValue": 0
}
},
"signature": {
"HMAC": "oaAgz3MT50kVviDcqLyanwiNuZ/KVTslMSncg9veDnA="
}
}Device 123456789012345678901234 set position to 0
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setRangeValue",
"clientId": "portal",
"createdAt": 1622610388,
"deviceId": "123456789012345678901234",
"message": "OK",
"replyToken": "b3af6342-bf52-4a7a-8919-c318bf9b9b3f",
"success": true,
"type": "response",
"value": {
"rangeValue": 0
}
},
"signature": {
"HMAC": "HT6U+Q+rfdeE6lzqdUAtehOexNi5us17B5j1FKHS1dM="
}
}
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setRangeValue",
"clientId": "portal",
"createdAt": 1622610394,
"deviceId": "123456789012345678901234",
"replyToken": "059e38ca-fce5-4188-99ab-7dba8863cb4f",
"type": "request",
"value": {
"rangeValue": 40
}
},
"signature": {
"HMAC": "7Nz3oiW+zHVtNh8gokRHzNGdYu/Y7F4beJkAfJpgGGg="
}
}Device 123456789012345678901234 set position to 40
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setRangeValue",
"clientId": "portal",
"createdAt": 1622610394,
"deviceId": "123456789012345678901234",
"message": "OK",
"replyToken": "059e38ca-fce5-4188-99ab-7dba8863cb4f",
"success": true,
"type": "response",
"value": {
"rangeValue": 40
}
},
"signature": {
"HMAC": "nV7UpnelVTTWMrYJvBZBhnd2zV3tEOanhseYVeQcIMA="
}
}
10. RP2040_WiFiNINA_Blinds on MBED NANO_RP2040_CONNECT
This is the terminal output when running terminal output when running Generic_WiFiNINA_Blinds on Arduino MBED NANO_RP2040_CONNECT
Starting RP2040_WiFiNINA_Blinds on MBED NANO_RP2040_CONNECT
SinricPro_Generic (v2.8.5)
[Wifi]: Connecting[WiFi]: IP-Address is 192.168.2.153
[SRP] Creating new device. No current DeviceId = 123456789012345678901234
[SRP] add(): Adding DeviceId = 123456789012345678901234
[SRP] begin(): App-Key = 12345678-1234-1234-1234-123456789012
[SRP] begin(): App-Secret = 12345678-1234-1234-1234-123456789012-12345678-1234-1234-1234-123456789012
[SRP] Websocket: Connecting to WebSocket Server: ws.sinric.pro
Websocket: headers:
appkey:12345678-1234-1234-1234-123456789012
deviceids:123456789012345678901234
restoredevicestates:false
ip:192.168.2.153
mac:98:1F:2E:A8:CC:84
platform:MBED NANO_RP2040_CONNECT
version:2.8.0
Connected to SinricPro
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1622609861
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1622609961
[SRP] handleRequest(): handling request
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1622609961,
"deviceId": "123456789012345678901234",
"replyToken": "d2b469d3-aa7a-4fe8-a726-21f64fbf838e",
"type": "request",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "4S+9TcRml7dUdapV9tbJnMmqz/bm7MTe4Kfqyo2bnjs="
}
}
Device 123456789012345678901234 power turned on
[SRP] handleSendQueue(): Sending Number of Message(s) in sendQueue = 1
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1622609961,
"deviceId": "123456789012345678901234",
"message": "OK",
"replyToken": "d2b469d3-aa7a-4fe8-a726-21f64fbf838e",
"success": true,
"type": "response",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "0Wfn7ozGRg1h3LlN+m+2x5c5XZNOl0akoYR8NlAX+fo0"
}
}
[SRP] handleSendQueue: Sending to WebSocket
[SRP] handleSendQueue(): Message sent.
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1622609963
[SRP] handleRequest(): handling request
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1622609963,
"deviceId": "123456789012345678901234",
"replyToken": "22bb0f44-15d7-41ca-9df1-4411bad86d47",
"type": "request",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "Di8m+/krnAZOGKvvLYVII07pwIWhzkY2auXfQNd1Ta0="
}
}
Device 123456789012345678901234 power turned off
[SRP] handleSendQueue(): Sending Number of Message(s) in sendQueue = 1
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1622609963,
"deviceId": "123456789012345678901234",
"message": "OK",
"replyToken": "22bb0f44-15d7-41ca-9df1-4411bad86d47",
"success": true,
"type": "response",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "LknB4L8yaPbDeVSEAfZ6bg16RcPELGScuBAiuOEGLnU="
}
}
[SRP] handleSendQueue: Sending to WebSocket
[SRP] handleSendQueue(): Message sent.
11. Blinds on WT32-ETH01 with ETH_PHY_LAN8720
This is the terminal output when running terminal output when running Blinds on WT32-ETH01 with ETH_PHY_LAN8720
Start Blinds on WT32-ETH01 with ETH_PHY_LAN8720
WebServer_WT32_ETH01 v1.4.1
SinricPro_Generic (v2.8.5)
[ETH]: Connecting
ETH Started
ETH Connected
ETH MAC: A8:03:2A:A1:61:73, IPv4: 192.168.2.83
FULL_DUPLEX, 100Mbps
[ETH]: IP-Address is 192.168.2.83
Connected to SinricPro
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1626752759,
"deviceId": "device-id",
"replyToken": "ab499dd7-9846-4944-814e-21262e645809",
"type": "request",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "i4exN7P/ScPsul8Cdn2hQa0hZ49zw6nc7TTwiKEVeYw="
}
}Device device-id power turned on
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1626752759,
"deviceId": "device-id",
"message": "OK",
"replyToken": "ab499dd7-9846-4944-814e-21262e645809",
"success": true,
"type": "response",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "3V/YzNA6AjgAj97QlRUguJijMXtlTjq/KQyViulRPrs="
}
}
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1626752762,
"deviceId": "device-id",
"replyToken": "86d11bc3-1711-48ca-8bdd-f4df119f02f2",
"type": "request",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "UrmmYfZM0xcpVg20vVeh0/rdj1hs9K7B93Ge4ZmgYYE="
}
}Device device-id power turned off
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1626752762,
"deviceId": "device-id",
"message": "OK",
"replyToken": "86d11bc3-1711-48ca-8bdd-f4df119f02f2",
"success": true,
"type": "response",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "gHrceMstnanDVixoRloVFalZREux+8CF9q6SnXn4F8Q="
}
}
12. Generic_Ethernet_Light on RASPBERRY_PI_PICO
This is the terminal output when running terminal output when running Generic_Ethernet_Light on RASPBERRY_PI_PICO with WIZnet Ethernet HAT
Starting Generic_Ethernet_Light on RASPBERRY_PI_PICO
Version : SinricPro_Generic (v2.8.5)
Setup color temperature lookup table
colorTemperatureIndex[2200] = 0
colorTemperatureIndex[2700] = 1
colorTemperatureIndex[4000] = 2
colorTemperatureIndex[5500] = 3
colorTemperatureIndex[7000] = 4
[SRP] =========== USE_ETHERNET_GENERIC ===========
[SRP] Default SPI pinout:
[SRP] MOSI: 19
[SRP] MISO: 16
[SRP] SCK: 18
[SRP] SS: 17
[SRP] =========================
[SRP] RPIPICO setCsPin: 17
[ETG] W5100 init, using SS_PIN_DEFAULT = 17 , new ss_pin = 10 , W5100Class::ss_pin = 17
[ETG] Chip is W5100S
[ETG] W5100::init: W5100S, SSIZE = 4096
[SRP] =========================
[SRP] Currently Used SPI pinout:
[SRP] MOSI: 19
[SRP] MISO: 16
[SRP] SCK: 18
[SRP] SS: 17
[SRP] =========================
Using mac index = 0
Connected! IP address: 192.168.2.98
[SRP] Creating new device. No current DeviceId = Device_ID
[SRP] add(): Adding DeviceId = Device_ID
[SRP] begin(): App-Key = App_Key
[SRP] begin(): App-Secret = App_Secret
[SRP] Websocket: Connecting to WebSocket Server: ws.sinric.pro
Websocket: headers:
appkey:App_Key
deviceids:Device_ID
restoredevicestates:false
ip:192.168.2.98
mac:DE:AD:BE:EF:FE:01
platform:RASPBERRY_PI_PICO
version:2.8.4
Connected to SinricPro
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1650769456
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1650769562
[SRP] handleRequest(): handling request
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1650769562,
"deviceId": "Device_ID",
"replyToken": "fdbf1cc6-5e32-4d8f-81dc-43ad905116e6",
"type": "request",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "5u64RTTXqgQiHNVZFo7hmA0ora3XYKzethOg3C/li8c="
}
}
Device Device_ID turned on (via SinricPro)
[SRP] handleSendQueue(): Sending Number of Message(s) in sendQueue = 1
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1650769562,
"deviceId": "Device_ID",
"message": "OK",
"replyToken": "fdbf1cc6-5e32-4d8f-81dc-43ad905116e6",
"success": true,
"type": "response",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "gYvvaar7x4BwJbkofSOkjDHeP9uBU/SL81db++BzE8s="
}
}
[SRP] handleSendQueue: Sending to WebSocket
[SRP] handleSendQueue(): Message sent.
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1650769564
[SRP] handleRequest(): handling request
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1650769564,
"deviceId": "Device_ID",
"replyToken": "9453bef8-4c4e-47fb-9df9-e1a2cb5be795",
"type": "request",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "M9NIE+Bp4I/+o9D9pQoQFguLxiNBebGJKN9A/k+i7bQ="
}
}
Device Device_ID turn off (via SinricPro)
[SRP] handleSendQueue(): Sending Number of Message(s) in sendQueue = 1
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1650769564,
"deviceId": "Device_ID",
"message": "OK",
"replyToken": "9453bef8-4c4e-47fb-9df9-e1a2cb5be795",
"success": true,
"type": "response",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "aRT3TNQmSDMlOzZ91OncVkzEZwbFxMC/BahmjHT8QEQ="
}
}
[SRP] handleSendQueue: Sending to WebSocket
[SRP] handleSendQueue(): Message sent.
13. Generic_Ethernet_Light on PORTENTA_H7_M7
This is the terminal output when running terminal output when running Generic_Ethernet_Light on WT32-PORTENTA_H7_M7 with Portenta Ethernet
Starting Generic_Ethernet_Light on PORTENTA_H7_M7
Version : SinricPro_Generic (v2.8.5)
Setup color temperature lookup table
colorTemperatureIndex[2200] = 0
colorTemperatureIndex[2700] = 1
colorTemperatureIndex[4000] = 2
colorTemperatureIndex[5500] = 3
colorTemperatureIndex[7000] = 4
[SRP] ======== USE_PORTENTA_H7_ETHERNET ========
Using mac index = 14
Connected! IP address: 192.168.2.106
[SRP] Creating new device. No current DeviceId =
[SRP] add(): Invalid DeviceId =
[SRP] begin(): App-Key =
[SRP] begin(): App-Secret =
[SRP] begin(): Invalid App-Key =
[SRP] begin(): Invalid App-Secret =
[SRP] handle(): ERROR! begin() failed or was not called prior to event handler
[SRP] -Reasons: Invalid app-key, app-secret or deviceIds
[SRP] -SinricPro is disabled! Check earlier log messages for details.
Starting Generic_Ethernet_Light on PORTENTA_H7_M7
Version : SinricPro_Generic (v2.8.5)
Setup color temperature lookup table
colorTemperatureIndex[2200] = 0
colorTemperatureIndex[2700] = 1
colorTemperatureIndex[4000] = 2
colorTemperatureIndex[5500] = 3
colorTemperatureIndex[7000] = 4
[SRP] ======== USE_PORTENTA_H7_ETHERNET ========
Using mac index = 8
Connected! IP address: 192.168.2.106
[SRP] Creating new device. No current DeviceId = Device_ID
[SRP] add(): Adding DeviceId = Device_ID
[SRP] begin(): App-Key = App_Key
[SRP] begin(): App-Secret = App_Secret
[SRP] Websocket: Connecting to WebSocket Server: ws.sinric.pro
Websocket: headers:
appkey:App_Key
deviceids:Device_ID
restoredevicestates:false
ip:192.168.2.106
mac:40:00:29:E1:80:00
platform:PORTENTA_H7_M7
version:2.8.4
Connected to SinricPro
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1650770708
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1650770720
[SRP] handleRequest(): handling request
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1650770720,
"deviceId": "Device_ID",
"replyToken": "29af8102-3437-4379-b024-900d970a0d1e",
"type": "request",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "OdAt4FLchxe0ot6vO4Ihb6dLnP+KC2fwLcnUykyZyLc="
}
}
Device Device_ID turned on (via SinricPro)
[SRP] handleSendQueue(): Sending Number of Message(s) in sendQueue = 1
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1650770720,
"deviceId": "Device_ID",
"message": "OK",
"replyToken": "29af8102-3437-4379-b024-900d970a0d1e",
"success": true,
"type": "response",
"value": {
"state": "On"
}
},
"signature": {
"HMAC": "YfuVMX1kCssKymi8UiYcbY0ELkIUnSElMttlG0Sp/cU="
}
}
[SRP] handleSendQueue: Sending to WebSocket
[SRP] handleSendQueue(): Message sent.
[SRP] handleReceiveQueue(): Message(s) in receiveQueue = 1
[SRP] handleReceiveQueue(): Valid Signature. Processing message...
[SRP] extractTimestamp(): Got Timestamp = 1650770722
[SRP] handleRequest(): handling request
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1650770722,
"deviceId": "Device_ID",
"replyToken": "db211e3d-4334-4f3f-8dd6-2aa4a82aa801",
"type": "request",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "m1EXS1JvUP/pI7HDSoOwE1Zc1r7JZMaCf9y8hsnZeFI="
}
}
Device Device_ID turn off (via SinricPro)
[SRP] handleSendQueue(): Sending Number of Message(s) in sendQueue = 1
{
"header": {
"payloadVersion": 2,
"signatureVersion": 1
},
"payload": {
"action": "setPowerState",
"clientId": "portal",
"createdAt": 1650770722,
"deviceId": "Device_ID",
"message": "OK",
"replyToken": "db211e3d-4334-4f3f-8dd6-2aa4a82aa801",
"success": true,
"type": "response",
"value": {
"state": "Off"
}
},
"signature": {
"HMAC": "mQxdqwFZ09QOXY63Qlckhbkgsygi0jDM/TYh1JHEZYw="
}
}
[SRP] handleSendQueue: Sending to WebSocket
[SRP] handleSendQueue(): Message sent.
- Switch
- Dimmable Switch
- Light
- TV
- Speaker
- Thermostat
- Fan (US and non US version)
- Lock
- DoorBell
- TemperatureSensor
- MotionSensor
- ContactSensor
- Windows Air Conditioner
- Interior Blinds
- Garage Door
- Camera (from v2.5.1)
- AirQualitySensor (from v2.6.1)
Debug is enabled by default on Serial. Debug Level from 0 to 4. To disable, change the SRP_LOGLEVEL to 0
#define SRP_DEBUG_PORT Serial
// Debug Level from 0 to 4
#define _SRP_LOGLEVEL_ 4
If you get compilation errors, more often than not, you may need to install a newer version of the board's core, applying Libraries' Patches, Packages' Patches or this library latest version.
Submit issues to: SinricPro_Generic issues
- Bug Searching and Killing
- Support more types of new boards
- Support GSM/GPRS modules/shields
- Sync with latest SinricPro library
- Add support to Adafruit SAMD21 (Itsy-Bitsy M0, Metro M0, Feather M0 Express, etc.).
- Add support to Adafruit SAMD51 (Itsy-Bitsy M4, Metro M4, Grand Central M4, Feather M4 Express, etc.).
- Add support to Adafruit nRF52 ( Feather nRF52832, nRF52840 Express, BlueFruit Sense, Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B302_ublox, NINA_B112_ublox, etc.).
- Add support to SAM DUE.
- Add support to Teensy.
- Add support to all STM32F/L/H/G/WB/MP1 having 64K+ Flash program memory.
- Add support to 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.)
- Add support to W5x00, ENC28J60 Ethernet modules/shields.
- Add support to Ethernet, EthernetLarge, Ethernet2, Ethernet3, UIPEthernet libraries.
- Add support to RP2040-based boards, such as RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040, using Earle Philhower's arduino-pico core.
- Add support to RP2040-based boards, such as RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040, using Arduino-mbed RP2040 core
- Add support to Arduino Nano RP2040 Connect using Arduino mbed OS for Nano boards.
- Add
Table of Contents
- Use Ethernet_Generic library as default for W5x00 Ethernet.
- Add support to Portenta_H7
- Add support to WIZNet W5100S, such as WIZnet Ethernet HAT and W5100S-EVB-Pico
- Add astyle using
allman
style. Restyle the library
- Based on and modified from Boris Jaeger's SinricPro library which is written for only ESP8266 and ESP32.
- Also thanks to the good Sinric/SinricPro platform of Aruna Tennakoon
- Thanks to good work of Miguel Wisintainer for initiating, inspriring, working with, developing, debugging and testing. Without that, support to nRF52, especially U-Blox B302 running as nRF52840 and U-Box B112 running as nRF52832, has never been started and finished.
⭐️ Boris Jaeger |
⭐️ Aruna Tennakoon |
Miguel Wisintainer |
If you want to contribute to this project:
- Report bugs and errors
- Ask for enhancements
- Create issues and pull requests
- Tell other people about this library
-
Most of the credits go to original author Boris Jaeger.
-
The library is licensed under CC-BY-SA
Copyright (c) 2020- Boris Jaeger, Khoi Hoang