octopus-agile-pi-prices icon indicating copy to clipboard operation
octopus-agile-pi-prices copied to clipboard

Congratulations on public recognition

Open Chiny91 opened this issue 5 years ago • 19 comments

Congratulations @pufferfish-tech on being officially noticed by Octopus Energy. Now there is absolutely no excuse for not fixing the bugs, sorting one or two sub-optimal points 😄

Octopus Energy blog.

Incidentally, Octopus Energy show a Raspberry Pi Zero which I find 100% reliable, compared to my daily crash of an older R Pi 2b.

Chiny91 avatar Jun 28 '20 16:06 Chiny91

I noticed that yesterday! I used a pi 2b to write this on, never had any crashes, I wonder if you had an sd card problem or something. Could be anything, power supply spikes, who knows.

I'm pretending the minimum price bug doesn't exist. I've fixed it in the new thing I'm working on so I suppose I will roll it out to this in due course! 😛

pufferfish-tech avatar Jun 28 '20 19:06 pufferfish-tech

I am an Octopus customer and came accros your work whilst researching the Agile tariff. I have now followed your install instructions on a Pi Zero W with red inkyphat display. Running "python3 octoprice_main_inky.py" gave a couple of import errors and had to do the following before it would run: pip3 install inky pip3 install font_fredoka_one. Thank you for your contribution!

GeofP avatar Jul 02 '20 11:07 GeofP

Welcome to Agile :)

The step: "curl https://get.pimoroni.com/inky | bash" in the instructions ought to have done the install of inky and the font, but it is owned/maintained by pimoroni so if you did run it, perhaps it may have failed or been down somehow at the time.

pufferfish-tech avatar Jul 02 '20 12:07 pufferfish-tech

Thank you. I think your software will be getting a lot of attention!

GeofP avatar Jul 02 '20 12:07 GeofP

I have had this running a while now. Tempted to fix the min price bug too. The other issue I have is regular failure to have prices available when the crontab entry runs. Tempted to create a store prices which can be called multiple times but will only insert if not already exists.

ukblaster avatar Jul 04 '20 09:07 ukblaster

I have had this running a while now. Tempted to fix the min price bug too.

Yeah its bugging me now too - I'll get right on it ;)

The other issue I have is regular failure to have prices available when the crontab entry runs. Tempted to create a store prices which can be called multiple times but will only insert if not already exists.

You can just run it multiple times in cron, say... 15 17,19,20,21 * * * /usr/bin/python3 store_prices.py > /home/pi/cron2.log

This will run at 15 mins past 5, 7, 8 and 9pm

My only advice is don't do it more than a few times a day. I think the above ought to work fine. If you do look at the insert if not exists, then maybe you could combine that with making sure not to make duplicates in the sqlite (currently it does, which isn't a massive issue, but not exactly desirable). That would be useful for me.

Cheers!

pufferfish-tech avatar Jul 04 '20 14:07 pufferfish-tech

If you do look at the insert if not exists

Hey buddy, if it helps you, this is the SQL I've used to achieve that same result. Hopefully copypastable. Linky :)

beararmy avatar Jul 04 '20 15:07 beararmy

I have had this running a while now. Tempted to fix the min price bug too.

Done :) Nice - we have negative pricing tonight too, so I'm seeing the right minimum value, -4.2p in 23hrs Give me a shout if I've messed any(every)thing up but it should just need the new octoprice_main_inky.py file pulling down.

pufferfish-tech avatar Jul 04 '20 15:07 pufferfish-tech

Yes, that fix works fine for me, (-4.6p at 1500 bst). Ah, just had the Octopus email re a "double plunge"... now, what will I switch on ?

Nice work.

Chiny91 avatar Jul 04 '20 17:07 Chiny91

Yes, that fix works fine for me, (-4.6p at 1500 bst). Ah, just had the Octopus email re a "double plunge"... now, what will I switch on ?

.... everything :)

pufferfish-tech avatar Jul 04 '20 17:07 pufferfish-tech

needed manual installs of

pip3 install inky pip3 install font_fredoka_one pip3 install pytz pip install smbus2

but now getting this

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/inky/eeprom.py", line 100, in read_eeprom
    from smbus2 import SMBus
ModuleNotFoundError: No module named 'smbus2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "octoprice_main_inky.py", line 25, in <module>
    inky_display = InkyPHAT("red")
  File "/usr/local/lib/python3.7/dist-packages/inky/phat.py", line 72, in __init__
    v_flip=False)
  File "/usr/local/lib/python3.7/dist-packages/inky/inky.py", line 86, in __init__
    self.eeprom = eeprom.read_eeprom(i2c_bus=i2c_bus)
  File "/usr/local/lib/python3.7/dist-packages/inky/eeprom.py", line 102, in read_eeprom
    raise ImportError('This library requires the smbus2 module\nInstall with: sudo pip install smbus2')
ImportError: This library requires the smbus2 module
Install with: sudo pip install smbus2

bertybassett avatar Sep 09 '20 15:09 bertybassett

@bertybassett did you install the inky phat library?

"curl https://get.pimoroni.com/inky | bash"

pufferfish-tech avatar Sep 09 '20 16:09 pufferfish-tech

yes

bertybassett avatar Sep 09 '20 16:09 bertybassett

Did it fail? It seems like it missed the install for a lot of things..

pufferfish-tech avatar Sep 09 '20 16:09 pufferfish-tech

sudo pip3 install smbus2 fixed it and I can confirm that it is now working

I must say the inky script asked if I wanted a full install examples and documents and I said no maybe that caused it to fail.

bertybassett avatar Sep 09 '20 16:09 bertybassett

Yeah looking down the list of things the pimoroni script does, I think if it fails you will get a lot of missing stuff. Try running it again and see if you can spot any errors?

pufferfish-tech avatar Sep 09 '20 16:09 pufferfish-tech

You can literally put https://get.pimoroni.com/inky into a browser, save the file, open it as text and see how much stuff it does...quite a lot!

pufferfish-tech avatar Sep 09 '20 16:09 pufferfish-tech

don't worry it is working now

bertybassett avatar Sep 09 '20 16:09 bertybassett

Good stuff!

pufferfish-tech avatar Sep 09 '20 16:09 pufferfish-tech