-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESPurna stops sending sensor data in MQTT messages. #398
Comments
Can you connect to the device via telnet while it is not sending messages to see the debug log? |
Original comment by Albert Weterings (Bitbucket: AlbertWeterings, GitHub: Unknown): The sensor error occurred out of nothing. the moment I connect to the web socked and request a page it recovers. |
Original comment by Albert Weterings (Bitbucket: AlbertWeterings, GitHub: Unknown): in the second log Sensor debug was on and the unit stopped responding. It is now in a state telnet is not possible anymore and web socked is also not working. It will need a hard reset now, as I'm not at home this has to wait. |
Original comment by Albert Weterings (Bitbucket: AlbertWeterings, GitHub: Unknown): I tried a other ESP8266 to this string of sensors, have set Sensor debugging on and off and now changed "define DS_PARASITE" to 0 as I use a external pull up resistor. Do you know the meaning of error number 5? |
Original comment by Albert Weterings (Bitbucket: AlbertWeterings, GitHub: Unknown): Discovered a small difference.. With "define DS_PARASITE" to 0 I see the message: [SENSOR] Error reading data from Dallas @ GPIO14 (error: 5) come by in the debug terminal but the unit recovers and continues. If "define DS_PARASITE" to 1 it never comes out of the error state. |
Original comment by Albert Weterings (Bitbucket: AlbertWeterings, GitHub: Unknown): I have been testing all kind of things replacing sensors, redo wiring changed timings in the OneWire library and so on. This is the result of what I learned and can come out handy for others having OneWire sensor problems. Cable length and type of cable: Kind of sensor network: Pull-up resistor: So my error messages are gone now having all sensors in a daisy chain on cat5 cable total length approximately 23 meters a 4k7 resistor at the far end and one 4k7 resistor near the controller resulting in a pull-up resistor of 2K35 Back to the issue I reported. It stays strange ESPurna gets in a sensor error 5 state and doesn't come out anymore until you open the web interface, as if opening the web interface is triggering a re-initialization of the sensors. It might be handy to reinitialize the sensors after multiple read error's on the other hand in that case faults with wiring and resistors or a bad sensor will not be seen as easy as the software is covering the error. So it is up to Xose to decide if re-initialization of the sensors is the right thing to implement. In my opinion a few comment lines in the DallasSensor.h file explaining the different error messages and possible solutions is sufficient. |
Great info. Thanks for sharing @AlbertWeterings. I've been working on making the sensor code more resilient and recover from error states. I'm doing two kinds of tests:
The first case is not working for all sensors at the moment. Specially not working for I2C sensors since they check the I2C address at boot. The second one would also be the case where the sensor errors for whatever reason. This is also - IMHO - the most common case since most of the times you will boot the device with the sensors attached or reboot it after attaching them. I've done some changes to the sensors code to enable this second scenario (also for the Dallas sensors). Right now the code is in the dev branch as I'm still testing it. My goal is to release the code with next version soon. |
Will be released with 1.12.2 |
Originally reported by: Albert Weterings (Bitbucket: AlbertWeterings, GitHub: Unknown)
I have SonOff with 5 Dallas 18B20 sensors running, it works fine as long as I keep the web interface open but after closing it somehow after a few hours the unit stops sending the sensor data via MQTT. When I logon to the web interface it resumes sending data.
Do you have some information on how to debug this situation to see what is going wrong?
The text was updated successfully, but these errors were encountered: