ems-esp MQTT

Begonnen von moustic999, 01 November 2019, 23:23:52

Vorheriges Thema - Nächstes Thema

Beta-User

We could do so, but please keep in mind the reason we did it the way it is now: Imo we should use same reading names for the same functionality that are already established in other modules for heating control purposes...

So I'd rather suggest to map "hc_1_currtemp" to "measured-temp" (assuming it has the same meaning/function) according to teminology in CUL_HM (or use any other's Module-Type  wording that is already well-known and especially used in (weekprofile and) WeekdayTimer) ;) .

But if the meaning is different, feel free to make good suggestions. It's just some small changes to jsonMap and setList to rename things to whatever is reasonable...

To see the RAW-Events, use menu entry "Event monitor".
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

grappa24

Zitat von: Beta-User am 24 Januar 2020, 15:09:37
So I'd rather suggest to map "hc_1_currtemp" to "measured-temp" (assuming it has the same meaning/function) according to teminology in CUL_HM (or use any other's Module-Type  wording that is already well-known and especially used in (weekprofile and) WeekdayTimer
o.k. I understand your motivation and I agree. My suggestions referred to the original names of the EMS-ESP, but "desired-temp" and "measured-temp" is fine  ;D
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

grappa24

Zitat von: moustic999 am 22 Januar 2020, 09:59:21
So fart I can control the target temp and the desired mode of my heater/thermostat ( Buderus RC300 , auto/manual mode + target temp)
I also retrieve a bunch of sensors (outdoor temp, return temp, flow temp) to monitor the heater working to optimize it later on.
all these could be quite easily combined into 1 or more template.
I will do some cleanup in the code and will share what is working for me.
@moustic999: Could you please give me the receiving topics (.../boiler_cmd) which work for you? I just can control "comfort" (hot,comfort,intelligent), "flowtemp" does not work with my boiler.
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

moustic999

here is the full "mqttlog" from EMS-ESP
you can get this anytime by "telnet" youer ems-esp and use command : mqttlog

MQTT publish log:
  Timestamp:03:02:04 Topic:status Payload:online
  Timestamp:03:02:04 Topic:start Payload:start
  Timestamp:03:02:04 Topic:shower_data Payload:{"timer":"0","alert":"0"}
  Timestamp:20:28:00 Topic:boiler_data Payload:{"wWComfort":"Hot","wWSelTemp":60,"wWDesinfectionTemp":70,"selFlowTemp":54,"selBurnPow":100,"curBurnPow":23,"pumpMod":78,"wWCircPump":0,"outdoorTemp":3.9,"wWCurTmp":61.6,"wWCurFlow":0,"curFlowTemp":54,"retTemp":47.5,"switchTemp":0,"sysPress":1.5,"boilTemp":51.4,"wWActivated":"on","wWOnetime":"off","burnGas":"on","flameCurr":12,"heatPmp":"on","fanWork":"on","ignWork":"off","wWCirc":"off","heating_temp":90,"pump_mod_max":100,"pump_mod_min":30,"wWHeat":"off","wWStarts":2760,"wWWorkM":50799,"UBAuptime":2165246,"burnStarts":76190,"burnWorkMin":486553,"heatWorkMin":435754,"ServiceCode":"-H","ServiceCodeNumber":200}
  Timestamp:19:11:00 Topic:tapwater_active Payload:0
  Timestamp:19:11:00 Topic:heating_active Payload:1
  Timestamp:20:27:30 Topic:thermostat_data Payload:{"hc1":{"seltemp":21,"mode":"auto"}}
  Timestamp:20:26:14 Topic:heartbeat Payload:{"version":"1.9.5b8","IP":"192.168.1.71","rssid":60,"load":1,"uptime":1455974,"freemem":50,"MQTTdisconnects":18}

MQTT subscriptions:
  Topic:home/ems-esp/restart
  Topic:home/ems-esp/start
  Topic:home/ems-esp/thermostat_cmd_temp1
  Topic:home/ems-esp/thermostat_cmd_mode1
  Topic:home/ems-esp/thermostat_cmd_temp2
  Topic:home/ems-esp/thermostat_cmd_mode2
  Topic:home/ems-esp/thermostat_cmd_temp3
  Topic:home/ems-esp/thermostat_cmd_mode3
  Topic:home/ems-esp/thermostat_cmd_temp4
  Topic:home/ems-esp/thermostat_cmd_mode4
  Topic:home/ems-esp/thermostat_cmd
  Topic:home/ems-esp/boiler_cmd
  Topic:home/ems-esp/boiler_cmd_wwactivated
  Topic:home/ems-esp/boiler_cmd_wwonetime
  Topic:home/ems-esp/boiler_cmd_wwtemp
  Topic:home/ems-esp/generic_cmd
  Topic:home/ems-esp/shower_data



note that I would like to create an issue for EMS-ESp to have boiler_data split into 2 or 3 topics, because this is huge and it make fhem to slow down.
also that would map better the reality of EMS bus messages.

moustic999

note that I don't have "currTemp" for thermostat, tha's normal because my thermostat is set up inside the heater and then, does not report the room temp.

grappa24

in my case the receiving topics Topic:home/ems-esp/thermostat_cmd_temp1
  Topic:home/ems-esp/thermostat_cmd_mode1
  Topic:home/ems-esp/thermostat_cmd_temp2
  Topic:home/ems-esp/thermostat_cmd_mode2
  Topic:home/ems-esp/thermostat_cmd_temp3
  Topic:home/ems-esp/thermostat_cmd_mode3
  Topic:home/ems-esp/thermostat_cmd_temp4
  Topic:home/ems-esp/thermostat_cmd_mode4
don't work, but Topic:home/ems-esp/thermostat_cmddoes the job.

My problem with Topic:home/ems-esp/boiler_cmd is, that command comfort works well but command flowtemp not. So I would be glad if you moustic999 could tell me, which concrete boiler command works for you?

Here is the original documentation from github:boiler_cmd for sending generic command to control the Boiler JSON {"cmd":<command>,"data":<value> with command being comfort and data = [hot,comfort,intelligent] or flowtemp with data being the desired temperature or boiler_cmd_wwonetime {"cmd":"flowtemp",data:55}


Zitat von: moustic999 am 25 Januar 2020, 18:02:43
note that I would like to create an issue for EMS-ESp to have boiler_data split into 2 or 3 topics, because this is huge and it make fhem to slow down.
also that would map better the reality of EMS bus messages.
feel free to do so, I have no problem with fhem performance till now

Zitat von: moustic999 am 25 Januar 2020, 18:11:04
note that I don't have "currTemp" for thermostat, tha's normal because my thermostat is set up inside the heater and then, does not report the room temp.
same with my setup, but my boiler reports the currTemp, but its useless because its the temperature of my "heating room" and not relevant for setting "selTemp". By the way I startet to build al glossar to get an overview of the different names and meanings of the terms used by the different "players" (EMS protocoll, FHEM, ...). See the draft version as enclosure. By the way, I'm meanwhile using 1.9.5 Beta firmware for Kees EMS-Gateway  ;D
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

grappa24

while I'm using FLOORPLAN for visualising have a look at my implementation of our EMS-ESP project to my floorplan ...  8)
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

grappa24

Zitat von: grappa24 am 26 Januar 2020, 06:59:38
in my case the receiving topics Topic:home/ems-esp/thermostat_cmd_temp1
  Topic:home/ems-esp/thermostat_cmd_mode1
  Topic:home/ems-esp/thermostat_cmd_temp2
  Topic:home/ems-esp/thermostat_cmd_mode2
  Topic:home/ems-esp/thermostat_cmd_temp3
  Topic:home/ems-esp/thermostat_cmd_mode3
  Topic:home/ems-esp/thermostat_cmd_temp4
  Topic:home/ems-esp/thermostat_cmd_mode4
don't work,
After Updating EMS gateway to firmware 1.9.4 (?) these topics work well  ;D. As well as "Topic:home/ems-esp/thermostat_cmd + JSON-Blob"
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

grappa24

Zitat von: grappa24 am 26 Januar 2020, 06:59:38
My problem with Topic:home/ems-esp/boiler_cmd is, that command comfort works well but command flowtemp not.
As Proddy told me, the following boiler-topics should work:
- boiler_cmd with command being "comfort" and "flowtemp"
- boiler_cmd_wwtemp (setting the warm water boiler temp)
- boiler_cmd_wwonetime (send a single charge to boiler to heat up the warm water (DHW) )

(Only) in case of my boiler Junkers Cerapur ZSB 24-5 C 23 "flowtemp" and "wwtemp" don't work - seams to be boiler-specific
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

grappa24

For now I'm "through" and "made my peace with" EMS;D So please @Beta-User tell me, what is your issue no. 1 and I will concentrate on that to support finishing the AttrTemplates concerning ems-esp.
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

grappa24

For now I'm "through" and "made my peace with" EMS ;D So please @Beta-User tell me, what is your issue no. 1 and I will concentrate on that to support finishing the AttrTemplates concerning ems-esp.
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

Beta-User

 :) Thx for updating about making progress.

Wrt. to the firmware issue, I'm a little surprised the later firmware (0.9.5 beta) beeing more restricted than 0.9.4. If there's limitations in 0.9.5 that can be overruled by the use of the "right" way to set setters, I'd suggest to concentrate on the newer ones.

My "concern nr. 1"? Hmmm, (beside the above mentionned) not that easy...

I'd like to offer a reasonable set of attrTemplates (part of them beeing "conditioned" by the existence of the mcu device). "Reasonable" for now means: They are working, whoever wants to use them can easily find out to what hardware they have been configured for... stuff like that ;) . Sufficient as a guideline?
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

grappa24

Zitat
- is the grouping of the sent data meaningful, or should there be some changes? (=bridgeRegexp of the base template builds "reasonable" devices?!? Or do we need more or less?)
- are the reading names "good"? (I added $JSONMAP to the json2nameValue() function, so we can easily rename the names used by the ESP firmware; perhaps we also need a "prefix", if there's sent identically named data for different parts of the bus...?)
- setList for boiler device?
- Optics for boiler device (stateFormat, icons and so on...)
- hide the additional templates to users not using ems-esp (use prereq: or move them to seperate template file in contrib/AttrTemplate, see changes here, esp. to ebus and milight).
So I will concentrate on the red issues cause "grouping" and "optics" are not my favourite  :-[

OT: But first I have to go to the DIY-store to get some stuff for wiring my new Bosch MB LAN2 beside my EMS-gateway 8). FHEM/EMS ist nice, but additionally I want to access my boiler via Bosch HomeCom
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

Beta-User

Zitat von: grappa24 am 28 Januar 2020, 10:40:03
So I will concentrate on the red issues cause "grouping" and "optics" are not my favourite  :-[
That's ok. Hope the "mechanics" behind the bridgeRegexp is clear now or do you need additional help on that? (then I'd need additional info what should "end" where..)

ZitatOT: But first I have to go to the DIY-store to get some stuff for wiring my new Bosch MB LAN2 beside my EMS-gateway 8) . FHEM/EMS ist nice, but additionally I want to access my boiler via Bosch HomeCom
Enjoy ;D !
Server: HP-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

grappa24

Zitat von: Beta-User am 28 Januar 2020, 10:44:36
Hope the "mechanics" behind the bridgeRegexp is clear now or do you need additional help on that? (then I'd need additional info what should "end" where..)
I'll have a look at the mechanics behind bridgeRegexp but if you have some basic info for me your welcome.

As I said Regular Expressions / Perl are not my favourites. As a former it-trainer C/C++ were my topics (beside FORTRAN in the beginning - guess how old I am :P )
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...