You have your latitude set to +31.5. It should be -31.5. You're the land
down under!

-tk

On Wed, Nov 30, 2016 at 6:15 PM, Graham Gear <[email protected]> wrote:

> Of course it was, sorry, didn’t notice it!
>
> 2. Substitute this instrumented version of vantage.py for the one you
>> have. Set debug=1, restart weewx, run it for a few loop packets (only a few
>> are needed). Send the log. It will show the raw and processed values for
>> sunrise and sunset. Be sure to set debug=1.
>>
>>
> graham@rochelle:/usr/share/weewx/weewx/drivers$ tail -f /var/log/syslog |
> grep weewx
>
> Dec  1 10:13:16 rochelle weewx[18658]: vantage: Final sunrise
> (1480602360), sunset (1480552860).
>
> Dec  1 10:13:18 rochelle weewx[18658]: vantage: Raw sunrise (2226), sunset
> (841).
>
> Dec  1 10:13:18 rochelle weewx[18658]: vantage: Offset sunrise (80760),
> sunset (31260).
>
> Dec  1 10:13:18 rochelle weewx[18658]: vantage: Final sunrise
> (1480602360), sunset (1480552860).
>
> Dec  1 10:13:20 rochelle weewx[18658]: vantage: Raw sunrise (2226), sunset
> (841).
>
> Dec  1 10:13:20 rochelle weewx[18658]: vantage: Offset sunrise (80760),
> sunset (31260).
>
> Dec  1 10:13:20 rochelle weewx[18658]: vantage: Final sunrise
> (1480602360), sunset (1480552860).
>
> Dec  1 10:13:22 rochelle weewx[18658]: vantage: Raw sunrise (2226), sunset
> (841).
>
> Dec  1 10:13:22 rochelle weewx[18658]: vantage: Offset sunrise (80760),
> sunset (31260).
>
> Dec  1 10:13:22 rochelle weewx[18658]: vantage: Final sunrise
> (1480602360), sunset (1480552860).
>
> Dec  1 10:13:24 rochelle weewx[18658]: vantage: Raw sunrise (2226), sunset
> (841).
>
> Dec  1 10:13:24 rochelle weewx[18658]: vantage: Offset sunrise (80760),
> sunset (31260).
>
> What do we think?
>
> Am I able to use the processed sunrise/sunset out of the loop packet or do
> I need to query the almanac directly?
>
> Graham
>
> On 1 December 2016 at 10:11:00, Thomas Keffer ([email protected]) wrote:
>
> It was attached to the last message.
>
> On Wed, Nov 30, 2016 at 6:08 PM, Graham Gear <[email protected]>
> wrote:
>
>> Thanks Thomas.
>>
>> The timezone on the Vantage looks to be correct for Perth and I was able
>> to set debug to 1 but could not find the instrumented version
>> of vantage.py, in the source repository nor installed distribution, could
>> you advise where this comes from?
>>
>>
>> 1. Run the utility wee_device with the --info flag:
>>
>> *wee_device --info*
>>
>> This will show what time zone the Vantage is using. Post the results.
>>
>>
>> graham@rochelle:~/dev/asystem$ sudo wee_device /etc/weewx/weewx.conf
>> --info
>>
>> Using configuration file /etc/weewx/weewx.conf
>>
>> Using Vantage driver version 3.0.9 (weewx.drivers.vantage)
>>
>> Querying...
>>
>> Davis Vantage EEPROM settings:
>>
>>
>>
>>     CONSOLE TYPE:                   VantagePro2
>>
>>
>>
>>     CONSOLE FIRMWARE:
>>
>>       Date:                         Jun  3 2013
>>
>>       Version:                      3.15
>>
>>
>>
>>     CONSOLE SETTINGS:
>>
>>       Archive interval:             1800 (seconds)
>>
>>       Altitude:                     630 (foot)
>>
>>       Wind cup type:                large
>>
>>       Rain bucket type:             0.01 inches
>>
>>       Rain year start:              1
>>
>>       Onboard time:                 2016-12-01 09:53:03
>>
>>
>>
>>     CONSOLE DISPLAY UNITS:
>>
>>       Barometer:                    mmHg
>>
>>       Temperature:                  degree_C
>>
>>       Rain:                         mm
>>
>>       Wind:                         meter_per_second
>>
>>
>>
>>     CONSOLE STATION INFO:
>>
>>       Latitude (onboard):           +31.5
>>
>>       Longitude (onboard):          -116.0
>>
>>       Use manual or auto DST?       MANUAL
>>
>>       DST setting:                  OFF
>>
>>       Use GMT offset or zone code?  ZONE_CODE
>>
>>       Time zone code:               38
>>
>>       GMT offset:                   N/A
>>
>>
>> On 1 December 2016 at 09:48:54, Thomas Keffer ([email protected]) wrote:
>>
>> 1. The vantage emits sunrise and sunset as a time offset since the start
>> of the day as HHMM. Weewx converts this into the number of seconds since
>> the start of day.
>>
>> 2. To this, is added the unix epoch time of the start of the day.
>>
>> So, if you're getting sunrise after a sunset, then the results of #1 must
>> be wrong (adding a constant offset doesn't change their relative times).
>>
>> If you could do two things for me:
>>
>> 1. Run the utility wee_device with the --info flag:
>>
>> *wee_device --info*
>>
>> This will show what time zone the Vantage is using. Post the results.
>>
>> 2. Substitute this instrumented version of vantage.py for the one you
>> have. Set debug=1, restart weewx, run it for a few loop packets (only a few
>> are needed). Send the log. It will show the raw and processed values for
>> sunrise and sunset. Be sure to set debug=1.
>>
>> -tk
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Nov 30, 2016 at 4:37 PM, Graham Gear <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> I am based in Perth, Western Australia in the AWST (GMT+8) timezone and
>>> running weewx on a Debian machine with correctly setup timezone:
>>>
>>> graham@rochelle:~/dev/asystem$ cat /etc/os-release
>>> PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
>>> NAME="Raspbian GNU/Linux"
>>> VERSION_ID="8"
>>> VERSION="8 (jessie)"
>>> ID=raspbian
>>> ID_LIKE=debian
>>> HOME_URL="http://www.raspbian.org/";
>>> SUPPORT_URL="http://www.raspbian.org/RaspbianForums";
>>> BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs";
>>>
>>>
>>>
>>> graham@rochelle:~/dev/asystem$ date
>>> Thursday 1 December  08:23:21 AWST 2016
>>>
>>>
>>> The Vantage is also setup timezone wise correctly and think that weewx
>>> might do something on this in any case.
>>>
>>> My issues is that I am unable to make head nor tail of the epochs I am
>>> getting out of the Vantage loop packets, there doesn't seem to be a
>>> timezone offset that would make sense of these, does anyone know how I can
>>> interpret them?
>>>
>>> The UI seems to do fine, although not sure if it is using the Vantage
>>> for this or its own internal calculations. If the later, is there a nice
>>> way I can get access to this (and other almanac details) from within a
>>> custom service?
>>>
>>> sunrise from loop packet: 1480602360
>>> sunset from loop packet: 1480552860
>>>
>>> sunrise from loop packet formated: 01/12/2016, 22:26:00 AWST
>>> sunset from loop packet formated: 01/12/2016, 08:41:00 AWST
>>>
>>> sunrise from UI: 05:02:10
>>> sunset from UI: 19:07:23
>>>
>>> Thanks for your help, perhaps I am missing something obvious, I always
>>> find time hard!
>>>
>>> Graham
>>>
>>
>>
>

Reply via email to