Closed Boemelmann closed 10 months ago
Hi @Boemelmann ,
die relevanten Zeilen sind die hier:
Oct 13 09:23:59 raspberrypi python3[1774]: File "/home/admin/HoymilesZeroExpor t/HoymilesZeroExport.py", line 32, in
Oct 13 09:23:59 raspberrypi python3[1774]: from packaging import version
Oct 13 09:23:59 raspberrypi python3[1774]: ModuleNotFoundError: No module named 'packaging'
Installier mal das "packaging" modul nach:
sudo pip3 install packaging
Hallo Boemelmann ,
die Zeilen sind die hier:
Oct 13 09:23:59 raspberrypi python3[1774]: File "/home/admin/HoymilesZeroExpor t/HoymilesZeroExport.py", line 32, in Oct 13 09:23:59 raspberrypi python3[1774]: from packaging import version Oct 13 09:23:59 raspberrypi python3[1774]: ModuleNotFoundError: No module named 'packaging'
Installier mal das "packaging" modul nach:
sudo pip3 install packaging
danke für die schnelle Antwort.
dann bekomme ich folgende Fehlermeldung.
error: externally-managed-environment
× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
For more information visit http://rptl.io/venv
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification.
VG
versuche mal
sudo pip3 install packaging --break-system-packages
aus: https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3
nochwas Vorab: deine Config oben passt so nicht, da fehlen teilweise Zeilen. Du darfst nix aus der config löschen, nur die Einträge bearbeiten. Sonst hagelt es die nächsten Fehler.
@Boemelmann ,
oder sudo apt install python3-packaging
versuche mal
sudo pip3 install packaging --break-system-packages
aus: https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3
Moin,
super es hat geklappt. 💯
Okt 13 11:37:30 raspberrypi python3[2476]: 2023-10-13 11:37:30 INFO Ahoy: Cu rrent Version: 0.7.36 Okt 13 11:37:30 raspberrypi python3[2476]: 2023-10-13 11:37:30 INFO Ahoy: In verter "yet unknown" reachable: True Okt 13 11:37:31 raspberrypi python3[2476]: 2023-10-13 11:37:31 INFO Ahoy: In verter "Balkonsolar" / serial number "116183121579" / temperature 21.6 degC Okt 13 11:37:31 raspberrypi python3[2476]: 2023-10-13 11:37:31 INFO Ahoy: In verter "Balkonsolar": Turn on Okt 13 11:37:41 raspberrypi python3[2476]: 2023-10-13 11:37:41 INFO setting new limit to 75 Watt Okt 13 11:37:41 raspberrypi python3[2476]: 2023-10-13 11:37:41 INFO Ahoy: In verter "Balkonsolar": setting new limit from 0 Watt to 75 Watt Okt 13 11:37:41 raspberrypi python3[2476]: 2023-10-13 11:37:41 INFO Ahoy: In verter "Balkonsolar": Limit acknowledged Okt 13 11:37:42 raspberrypi python3[2476]: 2023-10-13 11:37:42 WARNING Certific ate did not match expected hostname: 192.169.178.93. Certificate: {'subject': (( ('commonName', 'fbfanimation.com'),),), 'issuer': ((('countryName', 'GB'),), ((' stateOrProvinceName', 'Greater Manchester'),), (('localityName', 'Salford'),), ( ('organizationName', 'Sectigo Limited'),), (('commonName', 'Sectigo RSA Domain V alidation Secure Server CA'),)), 'version': 3, 'serialNumber': 'CE37276CC1AB86E1 5D58013D6082DA60', 'notBefore': 'Oct 17 00:00:00 2022 GMT', 'notAfter': 'Nov 17 23:59:59 2023 GMT', 'subjectAltName': (('DNS', 'fbfanimation.com'), ('DNS', 'www .fbfanimation.com')), 'OCSP': ('http://ocsp.sectigo.com',), 'caIssuers': ('http: //crt.sectigo.com/SectigoRSADomainValidationSecureServerCA.crt',)} Okt 13 11:37:42 raspberrypi python3[2476]: 2023-10-13 11:37:42 ERROR Exceptio n at GetHoymilesActualPower Okt 13 11:37:42 raspberrypi python3[2476]: 2023-10-13 11:37:42 ERROR HTTPSCon nectionPool(host='192.169.178.93', port=443): Max retries exceeded with url: /st atus (Caused by SSLError(CertificateError("hostname '192.169.178.93' doesn't mat ch either of 'fbfanimation.com', 'www.fbfanimation.com'"))) Okt 13 11:38:02 raspberrypi python3[2476]: 2023-10-13 11:38:02 INFO ---Start Zero Export--- Okt 13 11:38:03 raspberrypi python3[2476]: 2023-10-13 11:38:03 INFO Ahoy: Inverter "Balkonsolar" reachable: True Okt 13 11:38:03 raspberrypi python3[2476]: 2023-10-13 11:38:03 INFO powermeter Shelly 3EM: 234 Watt Okt 13 11:38:03 raspberrypi python3[2476]: 2023-10-13 11:38:03 INFO setting new limit to 1500 Watt Okt 13 11:38:03 raspberrypi python3[2476]: 2023-10-13 11:38:03 INFO Ahoy: Inverter "Balkonsolar": setting new limit from 75 Watt to 1500 Watt Okt 13 11:38:04 raspberrypi python3[2476]: 2023-10-13 11:38:04 INFO Ahoy: Inverter "Balkonsolar": Limit acknowledged Okt 13 11:38:19 raspberrypi python3[2476]: 2023-10-13 11:38:19 INFO Ahoy: Inverter "Balkonsolar" reachable: True Okt 13 11:38:19 raspberrypi python3[2476]: 2023-10-13 11:38:19 INFO powermeter Shelly 3EM: 102 Watt Okt 13 11:38:19 raspberrypi python3[2476]: 2023-10-13 11:38:19 INFO Inverterlimit already at 1500 Watt Okt 13 11:38:34 raspberrypi python3[2476]: 2023-10-13 11:38:34 INFO Ahoy: Inverter "Balkonsolar" reachable: True Okt 13 11:38:34 raspberrypi python3[2476]: 2023-10-13 11:38:34 INFO powermeter Shelly 3EM: 104 Watt Okt 13 11:38:34 raspberrypi python3[2476]: 2023-10-13 11:38:34 INFO Inverterlimit already at 1500 Watt Okt 13 11:38:49 raspberrypi python3[2476]: 2023-10-13 11:38:49 INFO Ahoy: Inverter "Balkonsolar" reachable: True Okt 13 11:38:49 raspberrypi python3[2476]: 2023-10-13 11:38:49 INFO powermeter Shelly 3EM: 110 Watt Okt 13 11:38:49 raspberrypi python3[2476]: 2023-10-13 11:38:49 INFO Inverterlimit already at 1500 Watt Okt 13 11:39:04 raspberrypi python3[2476]: 2023-10-13 11:39:04 INFO Ahoy: Inverter "Balkonsolar" reachable: True Okt 13 11:39:05 raspberrypi python3[2476]: 2023-10-13 11:39:05 INFO powermeter Shelly 3EM: 116 Watt Okt 13 11:39:05 raspberrypi python3[2476]: 2023-10-13 11:39:05 INFO Inverterlimit already at 1500 Watt Okt 13 11:39:20 raspberrypi python3[2476]: 2023-10-13 11:39:20 INFO Ahoy: Inverter "Balkonsolar" reachable: True Okt 13 11:39:20 raspberrypi python3[2476]: 2023-10-13 11:39:20 INFO powermeter Shelly 3EM: 136 Watt Okt 13 11:39:20 raspberrypi python3[2476]: 2023-10-13 11:39:20 INFO Inverterlimit already at 1500 Watt Okt 13 11:39:35 raspberrypi python3[2476]: 2023-10-13 11:39:35 INFO Ahoy: Inverter "Balkonsolar" reachable: True Okt 13 11:39:35 raspberrypi python3[2476]: 2023-10-13 11:39:35 INFO powermeter Shelly 3EM: 133 Watt Okt 13 11:39:35 raspberrypi python3[2476]: 2023-10-13 11:39:35 INFO Inverterlimit already at 1500 Watt Okt 13 11:39:50 raspberrypi python3[2476]: 2023-10-13 11:39:50 INFO Ahoy: Inverter "Balkonsolar" reachable: True Okt 13 11:39:50 raspberrypi python3[2476]: 2023-10-13 11:39:50 INFO powermeter Shelly 3EM: 140 Watt Okt 13 11:39:50 raspberrypi python3[2476]: 2023-10-13 11:39:50 INFO Inverterlimit already at 1500 Watt Okt 13 11:40:05 raspberrypi python3[2476]: 2023-10-13 11:40:05 INFO Ahoy: Inverter "Balkonsolar" reachable: True Okt 13 11:40:06 raspberrypi python3[2476]: 2023-10-13 11:40:06 INFO powermeter Shelly 3EM: 141 Watt Okt 13 11:40:06 raspberrypi python3[2476]: 2023-10-13 11:40:06 INFO Inverterlimit already at 1500 Watt Okt 13 11:40:21 raspberrypi python3[2476]: 2023-10-13 11:40:21 INFO Ahoy: Inverter "Balkonsolar" reachable: True Okt 13 11:40:21 raspberrypi python3[2476]: 2023-10-13 11:40:21 INFO powermeter Shelly 3EM: 153 Watt Okt 13 11:40:21 raspberrypi python3[2476]: 2023-10-13 11:40:21 INFO Inverterlimit already at 1500 Watt
Eine Frage habe ich noch. Startet die Software morgends und nach dem reboot automatisch?
Danke für eure Hilfe.
VG
nene, das passt noch nicht, da kommt noch ein Zertifikatsfehler bei der Abfrage von Ahoy? Da bin ich allerdings total überfragt.
Okt 13 11:37:42 raspberrypi python3[2476]: 2023-10-13 11:37:42 WARNING Certificate did not match expected hostname: 192.169.178.93. Certificate: {'subject': (( ('commonName', 'fbfanimation.com'),),), 'issuer': ((('countryName', 'GB'),), ((' stateOrProvinceName', 'Greater Manchester'),), (('localityName', 'Salford'),), ( ('organizationName', 'Sectigo Limited'),), (('commonName', 'Sectigo RSA Domain V alidation Secure Server CA'),)), 'version': 3, 'serialNumber': 'CE37276CC1AB86E1 5D58013D6082DA60', 'notBefore': 'Oct 17 00:00:00 2022 GMT', 'notAfter': 'Nov 17 23:59:59 2023 GMT', 'subjectAltName': (('DNS', 'fbfanimation.com'), ('DNS', 'www .fbfanimation.com')), 'OCSP': ('http://ocsp.sectigo.com/',), 'caIssuers': ('http: //crt.sectigo.com/SectigoRSADomainValidationSecureServerCA.crt',)}
Okt 13 11:37:42 raspberrypi python3[2476]: 2023-10-13 11:37:42 ERROR Exception at GetHoymilesActualPower
Okt 13 11:37:42 raspberrypi python3[2476]: 2023-10-13 11:37:42 ERROR HTTPSConnectionPool(host='192.169.178.93', port=443): Max retries exceeded with url: /st atus (Caused by SSLError(CertificateError("hostname '192.169.178.93' doesn't mat ch either of 'fbfanimation.com', 'www.fbfanimation.com'")))
https://stackoverflow.com/questions/28768530/certificateerror-hostname-doesnt-match
nene, die ganz, die nicht, da zu ein beamtenfehler bei der Abfrage von Ahoy? Da bin ich total überfragt.
Okt 13 11:37:42 raspberrypi python3[2476]: 2023-10-13 11:37:42 WARNING Certificate did not match expected hostname: 192.169.178.93. Certificate: {'subject': (( ('commonName', 'fbfanimation.com'),),), 'issuer': ((('countryName', 'GB'),), ((' stateOrProvinceName', 'Greater Manchester'),), (('localityName', 'Salford'),), ( ('organizationName', 'Sectigo Limited'),), (('commonName', 'Sectigo RSA Domain V alidation Secure Server CA'),)), 'version': 3, 'serialNumber': 'CE37276CC1AB86E1 5D58013D6082DA60', 'notBefore': 'Oct 17 00:00:00 2022 GMT', 'notAfter': 'Nov 17 23:59:59 2023 GMT', 'subjectAltName': (('DNS', 'fbfanimation.com'), ('DNS', 'www .fbfanimation.com')), 'OCSP': ('http://ocsp.sectigo.com/',), 'caIssuers': ('http: //crt.sectigo.com/SectigoRSADomainValidationSecureServerCA.crt',)} Okt 13 11:37:42 raspberrypi python3[2476]: 2023-10-13 11:37:42 ERROR Exception at GetHoymilesActualPower Okt 13 11:37:42 raspberrypi python3[2476]: 2023-10-13 11:37:42 ERROR HTTPSConnectionPool(host='192.169.178.93', port=443): Max retries exceeded with url: /st atus (Caused by SSLError(CertificateError("hostname '192.169.178.93' doesn't mat ch either of 'fbfanimation.com', 'www.fbfanimation.com'")))
https://stackoverflow.com/questions/28768530/certificateerror-hostname-doesnt-match
jetzt aber, war mein Fehler. Ich hatte in der .ini unter [SELECT_INTERMEDIATE_METER] auch die Anmeldedaten vom SHELLY_3EM hinterlegt. Gibt es noch die Möglichgeit, dass das Skript automatisch nach dem Neutstart startet?
Vielen Dank noch einmal!
Ja, du musst das Scipt als Service eintragen:
cat << EOF | tee /etc/systemd/system/HoymilesZeroExport.service
[Unit]
Description=HoymilesZeroExport Service
After=multi-user.target
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/python3 ${SCRIPT_DIR}/HoymilesZeroExport.py
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable HoymilesZeroExport.service
systemctl start HoymilesZeroExport.service
systemctl status HoymilesZeroExport.service
${SCRIPT_DIR} musst du mit deinem Dir ersetzen.
Moin,
ich bekomme das Skript leider nicht zum Laufen. Ich verwende einen Raspberry zero, SHELLY 3EM und eine Ahoy DTU. Alle Lifedaten der DTU kann ich über den Browser sehen. Muss die Inverternummer nirgendwo eingegeben werden?
Hier ein Auszug aus der .ini
Auszug von dem Fehler.
Über eine Hilfe, würde ich mich sehr freuen.
VG Sebastian