Vince, Great suggestion. I must admit that it's been a few years since last coding project. Is it like riding a bike? In the process of adding a few tools to the PI and will give it a try. Should know if this reasonable step works in the next week or so.
Stay healthy, Pat On Tuesday, June 4, 2024 at 12:30:14 PM UTC-4 vince wrote: > * Missing parentheses in call to 'print'. Did you mean print(...)? > (envoy.py, line 164)* > > Looks like the driver is very ancient and has not been ported to python3. > You could try to clean it up with 2to3 and perhaps that's all that is > missing.... > > On Tuesday, June 4, 2024 at 7:24:21 AM UTC-7 P Black wrote: > >> All, >> >> I am trying out 2 different tasks. First is to confirm that I can make >> weewx run on a raspberry pi before I move from wview and then to automate >> the collection of data from our enphase envoy system. This post is >> regarding my second task which I am trying out on a different raspberry pi >> from what I will use to replace my wview system. >> >> System: >> raspberry pi 4b >> latest os >> WeeWx 5.0 >> >> So far: >> WeeWx runs using Simulator >> Installed Matthew Wall's driver >> - weectl extension install /home/pi/weewx-envoy.zip >> Then ran >> - weectl station reconfigure >> but obtained these warnings and errors: >> >> *Warning ---* >> >> >> *Choose a driver. Installed drivers include: 0) ? >> (user.envoy) Missing parentheses in call to 'print'. Did you >> mean print(...)? (envoy.py, line 164) 1) AcuRite >> (weewx.drivers.acurite)* >> then the standard list of stations >> >> After selecting 0): for the driver the errors arrive: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> *driver [4]: 0Traceback (most recent call last): File >> "/usr/share/weewx/weectl.py", line 74, in <module> main() File >> "/usr/share/weewx/weectl.py", line 66, in main >> namespace.func(namespace) File "/usr/share/weewx/weectllib/__init__.py", >> line 121, in dispatch namespace.action_func(config_dict, namespace) >> File "/usr/share/weewx/weectllib/station_cmd.py", line 311, in >> reconfigure_station >> weectllib.station_actions.station_reconfigure(config_dict=config_dict, >> File "/usr/share/weewx/weectllib/station_actions.py", line 164, in >> station_reconfigure config_config(config_dict, File >> "/usr/share/weewx/weectllib/station_actions.py", line 207, in >> config_config config_driver(config_dict, driver=driver, >> no_prompt=no_prompt) File "/usr/share/weewx/weectllib/station_actions.py", >> line 419, in config_driver driver_editor, driver_name, driver_version = >> weecfg.load_driver_editor(final_driver) >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File >> "/usr/share/weewx/weecfg/__init__.py", line 451, in load_driver_editor >> driver_module = importlib.import_module(driver_module_name) >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File >> "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module >> return _bootstrap._gcd_import(name[level:], package, level) >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen >> importlib._bootstrap>", line 1206, in _gcd_import File "<frozen >> importlib._bootstrap>", line 1178, in _find_and_load File "<frozen >> importlib._bootstrap>", line 1149, in _find_and_load_unlocked File >> "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen >> importlib._bootstrap_external>", line 936, in exec_module File "<frozen >> importlib._bootstrap_external>", line 1074, in get_code File "<frozen >> importlib._bootstrap_external>", line 1004, in source_to_code File >> "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed >> File "/etc/weewx/bin/user/envoy.py", line 164 print "Specify the >> hostname or address of the Envoy" >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^SyntaxError: Missing >> parentheses in call to 'print'. Did you mean print(...)?* >> >> Before I jump in blindly looking at the code.....a question. Is the core >> issue something like the driver no longer will work with the current >> version of WeeWx or is there some simple modification that will make it >> work? >> >> Stay healthy, >> Pat >> >> >> >> >> >> >> >> >> >> >> On Thursday, April 30, 2020 at 4:50:28 PM UTC-4 weather list wrote: >> >>> I’ve been working on getting this going and have some questions. >>> >>> Reading Matthew Wall’s notes in envoy.py, my Envoy appears to be the >>> ovular unit. >>> >>> Current Software Version R3.12.34 (2e8bfe) >>> Software Build Date Wed Apr 29, 2015 02:28 PM PDT >>> >>> On my unit, http://192.168.1.16/api/v1/production outputs: >>> { >>> "wattHoursToday": 23071, >>> "wattHoursSevenDays": 157158, >>> "wattHoursLifetime": 23581797, >>> "wattsNow": 842 >>> } >>> >>> envoy.conf is set up so: >>> >>> [Envoy] >>> # This section is for the Enphase Envoy driver. >>> >>> # Hostname or IP address of the Envoy >>> host = 192.168.1.16 >>> >>> # Envoy serial number >>> serial = serial_nbr_here >>> >>> # The driver to use: >>> driver = user.envoy >>> >>> >>> >>> Running envoy.conf manually outputs: >>> >>> LOOP: 2020-04-30 16:16:59 EDT (1588277819) dateTime: 1588277819, >>> energy: None, energy_total: None, maxSolarRad: 751.250337201, power: None, >>> rainRate: 0, usUnits: 1 >>> REC: 2020-04-30 16:15:00 EDT (1588277700) dateTime: 1588277700.0, >>> energy: None, energy_total: None, ET: None, interval: 5, maxSolarRad: >>> 767.6566517, power: None, rainRate: 0.0, usUnits: 1 >>> >>> >>> envoy.py has this config: >>> >>> class Envoy(object): >>> >>> >>> def __init__(self, host): >>> self.host = host >>> self.url = "http://%s/api/v1/production" % host >>> >>> >>> But I am clearly not getting the output shown by the web interface. >>> >>> weewx 3.9.2 >>> python 2.7 >>> >>> Pointers most welcome. >>> >>> -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/de55ce8f-9154-473f-86e9-f1018dfa41ean%40googlegroups.com.