Closed osulivanDE closed 3 months ago
Ok, PR welcome!
Just ignore any prefix?
Even better since it makes it much more convenient for everyone.
Just ignore any prefix?
Like this?
select(.StatusSNS != null) | .. | .Power_curr? | select(type != "null")
Sounds easy using jq but will need modification on how the JSON parsing inside Tasmota implementation is done.
/cc @thierolm
I also thought about possible ways, to make the SML part of the Tasmota SML meter more flexible regarding the individual script flavours of the users, but it's not only the prefix which can be defined individually but also each reading parameter, e.g. Power_curr, which will be provided in the Tasmota response JSON. Trying to make the Tasmota SML template as flexible as possible, would lead to more configuration parameters. So why making evcc template more flexible and complex, by having the flexibility already on Tasmota script side?
Idea: We are providing a tasmota-sml-http
template, which configures a HTTP plugin config with many parameters to map the JSON tags and creates multiple HTTP requests to the SML device.
Lets not do this ;) The request here was prefix. Is that still a relevant topic?
Is that still a relevant topic?
Not for me.
Lets not do this ;) The request here was prefix. Is that still a relevant topic?
For me yes. Being flexible in the jsonPrefix would be great.
@thierolm mentioned that the other parameters like Power_curr Power_p1, Total_in, ... might also be flexible since they are also variables on Tasmotas side. As far as i have seen diffreent setup guides for Tasmota-SML heads, those variables seem to be quite universal. Imho those do not have to be flexible.
@osulivanDE Imho everything that's flexible on source side, has to be handeled on receiving side ... bec of the wide use of the tasmota SML devices and a lot of flavors of scripts, the next user is coming soon requesting flexibility on parameter name level ...
Thanks to everyone. I totally understand your point @thierolm I for my side switched ESS, Solar and HA to the "SML" prefix and now use tasmota-sml
Depending on which instructions users have followed to set up their Tasmota SML read head, it is possible that a wide variety of jsonPrefix variants have been set up there.
for example: +1,3,s,16,9600,MT681 Here is the documentation from Tasmota for this slug. Look for "jsonPrefix": https://tasmota.github.io/docs/Smart-Meter-Interface/#meter-definition
The EVCC template “tasmota-sml” requires the configuration as follows with a fixed "SML" as jsonPrefix +1,3,s,16,9600,SML
Docu here: https://docs.evcc.io/docs/devices/meters#tasmota-sml-ir-lesekopf-f%C3%BCr-smarte-stromz%C3%A4hler-bspw-hichi
The problem is that many other integrations are dependent on this jsonPrefix and it might not be easy to modify to the from EVCC required "SML"
Battery storage, HomeAssistant, solar integrations etc. might depend on this. It would therefore be nice if EVCC could adapt to a custom slug as it is possible with the custom template where you can set this jsonPrefix yourself with "jq":
This would also make it easier for people to switch from the custom template to the tasmota-sml template.
@andig maybe this makes it more easy to push users to the correct configuration as you mentioned here: https://github.com/evcc-io/evcc/pull/14146#issuecomment-2148995542
In my idea the configuration from tasmota-sml could look like this: