How to use app to control relay32s

 

How to use app to control relay32s

What you need:
1PCS Relay32s
1PCS Power Supply
APP name: DIYmall Relay Control

Download APP:
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

FAQ

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:
https://github.com/cyoung/esp32-webserver/blob/master/main/main.c#L123

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?
A:
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?
A:

  1. Install esp-idf. http://esp-idf.readthedocs.io/en/latest/get-started/
  2. Modify firmware (https://github.com/cyoung/esp32-webserver/blob/master/main/main.c) to add your SSID and password.
  3. Compile firmware.
  4. 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 sales@diymalls.com

 

How to program relay32s

 

          How to program relay32s

What you need:
1PCS Relay32s
1PCS USB to TTL Module (please install driver in your PCc)
1PCS Power Supply
4P Female to Female Dupont Cable

The pinout for program:

 

Connection:
Relay32s              USB to TTL Module             Terminal

GND  (J1)               GND(white)

TX                           RX(black)

RX                          TX(grey)

GND                                                                      -(yellow)
Connection as below :
 

Open FLASH_DOWNLOAD_TOOLS_V3.4.4 file

Open ESPFlashDownloadTool_v3.4.4.exe

Setting as below:

Click START

Connect the yellow cable

Connect Power supply:

Then it will show downloading….

Once download is finished, it will show

At last you open serial port software to test it, it will show as below

FAQ

Q: It shows error when program
A: 

  1. Please unplug the power supply, then plug it , until the software show downloading…
  2. Please exchange TX and RX and have try it again

website link  http://www.diymalls.com/esp32-wifi-bluetooth-relay-module?search=relay
Any question please email sales@diymalls.com