sircuri / GoodWeUSBLogger

Python based logger for GoodWe inverters using USB.
GNU General Public License v3.0
10 stars 7 forks source link

Python3 rebased #11

Closed llagendijk closed 5 years ago

llagendijk commented 5 years ago

This is a new pull request, as I completely messed up my python3 branch. This new branch is based on your master with the python3 patches cherry-picked from the old python 3 branch.

As with the previous patch set, I was not sure how to handle patches for daemonpy. I don't recall where I got daemonpy (was a bit tricky to find out how to get it). The diff is however really simple: diff --git a/daemon.py b/daemon.py index d5fcd23..ed5fd0b 100644 --- a/daemon.py +++ b/daemon.py @@ -1,5 +1,7 @@

!/usr/bin/python

+from future import absolute_import +from future import print_function import sys, os, time, atexit from signal import SIGTERM

As for the issue in serialNumber: when I dump the generated json with mosquitto_sub, I get . . "serial": "13000DSN162W0060", "serialNumber": [ 49, 51, 48, 48, 48, 68, 83, 78, 49, 54, 50, 87, 48, 48, 54, 48 ],

What is the purpose of reporting the serialnumber as a list rather than a string? Thanks for your merging of my patches so far

kind regards, Louis

sircuri commented 5 years ago

Well, thank you for making these changes :)

Ah, yes that array for the serial number. I can't recall why its there. I don't think it is used, but it gets exported because it is part of the RunningInfo object.

sircuri commented 5 years ago

Merged into master