Model: NodeMCU ESP8266
Protocol: LAN
A SmartThings Hub with firmware version 38.x or greater and a LAN device ready to connect.
For this tutorial, we used an ESP8266 but the same principles can be used to integrate any LAN-based device that supports SSDP and HTTP.
- Set up the SmartThings CLI according to the configuration document.
- Add the Edge Driver plugin to the CLI.
- Configure your development environment for the SmartThingsEdgeDrivers
Note: Take a look at the installation tutorial in our Developer's Community.
- Compile the driver:
smartthings edge:drivers:package driver/
- Create a channel for your driver
smartthings edge:channels:create
- Enroll your driver into the channel
smartthings edge:channels:enroll
- Publish your driver to the channel
smartthings edge:drivers:publish
- If the package was successfully created, you can call the command below and follow the on-screen prompts to install the Driver in your Hub:
smartthings edge:drivers:install
You should see the confirmation message: Driver {driver-id} installed to Hub {hub-id}
-
Use your WiFi router or the SmartThings IDE > My Hubs to locate and copy the IP Address for your Hub.
-
From a computer on the same local network as your Hub, open a new terminal window and run the command to get the logs from all the installed drivers.
smartthings edge:drivers:logcat --hub-address=x.x.x.x -a
-
Setup the ESP8266 board and embedded app according to these instructions.
-
Open the SmartThings App and follow these steps (notice that you must add the device in the same location your Hub is installed):
- Select Add (+) and then Device.
- Tap on Scan nearby and check the logs emitted at your logcat session.
As soon as your device gets installed, the Driver will send a
periodic Ping HTTP Requests with IP and Port reference of the server that will
listen for external device updates at X.X.X.X:XXXXX/push-state
.