Heel mooi! Ik ben er bijna...AUijtdehaag schreef op zondag 16 juni 2024 @ 13:07:
@Zanzibar-1337
Dat zou zoiets moeten zijn dan:
secrets.yaml
YAML:
1secret
pvoutput.yaml
YAML:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 ## elke 5 minuten naar pvoutput automation: - id: update_pvoutput alias: update pvoutput trigger: platform: time_pattern minutes: /5 condition: and: - condition: numeric_state entity_id: sensor.sma_actueel above: 10 action: service: rest_command.update_pvoutput data: {} mode: single ## v1 = Energy Generation (Wh) / v2 = Power Generation (W) / v3 = Energy Production (Wh) / v4 = Power Production (W) / v5 = Temperature (degr. C) rest_command: update_pvoutput: url: "https://pvoutput.org/service/r2/addstatus.jsp" method: post headers: X-Pvoutput-Apikey: !secret pvoutput_api_key X-Pvoutput-SystemId: !secret pvoutput_system_id_1 Content-Type: 'application/x-www-form-urlencoded' payload: >- d={{now().strftime("%Y%m%d")}} {#- date -#} &t={{now().strftime("%H:%M")}} {#- time -#} &v1={{(states('sensor.sma_vandaag')|float(0)*1000) | int}} {#- Energy generation (Wh) -#} &v2={{states('sensor.sma_actueel')|float(0) |round(0)}} {#- Power generation (W) -#} &v5={{states('sensor.sma_temperatuur')|float(0) |round(1)}} {#- Temperature (degr. C) -#} &v6={{states('sensor.sma_ac_spanning')|float(0) |round(0)}} {#- AC voltage (V) -#} &v7={{states('sensor.sma_dc_spanning_1')|float(0) |round(0)}} {#- Voltage string 1 (V) -#} &v8={{states('sensor.sma_dc_spanning_2')|float(0) |round(0)}} {#- Voltage string 2 (V) -#} &v9={{states('sensor.sma_dc_power_1')|float(0) |round(0)}} {#- Power string 1 (W) -#} &v10={{states('sensor.sma_dc_power_2')|float(0) |round(0)}} {#- Power string 2 (W) -#} &c1=1
YAML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| ## elke 5 minuten naar pvoutput automation: - id: update_pvoutput alias: update pvoutput trigger: platform: time_pattern minutes: /5 condition: and: - condition: numeric_state entity_id: sensor.stp6_0_3av_40_208_total_yield above: 10 action: service: rest_command.update_pvoutput data: {} mode: single ## v1 = Energy Generation (Wh) / v2 = Power Generation (W) / v3 = Energy Production (Wh) / v4 = Power Production (W) / v5 = Temperature (degr. C) rest_command: update_pvoutput: url: "https://pvoutput.org/service/r2/addstatus.jsp" method: post headers: X-Pvoutput-Apikey: !secret pvoutput_api_key X-Pvoutput-SystemId: !secret pvoutput_system_sma Content-Type: 'application/x-www-form-urlencoded' payload: >- d={{now().strftime("%Y%m%d")}} {#- date -#} &t={{now().strftime("%H:%M")}} {#- time -#} &v1={{(states('sensor.stp6_0_3av_40_208_daily_yield')|float(0)*1000) | int}} {#- Energy generation (Wh) -#} &v2={{states('sensor.stp6_0_3av_40_208_pv_power')|float(0) |round(0)}} {#- Power generation (W) -#} &v5={{states('sensor.sma_temperature')|float(0) |round(1)}} {#- Temperature (degr. C) -#} &v6={{states('sensor.stp6_0_3av_40_208_voltage_l1')|float(0) |round(0)}} {#- AC voltage L1 (V) -#} &v6={{states('sensor.stp6_0_3av_40_208_voltage_l2')|float(0) |round(0)}} {#- AC voltage L2 (V) -#} &v6={{states('sensor.stp6_0_3av_40_208_voltage_l3')|float(0) |round(0)}} {#- AC voltage L3 (V) -#} &v7={{states('sensor.sma_dc_voltage_1')|float(0) |round(0)}} {#- Voltage string 1 (V) -#} &v8={{states('sensor.sma_dc_voltage_2')|float(0) |round(0)}} {#- Voltage string 2 (V) -#} &v9={{states('sensor.sma_dc_power_1')|float(0) |round(0)}} {#- Power string 1 (W) -#} &v10={{states('sensor.sma_dc_power_2')|float(0) |round(0)}} {#- Power string 2 (W) -#} &c1=1 |
Maar ik krijg de volgende foutmelding in HA:
De automation start nu dus niet automatisch.The automation "update pvoutput" (automation.update_pvoutput) has an action that calls an unknown service: rest_command.update_pvoutput.
Handmatig heb ik de automation gestart en komt er wel wat binnen.
Members only:
Alleen zichtbaar voor ingelogde gebruikers.
Inloggen
Ik vraag mij af of dit wel goed gaat, of komt er ineens zoveel binnen om de histische data in te halen?
Gasloos huis 9kW Panasonic WH-MDC09J3E5 | Atlantic Explorer V4 270L | 8715Wp @ SMA Tripower 6.0-3AV-40 (4150Wp NO, 4565Wp ZW)