as you can see in my mosquito_sub, I have a “\n”, the one I’ve put in home-assistant.
I’m losing one ping packet, so I suppose ESP is rebooting. But don’t know why because I’m using ‘\n’ as asked.
I have the same behavior with a direct publish on mqtt with ‘\n’ :
Last News :
I’ve tried to debug without success. I have a an Exception(28) with a stack trace every time i use swSer. I change the SoftwareSerial lib with the one design for ESP : https://github.com/plerup/espsoftwareserial but i have the same problem.
Does your unit transmit an RF code before crashing?
Also, what pins are you connecting to on your NodeMCU? some pins are a bit special and might cause issues I think. Will confirm what I am using also tonight.
Hi
I tried this project too, but replaced my 433 mhz devices with ESP8266/Sonoff instead.
I didn`t get this working when trying, but found this statement in the RFlink Hub page (Component): Due to different logic levels, a voltage level shifter is required between the 3.3V NodeMCU and 5V Arduino MEGA 2560 pins.
I cant see that phileep mentions this, but if you dont have on installed, maybe the ESP restart or maybe the voltage level shifter was reason why I could not get this working
hmm. Not sure. I think lm1117 could interupt/change the signals. Maybe a electronics guy could help us.
When looking up the type I bought I found this in additional information part: The level converter is very easy to use. The board needs to be powered from the two voltages sources (high voltage and low voltage) that your system is using. High voltage (5V for example) to the ‘HV’ pin, low voltage (3.3V for example) to ‘LV’, and ground from the system to the ‘GND’ pin.
I think I found out why I didnt get it to work… I only supplied 5v and thought I could use the LV side for other stuff…
I’ve made a level shifter for both side, but it doesn’t help.
I have continue my debug, and if I remove the wire from TX Arduino to RX ESP, it works. I can’t read data from RFLink, but activate is OK et non crash. So I suppose the problem is when RFLink say OK to the command I sent.
–
EDIT:
@phileep@Rune Found It !! I will propose a pull request on gitHub.
The problem is that RFLink send 20;xx;OK; when you send a command. (New in R46 ? if you dont have the problem ? )
The void parseData crash when it tries to get RFData. So if RFName == OK => return; to exit void. And ESP is running fine. I will add the fix for \n too. I hope I will get time this WeekEnd to propose it.
However it is only on the communications in to the ESP8266, and the NODEMCU units seem tolerant, especially to such short bursts.
If you want to be sure, cheapest is a voltage divider on the TX from the MEGA as that is 5v logic. google voltage divider - you only need 2 resistors of different ratings to get the voltage down to the proper 3.3v range for the ESP.
The proof you don’t need on is that all the inward signals have been working fine. ie we can get data from the RFLink mega without the shifter.
I thought I give this a try but I’m stuck at the point of trying to login to MQTT for the lack of mqtt username and password within the Esp sketch, need your help.
thank you.
The sketch is not setup currently for a mqtt password.
You need to add it to the sketch.
I think it is as simple as adding the username & password to the mqtt client conect statement at about line 125
change if (client.connect(client_name, willTopic, 0, willRetain, willMessage)) {
to if (client.connect(client_name, username, password, willTopic, 0, willRetain, willMessage)) {
Where you define variables in the sketch or input directly your own username and password in this statement.
I did make a pull request a few months ago, to fix stability, negative temperatures and Mqtt authentication. It doesn’t appear to have been merged yet.
Guys, it is not clear to me. I connected my Arduino with Rflink to NodeMCU with ESP-LINK. Esp-Link is supporting:
MQTT
Serial over Wifi
How do I connect with the latter to Home Assistant?
The documentation is missing how to setup Esp-Link, port etc.? While there is an information that it has been tested with Esp-Link:
Tested with Wifi serial bridge [esp-link V2.2.3](https://github.com/jeelabs/esp-link/releases/tag/v2.2.3) running on a NodeMCU (ESP8266 Wifi module) with ESP8266 TXD0 (pin D10) and RXD0 (pin D9) connected to Arduino MEGA 2560 RX (Pin 2) and TX (Pin 3) respectively.