Replies: 3 comments 1 reply
-
Hi @Jambola77 I think (!) that this is not possible out of the box right now. If you would send the power value via MQTT as its own item, then you could easily use this: https://github.com/andig/evcc-config#meter-generic-mqtt |
Beta Was this translation helpful? Give feedback.
-
Note so self: add JSON decoding to MQTT plugin using JQ similar to HTTP plugin |
Beta Was this translation helpful? Give feedback.
-
This is only somewhat related, but it might still help: I query my wemos mini (with Tasmota and enabled smartmeter extension) very frequently (every 1-2 seconds) via telegraf and store the values in influxdb. Next a one-liner runs every 15 seconds that sanitized (as sometimes the read values are nonsensical like -1000000 or some insanely large power of 2) the read values and publishes a summary to MQTT as JSON string so that I can use it wherever I need them (e.g. MQTT Dashboard on the phone, OpenHAB, ...). Relevant crontab snippet:
/opt/scripts/smartmeter2mqtt.sh:
The influxdb query returns something like
And the jq pipe turns it into
Which is updated every 15 seconds and published via MQTT to topic Posting just a single value is much easier:
So I guess once I have an EV or PHEV, I would use a line like that to publish the current smartmeter power value to evcc. :-) If you don't use influx but use Tasmota's smartmeter implementation (as it looks from your output) then you can directly query the URL http://192.168.8.120/?m=1 (use your wemos' IP of course) which returns in my case this ugly string:
Just run that output through some regex and post it to MQTT like this:
PS: Doesn't evcc also have a scripting plugin? Maybe you don't even need to go via MQTT in that case? PPS: Just found out a better way of querying the current Smart Meter value from Tasmota:
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I have an mqtt setup where I have the actual power measurement available to use this information for evcc.
That means that evcc could subsribe to the power delivery state which can be negative when PV is producing more power than needed:
tele/wemos3/SENSOR = {"Time":"2021-03-31T13:42:22",[..],"Strom":{[..],"AktLeist":-5116.9}}
How can I use these information for setting up evcc?
Beta Was this translation helpful? Give feedback.
All reactions