-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cron issue #4
Comments
Forgot to add, do you have a referral code ? I've just signed up but Octopus still allow me to show my appreciation properly 😄 |
Phew, I hope to get a day this week to catch up and fix the issues so far - good to see a few people using this now! This looks like a documentation issue for the front page / readme on the face of it? referral code: indeed I do - https://share.octopus.energy/rust-heron-863 - much appreciated too. Cheers |
Your call re cron; doc addition good for me. I've used your referral. Perhaps add that to your documentation 😄 |
Hmm, I suppose that was asking for trouble. Today, the daily update ran as usual at 16:05 but the display continued to run out of graph bars. I inspected the sqlite DB but no update had occurred. I manually ran the store_prices.py from time to time but it did not update until around 19:00. At each check, I went back to this site, which had the same problem, so not a bug here. Obviously without manual intervention, the system would fail. This is not wife friendly 😦 I think we need a new mechanism for checking that the price DB is properly updated at 16:05, and if not, repeat at intervals until it does. |
@Chiny91 - I've hacked the script to incorporate a simple retry method as I found the update was failing regularly. I'm sure this could be made a lot better, but I'm a relative github/python noob so just learning as I go! @pufferfish-tech - many thanks for sharing this great project! |
Guys, sorry I somehow missed this issue 8 days ago. I'll check your code - we're all noobs here, I'm not a python coder myself as it happens, if that wasn't evident from the code :) I'll add it to the list of things to look into. For the time being either your solution with a longer delay, or just add a later cron time into crontab, should sort this out. |
Yes maybe a bit too aggressive! 1 hour seems more sensible |
I've also had a couple of mystery update failures, in addition to the late prices from Octopus issue. Anyway, your hacked script has just worked fine on its first try. Re cron, to avoid us all hammering Octopus every hour from 16:05, I've shifted the cron to 16:nn. No display update occurs until 16:30, so no change is noticed in practice. I've also added the conventional And... I've been coding since 1972 (Fortran IV), never professionally and I most certainly would not call myself a coder, still a Python newbie occasionally bodging scripts 😄 |
Firstly, @pufferfish-tech said:
Many thanks for your efforts, much appreciated. I'm not sure I could get my mind in Python around the inky pHAT display.
I had a problem getting the cron jobs to run. The problem was that I had tidied all the project files, into a project sub-directory
/home/my_user/agile/
, which broke the crontab. In short, the problem says here,It's nice to have individual projects separated in the user dir, into individual sub-dirs, saves much confusion. I fixed my installation by adding at the top of
octoprice_main_inky.py
:Also, I provided the full path to commands in the crontab. Works fine.
The text was updated successfully, but these errors were encountered: