Devantech ESP32LR88 Manual de usuario

ESP32LR88 User Manual v1.6
Table of Contents
Changes from v1.5 to v1.6.........................................................................................................................4
Overview....................................................................................................................................................4
Control Protocols.......................................................................................................................................4
WiFi............................................................................................................................................................4
Configuration.............................................................................................................................................4
SB Configuration Commands.................................................................................................................5
ST Status. Return the system status.......................................................................................................5
RB ReBoot............................................................................................................................................6
IP Sets the modules IP address..............................................................................................................6
SB Sets the SuBnet mask......................................................................................................................6
GW Sets the GateWay address..............................................................................................................6
PD Sets the Primary DNS.....................................................................................................................6
SD Sets the Secondary DNS.................................................................................................................7
SS This sets the SSID............................................................................................................................7
PW Sets your networks WIFI password................................................................................................7
PA Sets the TCP/IP port number for the ASCII commands..................................................................7
AP Sets the ASCII password.................................................................................................................8
MS Sets the MQTT broker address.......................................................................................................8
MD Sets the MQTT ID for this module................................................................................................8
MP Sets the MQTT broker’s port..........................................................................................................8
M Sets the MQTT user name (V1.6+)................................................................................................8
MW Sets the MQTT password (V1.6+)................................................................................................9
R1-R8 Sets the MQTT topic this relay is subscribed to........................................................................9
N1-N8 Sets the MQTT topic this Input will publish to.........................................................................9
TCP/IP Commands...................................................................................................................................10
SR Set Relay........................................................................................................................................10
GR Get Relay......................................................................................................................................10
GI Get Input.........................................................................................................................................11
AL Get All 8 inputs..............................................................................................................................11
Password..............................................................................................................................................11
HTML Commands...................................................................................................................................12
Webpage...................................................................................................................................................13
Schematics...............................................................................................................................................14
CP .....................................................................................................................................................14
Power Supply......................................................................................................................................15
Relay Outputs......................................................................................................................................16
Digital Input........................................................................................................................................17
PCB dimensions.......................................................................................................................................18
Appendix 1...............................................................................................................................................19
Programming the ESP32LR88 with Arduino studio...........................................................................19
Notes........................................................................................................................................................25
Copyright © 2021, Devantech Ltd.
ll rights reserved. www.robot-electronics.co.uk 2

ESP32LR88 User Manual v1.6
Changes from v1.5 to v1.6
Setup commands M and MW were added to provide an MQTT username and password.
Overvie
The ESP32LR88 is a WIFI connected relay module using the popular ESP32.
It provides 8 relays capable switching up to 16Amps and 8 digital inputs with pull-ups than can
interface directly with volt free contacts. The normally open relay contacts have snubbers fitted across
them, and can drive inductive loads such as contactors and solenoids.
Power for the board is 12v dc, which can be provided by a standard universal wall power supply. A 1A
or greater supply should be selected.
Control Protocols
1. Simple plain text commands sent to the module.
2. HTML commands
3. MQTT
4. A built in webpage
WiFi
The ESP32LR88 connects via 2.4GHz WiFi to your network. Therefore it must be located in a position
where it gets a good WiFi signal. The module should not be enclosed in a metal box/cabinet as this will
shield the WiFi signal.
You can check the signal level by looking at the RSSI figure which is reported by the ST (STatus)
command.
Configuration
The ESP32LR88 is configured by connecting a SB cable to your PC and running a terminal program.
PuTTY is a good option if you don’t have any other preferences.
The serial port should be set to 115200 baud, 8 bit, 1 stop, no parity, no flow control.
Copyright © 2021, Devantech Ltd.
ll rights reserved. www.robot-electronics.co.uk 3

ESP32LR88 User Manual v1.6
USB Configuration Commands
ST Status. Return the system status
Status:
Firmware Version: 1.2
IP: 0.0.0.0 (192.168.0.48)
Subnet: 255.255.255.0
Gateway: 192.168.0.1
Primary DNS: 192.168.0.1
Secondary DNS: 8.8.4.4
SSID: ********
Password: ********
SCII TCP Port: 17126
RSSI: -62
MQTT Server: 192.168.0.121
MQTT Port: 1883
MQTT ID: ModuleESP1
MQTT User: myUsername
MQTT Password: ********
Relay1 Topic: R1Topic
Relay2 Topic: R2Topic
Relay3 Topic: R3Topic
Relay4 Topic: R4Topic
Relay5 Topic: R5Topic
Relay6 Topic: R6Topic
Relay7 Topic: R7Topic
Relay8 Topic: R8Topic
Input1 Topic: myNew/Topic
Input2 Topic: myNew/TopicB
Input3 Topic: N3Topic
Input4 Topic: N4Topic
Input5 Topic: N5Topic
Input6 Topic: N6Topic
Input7 Topic: N7Topic
Input8 Topic: N8Topic
When the IP address is set to 0.0.0.0 this means that the IP address is being provided by
your networks DHCP server. In that case the assigned IP address is also provided, as
above.
When the SSID and Password are setup, they will be displayed until the next reset, fter
that they will only show as ********.
Copyright © 2021, Devantech Ltd.
ll rights reserved. www.robot-electronics.co.uk 4

ESP32LR88 User Manual v1.6
RB ReBoot
This will restart the module. It may produce a lot of random characters as the
ESP32’s boot logging runs at a different baud rate. If it succeeds in connecting to your
network it will report the IP address.
Re-Booting.. .
崳⸮⸮⸮⸮⸮⸮⸮⸮#XL###C 5)5) ia b⸮⸮⸮⸮⸮ ⸮⸮⸮ ⸮ ⸮⸮⸮⸮⸮⸮⸮⸮奅# UY o ##i#U 5⸮⸮*⸮⸮ ⸮ ⸮⸮⸮⸮⸮ ⸮* Q⸮ ⸮⸮⸮⸮⸮
WiFi connected.
IP address:
192.168.0.6
IP Sets the modules IP address
Enter IP followed by the required IP address. Entering address 0.0.0.0 means the IP will be
obtained from your networks DHCP server. The new IP address will take effect after the
next re-boot.
IP “192.168.0.123”
OK. Saved IP ddress: 192.168.0.123
SB Sets the SuBnet mask
SB “255.255.255.0”
OK. Saved Subnet Mask: 255.255.255.0
GW Sets the GateWay address
This is normally the IP address of your router.
GW “192.168.0.1”
OK. Saved Gateway ddress: 192.168.0.1
PD Sets the Primary DNS
The can be the IP address of your router which will then use your ISP provided DNS.
You can also specify the DNS such as 8.8.8.8 for Googles DNS server.
PD “192.168.0.1”
OK. Saved Primary DNS: 192.168.0.1
Copyright © 2021, Devantech Ltd.
ll rights reserved. www.robot-electronics.co.uk 5

ESP32LR88 User Manual v1.6
SD Sets the Secondary DNS
The can be the IP address of your router which will then use your ISP provided DNS.
You can also specify the DNS such as 8.8.4.4 for Googles DNS server.
SD “8.8.4.4”
OK. Saved Secondary DNS: 8.8.4.4
SS This sets the SSID
The SSID is the public name of your WIFI network Enter your WIFI’s SSID here.
SS “Devantech”
OK. Saved SSID: Devantech
PW Sets your net orks WIFI pass ord
PW "K]~kCZUV*UG 6SG~"
OK. Saved Password: K]~kCZUV*UG 6SG~
PA Sets the TCP/IP port number for the ASCII commands
P 17126
OK. Saved SCII port number: 17126
Copyright © 2021, Devantech Ltd.
ll rights reserved. www.robot-electronics.co.uk 6

ESP32LR88 User Manual v1.6
AP Sets the ASCII pass ord
P "MySecretPassword"
OK. Saved sciiPassword: MySecretPassword
MS Sets the MQTT broker address
MS “192.168.0.121”
OK. Saved MQTT Server: 192.168.0.121
MD Sets the MQTT ID for this module
MS “UniqueModuleName”
OK. Saved MQTT ID: UniqueModuleName
MP Sets the MQTT broker’s port
Normally, this should be set to 1883.
mp 1883
OK. Saved MQTT port number: 1883
If you are not using MQTT, set the port to 0. This will turn off MQTT, otherwise it will continuously
try to connect if there is no MQTT broker.
MU Sets the MQTT user name (V1.6+)
This is for MQTT brokers that are setup to require a username and password. For open MQTT
brokers that do not require a user name/password, these may be ignored.
MU “myUsername”
OK. Saved MQTT User: myUsername
Copyright © 2021, Devantech Ltd.
ll rights reserved. www.robot-electronics.co.uk 7

ESP32LR88 User Manual v1.6
MW Sets the MQTT pass ord (V1.6+)
This is for MQTT brokers that are setup to require a username and password.
MW “mySuperSecretPassword”
OK. Saved MQTT Password: mySuperSecretPassword
R1-R8 Sets the MQTT topic this relay is subscribed to
R3 "Workshop/Heater"
OK. Saved Relay 3 Topic: Workshop/Heater
In use, the payload for relay topics should be a string with the first character set to ‘0’ or ‘1’
( SCII characters 0x31/0x30).
N1-N8 Sets the MQTT topic this Input ill publish to
N2 "Workshop/Heater"
OK. Saved Input 2 Topic: Workshop/Heater
The payload generated for input topics is a string with the first character set to ‘1’ if the input is
open or unconnected, and ‘0’ if the input pins are shorted. ( SCII characters 0x31/0x30).
Copyright © 2021, Devantech Ltd.
ll rights reserved. www.robot-electronics.co.uk 8

ESP32LR88 User Manual v1.6
TCP/IP Commands
The ESP32LR88 has a built in TCP/IP command set which allows you to control the module
remotely.
ll commands are sent using plain SCII text. PuTTY is a good cross platform terminal program to
use for testing. The TCP/IP port is the one you set-up with the P command during USB
configuration. Do not use port 80 as that is reserved for the HTML commands and Webpage.
SR Set Relay
This is used to turn a relay on or off
To turn Relay 1 on:
SR 1 1
The first number is the relay number from 1 to 8.
The second number is 1 or 0, on or off.
So turn turn relay 1 off again:
SR 1 0
The command will respond with ok or fail.
SR 1 1
ok
SR 1 6
fail < 6 is not valid, only 1 or 0 for on/off
SR 9 1
fail < relay 9 does not exist.
GR Get Relay
Will return the state of the relay.
To get the status of relay 6:
GR 6
1
GR 6
0
GR 9
fail < relay 9 does not exist.
Copyright © 2021, Devantech Ltd.
ll rights reserved. www.robot-electronics.co.uk 9

ESP32LR88 User Manual v1.6
GI Get Input
Will return the status of an input.
GI 2
0 Input 2 is low (Green Led is on)
GI 2 Input 2 is high (Green Led is off)
1
GI 9
fail Only 8 inputs available
AL Get All 8 inputs
L
11111011 Here, Input 6 is low, all others are high.
Inputs are numbered from left to right, 1 to 8.
Pass ord
From version 1.5 we have added a password to the SCII commands, this can be set with the P
command over the USB connection. The password is passed as a prefix to any command.
For example if a password is set and relay 1 is required to be turned on, start with the password
(example password of 1234), then the command, so it becomes:
1234 SR 1 1
Copyright © 2021, Devantech Ltd.
ll rights reserved. www.robot-electronics.co.uk 10
Tabla de contenidos
Otros manuales de Relé de Devantech

Devantech
Devantech ESP32LR42 Manual de usuario

Devantech
Devantech ESP32LR20 Manual de usuario

Devantech
Devantech dS3484 Manual de usuario

Devantech
Devantech dS378 Manual de usuario

Devantech
Devantech tcp184 Manual de usuario

Devantech
Devantech dS2824 Manual de usuario

Devantech
Devantech ESP32SR88 Manual de usuario

Devantech
Devantech ETH8020 Guía

Devantech
Devantech dS2824 Manual de usuario

Devantech
Devantech dS2832 Manual de usuario


















