Hi @TD-er,
the issue is more complicated. Let me start from the beginning.
I have an electrical box in the wall that is between living room and kitchen. In that box I have Wemos D1 and two sensors going to each room, the max cable length is 30 cm.
I'm using pull-up resistor (4k7)
I've created another screenshot of the graph:
The blue line is the value from my MQTT sensor and the green is from the template sensor. I'm using a template sensor to calibrate value in the room (I need to subtract 1.9 to have the correct value). Because the sensor is unavailable for some time the value is 0 and after subtraction, it is -1.9. This is specific to Home Assistant, but after you do that for the first time it is more intuitive
The problem is that the wemos D1 is losing connection with MQTT server. I was monitoring LWT topic and I saw it is sending offline and offline messages. The problem is I don't know why this behavior is happening.
This is how the sensor is configured in Home Assistant
Code: Select all
- platform: mqtt
state_topic: "Temp1/Sypialnia/Temperature"
name: "sypialnia_temperature"
unit_of_measurement: "°C"
expire_after: 180
availability_topic: "Temp1/status"
payload_available: "Online"
payload_not_available: "Offline"
so when LWT topic gets `Offline` message the whole sensor is offline and I get those spikes (bad readings).
I think there is something wrong with the wemos or my power source or wifi or config. The power supply is very good. I'm using Wean Well 5V 3A DIN Rail power supply and using CAT5 wires.
I'd like to monitor wifi and MQTT parameters on wemos and report them at specific intervals to my server.
I also want to send log info and reset reason.
This way I'll be able to check what is going on and what was the reset reason.
Sadly I can't go there to check the electrical connections, but I can use Team Viewer to connect to my parent's laptop and reconfigure the sensors. The offline messages aren't happening regularly so it will be hard to wait a couple of hours for the problem to occur, but if the crash report and logs can be sent to my server I won't lose them and will be able to investigate.
I'll try to log in today to my parent's network and will make screenshots and get version info and configs.
I hope this is a more clear image of the problem I have
