Feature Request: New MQTT sensors
Hey, I'd like to integrate the plan that EOS creates into my existing visualizations of HomeAssistant. To do this, it would be very handy if EOS Connect would publish more data points via MQTT. Each sensor ideally having the current state as the normal state and the full plan for the next x hours as key-value-pairs in the attribute of the sensor, so that users can read those with apexcharts data generator. Kinda similar to the EPEX sensor for instance:
I'd find the following sensors useful:
- Charge allowed/disallowed
- Planned grid consumption
- Forecasted battery SOC
- Forecasted energy consumption
- Expenses
- Income
Not the most urgent request of course, but would be great to have it some day 😊 Thanks a lot for the amazing work so far!
I will put this on the list - for aehm later ;-) (I'm not a fan of transferring bigger dynamic content JSONs via MQTT - almost static configs ok ... but that's my personal opinion)
But for the time of waiting ;-))): the direct usable way is... configure this in your configuration.yaml via rest interface and eos_connect web api
example for discharge array:
rest:
- scan_interval: 15
resource: http://<eos_connect_server>:8081/json/optimize_response.json
sensor:
- name: EOS_Connect_DischargeAllowed
unique_id: eos_connect_discharge_allowed
value_template: "{{ value_json.discharge_allowed }}"
the logic to unpack the json data for home assistant should be the same as you need for mqtt
and with some value_template 'magic' it should be also possible to reformat this in the expected format of this chart tool... or this tool have also some more availble input formats that you can configure...