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
Incorrect Tariff using Intelligent Octopus #114
Comments
Thanks for raising this. Unfortunately, I'm not sure where this information would come from as this doesn't look like Octopus exposes this information in their API. If you are able to point me in the correct direction, then I'll be able to look at it. |
I'm not sure either! This integration: https://github.com/megakid/ha_octopus_intelligent is able to find out if "intelligent" has switched to the off-peak rate. But does not have the tariff. |
This issue has become stale because it has been open for 30 days with no activity. If you still think it's an issue, please respond soon. |
Author of the above octopus intelligent integration here. @BottlecapDave I was considering posing the question of merging my integration into yours. What are your thoughts on this? I may be able to do the work on the my hour long commutes but would obviously want your blessing first given the size of the task (there's quite a lot of different sensors and other read/write controls with Intelligent tariff). The Octopus Intelligent tariff seems popular with EV owners so it would be nice if we teamed up to create the one-stop-shop of Octopus Energy Home Assistant Integration for Home Assistant. Thoughts? |
Hi there @megakid. The main reason why I haven't done anything around intelligent tariff is that I'm unable to test the scenarios (and therefore fine the solution in some cases). I also didn't want to be stepping on toes of other creators like yourself. If you're wishing to contribute your work to this integration, I'm all for it :) I've looked through your integration and here's my current thoughts.
|
+1 on this. Thank you both @BottlecapDave @megakid for your work on these fantastic integrations. I've hit the same issue today as OP. I've plugged my car in this morning and OE have set my smart charging schedule (i.e. off peak rate) to be from midday today to 4pm, continuing at 11pm through to the following 7:30am. I use the current_rate entity on my Energy Dashboard, which 90% of the time is fine - it's just scenarios like this one where it's showing me the peak rate instead of off peak. |
@megakid have you decided if you want to port intelligent features into this integration? I was going to try and look at the original bug for within the next week, but obv will have trouble testing the fix. I also don't mind looking at other parts (e.g. the switches) |
@ColinRobbins @tomfielder @megakid I've started looking at this issue and intelligent support at a wider level. I've created a beta release that hopefully fixes this issue as well as laying the ground work for future intelligent support. However I've done this a bit blind as I'm not on this tariff. It would be good to know the following
The release can be found at https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/releases/tag/intelligent-beta-1 |
Feel free to take some of the code etc from my integration - my free time has taken a massive hit in the last few weeks (baby arrived) so unlikely to get to it myself. |
No problem. My main priority is to fix the issue at hand, and then potentially provide some of the other app/integration features in the future. Congratulations on the new addition to your family! |
I can help test this with IO - I'm on the Ohme integration so it behaves very differently in terms of plannedDispatches to a vehicle integration. I've installed the beta version so will see how it 'behaves' on my next charge tonight. |
I can also test this - I have a Tesla so it will test different paths to @andyvee69's Ohme Octopus Intelligent functionality. I can perform GraphQL requests and give you the output too |
@andyvee69 @megakid Has anyone had a chance to check on this fix? The part I'm mainly interested in is what is being returned by |
I would love to be able to provide feedback regarding what is returned by If you point me in the right direction I'll be more than happy to help test any upgrades/beta |
@RPCHome The mentioned attributes are present in the beta release of this integration, it isn't present on the octopus intelligent integration. The plan is to add more support for intelligent in this integration, but as I don't have access to the tariff I'm relying on users for support. If you wish to help, then you'll need to install the beta and confirm back what you have in those attributes after a couple of days. This will help me work out if there is more work on my end to do for that part. Once added into the main integration I can start adding the other pieces. |
@BottlecapDave I can't see the beta release you released in the drop down in HACS: |
Looks like HACs only support so many versions behind. I've created a new beta release which should have the feature enabled. |
I'm not sure how to enable the new intelligent tariff sensors. I've updated to the latest beta and restarted but don't get any new config options or sensors. |
There should be a sensor called |
That tariff should be supported and only differs by region in my testing. I'll have to take another look. I assume there's no errors in your HA logs? |
I'm really sorry it looks like the last build didn't work correctly. Please try https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/releases/tag/intelligent-beta-3 |
Glad it's finally appearing. Interesting though that it's going offline a lot and that you don't have anything in your attributes (which suggests the two are probably linked). Do you have any errors in your HA instance that might hint at the issue? |
Yeh good point. I scheduled a charge on my car and was waiting for it to appear but nothing yet so I guess the unavailability is linked. Will check the logs |
hmm yeah I've double checked the code and nothing has changed around that sensor. I've released a new version, but again this shouldn't have any effect. I assume your tariff hasn't changed recently which might stop the sensor from being added? This can be determined by following this guide and pasting the results here. I also assume if you reload the integration the sensor doesn't come back? |
Updated to beta 10, still unavailable (I have reloaded as well) My tariff hasn't changed yet. Will be changing next Sunday on the 11th
|
@RPCHome - Could it be that something has gone wrong with your beta 10 installation? It seems from the code you pasted in the previous post that you might be running production version 7.4.2 of Dave's excellent component. @BottlecapDave - Dave, I read this thread with interest at the weekend. I have an Ohme charger and Intelligent Octopus so I thought I'd see whether I could give you some feedback. I installed your Beta 10 via HACS yesterday. Just after I plugged my car in at 15:07 this afternoon a planned dispatch appeared; see picture. I see it is for 23.00 BST to 05.00. Could it be out by half an hour and really represents the normal off-peak period of 23.30 to 05:30? Just wondering... otherwise I'm getting an extra half hour of off-peak. Let me know if you want any further and/or different feedback. |
@wralb Welcome to the beta and any additional feedback is welcome. I think you might be right with what you suggested to @RPCHome based on his diagnostics data. In terms of the planned/completed dispatches in that sensor, the data comes straight from OE without any modifications (other than some minor transformations in shape). I then use that data to 1) turn on/off the sensor and 2) adjust the rate/previous accumulative cost sensors to move any times within planned/completed dispatches to off peak rates. From what I've read with the tariff, planned dispatches can fall outside of the guaranteed hours if OE want to balance the grid. However again I've read (but could be wrong) that you will only get the off peak rates outside of those hours if your car is charging (which is why I'm unsure if it's right to adjust the rate sensor with planned dispatches as this might provide false data) |
The main things I want to test for this release are
Once these have been confirmed, I'll look to do a separate beta release with the other missing intelligent related sensors
|
Thank you @wralb for point out the error of my ways. I'm not sure what went wrong but beta 10 didn't install correctly. Just re-done it and it now reporting the sensor correctly. @BottlecapDave To answer a few of the things you have mentioned in your post 2 above. You are correct in thinking that planned dispatched can and do fall outside of the guaranteed hours (this happens a lot when we charge and we make use of the cheap rate) You do only get the cheap rate if the car is plugged in and charging. We have found that sometimes we have had to unplug and use the car. When this happens, the OE app updates at the end of the half hour window and reverts back to the Peak rate (the other Octopus intelligent integration also reflect this, I haven't tried it on the beta tests yet) We have crossed checked this on the bill a number of times as we were unsure if we were going to be charged peak rate In addition to this, when the planned dispatch kicks in mid-way through the half-hour window, ie 7 mins pas the hour, the off-peak rate is back-dated to the half hour window start time (ie xx:00 or xx:30). (hope that all make sense) So adjusting the rate with the planned dispatches is okay and doesn't cause false data. Moving on to your questions
All the other sensors will be welcomed, once all the above has been confirmed. Any more info or questions just ask. |
The completed dispatches is required in order to calculate the previous accumulative cost due to planned dispatches disappearing once they are in the past. |
It's going to take a little time for me to get my head fully around what the data I'm seeing means. Firstly, evidence from my bills indicates that the car does NOT have to be charging for me to benefit from additional off-peak periods. It also seems that the car does NOT need to be plugged in either. Here is a snippet of a bill for 16th April. I know for certain that I was out in the car between 9 AM and approx. 11 AM. The bill shows several additional off-peak sessions in the morning, for which I only have baseline electricity usage and the charges for those periods are clearly at the off-peak rate. These off-peak additional period during the day seem quite rare, but it does seem that Octopus quite frequently add an extra half hour before and/or after the "guaranteed off-peak" period. Now for more confusing data.
|
This is very confusing indeed. I've never had it where I'm getting the off peak rate while the car isn't plugged in. However you are using the Ohme charger which OE recommend, so it might work slightly differently to my charger.
Again this is correct, I find the
Good to know. I've set an alarm to check my |
@RPCHome Do you have any errors in your logs that might indicate why you don't have any planned dispatches? It might be the sensor isn't updating enough. |
Nope nothing but it might be baucase I had not long reloaded beta 10. As the completed ones are showing up now. |
More data.
Once I get my bill on the 18th, I'll be able to see whether the planned_dispatch matches the off-peak tariff. |
Thanks for the update. I'll try and work out why the sensor is not turning on/off. It also looks like I'll need to record a local record of the completed dispatches in order to properly calculate the previous cost. |
I've released a new beta https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/releases/tag/intelligent-beta-11 which stores the completed dispatches locally beyond the reported 12 hours. It should store a maximum of 3 days worth of data. |
My latest beta feedback...
|
Thanks for the update. When data is downloaded, the completed dispatches should merge the results between the newest data and the cached data and throw away anything that's more than 3 days old. Based on previous reports completed dispatches disappear quite quickly so the integration might have never had a chance to see them? Something to keep an eye on. Binary sensor should turn on every time a planned or completed dispatch is active. This is built in a similar way to my other sensors, but I've had sproadic reports of sensors not turning on. Not sure if this is a HA thing. I'm also not sure if a planned dispatch drops off the list once it's active or once it's complete. |
I may have found a pointer to why my planned_dispatches are no-longer updating. I'm getting the following error in the home-assistant.log file every half hour. Note that the four DEBUG lines at 15:00:37.511 come from four additional logging lines I added to the beta11 code in case they help.
For info, here is my diagnostic data (note that the manifest below claims version 7.4.2, but I confirmed by inspection that I have the changes introduced in beta11).
|
Ok thanks for that. I know what the issue is, so I'll look at fixing it when I get a spare moment. |
New release (https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/releases/tag/intelligent-beta-12) should fix your issues @wralb |
Thanks Dave, Beta 12 installed at 6.15 today; no errors since, and I have more recent completed_dispatches. One thought, which may or may-not be helpful since I don't understand all the use cases here... I have a lot of half-hour completed dispatches that are contiguous, would it make sense to merge them in to a smaller number of entries spanning a longer time? This would be consistent with the planned_dispatches which show longer periods:
It would save memory, reduce the size of the attributes and make the completed_dispatches attribute more readable. |
I'm glad it's now working :) If others agree, I think this fix might be ready? The 30 minute chunks is how OE report them. I assume because you could stop charging during a planned dispatch and therefore cut it short. I'm trying to do minimal transformations on the data due to the nature of me being unable to test is thoroughly. I plan to try and work on the other features over the few weeks, but I'll create a new ticket to keep the discussions focused aand tag everyone in it. |
I've upgraded to Beta 12 and it is working well for me. The only issue I have is the automation It returns this error message It stopped working a few betas ago but unsure why. For reference, I use this automation from the Octopus Intelligent integration and it working fine.
More than happy to continue testing the beta as when you other on the other features. |
@RPCHome As mentioned before your issue is your trying to cast a datetime into a datetime which doesnt work. You template needs to be
|
Thanks @BottlecapDave I must have missed that before. |
@RPCHome @wralb @megakid @tomfielder @ColinRobbins Thanks for the assistance in trying to fix this issue. I've released a new beta which adds various sensors exposed in @megakid's integration. Please join the discusssion at #282 and raise any related issues there. I'll keep this issue open until I've released the fix for the original issue. |
This fix is now available within https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/releases/tag/v7.4.4 so closing this issue. Thanks for all of the assistance :) |
Describe the bug
If using Intellilgent Octopus, and Octopus decide to charge your EV during peak time, the tariff changes to the off-peak tariff.
However, the tariff shown in this integration is still the peak tariff.
To Reproduce
Signup to Intelligent Octopus and observer sensor behaviour.
Expected behavior
The tariff should accurately reflect the current rate.
Home Assistant Version
The version of Home Assistant.
Integration Version
2022.12.8
The text was updated successfully, but these errors were encountered: