Time of Use Electricity Supply - Octopus Energies

Hi,
Glad it is usefyl!
(and not just for me )

Not sure why the re-call did not work, that but of code had not changed. I have not played with Reactor, so don’t know if that has a way to synchronise to call on the half hour.
Only thought at present is if code failed on first pass, then call Back would not get set. Possibly could not get a new variable, although I thought I had protected against those that are used before being created.:thinking:
Octo

Edit, ignore below, I think i’ve found out what’s happening (running your latest build from github). I’ve made some check expressions in reactor and the values are updating. There could be something strange with caching my side.
I’ve found on this virtual device (and never seen this before) that if I click dashboard and then devices (VeraSecure) and go into advanced/variables, they don’t actually consistently appear to update. Refreshing the page completely and then going back to the device does update them. They are getting stored, as i’m calling them elsewhere (reactor/and another virtual sensor for the wall dashboard display).

I will keep a check on this, I also perhaps last night while doing other things, reloaded luup a few times. This would have made several calls to the API. I’d not expect that to be limited, but there is a chance the script was running OK but for some reason not getting the data.

But, i’m hoping everything is great now (with exception why i need to full refresh to get the virtual meter to display the true variables).
Update after a few hours (14:16) : all syncing OK now :slight_smile:

-Previous Edit-
(i’m not coder, lets just get that out there)
I’ve made a compare against what I was running previously, the new edit (with pricing variable etc) and what was working and kind of blended them together. Just checking now if if keeps running OK. I noticed minor formatting changes between the two, but whether any of those made a difference or not i’m unsure. If it runs OK with my hashing together, i’ll PM across what is working and feel free to PM back anything more refined. I’ll happily run it inside reactor and see what happens. I have the current price now displayed on my wall display thanks to this, so super easy to monitor :slight_smile:

Hi Octoplayer, on the subject of house battery, which product do you have? I have a LuxPowerTek inverter and would love to be able to control AC charge from automation logic

Hi
I have 2 X 2.4kwh pylon phantom. I am looking at adding another battery, and have been told by my supplier (pluginsolar) there will be a module available “soon” that will allow remote control via rs485.
That would be a key piece of my automation, with Octopus.
There are a couple of designs on GitHub via Rasp Pi, not sure if there is an equivalent for your Lux batteries.
Good luck :smiley:

I have pylontech us2000 too, but they are connected to the inverter.
I do have my inverter hooked into Octopus with scheduling here though. Unsure if you are aware of : https://smart-energy.octopushome.net/

Hi Octoplayer,
I’m seeing a mismatch between actual and called values for some reason. I took these snips at the same time (just after 10:00 on 30/03)
Could this be due to the clocks changing. The clock is correct in my Vera, but they look like they are now an hour out of sync.

actual

I’m using this tariff info
local Product = “AGILE-18-02-21”
local Tariff = “E-1R-AGILE-18-02-21-M”
local PriceIncVAT = true

I have a trigger set up to alert me if the values don’t change for over an hour, i’m very sure they are changing and updating. I first noticed this yesterday when InPeak hadn’t triggered yesterday.

Hi,
Good point , I meant when I put in the time calcs to check what would happen on BST, but have been busy putting External Wall Insulation up, and with the warm weather the heating has not been cutting in anyway, so I had not noticed.

I am sure you are right - I’ll look the dst options in the date function and update asap.

Thank
Octo.

Hi Octo,
It’s looking good now :slight_smile: I’m still running via Reactor and everything is matching up nicely.

One thing i’ve noticed in Vera (don’t think its anything to do with your code, but for info only) is that when the code is changed and even after a luup reload, a hard browser refresh seems to be needed to properly display the variables in the UI (even though they are correct in memory if referenced elsewhere). Once that’s done, they update OK when clicking in and out of the device afterwards.

Just testing a new version of Scene code before release.
I noticed in mid April that there were some days with TWO periods of capped pricing. My code found the start of the morning peak, and the end of the evening. Everything in between was then “inpeak”

The update finds the next peak, when that is over it rechecks in case there is another. It also should handle the case when there is no slot exceeding the peak threshold (although I haven’t seen any sign of that happening!)
Octo

1 Like

New version now in Github
Octo

Is it possible to pull down the half hour electric and gas meter readings into Vera?

Hi Talisker
I have some LUA that runs in a scene to pull down the Agile electricity prices.
It would be straight forward to add meter readings to it, please feel free to update it, but note they are 24 hours behind, so not much use for daily control.
I use the Otopus Go Agile App from Jamsim for tracking / comparing my usage and export on Android, and the Octopus web dashboard.

HTH
Regards
Octo

Thanks Octo. I’ll take a look at the app.