switch-it! is available now on Google Play.
switch-it! is a simple configurator, monitoring, and controller app for your D.I.Y ESP8266 IoT device. You can use switch-it! for real-time monitoring and controling for example relay and motion sensor through WebSocket and MQTT. All configuration can be done via the app, including Wi-Fi and MQTT setup, so there is no need to hardcode anything, at all.
- One Time Binding , the app will store connected device locally, so you don't have to manually enter address of the ESP everytime you wan't to access it.
- Free 3 Device Registration, bind up to 3 ESP8266 device for free.
- MQTT, support control and monitoring through MQTT. (Currently we only support, and tested MQTT implementation with HiveMQ broker).
- OTA Firmware Update, update device firmware through webserver.
- Auto Discovery, with mDNS service, the app will automatically look for configured ESP within the same local network.
- No Coding Required, we have provided a ready to flash firmware binary file. All you need to do is to configure WiFi connection, and bind it with the app.
- State Persistance, the board will revert back to the state it is in before a restart, or power out.
- Pull to Refresh, for easy reconnection to all bonded ESP board.
- Board Reset, swipe card to unbind the ESP board, and reset it to Wi-Fi configuration mode.
- New device available, PIR / Motion sensor
- OTA update support
- MQTT support with HiveMQ
- Redesigned device card to show more device info and state
- Feedback state from device. Example, when sending command from app to turn relay on, the app will wait for confirmation from ESP device. If relay is on, then device will send feedback, and app will update the button state.
- Download .bin firmware from this repository.
- Flash .bin firmware to ESP8266 board. You can use any flasher you like. We recommend using NodeMCU PyFlasher. Flasher settings:
- BAUD Rate : 115200
- Flash Mode : Dual I/O (DIO)
- Erase Flash : Yes
- After flashing done, reset the board, the built-in LED will light up, this indicate the board is is Wi-Fi setup mode.
- Connect to the board via Wi-Fi, SSID should be something like ESP_XXXXXX.
- Most of the time you will be automatically redirected to configuration page, if not, open browser and go to 1.1.1.1
- Click on Configure WiFi, tap the SSID you want to connect to or manually enter SSID and password. Once you are done, save, then the ESP will restart.
- Wait until the LED is blinking. This indicates that the board is broadcasting mDNS.
- Open the app and press + icon to bind the ESP.
- Give the device a name, and enter any required device parameters.
- and you are done!
We currently only support, and have tested the MQTT features with broker provided by HiveMQ. HiveMQ offers a free plan with up to 10GB of data traffic, with option to upgrade in case you are using many devices, and running out of data traffic quota.
- Go to HiveMQ website, and sign up for their free MQTT cloud service. HiveMQ Cloud
- Create authentication for your MQTT broker, username, and password.
- Go to swith-it! app, and enter:
- Username
- Password
- Hostname (HiveMQ broker server)
- Port (8883 is the default port)
- Keep Alive Period (20)
- MQTT client ID will be auto generated based on your device UUID.
- Press connect, if connection is successful, globe icon on top right will turn purple.
- Go back to main screen, the app will automatically contact all devices through websocket, and send MQTT setup command.
- If setup is successful, MQTT status icon in each device card will turn purple.
- If not, you can re-attemp the MQTT setup by pull-to-refresh.
- Make sure you are connected to the same network as the Device you are going to update.
- Access the OTA webserver, address : http://{ip address}:81
- Enter username, and password.
- Username : IP Address (ex. 192.168.100.100)
- Password : deviceType_chipID (ex. relay_299RFT or pir_998PTR). Note that chip ID part could be alphanumeric, and are in upper case letter.
- Locate the bin file, and click update firmware.
- The device will reset when OTA update is done.
App Button | I/O | Wemos D1 Mini | Lolin NodeMCU v3 |
---|---|---|---|
1 | GPIO 14 | D5 | D5 |
2 | GPIO 12 | D6 | D6 |
3 | GPIO 13 | D7 | D7 |
4 | GPIO 15 | D8 | D8 |
This setup is based on the use of HC-SR501 PIR sensor. This sensor uses 3 connection, power (5v), GND, and input. The mapping is as follows,
HC-SR501 | I/O | Wemos D1 Mini | Lolin NodeMCU v3 |
---|---|---|---|
5v | - | 5v | 5v |
Signal | GPIO 5 | D1 | D1 |
GND | - | GND | GND |
- Currently, the ESP board can only be controlled by 1 device, the one it is bonded to.
- You might need to have a physical access to the ESP board to reset or update it with a new firmware.
- Future updates might be breaking, you might need to reflash the ESP board, and re-bind the board to the app.
Firmware is provided as is, we are not liable for any damage or consequences of using this firmware. Use this software at your own risk.
We value your feedback and input to help us improve and provide you with many more useful apps, libraries, and tools. If you have any question or inquiries, you can reach us via :
Thanks!