ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
zerplerp
Normal user
Posts: 10
Joined: 12 Feb 2024, 19:21

ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#1 Post by zerplerp » 12 Feb 2024, 19:28

Hi all,

Sortof new to the hobby here but I have hit a wall with this one.

I foud the two parts mentioned in the titleas a solution that works out of the box. I was hoping to control the relay via MQTT on NodeRED but I cant seem to get it to work.
The LC-Tech board has its own firmware?
When powered the ESP-01 creates a connectable wifi network "AI-Thinker-..." but when i connect to it nothing happens?!

ANY guidance will be helpful.

Thanks

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#2 Post by TD-er » 12 Feb 2024, 20:36

If it starts with such a WiFi network, then I guess you did not successfully flash ESPEasy on the module, did you?

zerplerp
Normal user
Posts: 10
Joined: 12 Feb 2024, 19:21

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#3 Post by zerplerp » 13 Feb 2024, 07:59

I’ve been having trouble with the “Flash Download Tools” from Espressif.com but I guess I’ve been unsuccessful. Is there a different software that would be easier to use?

Also, I’ve been using this USB-Adaptor with the switch on the “UART” side. (İts the red one 32768635202.html)

User avatar
Ath
Normal user
Posts: 3521
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#4 Post by Ath » 13 Feb 2024, 08:42

zerplerp wrote: 13 Feb 2024, 07:59 Is there a different software that would be easier to use?
The Web flasher at:
https://td-er.nl/ESPEasy/
(From Chrome or Edge you can flash an ESP connected to your computer)
/Ton (PayPal.me)

zerplerp
Normal user
Posts: 10
Joined: 12 Feb 2024, 19:21

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#5 Post by zerplerp » 13 Feb 2024, 09:07

Ath wrote: 13 Feb 2024, 08:42
zerplerp wrote: 13 Feb 2024, 07:59 Is there a different software that would be easier to use?
The Web flasher at:
https://td-er.nl/ESPEasy/
(From Chrome or Edge you can flash an ESP connected to your computer)
I'm getting this error?;

Forbidden
You don't have permission to access this resource.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


But I did find this;

https://github.com/Grovkillen/ESP_Easy_Flasher

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#6 Post by TD-er » 13 Feb 2024, 12:41

Can you send me the first 2 numbers of your IP-address?
I have setup quite a large IP block list as I have about 3 TByte/month of incoming attack requests.

But quite a lot of IP-blocks have been resold so it might be a bit too course and blocking non-hack attempts too.

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#7 Post by chromo23 » 13 Feb 2024, 12:43

zerplerp wrote: 13 Feb 2024, 09:07 I'm getting this error?;
I have same issue that's why i am using a tool from the competition. :D (The web flasher is a little picky when you are not living in the Netherlands.. ;) )
https://github.com/tasmota/tasmotizer

zerplerp
Normal user
Posts: 10
Joined: 12 Feb 2024, 19:21

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#8 Post by zerplerp » 13 Feb 2024, 13:53

TD-er wrote: 13 Feb 2024, 12:41 Can you send me the first 2 numbers of your IP-address?
I have setup quite a large IP block list as I have about 3 TByte/month of incoming attack requests.

But quite a lot of IP-blocks have been resold so it might be a bit too course and blocking non-hack attempts too.
external ip? if so currently its 101.188

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#9 Post by TD-er » 13 Feb 2024, 14:20

Hmm I don't see any of those in my block list.
Lots starting with 188.

Anyway based on the time you posted your message I could see some attempts in the error.log file and removed those from my block list.

Can you try again to see if the web flasher now works for you? (or at least is accessible)


When using the ESP01S:
You need to have GPIO-0 pulled down to GND before powering it on to enter flash mode.
And remember to pick an 1M build as the ESP01-S is an ESP8266 with 1M of flash.

zerplerp
Normal user
Posts: 10
Joined: 12 Feb 2024, 19:21

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#10 Post by zerplerp » 13 Feb 2024, 14:27

TD-er wrote: 13 Feb 2024, 14:20 Hmm I don't see any of those in my block list.
Lots starting with 188.

Anyway based on the time you posted your message I could see some attempts in the error.log file and removed those from my block list.

Can you try again to see if the web flasher now works for you? (or at least is accessible)
same error :/

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#11 Post by TD-er » 13 Feb 2024, 14:58

Are you using some TOR network or VPN?
It is a completely different IP range now and the strange part is, I can't find it in my block list.

There are some dynamic filters active for TOR and VPN network IP ranges, based on hack activity.

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#12 Post by TD-er » 13 Feb 2024, 15:04

Ah found one block, if you still have the same IP, it should now work.

zerplerp
Normal user
Posts: 10
Joined: 12 Feb 2024, 19:21

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#13 Post by zerplerp » 13 Feb 2024, 15:49

TD-er wrote: 13 Feb 2024, 15:04 Ah found one block, if you still have the same IP, it should now work.
YES, I'm connected! thank you!

So here is my first big brainfart, I'm getting a failed to initialize error.

I've got to do some troubleshooting. Any variant reccomendations for an ESP-01 to be controlled via MQTT?

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#14 Post by TD-er » 13 Feb 2024, 16:15

Did you connect GPIO-0 to GND and then power on the ESP01S board?
Did you select a build made for ESP8266?
Did you select a build for 1M flash size?

zerplerp
Normal user
Posts: 10
Joined: 12 Feb 2024, 19:21

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#15 Post by zerplerp » 13 Feb 2024, 16:28

TD-er wrote: 13 Feb 2024, 16:15 Did you connect GPIO-0 to GND and then power on the ESP01S board?
Did you select a build made for ESP8266?
Did you select a build for 1M flash size?
I've done all of these, great success!

Now I can connect to it via internet under "ESP-Easy", but whats the password?

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#16 Post by TD-er » 13 Feb 2024, 16:32

default password is "configesp"

zerplerp
Normal user
Posts: 10
Joined: 12 Feb 2024, 19:21

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#17 Post by zerplerp » 13 Feb 2024, 16:53

TD-er wrote: 13 Feb 2024, 16:32 default password is "configesp"
Thank you again you beautiful human being!

I'm gonna start playing around with this. In the meantime, Any tips on configuration to work with MQTT?

Also, how can I configure it after I connect the module to my Wifi?

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#18 Post by TD-er » 13 Feb 2024, 17:06

Have a look at the documentation page: https://espeasy.readthedocs.io/en/lates ... locks.html
I linked here first the functional blocks overview.

In short, you can under "Devices" add some tasks which can generate sample data.
This can be sent to a "controller".
There are several controllers for MQTT, but I guess the most generic one is the Home Assistant/OpenHAB one.

This one can also receive commands via MQTT, as is described here: https://espeasy.readthedocs.io/en/lates ... #c005-page

zerplerp
Normal user
Posts: 10
Joined: 12 Feb 2024, 19:21

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#19 Post by zerplerp » 13 Feb 2024, 17:33

So would i have to add multiple tasks?

ie;

To recieve MQTT command from controller (Mosquitto set up on RPi)
To control relay On/Off (LC Tech Relay)
TO send On/Off Status via MQTT controller

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#20 Post by TD-er » 13 Feb 2024, 19:46

You can control the relay state via MQTT commands, quite literally how it is described in the "C005" controller documentation I linked.

How do you need the relay state to be reported via MQTT?
When it changes?

I think it is by far the most elegant solution to act on changes via rules and then publish to some topic the current state.
Do you also need to toggle the state of a relay via some button?

zerplerp
Normal user
Posts: 10
Joined: 12 Feb 2024, 19:21

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#21 Post by zerplerp » 13 Feb 2024, 20:36

TD-er wrote: 13 Feb 2024, 19:46 You can control the relay state via MQTT commands, quite literally how it is described in the "C005" controller documentation I linked.

How do you need the relay state to be reported via MQTT?
When it changes?

I think it is by far the most elegant solution to act on changes via rules and then publish to some topic the current state.
Do you also need to toggle the state of a relay via some button?
2 Questions;

1- How can I configure the ESP Module once its connected to my Wifi Network?
2- I see the "C005" documentation, but I'm confused as to how to implement the code shown there in the interface I see when connected to the ESP Module

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP-01 w/ ESP8266 Relay V2.3Relay Troubleshooting

#22 Post by TD-er » 13 Feb 2024, 23:29

As soon as it is connected to WiFi, you should be able to open the web interface of ESPEasy in your browser.

Maybe it is best to start playing around first and trying to toggle some relay via the command line on the tools page.

Code: Select all

gpio,1,0 // Set GPIO pin 1 to 0
gpio,1,1 // Set GPIO pin 1 to 1
Just assuming your relay is connected to GPIO-1.

Then you can try to convert those commands to MQTT commands (almost literally shown as example in the docs I linked)
So you need to add a MQTT controller first (controller tab in the web browser), set the hostname of the MQTT broker and enable the controller.
Make sure to look for the correct subscribe topic in the MQTT controller settings.

You may want to use some MQTT client tool like MQTT Explorer (or similar tool) so you can publish to topics and see which topics get a message published to.
ESPEasy will send some message to the LWT topic, so you can see this via your MQTT client software.

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests