Hello, It seems that radiation values are missing for some archive records. Line 92 of sunduration.py had a wrong indentation. This is now corrected in my Github repository.
> Le 31 juil. 2022 à 06:45, Meteo Oberwallis <[email protected]> a écrit : > > Hello. > I have a Problem, wenn weewx stop an ih restart, can not read the Datalogger > from Update to weewx. I have this for logging the sunshine time -> > https://github.com/Jterrettaz/sunduration/blob/master/sunduration.py > <https://github.com/Jterrettaz/sunduration/blob/master/sunduration.py> > I have the Version weewx 4.8.0 > > Jul 31 06:31:03 Wetter systemd[1]: Started LSB: weewx weather system. > Jul 31 06:31:07 Wetter weewx[5077] DEBUG weewx.drivers.vantage: Retry #0 > failed > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.drivers.vantage: Gentle wake > up of console successful > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.drivers.vantage: Hardware type > is 16 > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.drivers.vantage: ISS ID is 1 > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.drivers.vantage: Hardware > name: Vantage Pro2 > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.engine.StdTimeSynch > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.engine.StdTimeSynch > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > user.cputemp.AddCpuTemp > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service user.cputemp.AddCpuTemp > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > user.sunduration.SunshineDuration > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service user.sunduration.SunshineDuration > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.engine.StdConvert > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.engine: StdConvert target unit > is 0x1 > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.engine.StdConvert > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.engine.StdCalibrate > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.engine.StdCalibrate > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.engine.StdQC > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.engine.StdQC > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.wxservices.StdWXCalculate > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.wxservices: StdWXCalculate will > use data binding wx_binding > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.manager: Daily summary version > is 4.0 > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.wxservices.StdWXCalculate > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.wxxtypes.StdWXXTypes > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.wxxtypes.StdWXXTypes > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.wxxtypes.StdPressureCooker > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.wxxtypes.StdPressureCooker > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.wxxtypes.StdRainRater > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.wxxtypes.StdRainRater > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.wxxtypes.StdDelta > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.wxxtypes.StdDelta > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.engine.StdArchive > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.engine: Archive will use data > binding wx_binding > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.engine: Record generation will > be attempted in 'hardware' > Jul 31 06:31:09 Wetter weewx[5077] ERROR weewx.engine: The archive interval > in the configuration file (300) does not match the station hardware interval > (600). > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.engine: Using archive interval > of 600 seconds (specified by hardware) > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Use LOOP data in > hi/low calculations: 1 > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.engine.StdArchive > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.restx.StdStationRegistry > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.restx: StationRegistry: > Registration not requested. > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.restx.StdStationRegistry > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.restx.StdWunderground > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.restx: Wunderground: Posting > not enabled. > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.restx.StdWunderground > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.restx.StdPWSweather > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.restx: PWSweather: Posting not > enabled. > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.restx.StdPWSweather > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.restx.StdCWOP > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.restx: CWOP: Posting not > enabled. > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.restx.StdCWOP > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.restx.StdWOW > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.restx: WOW: Posting not enabled. > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.restx.StdWOW > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.restx.StdAWEKAS > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.restx: AWEKAS: Posting not > enabled. > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.restx.StdAWEKAS > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > user.mqtt.MQTT > Jul 31 06:31:09 Wetter weewxd: restx: MQTT: service version is 0.19 > Jul 31 06:31:09 Wetter weewxd: restx: MQTT: binding to [u'archive', u'loop'] > Jul 31 06:31:09 Wetter weewxd: restx: MQTT: topic is weather/mittelallalin > Jul 31 06:31:09 Wetter weewxd: restx: MQTT: desired unit system is METRIC > Jul 31 06:31:09 Wetter weewxd: restx: MQTT: data will be uploaded to > mqtt://mosquitto:xxx@ > <mqtt://mosquitto:[email protected]:1883/>185.160.244.35:1883/ > <mqtt://mosquitto:[email protected]:1883/> > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service user.mqtt.MQTT > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.engine.StdPrint > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.engine.StdPrint > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Loading service > weewx.engine.StdReport > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.engine: 'pyephem' not detected, > extended almanac data is not available > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.engine: Finished loading > service weewx.engine.StdReport > Jul 31 06:31:09 Wetter weewx[5077] INFO __main__: Starting up weewx version > 4.8.0 > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.drivers.vantage: Gentle wake > up of console successful > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.engine: Clock error is 4.42 > seconds (positive is fast) > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.engine: Using binding > 'wx_binding' to database 'weewx.sdb_new' > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.manager: Starting backfill of > daily summaries > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.manager: Daily summaries up to > date > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.drivers.vantage: Getting > archive packets since 2022-07-30 16:40:00 CEST (1659192000) > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.manager: Daily summary version > is 4.0 > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.drivers.vantage: Gentle wake > up of console successful > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.drivers.vantage: Retrieving 18 > page(s); starting index= 3 > Jul 31 06:31:09 Wetter weewx[5077] INFO weewx.engine: Main loop exiting. > Shutting engine down. > Jul 31 06:31:09 Wetter weewx[5077] DEBUG weewx.restx: Shut down MQTT thread. > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: Caught unrecoverable > exception: > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** 'radiation' > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** Traceback > (most recent call last): > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** File > "/usr/share/weewx/weewxd", line 153, in main > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** > engine.run() > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** File > "/usr/share/weewx/weewx/engine.py", line 178, in run > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** > self.dispatchEvent(weewx.Event(weewx.STARTUP)) > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** File > "/usr/share/weewx/weewx/engine.py", line 245, in dispatchEvent > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** > callback(event) > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** File > "/usr/share/weewx/weewx/engine.py", line 584, in startup > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** > self._catchup(self.engine.console.genStartupRecords) > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** File > "/usr/share/weewx/weewx/engine.py", line 702, in _catchup > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** > origin='hardware')) > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** File > "/usr/share/weewx/weewx/engine.py", line 245, in dispatchEvent > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** > callback(event) > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** File > "/usr/share/weewx/user/sunduration.py", line 92, in newArchiveRecord > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** > event.record['sunshine_hours'], event.record['radiation'], self.lastSeuil)) > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** KeyError: > 'radiation' > Jul 31 06:31:09 Wetter weewx[5077] CRITICAL __main__: **** Exiting. > > Can i Help me? > Thanks > > [email protected] <http://gmail.com/> schrieb am Freitag, 22. Juli 2022 um > 18:45:46 UTC+2: > I didn't and that's done the trick, thanks! > > On Friday, 22 July 2022 at 17:12:35 UTC+1 [email protected] > <applewebdata://43B36FBA-9DC7-42A7-9284-25C8EA2BCAE7> wrote: > Did you try to add group_interval = hour in the [[Defaults]] [[[Units]]] > [[[[Groups]]]] section of weewx.conf ? > > >> Le 22 juil. 2022 à 16:35, Jon B <[email protected] <>> a écrit : >> > >> Thanks. I'm using the Belchertown skin so I think things may be set up >> slightly differently. Within this skin, a new observation type is defined >> for rain (rainTotal), which aggregates the total rain across the observation >> period. I've defined an equivalent for sunshine time, which I've called >> "sunshineTotal" so I now have the total number of minutes of sun for a given >> day/month etc. According to the documentation for that skin I should just be >> able to define the "unit" within the graphs.conf file, but adding "unit = >> hour" doesn't seem to make any difference. Perhaps this is something I need >> to ask on the Belchertown github page... >> On Friday, 22 July 2022 at 12:34:08 UTC+1 [email protected] >> <http://gmail.com/> wrote: >> @Jon B >> >> If you are retrieving the values using weewx tags, you can have the daily >> total sunshine duration, in hours with the following tag : >> $day.sunshine_time.sum.hour >> >> You can do the same with different aggregation periods , for instance : >> $yesterday.sunshine_time.sum.hour >> $week.sunshine_time.sum.hour >> $month.sunshine_time.sum.hour >> $year.sunshine_time.sum.hour >> $alltime.sunshine_time.sum.hour >> >> >> Look here : >> https://groups.google.com/g/weewx-user/c/z_hcx4deACQ/m/y9P2tF9qAwAJ >> <https://groups.google.com/g/weewx-user/c/z_hcx4deACQ/m/y9P2tF9qAwAJ> >> >> >> >>> Le 22 juil. 2022 à 11:48, Jon B <[email protected] <>> a écrit : >>> >> >>> Thanks for the fix! It's working now for me. >>> >>> A couple of other questions about this: >>> >>> - How can I change it so that the units are hours, rather than minutes? >>> - How can I add a total daily sunshine duration field, rather than >>> displaying the total sunshine within the last archive period? >>> >>> Thanks! >>> >>> On Monday, 18 July 2022 at 15:30:26 UTC+1 [email protected] >>> <http://gmail.com/> wrote: >>> I looked at the code in my GitHub, and it appeared that the last line >>> >>> schema_with_sunshine_time = schemas.wview.schema + [('sunshine_time', >>> 'REAL')] >>> >>> had a wrong indentation. >>> >>> This is corrected now. Sorry ! >>> >>> >>>> Le 18 juil. 2022 à 15:43, Jon B <jonbe...@ <>gmail.com >>>> <http://gmail.com/>> a écrit : >>>> >>> >>>> Sorry for piggybacking on this conversation, but it seemed like an >>>> appropriate place to ask this. >>>> >>>> I'm trying to install the sunshine duration extension >>>> (https://github.com/Jterrettaz/sunduration >>>> <https://github.com/Jterrettaz/sunduration>) but I'm getting an error when >>>> trying to create the new database. I've followed the installation >>>> instructions as follows: >>>> >>>> - Saved sunduration.py to /usr/share/weewx/user/ >>>> - Added user.sunduration.SunshineDuration to the process_services list >>>> - Changed the wx_binding schema to >>>> user.sunduration.schema_with_sunshine_time >>>> - Stopped weewx and ran wee_database weewx.conf --reconfigure >>>> >>>> This gives the following error: >>>> >>>> Using configuration file weewx.conf >>>> Using database binding 'wx_binding', which is bound to database >>>> 'archive_sqlite' >>>> Traceback (most recent call last): >>>> File "/usr/share/weewx/weeutil/weeutil.py", line 1155, in get_object >>>> mod = getattr(mod, part) >>>> AttributeError: module 'user.sunduration' has no attribute >>>> 'schema_with_sunshine_time' >>>> >>>> During handling of the above exception, another exception occurred: >>>> >>>> Traceback (most recent call last): >>>> File "/usr/share/weewx/wee_database", line 1170, in <module> >>>> main() >>>> File "/usr/share/weewx/wee_database", line 216, in main >>>> reconfigMainDatabase(config_dict, db_binding) >>>> File "/usr/share/weewx/wee_database", line 439, in reconfigMainDatabase >>>> manager_dict = weewx.manager.get_manager_dict_from_config(config_dict, >>>> File "/usr/share/weewx/weewx/manager.py", line 727, in >>>> get_manager_dict_from_config >>>> manager_dict['schema'] = weeutil.weeutil.get_object(schema_name) >>>> File "/usr/share/weewx/weeutil/weeutil.py", line 1158, in get_object >>>> raise AttributeError( >>>> AttributeError: Module 'user.sunduration' has no attribute >>>> 'schema_with_sunshine_time' when searching for >>>> 'user.sunduration.schema_with_sunshine_time' >>>> On Sunday, 17 July 2022 at 10:12:51 UTC+1 [email protected] >>>> <http://gmail.com/> wrote: >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "weewx-user" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe >>>> <https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe>. >>>> To unsubscribe from this group and all its topics, send an email to >>>> weewx-user+...@ <>googlegroups.com <http://googlegroups.com/>. >>> >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/weewx-user/e50560aa-d030-4096-97b4-7b9b614dc4cdn%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/weewx-user/e50560aa-d030-4096-97b4-7b9b614dc4cdn%40googlegroups.com?utm_medium=email&utm_source=footer>. >>> >>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "weewx-user" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe >>> <https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe>. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected] <>. >> >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/weewx-user/571f223d-9f92-4056-b9ac-8c8aff15c501n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/weewx-user/571f223d-9f92-4056-b9ac-8c8aff15c501n%40googlegroups.com?utm_medium=email&utm_source=footer>. >> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "weewx-user" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe >> <https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe>. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <>. > >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/adc2ed4c-ad2c-4d8f-8112-9e67da7f5ac4n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-user/adc2ed4c-ad2c-4d8f-8112-9e67da7f5ac4n%40googlegroups.com?utm_medium=email&utm_source=footer>. > > > -- > You received this message because you are subscribed to a topic in the Google > Groups "weewx-user" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe > <https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe>. > To unsubscribe from this group and all its topics, send an email to > [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/0a42c350-b5af-47f4-9e18-34ae7dc2b70an%40googlegroups.com > > <https://groups.google.com/d/msgid/weewx-user/0a42c350-b5af-47f4-9e18-34ae7dc2b70an%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/9544BD8B-A322-4B5A-A46F-8E292211DCB4%40gmail.com.
