Re: [weewx-user] Temperature probe plugged into VP2 UV socket
Thank you gjr80 your suggestions work absolutely perfectly and are breeze to implement. Wade On Fri, Oct 11, 2019 at 5:53 PM gjr80 wrote: > Hi, > > Interesting project, I’ll make no comment on accuracy/usefulness (what > happens for negative temperature or temperatures off the UV scale for > example), guess some testing and development will show one way or another. > > As for your questions these can be easily done, depending on exact > requirements, without changing any python code. The StdCalibrate service ( > http://weewx.com/docs/usersguide.htm#StdCalibrate ) is your friend. You > can use a ‘correction’ to alter an observation. So to assign you ‘UV’ value > to extraTemp1 you could do something like this under [[Corrections]] > (untested): > > [[Corrections]] > extraTemp1 = UV > > you can even take care of your negative sign with: > > extraTemp1 = -UV > > You can do more complex corrections as long as it can be expressed in a > single line of python code, for example if a sensor sometime fails and > provides a negative value you can filter those values out and set the > observation to None (The python value None is used to typically represent > an observation for which a sensor is present but there is no valid reading) > using something like: > > extraTemp2 = sensor1 if sensor1 >= 0 else None > > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/44f4de5a-414f-401a-aee7-0765eea028c0%40googlegroups.com > . > -- 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/CAA%2B5DqxX%3D7G-YUbgaApdtyAFhckDEwQCfJUf3S1u6UbcSxHGzg%40mail.gmail.com.
Re: [weewx-user] Temperature probe plugged into VP2 UV socket
Thank you Gary Your input is greatly appreciated. Regards Wade On Fri, Oct 11, 2019 at 5:53 PM gjr80 wrote: > Hi, > > Interesting project, I’ll make no comment on accuracy/usefulness (what > happens for negative temperature or temperatures off the UV scale for > example), guess some testing and development will show one way or another. > > As for your questions these can be easily done, depending on exact > requirements, without changing any python code. The StdCalibrate service ( > http://weewx.com/docs/usersguide.htm#StdCalibrate ) is your friend. You > can use a ‘correction’ to alter an observation. So to assign you ‘UV’ value > to extraTemp1 you could do something like this under [[Corrections]] > (untested): > > [[Corrections]] > extraTemp1 = UV > > you can even take care of your negative sign with: > > extraTemp1 = -UV > > You can do more complex corrections as long as it can be expressed in a > single line of python code, for example if a sensor sometime fails and > provides a negative value you can filter those values out and set the > observation to None (The python value None is used to typically represent > an observation for which a sensor is present but there is no valid reading) > using something like: > > extraTemp2 = sensor1 if sensor1 >= 0 else None > > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/44f4de5a-414f-401a-aee7-0765eea028c0%40googlegroups.com > . > -- 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/CAA%2B5DqxVhZTR0nc_SKRBh-hKKWK_%2BgZ6CHWg%3DJwKo59_602umw%40mail.gmail.com.
[weewx-user] Temperature probe plugged into VP2 UV socket
Hi, Interesting project, I’ll make no comment on accuracy/usefulness (what happens for negative temperature or temperatures off the UV scale for example), guess some testing and development will show one way or another. As for your questions these can be easily done, depending on exact requirements, without changing any python code. The StdCalibrate service (http://weewx.com/docs/usersguide.htm#StdCalibrate ) is your friend. You can use a ‘correction’ to alter an observation. So to assign you ‘UV’ value to extraTemp1 you could do something like this under [[Corrections]] (untested): [[Corrections]] extraTemp1 = UV you can even take care of your negative sign with: extraTemp1 = -UV You can do more complex corrections as long as it can be expressed in a single line of python code, for example if a sensor sometime fails and provides a negative value you can filter those values out and set the observation to None (The python value None is used to typically represent an observation for which a sensor is present but there is no valid reading) using something like: extraTemp2 = sensor1 if sensor1 >= 0 else None 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. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/44f4de5a-414f-401a-aee7-0765eea028c0%40googlegroups.com.
[weewx-user] Temperature probe plugged into VP2 UV socket
I just joined this great form a few days ago. I recently plugged a Davis temperature probe into the spare VP2 UV port to try and measure lake water temperature. Oddly after a bit of reformatting the output seems to be tracking the lake temperature with a negative sign as can be seen in the commandeered UV below. Simcoe Temperature --16.2°CCurrent actual lake temperature = 16.1 C. http://torontowindsurf.com/keswick/index.html Trial A: I am trying unsuccessfully to find where I can perform math functions on the UV output to make the displayed temperature match the actual, possibly by data curve matching or table lookup. I have looked at the wxformuals.py and cannot find a UV section. Trial B: Using the Simulator: I have tried to take the raw data from the UV simulated sensor and point it to the unused extraTemp1 variable by inserting the code below at various places in simulator.py without success. Typically the log file indicates "undefined variable" for both Station and extraTemp1 and terminates weewx. Possibly I should define both those variables as Global? I have meagre but improving Python skills. data['extraTemp1'] = Station.decode_UV(raw) Simulator.py exerpt: (very bottom of simulator.py data['extraTemp1'] = Station.decode_inTemp(raw) Any of your thoughts on how to implement this would be greatly appreciated. -- 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/d2e0159f-451a-4f72-b750-49d772a458ec%40googlegroups.com.