hansij66 / dsmr2mqtt

DSMR to MQTT; Smartmeter to MQTT; Slimme meter naar MQTT
GNU General Public License v3.0
9 stars 14 forks source link

AttributeError: module 'serial' has no attribute 'Serial' #1

Closed PA8E closed 1 year ago

PA8E commented 2 years ago

Got error: AttributeError: module 'serial' has no attribute 'Serial' dsmr-mqtt.mqtt INFO: FUNCTION:del LINE:162: >>

Python 3.8.6 @ Synology DSM6

hansij66 commented 2 years ago

Hi, as it seems that you get the error when you exit the parser (?), did the parser work for you? Did you get any readings from your smart meter?

I cannot reason yet what went wrong, it works fine on my side

On Fri, Jul 1, 2022 at 11:54 AM PA8E @.***> wrote:

Got error: AttributeError: module 'serial' has no attribute 'Serial' dsmr-mqtt.mqtt INFO: FUNCTION:del LINE:162: >>

Python 3.8.6 @ Synology DSM6

— Reply to this email directly, view it on GitHub https://github.com/hansij66/dsmr2mqtt/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFFPZD3XUSPT5LB6CRTJXSLVR2543ANCNFSM52MFMU3A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

hansij66 commented 2 years ago

have you installed module pyserial? See requirements.txt for all prerequisites.

On Fri, Jul 1, 2022 at 11:54 AM PA8E @.***> wrote:

Got error: AttributeError: module 'serial' has no attribute 'Serial' dsmr-mqtt.mqtt INFO: FUNCTION:del LINE:162: >>

Python 3.8.6 @ Synology DSM6

— Reply to this email directly, view it on GitHub https://github.com/hansij66/dsmr2mqtt/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFFPZD3XUSPT5LB6CRTJXSLVR2543ANCNFSM52MFMU3A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

PA8E commented 2 years ago

Hi Hans, yes I did. I installed a fresh RaspberryPi for this purpose only. I've got the same error. It turn out I had the script as root. As a systemd-service it seems to run fine. Can you confirm if these lines in the log are okay? Jul 1 16:15:18 DSRM dsmr-mqtt.mqtt[2976] WARNING: 16:15:18 FUNCTION:do_mqtt LINE:328: No connection with MQTT Broker; 2 messages queued Jul 1 16:15:18 DSRM dsmr-mqtt.py[2976]: dsmr-mqtt.mqtt INFO: FUNCTION:__do_mqtt LINE:331: Connection with MQTT Broker; 3 messages queued Jul 1 16:15:19 DSRM dsmr-mqtt.mqtt[2976] INFO: 16:15:18 FUNCTION:do_mqtt LINE:331: Connection with MQTT Broker; 3 messages queued

hansij66 commented 2 years ago

Your log files look OK. I have check my notes, below comment will likely solve your issue:

add root (or user which runs script) to group dialout (/etc/groups)

On Fri, Jul 1, 2022 at 4:27 PM PA8E @.***> wrote:

Hi Hans, yes I did. I installed a fresh RaspberryPi for this purpose only. I've got the same error. It turn out I had the script as root. As a systemd-service it seems to run fine. Can you confirm if these lines in the log are okay? Jul 1 16:15:18 DSRM dsmr-mqtt.mqtt[2976] WARNING: 16:15:18 FUNCTION:do_mqtt LINE:328: No connection with MQTT Broker; 2 messages queued Jul 1 16:15:18 DSRM dsmr-mqtt.py[2976]: dsmr-mqtt.mqtt INFO: FUNCTION:__do_mqtt LINE:331: Connection with MQTT Broker; 3 messages queued Jul 1 16:15:19 DSRM dsmr-mqtt.mqtt[2976] INFO: 16:15:18 FUNCTION:do_mqtt LINE:331: Connection with MQTT Broker; 3 messages queued

— Reply to this email directly, view it on GitHub https://github.com/hansij66/dsmr2mqtt/issues/1#issuecomment-1172408698, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFFPZD3EIBFU3DKGVCGMRVLVR356RANCNFSM52MFMU3A . You are receiving this because you commented.Message ID: @.***>

hansij66 commented 1 year ago

close by lack of feedback on last suggestion