[weewx-user] Re: use Weewx on raspberry
Patrick is your raspberry pi working again? On Tuesday, December 11, 2018 at 3:31:57 AM UTC-5, Patrick Tranchant wrote: > > hello Rich T > > yes, I used this package but in Pyton3 or 2 > > sudo pip(3) install RPi.bme280 > this is the same problem > > the module works with my script, just problem with Weewx. > > Patrick > > > On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote: >> >> hello I am a newbie from France ( sorry for my english ) >> >> I want to use weewx on a raspberry with a weather station built by myself >> (view on Magpi) >> I don't see my station on your website to configure : >> >> Weather Station Hardware Comparison: I don't found my weather station. >> Do you have a solution or how to configure Weewx >> >> thank you for your help >> >> Patrick >> > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: use Weewx on raspberry
hello yes it works I tested with my script, just a little problem with the wind_direction (script I think ) Patrick On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote: > > hello I am a newbie from France ( sorry for my english ) > > I want to use weewx on a raspberry with a weather station built by myself > (view on Magpi) > I don't see my station on your website to configure : > > Weather Station Hardware Comparison: I don't found my weather station. > Do you have a solution or how to configure Weewx > > thank you for your help > > Patrick > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: table archive_day_barometer already exists
Whoops. Someone who really knows crossposted at the same time I did. Happy to see my advice was good! phil On Tuesday, December 11, 2018 at 8:04:57 PM UTC-5, kutz...@gmail.com wrote: > > I'm not a database nor a weewx expert. But I'd try using the wee_database > utility trying first the --rebuild-daily option first (you could limit it > to only today). If that fails, I'd then do a wee_database --drop-daily > followed by a wee_database --rebuild-daily. See the Utlilities Guide on > this: http://weewx.com/docs/utilities.htm#wee_database_utility. Make sure > to stop weewx before using these commands and keep a backup of the database > if my advice hoses it :-). > phil > > On Tuesday, December 11, 2018 at 7:03:48 PM UTC-5, Dave Harper wrote: >> >> Over the past year I've had numerous cases of a corrupted database. I >> learned early on to have a good backup scheme in place and it has served me >> well - up until today. After I noticed that the web page was no longer >> updating I checked the /var/sys/logfile and found the message >> "DatabaseError: database disk image is malformed". Shortly after that I >> discovered my backups for the past month were not working, so I've been >> faced with trying to repair the weewx.sdb file. I've found several posts >> describing how to recover from problems like this and ended up using the >> repairsdb.sh script that I found in one of them. That fixed the >> "malformed" error and I am now able to load the database but when weewx >> starts it now aborts with the error that "table archive_day_barometer >> already exists". I had never used sqlite3 prior to weewx and am not really >> familiar with what to try now. Anybody have any ideas I can try? >> >> Thanks >> Dave >> > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: unable to get data from weather station lw30* (oregon weather anywhere)
Try to see which ports are listening: netstat -lptn On Tuesday, December 11, 2018 at 2:11:17 PM UTC-7, G Dupuis 89 wrote: > > Hi >> > trying to make progress… > > after installing pihole, trafic to Gateway.weather.oregonscientific.com > is re-directed to my pi hosting weewx(also hosting pihole) but i still have > the same issue… > web servers are stopped, so Nothing is using port80 > any idea ? > -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [weewx-user] Re: Belchertown Skin 0.8.1 released
Great news, glad to hear you sorted it. Cheers Colin On Wed, 12 Dec 2018, 03:47 G Hammer I did. The sqlite3 commands from Phil allowed me to see that whatever > config I did was not actually active. > I blame user error as I had edited files on one machine and ftp'd the > files to the server. > Performing the entire process on the server gave the expected result. > > Thanks for the education to all! > > On Monday, December 10, 2018 at 7:05:31 PM UTC-5, Colin Larsen wrote: >> >> Do you also see errors on your Records page where Highest App Temp and >> Lowest App temp are? >> >> On Tue, Dec 11, 2018 at 12:03 PM wrote: >> >>> That should do it. >>> >>> If you have sqlite3 installed, you can open the database with the >>> command sqlite3 weewx.sdb and then issue the command: >>> >>> .schema archive >>> >>> You should see `appTemp` REAL at the end of the list. >>> >>> The command: >>> >>> .tables >>> >>> should show archive_day_appTemp somewhere in the list. >>> >>> .exit >>> >>> will exit the program >>> >>> It's best to have weewx stopped prior to opening the database with >>> sqlite3. >>> phil >>> >>> >>> On Monday, December 10, 2018 at 5:41:02 PM UTC-5, G Hammer wrote: >>> Hmmm, well then I'm at a loss. I though the database had been extended. Here's what I did: Edit extensions.py to be: import schemas.wview schema_apptemp = schemas.wview.schema + [('appTemp', 'REAL')] Stop weewx Edit weewx.conf to have: [DataBindings] [[wx_binding]] # The database must match one of the sections in [Databases]. # This is likely to be the only option you would want to change. database = archive_sqlite # The name of the table within the database table_name = archive # The manager handles aggregation of data for historical summaries manager = weewx.wxmanager.WXDaySummaryManager # The schema defines the structure of the database. # It is *only* used when the database is created. #schema = schemas.wview.schema schema = user.extensions.schema_apptemp Ran wee_database weewx.conf --reconfigure Renamed weewx.sdb to weewx.sdb.org Renamed the new file to weewx.sdb Ran wee_database --rebuild-daily Start weewx On Monday, December 10, 2018 at 1:30:05 PM UTC-5, Colin Larsen wrote: > > If you haven't extended the database as per the Weewx wiki you will > get those errors. I haven't written a guide but it is reasonably > straightforward > > On Tue, 11 Dec 2018, 07:05 G Hammer >> Yes, in fact followed your guide above. >> The Feels like shows in the temp display, but when enabled in charts >> you get the error. >> >> -- >> 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+...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- >>> 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+...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Belchertown Skin 0.8.1 released - Suggestion
Thank you for your hard work. I am looking around for a alternative to Highcharts and I found this: https://www.highcharts.com/stock/demo/basic-line It would be cool if this could be integrated in the skin :) Just a suggestion Am Freitag, 7. Dezember 2018 23:12:23 UTC+1 schrieb Pat: > > The last thread was getting a bit long. So I've started a new one. > > Belchertown Skin 0.8.1 has been released which fixes a couple of bugs. See > the release notes, and install instructions here: > > https://github.com/poblabs/weewx-belchertown/releases > > > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Belchertown Skin 0.8.1 released
Is there a way to include alerts from Darksky? On Friday, December 7, 2018 at 5:12:23 PM UTC-5, Pat wrote: > > The last thread was getting a bit long. So I've started a new one. > > Belchertown Skin 0.8.1 has been released which fixes a couple of bugs. See > the release notes, and install instructions here: > > https://github.com/poblabs/weewx-belchertown/releases > > > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: unable to get data from weather station lw30* (oregon weather anywhere)
oh, and run it with root privileges to see what program is using it: sudo netstat -lptn On Tuesday, December 11, 2018 at 3:19:08 PM UTC-7, mashDrone wrote: > > Try to see which ports are listening: > > netstat -lptn > > On Tuesday, December 11, 2018 at 2:11:17 PM UTC-7, G Dupuis 89 wrote: >> >> Hi >>> >> trying to make progress… >> >> after installing pihole, trafic to Gateway.weather.oregonscientific.com >> is re-directed to my pi hosting weewx(also hosting pihole) but i still have >> the same issue… >> web servers are stopped, so Nothing is using port80 >> any idea ? >> > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] table archive_day_barometer already exists
Hi, Try the following: 1. Stop weeWX 2. Use the wee_database utility to drop the daily summaries 3. Use the wee_database utuilit to rebuild the daily summaries 4. Restart WeeWX wee_database usage is documented in the Utilities Guide (http://weewx.com/docs/utilities.htm#wee_database_utility) Gary -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] table archive_day_barometer already exists
Over the past year I've had numerous cases of a corrupted database. I learned early on to have a good backup scheme in place and it has served me well - up until today. After I noticed that the web page was no longer updating I checked the /var/sys/logfile and found the message "DatabaseError: database disk image is malformed". Shortly after that I discovered my backups for the past month were not working, so I've been faced with trying to repair the weewx.sdb file. I've found several posts describing how to recover from problems like this and ended up using the repairsdb.sh script that I found in one of them. That fixed the "malformed" error and I am now able to load the database but when weewx starts it now aborts with the error that "table archive_day_barometer already exists". I had never used sqlite3 prior to weewx and am not really familiar with what to try now. Anybody have any ideas I can try? Thanks Dave -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: table archive_day_barometer already exists
I'm not a database nor a weewx expert. But I'd try using the wee_database utility trying first the --rebuild-daily option first (you could limit it to only today). If that fails, I'd then do a wee_database --drop-daily followed by a wee_database --rebuild-daily. See the Utlilities Guide on this: http://weewx.com/docs/utilities.htm#wee_database_utility. Make sure to stop weewx before using these commands and keep a backup of the database if my advice hoses it :-). phil On Tuesday, December 11, 2018 at 7:03:48 PM UTC-5, Dave Harper wrote: > > Over the past year I've had numerous cases of a corrupted database. I > learned early on to have a good backup scheme in place and it has served me > well - up until today. After I noticed that the web page was no longer > updating I checked the /var/sys/logfile and found the message > "DatabaseError: database disk image is malformed". Shortly after that I > discovered my backups for the past month were not working, so I've been > faced with trying to repair the weewx.sdb file. I've found several posts > describing how to recover from problems like this and ended up using the > repairsdb.sh script that I found in one of them. That fixed the > "malformed" error and I am now able to load the database but when weewx > starts it now aborts with the error that "table archive_day_barometer > already exists". I had never used sqlite3 prior to weewx and am not really > familiar with what to try now. Anybody have any ideas I can try? > > Thanks > Dave > -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [weewx-user] Re: table archive_day_barometer already exists
It's always good when 2 people come back with the same answer :) On Wed, 12 Dec 2018, 14:06 Whoops. Someone who really knows crossposted at the same time I did. Happy > to see my advice was good! > phil > > On Tuesday, December 11, 2018 at 8:04:57 PM UTC-5, kutz...@gmail.com > wrote: >> >> I'm not a database nor a weewx expert. But I'd try using the wee_database >> utility trying first the --rebuild-daily option first (you could limit >> it to only today). If that fails, I'd then do a wee_database --drop-daily >> followed by a wee_database --rebuild-daily. See the Utlilities Guide on >> this: http://weewx.com/docs/utilities.htm#wee_database_utility. Make >> sure to stop weewx before using these commands and keep a backup of the >> database if my advice hoses it :-). >> phil >> >> On Tuesday, December 11, 2018 at 7:03:48 PM UTC-5, Dave Harper wrote: >>> >>> Over the past year I've had numerous cases of a corrupted database. I >>> learned early on to have a good backup scheme in place and it has served me >>> well - up until today. After I noticed that the web page was no longer >>> updating I checked the /var/sys/logfile and found the message >>> "DatabaseError: database disk image is malformed". Shortly after that I >>> discovered my backups for the past month were not working, so I've been >>> faced with trying to repair the weewx.sdb file. I've found several posts >>> describing how to recover from problems like this and ended up using the >>> repairsdb.sh script that I found in one of them. That fixed the >>> "malformed" error and I am now able to load the database but when weewx >>> starts it now aborts with the error that "table archive_day_barometer >>> already exists". I had never used sqlite3 prior to weewx and am not really >>> familiar with what to try now. Anybody have any ideas I can try? >>> >>> Thanks >>> Dave >>> >> -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [weewx-user] Re: Belchertown Skin 0.8.1 released
I came across the Darksky widgets today and they do include alerts https://darksky.net/widgets I've just replaced the whole Darksky forecast section with a 'hook' page to place the week widget there instead. Apparently it does include alerts. I have found the downloaded forecast data to be way off in temp - as much as 3 deg celsius low, even compared to their own widget which is both confusing and surprising. It appears that for me the widget forecast is much better than the api download data On Wed, Dec 12, 2018 at 2:26 PM rich T wrote: > Is there a way to include alerts from Darksky? > > On Friday, December 7, 2018 at 5:12:23 PM UTC-5, Pat wrote: >> >> The last thread was getting a bit long. So I've started a new one. >> >> Belchertown Skin 0.8.1 has been released which fixes a couple of bugs. >> See the release notes, and install instructions here: >> >> https://github.com/poblabs/weewx-belchertown/releases >> >> >> -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Problem with database weewx.sdb
I have a problem with the database, never save the information in it, is there any way to set the save time? or verify what is the problem? -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: table archive_day_barometer already exists
OK, a bit more serious than first looks. Make sure you have a backup of your current db then try using wee_database with the --reconfigure option. This will give you a new copy of your database with _new appended to the file name. Move your original db aside, rename the _new version and see how that goes. If that still fails we may have to get our hands dirty. Gary Sent from my Samsung mobile -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Problem with database weewx.sdb
The station is Davis Vantage Pro 2, and the sistem is Raspbian On Tuesday, December 11, 2018 at 6:56:29 PM UTC-7, h.o...@sistemasa3.com wrote: > > I have a problem with the database, never save the information in it, is > there any way to set the save time? or verify what is the problem? > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Belchertown Skin 0.8.1 released - Suggestion
Which part of the highcharts demo page do you think should be incorporated into the Belchertown skin, and instead of what?? On Tuesday, 11 December 2018 22:38:34 UTC+2, WILWetter25 wrote: > > Thank you for your hard work. I am looking around for a alternative to > Highcharts and I found this: > https://www.highcharts.com/stock/demo/basic-line > It would be cool if this could be integrated in the skin :) Just a > suggestion > Am Freitag, 7. Dezember 2018 23:12:23 UTC+1 schrieb Pat: >> >> The last thread was getting a bit long. So I've started a new one. >> >> Belchertown Skin 0.8.1 has been released which fixes a couple of bugs. >> See the release notes, and install instructions here: >> >> https://github.com/poblabs/weewx-belchertown/releases >> >> >> -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: Belchertown Skin 0.8.1 released - Suggestion
The Akin use Highcharts currently. In the link I posted you will See a example for HighStock. The difference between Highcharts and HighStock: In HighStock you can choose a Date, time. -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: table archive_day_barometer already exists
Thanks to you both for your suggestions. Gary, I followed your instructions with the following results: 1) Stopped weeWX and verified in /var/log/syslog that it was stopped 2) Used the wee_database utility to drop the daily summaries. The system responded with: Dropping daily summary tables from 'weewx.sdb' ... No daily summaries found in database 'weewx.sdb'. Nothing done. 3) Tried the --rebuild-daily. That produced the following list of errors: Traceback (most recent call last): File "/usr/bin/wee_database", line 793, in main() File "/usr/bin/wee_database", line 153, in main rebuildDaily(config_dict, db_binding, options) File "/usr/bin/wee_database", line 251, in rebuildDaily with weewx.manager.open_manager_with_config(config_dict, db_binding, initialize=True) as dbmanager: File "/usr/share/weewx/weewx/manager.py", line 1017, in open_manager_with_config return open_manager(manager_dict, initialize) File "/usr/share/weewx/weewx/manager.py", line 1006, in open_manager manager_dict['schema']) File "/usr/share/weewx/weewx/manager.py", line 140, in open_with_create dbmanager = cls(connection, table_name=table_name, schema=schema) File "/usr/share/weewx/weewx/manager.py", line 1152, in __init__ self._initialize_day_tables(schema, _cursor) File "/usr/share/weewx/weewx/wxmanager.py", line 35, in _initialize_day_tables weewx.manager.DaySummaryManager._initialize_day_tables(self, archiveSchema, cursor) File "/usr/share/weewx/weewx/manager.py", line 1179, in _initialize_day_tables cursor.execute(DaySummaryManager.sql_create_str % (self.table_name, _obs_type)) File "/usr/share/weewx/weedb/sqlite.py", line 39, in guarded_fn raise weedb.TableExistsError(e) weedb.TableExistsError: table archive_day_barometer already exists I also played with some of the other options to see what they would do (using the --dry-run option just in case) but they all ended up printing a list of errors that terminated in: weedb.OperationalError: No day summary schema for table 'archive' in database 'weewx.sdb' Still digging... -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: table archive_day_barometer already exists
Gary - I am in your debt. The --reconfigure option seems to have done the trick. It took a while to generate the new file but, once it was done, weeWX was able to accept the database. It then spend another large chunk of time rebuilding the daily summaries and, once that was done, it started downloading the updates from my console. It has loaded almost 7 hours worth and has about 3 more to go but everything seems to be going smoothly and there is no reason to think it won't finish normally at this point. I've been running on a dedicated Raspberry Pi and a while back, in anticipation of this crash, I built another Pi that boots from a 250GB hard drive and installed everything on that. Now that I have a working database again, I will be switching over to that one tomorrow and implementing another level of backups in addition to the NAS I have now. I really appreciate the time you've spent helping me get up and going again. Regards, Dave -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] One more option for Build Your Own enthusiasts
I recently came across a really excellent solution for putting together your own weather station on the cheap with high quality sensors - and most importantly a very useful weather HAT to use with a Raspberry PI to connect all the sensors. It comes complete with a 4 part step by step tutorial to assemble the whole station, and basic code to upload the data to and online service - see link below: https://www.bc-robotics.com/tutorials/raspberry-pi-weather-station-part-1/ I completed my own installation based on the instructions in the tutorial and my station running on weewx is active at the link below http://peachlandweather.ca/mystation/ For the outdoor portion I used a Raspberry Pi Zero W, with the weather HAT. Weewx is running indoors in a FreeBSD jail, using a stock Interceptor driver. I modified the basic upload code provided in the tutorial quite extensively to generate upload loops that matched the Observer URLs supported by the Interceptor driver, and also to produce derived observations not included in the original code. The upload code is attached for anyone who might be interested in trying to assemble their own. I tested the results from using the station against my Vantage Pro 2 and so far it seems to be pretty close - for less than 20% of the cost of a Vantage Pro. -- 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. For more options, visit https://groups.google.com/d/optout. #!/usr/bin/python import time import datetime from w1thermsensor import W1ThermSensor from Adafruit_BME280 import * import Adafruit_ADS1x15 import RPi.GPIO as GPIO import requests import syslog import pickle ds18b20 = W1ThermSensor() bme = BME280(t_mode=BME280_OSAMPLE_8, p_mode=BME280_OSAMPLE_8, h_mode=BME280_OSAMPLE_8) adc = Adafruit_ADS1x15.ADS1115() ## Settings to control operation of weather station interval = 15 #How long we want to wait between loops (seconds) loglevel = 0 #Set to 0 for no log entries, set to 1 for basic log info and 2 for all log info upload_url = "http://192.168.0.29; #IP address or URL to upload data, inlcude port number if not standard filename = "/home/pi/dailyrainfile" ## Init settings for variable - do not adjust windTick = 0 #Used to count the number of times the wind speed input is triggered rainTick = 0 #Used to count the number of times the rain input is triggered ticktimenow = None # Used to calculate the wind gust be determining the shortest time between windTicks mindeltatime = None # Used to calculate the wind gust be determining the shortest time between windTicks looptimenow = time.time() #Used to calculate the wind gust be determining the shortest time between windTicks #load previous saved dailyrain value try: infile = open(filename,'rb') saved_dailyrain = pickle.load(infile) infile.close() dailyrain = saved_dailyrain syslog.syslog("Loading of saved dailyrain state success. Initialise dailyrain to %s" % dailyrain) except: syslog.syslog("Loading of saved dailyrain state failed. Initialise dailyrain to zero") dailyrain = 0 #Set GPIO pins to use BCM pin numbers GPIO.setmode(GPIO.BCM) #Set digital pin 17 to an input and enable the pullup GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_UP) #Set digital pin 23 to an input and enable the pullup GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP) #Event to detect wind (4 ticks per revolution) GPIO.add_event_detect(17, GPIO.BOTH) def windtrig(self): global windTick windTick += 1 global ticktimenow if ticktimenow is None: ticktimenow = time.time() else: ticktimelast = ticktimenow ticktimenow = time.time() tickdelta = ticktimenow - ticktimelast #print 'Delta time:' , tickdelta, 'Seconds' global mindeltatime if mindeltatime is None: mindeltatime = tickdelta else: if tickdelta < mindeltatime: mindeltatime = tickdelta #print 'Min Delta Time:' , mindeltatime, 'Seconds' GPIO.add_event_callback(17, windtrig) #Event to detect rainfall tick GPIO.add_event_detect(23, GPIO.FALLING) def raintrig(self): global rainTick rainTick += 1 GPIO.add_event_callback(23, raintrig) #Function to determine the start of day timestamp def startOfDay(time_ts): """Calculate the unix epoch time for the start of a (local time) day. time_ts: A timestamp somewhere in the day for which the start-of-day is desired. returns: The timestamp for the start-of-day (00:00) in unix epoch time. """ _time_tt = time.localtime(time_ts) _bod_ts = time.mktime((_time_tt.tm_year, _time_tt.tm_mon, _time_tt.tm_mday, 0, 0, 0, 0, 0, -1)) return
[weewx-user] Re: Problem with database weewx.sdb
If you posted the log it may help us to be able to help you. On Wednesday, 12 December 2018 04:07:52 UTC+2, h.o...@sistemasa3.com wrote: > > The station is Davis Vantage Pro 2, and the sistem is Raspbian > > On Tuesday, December 11, 2018 at 6:56:29 PM UTC-7, h.o...@sistemasa3.com > wrote: >> >> I have a problem with the database, never save the information in it, is >> there any way to set the save time? or verify what is the problem? >> > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: table archive_day_barometer already exists
Gary, The backup strategy I use is a Python script I wrote that is started by cron every night. I had read that there could be a problem if the database is copied while it's being updated. The database is updated once a minute by weeWX so the script monitors the mtime of the weewx.sdb file, waits for the timestamp to change then waits about 15 seconds more before copying it to a subdirectory off my home directory. I also copy the /etc/weewx directory into the same backup subdirectory and then the script calls Duplicity to do the actual backup. Duplicity works by starting with a full backup the first time around and then doing incrementals from then on. A restore starts with the original full backup and then applies all incremental changes to get to the target restore date. To keep a restore process within reason, I only do a month of incrementals and on the first of each month the script creates a new monthly directory on the NAS. This strategy has seemed to work well over the past year or so and looking into why it failed this time around will be one of the top priorities for tomorrow. Dave -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: table archive_day_barometer already exists
Dave, Good that it was fixed, given the database was somehow corrupted there was probably something in there to do with the daily summaries was upsetting weeWX. Fortunately --reconfigure did the trick otherwise it was going to get messy. You are also fortunate that you have a station that logs records and allows downloading later, that helps prevent data loss. Of course having an effective database backup strategy in place is important and as you have just found out knowing that you can recover from your backups is equally as important. Not sure what approach you have taken, but some folks in the past have had some issues when they were copying their .sdb file whilst weeWX was still running. One of the strengths of SQLite is having everything in a single file, it makes backups very easy but that is also its Achilles heel; SQLite doesn't like sharing access to the file. You might want to do a bit of googling of the forums regards backups to see some of the approaches used. I used to take a precisely scheduled copy of the .sdb when weeWX was unlikely to be using it and never had a bad backup. I have since moved on to using MySQL/MariaDB and now just dump the database to file. Backups are really horses for courses. Gary On Wednesday, 12 December 2018 12:59:35 UTC+10, Dave Harper wrote: > > Gary - I am in your debt. The --reconfigure option seems to have done the > trick. It took a while to generate the new file but, once it was done, > weeWX was able to accept the database. It then spend another large chunk > of time rebuilding the daily summaries and, once that was done, it started > downloading the updates from my console. It has loaded almost 7 hours > worth and has about 3 more to go but everything seems to be going smoothly > and there is no reason to think it won't finish normally at this point. > I've been running on a dedicated Raspberry Pi and a while back, in > anticipation of this crash, I built another Pi that boots from a 250GB hard > drive and installed everything on that. Now that I have a working database > again, I will be switching over to that one tomorrow and implementing > another level of backups in addition to the NAS I have now. I really > appreciate the time you've spent helping me get up and going again. > > Regards, > Dave > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: (Off Topic?) How does weewx tell systemctl it is running
Susan, No systemd expert by a long shot but I can't say I have ever seen anything like Dec 11 20:02:08 weather systemd[1]: weewx.service holdoff time over, scheduling restart. before. As for weeWX changing from genStartupRecords to genLoopPackets, as far as I am aware there is no interaction with systemd. When the weeWX engine starts up one of the things it does is have the StdArchive service attempt to do a catchup which involves a call to genStartupRecords. If there are any records to catchup they are downloaded and processed, no notification to anything outside of weeWX. WeeWX then moves on and when the main packet loop is started genLoopPackets takes over. Tom or Matthew may be able to add more, but I am fairly certain weeWX is not dealing with systemd other than the normal daemon start/stop/load/status activities. Gary On Tuesday, 11 December 2018 19:19:53 UTC+10, vk3...@gmail.com wrote: > > (Note: Probably off topic but weewx related) > > I am running weewx (on a raspberry Pi Zero) and I'm seeing something that > I can't explain > > Using my HP1000 driver to access my WS1001, weewx and the driver seem to > be doing what they should in that the driver is reading the old records > that it missed while it was stopped as shown in the following log: > > Dec 11 20:02:02 weather weewx[1181]: manager: added record 2018-12-11 19: > 47:51 AEDT (1544518071) to daily summary in 'weewx.sdb' > > Dec 11 20:02:02 weather weewx[1181]: manager: added record 2018-12-11 19: > 52:51 AEDT (1544518371) to database 'weewx.sdb' > > Dec 11 20:02:02 weather weewx[1181]: manager: added record 2018-12-11 19: > 52:51 AEDT (1544518371) to daily summary in 'weewx.sdb' > > Dec 11 20:02:02 weather weewx[1181]: restx: Meteotemplate: Published > record 2018-12-11 19:47:51 AEDT (1544518071) > > Dec 11 20:02:02 weather weewx[1181]: restx: WOW: Published record 2018-12- > 11 15:37:51 AEDT (1544503071) > > Dec 11 20:02:08 weather systemd[1]: weewx.service holdoff time over, > scheduling restart. > > Dec 11 20:02:08 weather systemd[1]: Stopping weewx weather system... > > Dec 11 20:02:08 weather systemd[1]: Starting weewx weather system... > > Dec 11 20:02:08 weather systemd[1]: Started weewx weather system. > > Dec 11 20:02:09 weather weewx[1274]: engine: Initializing weewx version > 3.6.2 > > Dec 11 20:02:09 weather weewx[1274]: engine: Using Python 2.7.9 (default, > Sep 26 2018, 05:58:52) > > [GCC 4.9.2] > > Dec 11 20:02:09 weather weewx[1274]: engine: Platform Linux-4.9.35+-armv6l > -with-debian-8.0 > > Dec 11 20:02:09 weather weewx[1274]: engine: pid file is /var/run/weewx. > pid > > Dec 11 20:02:09 weather systemd[1]: weewx.service: Supervising process > 1278 which is not our child. We'll most likely not notice when it exits. > > Dec 11 20:02:09 weather weewx[1278]: engine: Using configuration file > /home/weewx/weewx.conf > > Dec 11 20:02:09 weather weewx[1278]: engine: Loading station type HP1000 > (user.HP1000) > > Then after about 2 minutes of weewx running, I get the message from > systemctl that the holdoff time is over and it restarts the service. > > However, when all of the historic records have been read and weewx starts > its main loop, then the service is not restarted by systemctl: > > Dec 11 20:02:10 weather weewx[1278]: engine: Starting up weewx version 3.6 > .2 > > Dec 11 20:02:11 weather weewx[1278]: HP1000: Connected to address ( > '10.1.1.97', 53495) > > Dec 11 20:02:12 weather weewx[1278]: HP1000: Established contact at 11/12/ > 18 20:02:12 > > Dec 11 20:02:12 weather weewx[1278]: HP1000: Retrieving startup records > > Dec 11 20:02:30 weather weewx[1278]: engine: Starting main packet loop. > > Dec 11 20:03:22 weather wpa_supplicant[453]: wlan0: WPA: Group rekeying > completed with b8:8d:12:5f:bf:7b [GTK=CCMP] > > Dec 11 20:04:00 weather python[705]: INFO:apscheduler.executors.default: > Running job "bomIRJob (trigger: cron[minute='4-55/10'], next run at: > 2018-12-11 20:04:00 AEDT)" (scheduled at 2018-12-11 20:04:00+11:00) > > Dec 11 20:04:00 weather animatedgif.py[705]: Running BoM IR Satellite at > 11/12/2018 20:04:00 > > Dec 11 20:04:00 weather python[705]: INFO:apscheduler.executors.default: > Running job "bomRadarJob (trigger: cron[minute='4-58/6'], next run at: > 2018-12-11 20:04:00 AEDT)" (scheduled at 2018-12-11 20:04:00+11:00) > > Dec 11 20:04:00 weather animatedgif.py[705]: Running BoM Radar at 11/12/ > 2018 20:04:00 > > Dec 11 20:04:05 weather python[705]: INFO:apscheduler.executors.default: > Job "bomRadarJob (trigger: cron[minute='4-58/6'], next run at: 2018-12-11 > 20:10:00 AEDT)" executed successfully > > Dec 11 20:05:01 weather CRON[1284]: pam_unix(cron:session): session > opened for user root by (uid=0) > > Dec 11 20:05:01 weather CRON[1288]: (root) CMD (command -v debian-sa1 > > /dev/null && debian-sa1 1 1) > > Dec 11 20:05:01 weather CRON[1284]: pam_unix(cron:session): session > closed for user root > > Dec 11 20:05:24
[weewx-user] Re: use Weewx on raspberry
hello Rich T yes, I used this package but in Pyton3 or 2 sudo pip(3) install RPi.bme280 this is the same problem the module works with my script, just problem with Weewx. Patrick On Saturday, December 8, 2018 at 3:40:43 PM UTC+1, Patrick Tranchant wrote: > > hello I am a newbie from France ( sorry for my english ) > > I want to use weewx on a raspberry with a weather station built by myself > (view on Magpi) > I don't see my station on your website to configure : > > Weather Station Hardware Comparison: I don't found my weather station. > Do you have a solution or how to configure Weewx > > thank you for your help > > Patrick > -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] (Off Topic?) How does weewx tell systemctl it is running
(Note: Probably off topic but weewx related) I am running weewx (on a raspberry Pi Zero) and I'm seeing something that I can't explain Using my HP1000 driver to access my WS1001, weewx and the driver seem to be doing what they should in that the driver is reading the old records that it missed while it was stopped as shown in the following log: Dec 11 20:02:02 weather weewx[1181]: manager: added record 2018-12-11 19:47: 51 AEDT (1544518071) to daily summary in 'weewx.sdb' Dec 11 20:02:02 weather weewx[1181]: manager: added record 2018-12-11 19:52: 51 AEDT (1544518371) to database 'weewx.sdb' Dec 11 20:02:02 weather weewx[1181]: manager: added record 2018-12-11 19:52: 51 AEDT (1544518371) to daily summary in 'weewx.sdb' Dec 11 20:02:02 weather weewx[1181]: restx: Meteotemplate: Published record 2018-12-11 19:47:51 AEDT (1544518071) Dec 11 20:02:02 weather weewx[1181]: restx: WOW: Published record 2018-12-11 15:37:51 AEDT (1544503071) Dec 11 20:02:08 weather systemd[1]: weewx.service holdoff time over, scheduling restart. Dec 11 20:02:08 weather systemd[1]: Stopping weewx weather system... Dec 11 20:02:08 weather systemd[1]: Starting weewx weather system... Dec 11 20:02:08 weather systemd[1]: Started weewx weather system. Dec 11 20:02:09 weather weewx[1274]: engine: Initializing weewx version 3.6. 2 Dec 11 20:02:09 weather weewx[1274]: engine: Using Python 2.7.9 (default, Sep 26 2018, 05:58:52) [GCC 4.9.2] Dec 11 20:02:09 weather weewx[1274]: engine: Platform Linux-4.9.35+-armv6l- with-debian-8.0 Dec 11 20:02:09 weather weewx[1274]: engine: pid file is /var/run/weewx.pid Dec 11 20:02:09 weather systemd[1]: weewx.service: Supervising process 1278 which is not our child. We'll most likely not notice when it exits. Dec 11 20:02:09 weather weewx[1278]: engine: Using configuration file /home/weewx/weewx.conf Dec 11 20:02:09 weather weewx[1278]: engine: Loading station type HP1000 (user.HP1000) Then after about 2 minutes of weewx running, I get the message from systemctl that the holdoff time is over and it restarts the service. However, when all of the historic records have been read and weewx starts its main loop, then the service is not restarted by systemctl: Dec 11 20:02:10 weather weewx[1278]: engine: Starting up weewx version 3.6.2 Dec 11 20:02:11 weather weewx[1278]: HP1000: Connected to address ( '10.1.1.97', 53495) Dec 11 20:02:12 weather weewx[1278]: HP1000: Established contact at 11/12/18 20:02:12 Dec 11 20:02:12 weather weewx[1278]: HP1000: Retrieving startup records Dec 11 20:02:30 weather weewx[1278]: engine: Starting main packet loop. Dec 11 20:03:22 weather wpa_supplicant[453]: wlan0: WPA: Group rekeying completed with b8:8d:12:5f:bf:7b [GTK=CCMP] Dec 11 20:04:00 weather python[705]: INFO:apscheduler.executors.default: Running job "bomIRJob (trigger: cron[minute='4-55/10'], next run at: 2018-12-11 20:04:00 AEDT)" (scheduled at 2018-12-11 20:04:00+11:00) Dec 11 20:04:00 weather animatedgif.py[705]: Running BoM IR Satellite at 11/ 12/2018 20:04:00 Dec 11 20:04:00 weather python[705]: INFO:apscheduler.executors.default: Running job "bomRadarJob (trigger: cron[minute='4-58/6'], next run at: 2018-12-11 20:04:00 AEDT)" (scheduled at 2018-12-11 20:04:00+11:00) Dec 11 20:04:00 weather animatedgif.py[705]: Running BoM Radar at 11/12/2018 20:04:00 Dec 11 20:04:05 weather python[705]: INFO:apscheduler.executors.default:Job "bomRadarJob (trigger: cron[minute='4-58/6'], next run at: 2018-12-11 20:10:00 AEDT)" executed successfully Dec 11 20:05:01 weather CRON[1284]: pam_unix(cron:session): session opened for user root by (uid=0) Dec 11 20:05:01 weather CRON[1288]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1) Dec 11 20:05:01 weather CRON[1284]: pam_unix(cron:session): session closed for user root Dec 11 20:05:24 weather weewx[1278]: manager: added record 2018-12-11 20:05: 00 AEDT (1544519100) to database 'weewx.sdb' Dec 11 20:05:24 weather weewx[1278]: manager: added record 2018-12-11 20:05: 00 AEDT (1544519100) to daily summary in 'weewx.sdb' You can see by the timestamps that the service is allowed to run. Does anyone know what weewx does when in the main packet loop that tells systemctl that the service is running in the 'genLoopPackets' area that it does not do in the 'genStartuprecords' space? Susan -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: unable to get data from weather station lw30* (oregon weather anywhere)
> > Hi > trying to make progress… after installing pihole, trafic to Gateway.weather.oregonscientific.com is re-directed to my pi hosting weewx(also hosting pihole) but i still have the same issue… web servers are stopped, so Nothing is using port80 any idea ? -- 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. For more options, visit https://groups.google.com/d/optout.
[weewx-user] Re: (Off Topic?) How does weewx tell systemctl it is running
Try here: https://people.redhat.com/mskinner/rhug/q1.2014/Demystifying_Systemd.pdf Not an answer, but background. On a new box I'm setting up, I went as far as finding a distribution that doesn't use systemd, if that ways anything. Chris -- 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. For more options, visit https://groups.google.com/d/optout.