-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
Shelly 1PM pv meter template #3227
Conversation
Could this be coalesced with the existing Shelly template(s)? |
Das bestehende Meter shelly-3em.yaml lässt sich nicht auf den Shelly-1PM erweitern. Der 3EM liefert im JSON für die gemessenen Werte ein (etwas) anderes Object Wenn du mir einen Tip gibst, wie ich unter Habs gerade mit der yaml unten probiert, aber choices werden unter params offensichtlich nicht unterstützt. :-( template: shelly
products:
- brand: Shelly
description:
generic: 3EM + 1PM
group: sockets
params:
- name: model
choice: ["3EM", "1PM"]
required: true
- name: usage
choice: ["grid", "pv", "charge"]
- name: host
- name: user
required: false
- name: password
required: false
mask: true
...
|
Hi @andig , template: shelly
products:
- brand: Shelly
description:
generic: 3EM + 1PM
group: sockets
params:
- name: model
choice: ["3EM", "1PM"]
required: true
help:
en: Please select model 3EM or 1PM
de: Wähle 3EM oder 1PM
- name: usage
choice: ["grid", "pv", "charge"]
- name: host
- name: user
required: false
- name: password
required: false
mask: true
render: |
type: custom
power:
source: http
uri: http://{{ if ne .user "" }}{{ .user }}:{{ .password }}@{{ end }}{{ .host }}/status
jq: {{ if eq .model "1PM" }}.meters{{ else }}.emeters{{ end }} | map(.power) | add
{{if eq .usage "grid" -}}
energy:
source: http
uri: http://{{ if ne .user "" }}{{ .user }}:{{ .password }}@{{ end }}{{ .host }}/status
jq: {{ if eq .model "1PM" }}.meters{{ else }}.emeters{{ end }} | map(.total) | add
scale: {{ if eq .model "1PM" }}0.0000166666666666667{{ else }}0.001{{ end }}
{{ end -}}
{{if and (eq .model "3EM") (ne .usage "pv") -}}
currents:
- source: http
uri: http://{{ if ne .user "" }}{{ .user }}:{{ .password }}@{{ end }}{{ .host }}/emeter/0
jq: .current
- source: http
uri: http://{{ if ne .user "" }}{{ .user }}:{{ .password }}@{{ end }}{{ .host }}/emeter/1
jq: .current
- source: http
uri: http://{{ if ne .user "" }}{{ .user }}:{{ .password }}@{{ end }}{{ .host }}/emeter/2
jq: .current
{{ end -}} |
@thierolm wir lassen es wie es ist. Modell über Choice zu machen erzeugt dann eine komische Doku. Danke fürs rein schauen. |
Shelly 1PM pv meter template to integrate pv power of e.g. balcony solar installations.
Sample
evcc configure
output:Sample
evcc meter
output with above configuration:thierolm@accffmmt:~/evcc$ ./evcc -l debug meter [main ] INFO 2022/04/24 14:30:47 evcc 0.90 (4ab3d7fb) [main ] INFO 2022/04/24 14:30:47 using config file /etc/evcc.yaml pv1 --------- Power: 56W Energy: 145.0kWh