nagius / remoterelay Goto Github PK
View Code? Open in Web Editor NEWRemoteRelay is an alternative ESP8266 firmware for the relay board made by LCTech-inc
License: GNU General Public License v3.0
RemoteRelay is an alternative ESP8266 firmware for the relay board made by LCTech-inc
License: GNU General Public License v3.0
Hi friend, I have the same relay, nice code, but during the first connection the AP mode does not connect on any device , I got messages like wifi connection temporary unavailable or cannot get IP address etc. It feels like AP mode is restarted due to appearance on my mobile phone. any ideas?
Hi friend, I have the same relay, nice code, but during the first connection the AP mode does not connect on any device , I got messages like wifi connection temporary unavailable or cannot get IP address etc. It feels like AP mode is restarted due to appearance on my mobile phone. any ideas?
The 4 channel relay available on AliExpress comes with firmware on the nuvoTon chip on the PCB that expects the ESP01 module to respond to AT commands, but this app does not.
If you add some simple code to lie to the nuvoTon, then it thinks the module is operating as it expects and will then accept the binary commands to switch the relays. IF the nuvoTon chip does not get a repsonse to the AT commands, it will not do anything when it receives the switching command bytes.
This solution was concocted after monitoring the communication between the ESP01 module and the nuvoTon chip on the relay module with a couple of USB-serial adapters.
// pretend to be an AT device here
if(Serial.available())
{
stringIn=Serial.readStringUntil('\r');
Serial.flush();// flush what's left '\n'?
if(stringIn!="")
{
if(stringIn.indexOf("AT+")>-1)
Serial.println("OK");
if(stringIn.indexOf("AT+RST")>-1)
{
// pretend we reset (wait a bit then send the WiFi connected message)
delay(1);
Serial.println("WIFI CONNECTED\nWIFI GOT IP");
}
}
}
On boot nuvoTon sends:
AT+CWMODE=1
AT+CWMODE=1
AT+RST
RemoteRelay+ responds with "OK" to every AT command and this to the AT+RST command
WIFI CONNECTED
WIFI GOT IP
Once the nuvoTon sees WiFi is connected, it thinks its going to start the webserver with:
AT+CIPMUX=1
AT+CIPSERVER=1,8080
AT+CIPSTO=360
Now it will accept the 4 byte commands to close and open all four relays. You'll have to add code for the extra two channels, but its a bit of easy copy and paste.
The logs seem fine and they are changing and responding to my commands, but the relays are not actually toggled at all.
I am dealing with this one: https://www.amazon.se/dp/B0BC28ZGH9/ref=pe_24982401_503747021_TE_SCE_3p_dp_1
This is the debug log:
[394.572] Channel 4 switched to on
[394.572] Sending payload A00401A5
Some extra debugging from a script i created:
Sending command: A00201A3
Error: [WinError 10061] No connection could be made because the target machine actively refused it
I am sure the current voids in the Logger src corresponds with the names in this arduino script but i do not know which ones are the right ones.
Hi sorry to ask, I am not an expert on http requests. what string http://192.168.1.14/ do i use to turn on relay 1
The board responds to requests such as http://192.168.1.14/settings but I cannot figure the correct syntax to turn on of relays.
Any help or nudge in right direction would be appreciated.
Thanks
I encountered the problem with single-channel relay from same manufacturer.
With debug=true
I was able to see that the chars A0 01 01 A2
were sent successfully. However, the relay did not switched on. I changed the baud rate to 9600.
Serial.begin(9600);
Now everything works perfectly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.