Git Product home page Git Product logo

remoterelay's People

Contributors

nagius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

remoterelay's Issues

AP does not connect

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?

AP does not connect

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?

4 channel relay requires AT command responses

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");
      }
    }
  }

image
image

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.

Not responding to the http requests.

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

Change Relay State

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

Proper baud rate

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.