Help trying to put an EQ3 valve using TASMOTA to work under HA

I am trying to integrate an EQ3 valve to Home assistant.
I have a tasmota device that connects to the valve, but it is not working properly.
I had only partial success.
I need help to get the valve reporting its state at regular intervals or when something is changed using its buttons.
It now answers commands but do not report the state at regular intervals or when you change something.
I have been plying with BLE options and TRV commands.
My current config in the autoexec.bat is this:

ledState 7

SetOption19 1
BLEAlias xxMACxxx=salajuegosRad
BLEAddrFilter 1
BLEPeriod 60
TRVOnlyAliased 1
TRVPeriod 60

The valve is discoverd by BLE (the provided mac addrs was get activating BLE scanning in the user interface) and rcognized by the trv command

10:51:16.862 CMD: trv devlist
10:51:16.874 MQT: stat/salajuegosTerm/EQ3 = {"devices":{"XXXMACXXX":-73}}
10:51:16.878 MQT: stat/salajuegosTerm/RESULT = {"trv":"Done"}

I can get status, but the documented trv xxx state gives an error.

10:53:46.380 CMD: trv xxxMACxxx state
10:53:46.386 EQ3 invalid
10:53:46.393 MQT: stat/salajuegosTerm/RESULT = {"trv":"invcmd"}

I have to provide a dummy 1 parameter in order to get it working.

10:53:49.959 CMD: trv xxMACxxx state 1
10:53:49.966 EQ3 queued
10:53:49.973 MQT: stat/salajuegosTerm/RESULT = {"trv":"queued"}
10:53:53.565 MQT: stat/EQ3/xxxMACxxx= {"cmd":"state","result":"ok","MAC":"xxxMACxxx","tas":"salajuegosTerm","RSSI":-71,"stattime":39233,"temp":16.0,"posn":0,"mode":"auto","hassmode":"auto","boost":"inactive","dst":"set","window":"closed","state":"unlocked","battery":"GOOD","holidayend":"00-00-00 00:00","windowtemp":12.0,"windowdur":15,"day":19.0,"night":16.0,"offset":0.5}
10:53:53.612 MQT: tele/salajuegosTerm/BLE = {"BLEOperation":{"opid":"8","stat":"7","state":"DONENOTIFIED","MAC":"xxxMACxxx","u":"2","svc":"3e135142-654f-9090-134a-a6ff5bb77046","char":"3fa4585a-ce4a-3bad-db4b-b8df8179ea09","notifychar":"d0e8434d-cd29-0996-af41-6c90f4e0eb2a","write":"03000000000000000000000000000000","notify":"020108000420000000001803262008"}}

But the stat is not updated every 60 seconds as configured by trvperiod, and there is no tele/ MQTT topic from the valve either.

Any idea what is going on?
I have been trying bleMode options and bleperiod with no success.

Hi
Still going at it then? Frustrating when everybody else sets it up and it all runs smoothly, but not you. That’s the best time to learn in HA.


Once I ran an active scan I disable scan in tasmota.

I don’t use Blealisa. When I try BLEperiod in tasmota consol it says {“BLEPeriod”:“Done”}

setoption19 0
BLEAddrFilter1 0
TRVPeriod 150

I have ESP32 on different floors(thick concrete) and use ESP32 with external antennas as very poor reception on ESP with just built in antenna on the PCB.

11:47:41.793 MQT: tele/GroundFloormasterU/BLE = {"BLEOperation":{"opid":"227","stat":"-11","state":"FAILCONNECT","MAC":"001A2212
11:47:50.231 BLE: failed to connect to device
11:47:50.795 EQ3 001A221299EF: trv operation failed - retrying -11
11:47:50.809 MQT: tele/GroundFloormasterU/BLE = {"BLEOperation":{"opid":"228","stat":"-11","state":"FAILCONNECT","MAC":"001A2212
11:47:56.789 BLE: failed to connect to device
11:47:57.749 EQ3 001A221299EF: trv operation failed - retrying -11
11:47:57.764 MQT: tele/GroundFloormasterU/BLE = {"BLEOperation":{"opid":"229","stat":"-11","state":"FAILCONNECT","MAC":"001A2212
11:48:00.797 BLE: failed to connect to device
11:48:01.769 EQ3 001A221299EF: trv operation failed - no more retries -11

Even then device doesn’t always connect straight away. Eventually does in background.

1 Like

And another thing. Go back and check all the mqtt spelling. I was messing around with my ESP and changed a u to a U in the mqtt section and it was treated as a different topic.

1 Like

Yes, quite frustrating, but I have discoverd the problem:
my devices are in an isolated lan, so there was no NTP server and the time in the device was not stablished.

I discovered it trying to stablish a cron work in the tasmota device to poll the valve and refresh the valve state at regular intervals (exaclty what trv does at TRVPeriods).
With the help of sfromis in discord, we discoverd that the problem or cron not working was there were no correct time in the device.
After configuring a NTP server an set it in tasmota, cron worked correctly.
And it made work TRV polls too.

Now it is working.

!!! note “about TRVPeriod and RTC”

In order of TRVPeriod to work and get the valves polled at regular intervales, you need to have the time and date of the tasmota device correctly configured, let it be using an RTC (real time clock) device connected to your tasmota or using NTP (Network Time Protocol).
To configues by default some known NTP servers, so usually the device would have its time automaticlly configured.
But if your device is connected to a local network isolated from internet, it won't get access to the configured NTP servers.
So you need to configure an NTP server in a device that is always running and connected to the same network as the TASMOTA device.
Good candidates for that are your router (if it has the option to activate an NTP server) or the device your are using for home automation (if you are using one).
Even if you have configured your TASMOTA device as a DHCP client in order to get the IP at boot, and your DHCP server is configured to set the NTP server to clients, TASMOTA devices do not admit that option, so you have to set the locall NTP server using `NTPserver`
1 Like

Glad you got there. That’s useful advice for someone else coming along with the same problem.

1 Like