Connecting the BlitzWolf® BW-SHP6 WIFI smart socket
In this tutorial, we will look at how to connect the BlitzWolf® BW-SHP6 2300W WIFI Smart Socket to the Kaa platform using the default, MQTT-based protocol. You will learn how to connect the real device used for Data Analytics and Notifications webinar, publish the telemetry data and handle commands from the Kaa platform.
We will provide the custom software for the smart socket. To do this repeat the steps from 1 to 7 from the serial flash instructions guide.
After that go through the below steps.
Before opening the Arduino IDE download and place the customized for the Blitzwolf BL0937 smart socket version of HLW8012 library to the
Arduino/librariesfolder. Do not install the HLW8012 library from Arduino library manager. Other libraries may be installed from Arduino library manager.
Open the bw-shp6_kaa_example project with an Arduino IDE and define bellow connection parameters in the
#define WIFI_SSID "**********" // your WiFi network SSID #define WIFI_PASS "**********" // your WiFi network password #define KAA_HOST "**********" // the KAA host address #define KAA_PORT 1883 #define KAA_TOKEN "**********" // your device token #define KAA_APP_VERSION "**********" // the application version you are working with
- In the Arduino IDE select:
Tools->Board: Generic ESP8266 Module for BW-SHP6 10A.
Tools->Flash Size: 1M (no SPIFFS).
Tools->Port: [your usb-serial adapter COM port].
bw-shp6_kaa_exampleproject to the ESP.
All programming part is done. Please finish all hardware preparation and make the smart socket able to connect to the power.
Now our smart socket can send the telemetry data with the voltage, current, and power values.
Also, the device can receive commands from the Kaa platform to switch
On/Off its state.
- All tutorial resources are located on GitHub.
- Customized for the Blitzwolf BL0937 smart socket version of the HLW8012 library GitHub.