I've changed the formula used to calculate the moon phase if you have not
installed pyephem. For 15-Sept-2018, this version gives 37% illumination
(versus 24% for the old version).

Interesting project. I learned a lot about lunations and how to calculate
the phases of the moon. The root problem is that the time between new moons
is not a constant value. So, as time marches on, the approximations get
worse and worse.

This new version starts with the first new moon of 2018 (16-Jan-2018) and
calculates forward from that.

Commit 0220656
<https://github.com/weewx/weewx/commit/0220656bc86785b51684d7eb20dfd3a991dee8f7>

-tk

On Sun, Sep 16, 2018 at 4:45 AM Philip Kutzenco <kutze...@gmail.com> wrote:

> Gary,
>
> OK. It's working now!
>
> Interestingly - "sudo pip uninstall ephem" and "sudo pip uninstall
> pyephem" gave not-installed errors. However, "pip uninstall ephem" and "pip
> uninstall pyephem" both did uninstalls. It appears that installing without
> privileges puts the files in /home/pi/.local/lib/python2.7/site-packages/ .
> After uninstalling both, I installed pyephem with sudo, restarted weewx
> and now am showing 46% moon illumination on both the standard skin and the
> belchertown skin.
>
> Thanks for your (and everyone else's) help.
>
> Now if someone can help explain the inconsistency between the DarkSky API
> download and the DarkSky.net forecast for my location I'd be grateful. If
> I see no answer to that, I can move that question to a new topic.
>
> Best,
> Phil
>
> On Sunday, September 16, 2018 at 1:14:28 AM UTC-4, gjr80 wrote:
>>
>> On Sunday, 16 September 2018 12:39:53 UTC+10, Philip Kutzenco wrote:
>>>
>>>
>>> Plus that doesn't explain why weewx is still indicating 24% on Standard
>>> and Belchertown skins for me.
>>>
>>>
>> Let's deal with the second problem first. It appears that installing
>> ephem and pyephem as an unprivileged causes issues, particularly for
>> WeeWX (well it does on my Debian stretch VM). I would also be using
>> pyephem and not ephem. First off let's uninstall ephem and pyephem:
>>
>> $ sudo pip uninstall ephem
>> $ sudo pip uninstall pyephem
>>
>> answer y to any y/n prompts
>>
>> Now install pyephem making sure you have privileges:
>>
>> $ sudo pip install pyephem
>>
>> and finally restart WeeWX:
>>
>> $ sudo systemctl restart weewx
>>
>> Wait for a report cycle to complete then check you pages again.
>>
>> 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.
>

-- 
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.

Reply via email to