How to use app to control relay32s
What you need:
1PCS Power Supply
APP name: DIYmall Relay Control
iPhone: please search “DIYmall Relay Control” in APP store
Android: please find this apk file(Requires Android : 4.1 and up)
Power the relay32s
Input: 6V 0.6A (NOTE: if the board does notwork, please change power to 9V 1A or 12V 1A)
Enable Bluetooth in your phone
Then the relay32s will connect your phone automatically(No need to pair, because it use BLE)
You can click the 4 red button to turn on and turn off the 4 relays
Once click, it will show ON, and the buttons turn green
Then we try to connect via wifi. Please close the Bluetooth and connect the wifi “TEST”, password is 123456789
On the app, the connection will show wifi, and you can click the 4 red buttons to control the replay status
Video Link: https://youtu.be/xwVyXb_0DKM
Q: Does this module include a web server?
A: Yes， simple HTTP GET requests to 1) turn on/off module, 2) get states of relays in JSON format
Q: Can the module be controlled by a browser on a PC (Firefox / Windows)?
A: Yes. http://192.168.1.1/h1 (activate relay 1), http://192.168.1.1/l1 (deactivate relay 1), http://192.168.1.1/j (JSON format, information on all relay states)
Q: Can the module operate in client state, and connect to my existing AP, so I can control it over my existing LAN?
A: AP only, but can send the firmware to the user to modify easily to add to client state if the user is advanced (just need usb-to-serial). Requires firmware change.
Q: And then, using port forwarding, can I control if over WAN?
A: If you do the above firmware change and you set up the relay client as the DMZ, yes
Q: Can I change wifi password?
A: Yes, you can change password by modifying the firmware, change this line:
Q: Does this work with Google home?
A: Google home – no, but they could potentially plug into IFTTT with firmware changes
Q: How to control relays with my own program?
1. Connect to hotspot (ssid=TEST, password=123456789).
2. Use http://192.168.1.1/j for JSON output to obtain relay states.
3. Change relay states: http://192.168.1.1/h1 (‘high’, relay 1 – on) or http://192.168.1.1/l1 (‘low’, relay 1 – off).
Q: How to change the firmware?
- Install esp-idf. http://esp-idf.readthedocs.io/en/latest/get-started/
- Modify firmware (https://github.com/cyoung/esp32-webserver/blob/master/main/main.c) to add your SSID and password.
- Compile firmware.
- Flash with the ESP32-Flasher-GUI http://iot-bits.com/esp32/esp32-flash-download-tool-tutorial/
Q: Can the Bluetooth pair with multiple phones? And can it stay paired
A: It can work with multiple phones on Bluetooth
It actually doesn’t pair because it uses BLE
Q: Can the firmware be updated with a raspberry pi?
A: No, can’t be. best to use CP2102 dongle
website link http://www.diymalls.com/esp32-wifi-bluetooth-relay-module?search=relay
Any question please email firstname.lastname@example.org