tasmota mqtt

21 views
Skip to first unread message

joel gerardi

unread,
Aug 15, 2026, 3:43:03 PM (12 days ago) Aug 15
to TasmotaUsers
I am using tasmota with home assistant.  I have a pool control where i set my desired temp to mem1 and the current temp is monitored with a ds18x20.  It is my understanding that mem1 will always retain its value even after a reboot.  For some reason, every couple of days mem1 takes a value of "null".  i cant seem to figure out what would be causing this.  I display the value on my dashboard using a sensor from an mqtt message /stat/poolcontrol/result {mem1 "73").  I just can't seem to find what is causing this to go null.   The stat/poolcontrol/result is not retained.  Is there a way i can give this a retain flag in tasmota.

JG

Philip Knowles

unread,
Aug 15, 2026, 4:35:32 PM (12 days ago) Aug 15
to joel gerardi, TasmotaUsers
I presume you are running a rule as well. Can you share the rules? 
Mine gives a slightly differently formatted output
stat/Sonoff-Pump/RESULT = {"Mem1":"25"}

I use openHAB and it's case sensitive  reading MQTT messages - HA may not be

Phil

From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of joel gerardi <joelg...@gmail.com>
Sent: 15 August 2026 20:43
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: tasmota mqtt
 
I am using tasmota with home assistant.  I have a pool control where i set my desired temp to mem1 and the current temp is monitored with a ds18x20.  It is my understanding that mem1 will always retain its value even after a reboot.  For some reason, every couple of days mem1 takes a value of "null".  i cant seem to figure out what would be causing this.  I display the value on my dashboard using a sensor from an mqtt message /stat/poolcontrol/result {mem1 "73").  I just can't seem to find what is causing this to go null.   The stat/poolcontrol/result is not retained.  Is there a way i can give this a retain flag in tasmota.

JG

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/sonoffusers/e4b84b42-c36d-4f0e-8f2a-bf27ff807c31n%40googlegroups.com.

joel gerardi

unread,
Aug 16, 2026, 12:39:19 PM (11 days ago) Aug 16
to TasmotaUsers
you are correct, my message format is the same:
12:27:47.484 MQT: stat/poolcontrol/RESULT = {"Mem1":"77"}.  I mistyped it.
Regarding tne rules:

All of these are included in "rule1"
Screenshot 2026-08-16 at 12.26.16 PM.png
Im sure the issue i am having is due to the mqtt messaging format.  I would rather use HA to send settings to the tasmota pool control as opposed to having HA actually control the tasmota.  My concern is if for some reason HA stops working (network/power/etc) the system will continue to operate.
Additionally the value of Var1 (current temp) is set by a sonoff th16. This is until i can figure out a way to monitor the pool temp with a ds18 connected directly to the ESP32 i am using as a main control. The pool equipment is quite a distance from the pool itself so at this point this is my best solution.  This somewhat negates the idea of having the control work without an active network or HA-MQTT but i do have a separate thermostat on the heater which i can use to set and absoulute high temp limit.

Philip Knowles

unread,
Aug 16, 2026, 11:46:42 PM (11 days ago) Aug 16
to joel gerardi, TasmotaUsers
There's a couple of things.
ClockTimer3 sets mem1 to mem3 but I can't see where you set mem3
The lines
mem1#state>=mem2 and
mem2#state<=mem1
seem to be the same thing
If mem1 greater than or equal to mem2  is essentially the same as if mem2 less that or equal to mem2
You're writing to mems a lot which will wear the memory out. Ideally you would only write to mems infrequently. In your case I would set the mems once (as a coarse control) and use vars for the fine tuning but use HA to reinstate the vars on a reboot of the ESP.
You also seem to be publishing stuff which Tasmota will already be sending (change in output state is sent automatically)  mems should be changing infrequently 
Are you having an issue considering a DS28B20 to the ESP32?



Sent: Sunday, 16 August 2026 17:39:18
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: tasmota mqtt
 
Reply all
Reply to author
Forward
0 new messages