You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nov 18 15:53:10 rpizero systemd[1]: Started solaredge_meterproxy.
Nov 18 15:53:15 rpizero python3[31057]: Traceback (most recent call last):
Nov 18 15:53:15 rpizero python3[31057]: File "/home/openhabian/shared/solaredge_meterproxy/semp-rtu.py", line 153, in
Nov 18 15:53:15 rpizero python3[31057]: address = confparser[meter].getint("dst_address", fallback=default_config["meters"]["dst_address"])
Nov 18 15:53:15 rpizero python3[31057]: File "/usr/lib/python3.9/configparser.py", line 960, in getitem
Nov 18 15:53:15 rpizero python3[31057]: raise KeyError(key)
Nov 18 15:53:15 rpizero python3[31057]: KeyError: ''
Nov 18 15:53:15 rpizero systemd[1]: solaredge_meterproxy.service: Main process exited, code=exited, status=1/FAILURE
Nov 18 15:53:15 rpizero systemd[1]: solaredge_meterproxy.service: Failed with result 'exit-code'.
Nov 18 15:53:15 rpizero systemd[1]: solaredge_meterproxy.service: Consumed 2.287s CPU time.
The text was updated successfully, but these errors were encountered:
But in some way running the script as a service, the serial port is not accessable
2022-11-18 17:57:36 INFO: Starting <Thread(t_update_2, started 3035092032)>
2022-11-18 17:57:36 DEBUG: Using selector: EpollSelector
2022-11-18 17:57:36 DEBUG: Exception while create - name 'create_serial_connection' is not defined
also following is generating same error sudo python3 /home/openhabian/shared/solaredge_meterproxy/semp-rtu.py
without sudo is working fine
python3 /home/openhabian/shared/solaredge_meterproxy/semp-rtu.py
Hi all,
I have an issue with starting this script semp-rtu.py as a service. See below steps I have taken.
Anybody knows what step(s) are missing?
openhabian@rpizero:~ $ cd /lib/systemd/system/
openhabian@rpizero:/lib/systemd/system $ sudo nano solaredge_meterproxy.service
**[Unit]
Description=solaredge_meterproxy
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /home/openhabian/shared/solaredge_meterproxy/semp-rtu.py
Restart=on-abort
[Install]
WantedBy=multi-user.target**
openhabian@rpizero:/lib/systemd/system $ sudo chmod 644 /lib/systemd/system/solaredge_meterproxy.service
openhabian@rpizero:/lib/systemd/system $ chmod +x /home/openhabian/shared/solaredge_meterproxy/semp-rtu.py
openhabian@rpizero:/lib/systemd/system $ sudo nano solaredge_meterproxy.service
openhabian@rpizero:/lib/systemd/system $ sudo systemctl daemon-reload
openhabian@rpizero:/lib/systemd/system $ sudo systemctl enable solaredge_meterproxy.service
chmod +x /home/openhabian/shared/solaredge_meterproxy/.
When starting the service the log gives the error below
sudo journalctl -f -u solaredge_meterproxy.service
Nov 18 15:53:10 rpizero systemd[1]: Started solaredge_meterproxy.
Nov 18 15:53:15 rpizero python3[31057]: Traceback (most recent call last):
Nov 18 15:53:15 rpizero python3[31057]: File "/home/openhabian/shared/solaredge_meterproxy/semp-rtu.py", line 153, in
Nov 18 15:53:15 rpizero python3[31057]: address = confparser[meter].getint("dst_address", fallback=default_config["meters"]["dst_address"])
Nov 18 15:53:15 rpizero python3[31057]: File "/usr/lib/python3.9/configparser.py", line 960, in getitem
Nov 18 15:53:15 rpizero python3[31057]: raise KeyError(key)
Nov 18 15:53:15 rpizero python3[31057]: KeyError: ''
Nov 18 15:53:15 rpizero systemd[1]: solaredge_meterproxy.service: Main process exited, code=exited, status=1/FAILURE
Nov 18 15:53:15 rpizero systemd[1]: solaredge_meterproxy.service: Failed with result 'exit-code'.
Nov 18 15:53:15 rpizero systemd[1]: solaredge_meterproxy.service: Consumed 2.287s CPU time.
The text was updated successfully, but these errors were encountered: