-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose individual commands via MQTT topics #31
Comments
did a first rough implementation. It will create a lot of additional MQTT subscribes, but I think the ESP32 can handle it. |
OK. Should I look to implement it a better way in HA? Maybe scripting was a better option? Shout if/when you want me to test. Thanks! |
haven't tested with HA but should work with latest dev build. |
I think for thermostat you should enhance with the tag, now |
yeah, spotted that too. thanks. |
The |
also true. Adding the tag is going to be tricky since for the thermostat this is done dynamically when a HC is detected. And these subscribes are created when a device is added. So I think I'll just limit it to a few functions, either what shall I do? |
I think thermostat is the most used device to set a value. Imho stay with default hc is better than skip thermostat. |
ok skipping 'system' and thermostat will use the default hc. Adding all the hc's 1-4 can create up to 14*4 additional subscribes. |
For my RC35 it's 4x22 subscribes for the hc. I tested this and heap (free/max.alloc) drops from 96.968 / 84.384 bytes without subscribes to 81.968 / 55.140 bytes with boiler, thermostat and all 4 hc. No issues so far, the esp32 can handle it, but it's a lot of memory allocated. In #739 there is someone with 3 active hc now switching to esp32. I don't know if he needs the direct subscriptions. Maybe add a setting to mqtt-settings to activate the subscriptions? |
The high memory usage is due to register all subscriptions also as mqtt-subfunctions. I skip this, only use |
ok! Let's go with that |
Ok, i need to clean up my test codes a bit, than i can push it. I've also added a mqtt setting below boolean format as |
Ok, pushed, please check. With thermostats like RC20 with only a single heatingcircuit the setting does not have a effect, there will not /hc1/ tags added (can be changed by flagging the commands in thermostat). |
ok, I'll check. I also changed a few web files so it'll probably merge clash somewhere |
tested and works. nice. |
As a request from @glitter-ball , since all EMS-ESP commands need to follow the JSON format
{cmd:"", data:"", id:""}
it's hard to send individual commands, like from a component or trigger in HA. For example, when using HA'splatform:mqtt
in a switch component it can only send on/off payloads to a single command topic, like in this screenshot:This feature is to expose all commands as individual MQTT topics by subscribing to them as for example:
[21] (Sub) topic=ems-esp/boiler/comfort
[22] (Sub) topic=ems-esp/boiler/wwactivated
[23] (Sub) topic=ems-esp/boiler/wwtapactivated
[24] (Sub) topic=ems-esp/boiler/wwflowtempoffset
[25] (Sub) topic=ems-esp/boiler/wwmaxpower
[26] (Sub) topic=ems-esp/boiler/wwonetime
[27] (Sub) topic=ems-esp/boiler/wwcircpump
[28] (Sub) topic=ems-esp/boiler/wwcirculation
[29] (Sub) topic=ems-esp/boiler/wwcircmode
[30] (Sub) topic=ems-esp/boiler/flowtemp
[31] (Sub) topic=ems-esp/boiler/wwsettemp
[32] (Sub) topic=ems-esp/boiler/heatingactivated
[33] (Sub) topic=ems-esp/boiler/heatingtemp
[34] (Sub) topic=ems-esp/boiler/burnmaxpower
[35] (Sub) topic=ems-esp/boiler/burnminpower
[36] (Sub) topic=ems-esp/boiler/boilhyston
[37] (Sub) topic=ems-esp/boiler/boilhystoff
[38] (Sub) topic=ems-esp/boiler/burnperiod
[39] (Sub) topic=ems-esp/boiler/pumpdelay
[40] (Sub) topic=ems-esp/boiler/maintenance
[41] (Sub) topic=ems-esp/boiler/pumpmodmax
[42] (Sub) topic=ems-esp/boiler/pumpmodmin
The text was updated successfully, but these errors were encountered: