-
Notifications
You must be signed in to change notification settings - Fork 3
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
Possibility to combine or calculated values for MQTT output #12
Comments
Funny, I have implemented this in a basic fashion a few weeks ago. Have a look into https://github.com/micw/homedatabroker/blob/master/src/main/java/de/wyraz/homedatabroker/source/AggregationSource.java in master. Here's a config example where I sum my 3 phases:
Currenly only "sum" is implemented but I can add other aggregations on interest. Your 2nd example would require some kind of expression parser. Doable (I already implemented a few in my past) but I'd add it only if necessary. For the particular example I'd rather add better support for Units (e.g. if you sum kWh and Wh, conversion could be done automatically). Openmetrics does support http and https, I use it to feed into victoriametrics. For a generic http input please create another ticket to collect the ideas. I have the feeling that this could become quite feature-rich :-) Edit: aggregation also supports to expire input values so that gridPowerTotal will become zero if the inputs are not updated for a particular amount of time. |
Cool the sum aggregation looks good. And as you said this could become quite feature-rich. Keep going the good work. |
I like combine or caclulate some values for MQTT output.
For example values from tibberpulse:
combined into currents like this:
example: [1.2,2.3,-2.1]
or
- source: pulse.powerTotal
topic: TibberPulse/powerTotal
pulse.powerTotal in W output kW with unit
Another question, can i use type: openmetrics to handle http/https api as output and would it be possible to generalise the tibber-pulse-http as a more common http input to also use for example the tibber api or traccar api or others.
Thanks for our answer and this great broker.
Regards
Hubert
The text was updated successfully, but these errors were encountered: