FHEM > English Corner

tasmota MQTT EQ3BT devices

(1/4) > >>

kroonen:
Hoi,

I have an ESP32 flashed with tasmota to connect to EQ3 bluetooth devices. I can connect to the devices, now I want to intgrate it also with fhem

I got this:


--- Code: ---define Zolderkamer_thermostaat dummy
setuuid Zolderkamer_thermostaat 6168848e-f33f-7999-a5ef-5ea28c7144db4ef8
attr Zolderkamer_thermostaat group Klimaat
attr Zolderkamer_thermostaat mqttSubscribe state:stopic={"stat/EQ3/EQ3Zolderkamer"}
attr Zolderkamer_thermostaat readingList tele/EQ3/EQ3Zolderkamer/LWT:.* LWT\
    stat/EQ3/EQ3Zolderkamer:.* { json2nameValue($EVENT) }
attr Zolderkamer_thermostaat room Zolder
attr Zolderkamer_thermostaat setList state:14.0,14.5,15.0,15.5,16.0,16.5,17.0,17.5,18.0,18.5,19.0,19.5,20.0,20.5,21.0,21.5,22.0,22.5,23.0
attr Zolderkamer_thermostaat webCmd state

--- Ende Code ---

I only get this as state, so not yet ready good, I don't get de json reformatted as single values


--- Code: ---{"cmd":"poll","result":"ok","MAC":"001A220B5533","tas":"Rolluikzolder","RSSI":-63,"stattime":1634241933,"temp":17.0,"posn":0,"mode":"manual","hassmode":"idle","boost":"inactive","dst":"set","window":"closed","state":"unlocked","battery":"GOOD"}

--- Ende Code ---

Beta-User:
 :o dummy + readingList in MQTT environment = strange brew, especially in combination with an MQTT_GENERIC_BRIDGE that seems to be working in the background ;D .

I'd recommend to go for the "pure MQTT2-way" (at least to sort things out first) and let send the tasmota Client-ESP32 to a MQTT2_SERVER. This will generate a MQTT2_DEVICE-TYPE device with already decoded data (that might not be to easy to interpret as well, but that's next step)...

Other (more complex) option would be to do some "expression" statements in MQTT_GENERIC_BRIDGE attributes.

kroonen:
I created with MQTT2, and looks better now.


--- Code: ---fhem> l Zolderkamer_thermostaat
Internals:
   CID        rolluikzolder
   DEF        rolluikzolder
   DEVICETOPIC Zolderkamer_thermostaat
   FUUID      6168848e-f33f-7999-a5ef-5ea28c7144db4ef8
   IODev      mqtt2
   LASTInputDev mqtt2
   MSGCNT     2
   NAME       Zolderkamer_thermostaat
   NR         87
   STATE      unlocked
   TYPE       MQTT2_DEVICE
   mqtt2_MSGCNT 2
   mqtt2_TIME 2021-10-14 22:45:33
   READINGS:
     2021-10-14 22:37:08   IODev           mqtt2
     2021-10-14 22:45:33   MAC             001A220B5533
     2021-10-14 22:45:33   RSSI            -63
     2021-10-14 22:45:33   battery         GOOD
     2021-10-14 22:45:33   boost           inactive
     2021-10-14 22:45:33   cmd             poll
     2021-10-14 22:45:33   dst             set
     2021-10-14 22:45:33   hassmode        idle
     2021-10-14 22:45:33   mode            manual
     2021-10-14 22:45:33   posn            0
     2021-10-14 22:45:33   result          ok
     2021-10-14 22:45:33   state           unlocked
     2021-10-14 22:45:33   stattime        1634244333
     2021-10-14 22:45:33   tas             Rolluikzolder
     2021-10-14 22:45:33   temp            17.0
     2021-10-14 22:45:33   window          closed
Attributes:
   group      Klimaat
   mqttSubscribe state:stopic={"stat/EQ3/EQ3Zolderkamer"}
   readingList tele/EQ3/EQ3Zolderkamer/LWT:.* LWT
    stat/EQ3/EQ3Zolderkamer:.* { json2nameValue($EVENT) }
   room       Zolder
   webCmd     state

--- Ende Code ---

So the values are good. Now the quuestion is How can I set the temp with mqtt in fhem with slider or something?

the mqtt command is

cmnd/eq3devices/EQ3/EQ3Zolderkamer/settemp 20.0

Beta-User:
Try with

--- Code: ---attr Zolderkamer_thermostaat setList desired-temp:slider,5.0,0.5,30.0,1 cmnd/eq3devices/EQ3/EQ3Zolderkamer/settemp $EVTPART1
--- Ende Code ---

What's the mqttSubscribe attribute for? You may delete that ;) .

There's some more things that may be of interest, but step by step...

kroonen:
remove the mqtt subscribe

I added the line, tried to change the valu, but nothing happens. Also checked with mqtt explorer


--- Code: ---l Zolderkamer_thermostaat
Internals:
   CID        rolluikzolder
   DEF        rolluikzolder
   DEVICETOPIC Zolderkamer_thermostaat
   FUUID      6168848e-f33f-7999-a5ef-5ea28c7144db4ef8
   IODev      mqtt2
   LASTInputDev mqtt2
   MSGCNT     1
   NAME       Zolderkamer_thermostaat
   NR         87
   STATE      Desired:16.5 manual valve:0
   TYPE       MQTT2_DEVICE
   mqtt2_MSGCNT 1
   mqtt2_TIME 2021-10-14 23:18:26
   READINGS:
     2021-10-14 23:16:40   IODev           mqtt2
     2021-10-14 23:18:26   MAC             001A220B5533
     2021-10-14 23:18:26   RSSI            -65
     2021-10-14 23:18:26   battery         GOOD
     2021-10-14 23:18:26   boost           inactive
     2021-10-14 23:18:26   cmd             poll
     2021-10-14 23:18:26   dst             set
     2021-10-14 23:18:26   hassmode        idle
     2021-10-14 23:18:26   mode            manual
     2021-10-14 23:18:26   posn            0
     2021-10-14 23:18:26   result          ok
     2021-10-14 23:18:26   state           unlocked
     2021-10-14 23:18:26   stattime        1634246306
     2021-10-14 23:18:26   tas             Rolluikzolder
     2021-10-14 23:18:26   temp            16.5
     2021-10-14 23:18:26   window          closed
Attributes:
   group      Klimaat
   readingList tele/EQ3/EQ3Zolderkamer/LWT:.* LWT
    stat/EQ3/EQ3Zolderkamer:.* { json2nameValue($EVENT) }
   room       Zolder
   setList    desired-temp:slider,5.0,0.5,30.0,1 cmnd/eq3devices/EQ3/EQ3Zolderkamer/settemp $EVTPART1
   stateFormat Desired:temp mode valve:posn


--- Ende Code ---


Checkin in home assisant and than in console from tasmota:

22:31:16.780 EQ3 mqtt: cmnd/eq3devices/EQ3/EQ3Zolderkamer/settemp:15.5

Bunt not from fhem

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln