Thanks Gary. That is pretty close to what I ended up after seeing the changes for 3.x and commenting out the altitude stuff that was failing. I added a "print" to the driver and have confirmed I am picking up the correct data. Everything looks good at this point and I seem to have a functioning station. Thanks for all of the help.
On Wednesday, June 21, 2017 at 6:23:45 PM UTC-5, gjr80 wrote: > > Bob, > > When weeWX v3 was released there were a lot of changes (the big one was > the database structure - but that thas no effect on your driver). A lot of > the other changes were more subtle; some functions were renamed, others > moved and others reworked. One significant change was the move of the > calculation of so called derived observations (eg heatindex) out of the > drivers and into the service StdWXCalculate. > > So what, well knowing this and given that your driver is fairly basic, it > is not too hard to rework your driver to be v3 compatible. I sat down this > morning and worked through it, did not take long. Have a look at the > attached Raspberry_Pi.txt (can't attach .py). The changes were: > > 1. use weewx.drivers rather than weewx.abstractstation > 2. base class for your driver is now weewx.drivers.AbstractDevice > 3. remove the heatindex, altimeter etc calcs from the driver, > StdWXCalculate > will take care of this > 4. due to 2. we can remove the altitude stuff from the loader() method > > Left the heating and cooling degree stuff there, that is not covered by > the StdWXCalculate service. This revised driver loads OK under 3.7.1, I > didn't go as far as setting up the data file to test it fully, that bit is > up to you! > > > Gary > > On Wednesday, 21 June 2017 22:45:21 UTC+10, Bob Snyder wrote: >> >> Awesome, Gary. That did it. Thank you! Now time to chase down driver >> bugs. Seems this one is from 2.x and has issues. Thanks again! >> >> On Tuesday, June 20, 2017 at 10:23:31 PM UTC-5, gjr80 wrote: >>> >>> Jun 20 21:17:30 wx-rpi weewx[24467]: engine: Using configuration file / >>>> etc/weewx/weewx.conf >>>> >>> >>> Ahah, my mistake, I assumed this was a setup.py instal >>> <http://weewx.com/docs/setup.htm>l but it appears it is not. >>> >>> No matter, do you have a directory /usr/share/weewx/user ? If so, try >>> putting Raspberry_Pi.py there, stop then start weeWX and see how that >>> goes. If it fails or if such a directory doesn't exist, it might be time to >>> post weewx.conf in its entirety (remove any passwords/sensitive info) >>> as well as a log extract from weewx start until it exits; often there are >>> clues in the leadup to, or the error trace after, the error occurs. >>> >>> Gary >>> >>> On Wednesday, 21 June 2017 13:03:24 UTC+10, Bob Snyder wrote: >>>> >>>> Thanks for the quick reply, Gary. Yes, /usr seemed odd to me. My mind >>>> went there instead of user when I read where to create the driver script. >>>> >>>> I implemented the changes you suggested but get the same error. >>>> >>>> pi@wx-rpi:/home/weewx/bin/user $ ls -l >>>> total 4 >>>> -rw-r--r-- 1 pi pi 2664 Jun 20 21:17 Raspberry_Pi.py >>>> >>>> [Raspberry_Pi] >>>> loop_interval = 5 >>>> driver = user.Raspberry_Pi >>>> >>>> Jun 20 21:53:16 wx-rpi weewx[24736]: engine: Loading station type >>>> Raspberry_Pi (user.Raspberry_Pi) >>>> Jun 20 21:53:16 wx-rpi weewx[24736]: engine: Caught unrecoverable >>>> exception in engine: >>>> Jun 20 21:53:16 wx-rpi weewx[24736]: **** No module named >>>> Raspberry_Pi >>>> >>>> >>>> >>>> On Tuesday, June 20, 2017 at 9:36:41 PM UTC-5, gjr80 wrote: >>>>> >>>>> Hi, >>>>> >>>>> I think you should be putting your Raspberry_Pi.py file in the >>>>> /home/weewx/bin/user >>>>> directory not /usr. >>>>> >>>>> Also, under [Raspberry_Pi] you should use >>>>> >>>>> driver = user.Raspberry_Pi >>>>> >>>>> not >>>>> >>>>> driver = usr.Raspberry_Pi >>>>> >>>>> 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
