Using Python v3.7.3 I get

Jul  5 11:47:29 nuc weewx[158105] INFO weewx.engine: Using archive interval
of 60 seconds (specified by hardware)
Jul  5 11:47:29 nuc weewx[158105] INFO weewx.restx: StationRegistry:
Registration not requested.
Jul  5 11:47:29 nuc weewx[158105] INFO weewx.restx: Wunderground: Posting
not enabled.
Jul  5 11:47:29 nuc weewx[158105] INFO weewx.restx: PWSweather: Posting not
enabled.
Jul  5 11:47:29 nuc weewx[158105] INFO weewx.restx: CWOP: Posting not
enabled.
Jul  5 11:47:29 nuc weewx[158105] INFO weewx.restx: WOW: Posting not
enabled.
Jul  5 11:47:29 nuc weewx[158105] INFO weewx.restx: AWEKAS: Posting not
enabled.
Jul  5 11:47:29 nuc weewx[158105] CRITICAL __main__: Caught unrecoverable
exception:
Jul  5 11:47:29 nuc weewx[158105] CRITICAL __main__:     ****  invalid
syntax (loopdata.py, line 59)
Jul  5 11:47:29 nuc weewx[158105] CRITICAL __main__:     ****  Traceback
(most recent call last):
Jul  5 11:47:29 nuc weewx[158105] CRITICAL __main__:     ****    File
"./bin/weewxd", line 148, in main
Jul  5 11:47:29 nuc weewx[158105] CRITICAL __main__:     ****      engine =
weewx.engine.StdEngine(config_dict)
Jul  5 11:47:29 nuc weewx[158105] CRITICAL __main__:     ****    File
"/home/weewx/bin/weewx/engine.py", line 76, in __init__
Jul  5 11:47:29 nuc weewx[158105] CRITICAL __main__:     ****
 self.loadServices(config_dict)
Jul  5 11:47:29 nuc weewx[158105] CRITICAL __main__:     ****    File
"/home/weewx/bin/weewx/engine.py", line 139, in loadServices
Jul  5 11:47:29 nuc weewx[158105] CRITICAL __main__:     ****      obj =
weeutil.weeutil.get_object(svc)(self, config_dict)
Jul  5 11:47:30 nuc weewx[158105] CRITICAL __main__:     ****    File
"/home/weewx/bin/weeutil/weeutil.py", line 1093, in get_object
Jul  5 11:47:30 nuc weewx[158105] CRITICAL __main__:     ****      mod =
__import__(module)
Jul  5 11:47:30 nuc weewx[158105] CRITICAL __main__:     ****    File
"/home/weewx/bin/user/loopdata.py", line 59
Jul  5 11:47:30 nuc weewx[158105] CRITICAL __main__:     ****
 COMPASS_OBSERVATIONS: List[str] = ['windDir', 'windGustDir']
Jul  5 11:47:30 nuc weewx[158105] CRITICAL __main__:     ****
           ^
Jul  5 11:47:30 nuc weewx[158105] CRITICAL __main__:     ****  SyntaxError:
invalid syntax
Jul  5 11:47:30 nuc weewx[158105] CRITICAL __main__:     ****  Exiting.

Incidentally, I strongly encourage coding to the same support matrix as
WeeWX itself: Python v2.7 and V3.5 and later. Otherwise, you'll exclude a
lot of potential users.

-tk

-tk

On Sat, Jul 4, 2020 at 6:59 PM John Kline <[email protected]> wrote:

> Hi all,
>
> I have an extension, LoopData, that can be used to update weewx report web
> pages on each loop packet (of course, JavaScript is needed in the web
> pages).
>
> I’ve tested it with US, METRIC and METRICWX databases targeting US and
> metric reports.
>
> Alas, I have only tested it with the the RainWise CC3000 and IP100 drivers
> and the simulator.  I suspect there will be issues when other drivers are
> tried.
>
> It’s been tried by a couple of people on weewx-users, but at this point,
> I’d prefer weewx-developers give it a try.
>
> I would appreciate it if some of you could try it.  Running it just for a
> couple of loop cycles is fine—to see if the loop-data.txt file is being
> produced and to verify the contents of it look good.
>
> The install sets loop_data_dir to/home/weewx/public_html (yes, it should
> use a symbolic here).  Change it as necessary.
>
> The file is named loop-data.txt (by default).
>
> Please note, one user complained, after installing many versions, that one
> version of loopdata broke his installation.  He’s since fixed his
> weewx.conf.  I don’t believe the very simple install did that; but I feel
> it necessary to make you aware this.  If you do find this issue. Simply
> copy over the backup of weewx.conf that the install makes and restart.
>  (And of course, report the issue.)
>
> The aim is for loop-data.txt to yield exactly what the JavaScript needs
> right out of the box.  Please let me know what issues you run into.
>
> Install at head from https://github.com/chaunceygardiner/weewx-loopdata.
> Detailed installation instructions are there.
>
> Details of LoopData
> (BTW, credit to Gary for his great rtgd work that inspired this.)
>
> To use LoopData, you pick a report to target (e.g., SeasonsReport) and
> then all scalar observations, along with day high (w/ time), low (w/time),
> average, weighted average and sums are available in a form appropriate for
> the report.  That is, all of these are automatically converted and
> formatted to match the target report.  As such, if the SeasonsReport is
> targeted, and one changes windSpeed in the SeasonsReport to be in meters
> per second with three decimal places, windSpeed in the loop-data.txt file
> will also be in meters per second with three decimal places.  Formatting
> with a label is achieved simply by prepending FMT_ to the observation.  As
> such, FMT_SUM_rain would yield “FMT_SUM_rain”: “0.03 in” in loop-data.txt
> if .03 inches of rain fell today (even if the database was METRIC).
>
> Of course, if all of this data would make for an enormous loop-data.txt
> file: <obs>, FMT_<obs>, SUM_<obs>, FMT_SUM_<obs>, AVG_<obs>, FMT_AVG_<obs>
> and so on and so forth).  As such, it is possible to only include what you
> are going to use.
>
> For example:
>    [[Include]]
>         fields = dateTime, windSpeed, COMPASS_windDir, DESC_barometerRate,
> FMT_barometer, FMT_SUM_rain, FMT_dewpoint, FMT_heatindex, FMT_outHumidity,
> FMT_outTemp, FMT_rainRate, FMT_windchill, FMT_windSpeed, FMT_HI_windGust,
> FMT_10mMaxGust, pm2_5_aqi, pm2_5_aqic
>
> Yields a loop-data.txt file containing the following.  This is assuming
> everything in the include is in the loop packet.  Anything not in the loop
> packet will, of course, not be present in loop-data.txt.
>
> {"dateTime": 1593911456, "windSpeed": "4.4", "COMPASS_windDir": "N",
> "DESC_barometerRate": "Falling Slowly", "FMT_barometer": "29.965 inHg",
> "FMT_SUM_rain": "0.00 in", "FMT_dewpoint": "55.4\u00b0F", "FMT_heatindex":
> "88.2\u00b0F", "FMT_outHumidity": "33%", "FMT_outTemp": "88.2\u00b0F",
> "FMT_rainRate": "0.00 in/h", "FMT_windchill": "88.2\u00b0F",
> "FMT_windSpeed": "4.4 mph", "FMT_HI_windGust": "12.6 mph",
> "FMT_10mMaxGust": "9.1 mph", "pm2_5_aqi": "46", "pm2_5_aqic": "11204096"}
>
> Please let me know if you were successful and/or any issues that arose.
>
> Cheers,
> John
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-development/C255B03F-8498-48D9-A7A2-0D5EEACEF6C1%40johnkline.com
> <https://groups.google.com/d/msgid/weewx-development/C255B03F-8498-48D9-A7A2-0D5EEACEF6C1%40johnkline.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/CAPq0zEBX%2B5F3HCN%2BrtVuH9t%3DAmX-T5pCNjHbiSy1EFvytEBPSg%40mail.gmail.com.

Reply via email to