howto:wechselrichter_sma
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende ÜberarbeitungNächste ÜberarbeitungBeide Seiten der Revision | ||
howto:wechselrichter_sma [2014/06/01 12:58] – wf_bitplan.com | howto:wechselrichter_sma [2018/01/25 16:04] – code jau | ||
---|---|---|---|
Zeile 62: | Zeile 62: | ||
Anbei das Script: | Anbei das Script: | ||
- | <code perl |sma.pl> | + | <code perl sma.pl> |
# | # | ||
use LWP:: | use LWP:: | ||
Zeile 125: | Zeile 125: | ||
</ | </ | ||
- | Um den Eigenverbrauch zu bestimmen bilde ich die Differenz zwischen der Einspeisung, | + | Um den Eigenverbrauch zu bestimmen bilde ich die Differenz zwischen der Einspeisung, |
+ | Änderung 04.06.2014: Die Berechnung des Gesamtverbrauchs ist aktualisiert. | ||
== Originalscript von Markus == | == Originalscript von Markus == | ||
- | <code bash|eigenverbrauch.bash> | + | <code bash eigenverbrauch.sh> |
#!/bin/bash | #!/bin/bash | ||
echo ' | echo ' | ||
Zeile 150: | Zeile 151: | ||
echo ' | echo ' | ||
- | INSERT INTO `data`( `channel_id`, | + | INSERT INTO `data`( `channel_id`, |
+ | ( | ||
SELECT | SELECT | ||
max(case when `channel_id` | max(case when `channel_id` | ||
max(case when `channel_id` | max(case when `channel_id` | ||
FROM `data` where channel_id in (1,7) | FROM `data` where channel_id in (1,7) | ||
- | group by floor(`timestamp`/ | + | group by floor(`timestamp`/ |
- | inner join data data_1 on timestamp_1 | + | ) a inner join data data_1 on timestamp_1 |
- | ' | mysql --user=vz --password=fdfdfdfdf | + | ' | mysql --user=vz --password=dsdsdsdsds |
</ | </ | ||
auch diese Script wird mit cron gestartet, aber nur ein mal die Stunde. | auch diese Script wird mit cron gestartet, aber nur ein mal die Stunde. | ||
< | < | ||
- | 1 * * * * bash / | + | 1 * * * * bash / |
</ | </ | ||
== Modifiziertes Script (Versuch von Wolfgang) == | == Modifiziertes Script (Versuch von Wolfgang) == | ||
- | <code bash|eigenverbrauch.bash> | + | <code bash eigenverbrauch.sh> |
#!/bin/bash | #!/bin/bash | ||
# calculate own PV usage | # calculate own PV usage | ||
Zeile 254: | Zeile 256: | ||
there is a help screen available: | there is a help screen available: | ||
- | < | + | < |
./sma2vz --help | ./sma2vz --help | ||
| | ||
Zeile 292: | Zeile 294: | ||
</ | </ | ||
- | <code bash|configure example> | + | <code bash configure example> |
./sma2vz --lat 51.244 --lon 6.52 --configure | ./sma2vz --lat 51.244 --lon 6.52 --configure | ||
</ | </ | ||
- | <code bash|loop example> | + | <code bash loop example> |
./sma2vz \ | ./sma2vz \ | ||
--vzurl " | --vzurl " | ||
Zeile 305: | Zeile 307: | ||
</ | </ | ||
- | <code bash|cron example> | + | <code bash cron example> |
cd / | cd / | ||
/ | / | ||
Zeile 325: | Zeile 327: | ||
- | <code bash | sma2vz> | + | <code bash sma2vz> |
#/bin/bash | #/bin/bash | ||
# SMAspot with Volkszaehler | # SMAspot with Volkszaehler | ||
Zeile 789: | Zeile 791: | ||
</ | </ | ||
- | <code php | sma2vz.php> | + | <code php sma2vz.php> |
<?php | <?php | ||
/** | /** | ||
Zeile 894: | Zeile 896: | ||
</ | </ | ||
- | <code php | vzapihelper.php> | + | <code php vzapihelper.php> |
<?php | <?php | ||
/** | /** | ||
Zeile 980: | Zeile 982: | ||
?> | ?> | ||
- | |||
</ | </ |
howto/wechselrichter_sma.txt · Zuletzt geändert: 2018/04/01 15:56 von jau