Electricity Device not able to validate any postcode

Posted on
Wed Jul 13, 2022 11:29 am
RedYuriPrime offline
Posts: 58
Joined: Oct 14, 2014
Location: Oxford

Electricity Device not able to validate any postcode

Hi,
Trying to set up your plugin for the first time. Creating an electricity device to obtain charge rates, but the device setup complains it can't validate the post code. Tried a whole range of valid post codes and they all give the same message. Any ideas?
Geoff

Z-wave system with 80+ devices, Indigo7 on a dedicated MacMini
Controlling lighting, heating, hotwater, security; but still a lot to learn ... :shock:

Posted on
Wed Jul 13, 2022 2:58 pm
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Electricity Device not able to validate any postcode

Geoff,
I haven’t given the plug-in a lot of love for a while and not created any device recently. I was working on an update to support Go/Go Faster tariffs as well which I will get around to, so this may trigger me to complete those changes and complete the upgrade to python 3.0.

What version of Indigo are you running ?

I just created a new device and all was good, can you switch on debugging and capture a log extract when you try and do the device creation.


Neil

Posted on
Wed Jul 13, 2022 3:14 pm
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Electricity Device not able to validate any postcode

And try using SW1A 2AA which is 10 Downing Street, we should get the same results.

Code: Select all
 
   Octopus Energy Debug            API successfully Connected to Octopus Servers
   Octopus Energy Debug            GSP Not returned
   Octopus Energy Debug            API successfully Connected to Octopus Servers
   Octopus Energy Debug            GSP is C
   Octopus Energy Debug            Starting device: Boris' Gaff but not for long
   Octopus Energy Debug            472992674 Boris' Gaff but not for long
   Octopus Energy Debug            Need to Update Current 2022-07-13T21:00:00Z Stored  for Boris' Gaff but not for long
   Octopus Energy Debug            No Need for the Afternoon refresh - it is not 17:00Z or it has been done  for Boris' Gaff but not for long
   Octopus Energy                  Refreshing Daily Rate Information from the Octopus API for Device Boris' Gaff but not for long
   Octopus Energy Debug            Got the rates OK
   Octopus Energy Debug            [{"cost": "34.9965", "uiTime": "00:00", "time": "07/13/2022, 00:00:00"}, {"cost": "34.9965", "uiTime": "00:00", "time": "07/13/2022, 00:00:00"}, {"cost": "34.9965", "uiTime": "00:00", "time": "07/13/2022, 00:00:00"}, {"cost": "34.9965", "uiTime": "00:00", "time": "07/13/2022, 00:00:00"}, {"cost": "34.9965", "uiTime": "00:00", "time": "07/13/2022, 00:00:00"}]
   Octopus Energy Debug            Resetting Afternoon Refresh to False
   Octopus Energy Debug            Updating yesterday rates
   Octopus Energy Debug            Standing Charge 21.0
   Octopus Energy                  Current Rate inc vat is 34.9965
   Octopus Energy Debug            Update cycle complete for Boris' Gaff but not for long
   Octopus Energy Debug            No need to update Current 2022-07-13T21:00:00Z Stored 2022-07-13T21:00:00


This captures a deliberate failed attempt to validate a postcode, and a successful one. "GSP not returned" shows when the UI validation ran but Octopus did not return a region code for that postcode. It then follows a successful attempt when "GSP is C" which shows the region code being returned for that postcode.

Neil

Posted on
Fri Jul 15, 2022 9:17 am
RedYuriPrime offline
Posts: 58
Joined: Oct 14, 2014
Location: Oxford

Re: Electricity Device not able to validate any postcode

Hi Neil,
Thanks for your response and support.

I am using version 2021.1 of Indigo. I have just looked at the option of upgrading to 2022.1, but have several thousand lines of python code running and am nervous of the effect of the move to python 3 which is inherent in 2022.1 - I will need to put some time aside to do that. to debug any issues arising.

When I try to set up a device it fails much earlier than anything you are showing, as hopefully you can see from the attached screenshot.

Regards,
Geoff
Attachments
Octopus PI error.PNG
Result of trying to set up device
Octopus PI error.PNG (172.85 KiB) Viewed 2746 times

Z-wave system with 80+ devices, Indigo7 on a dedicated MacMini
Controlling lighting, heating, hotwater, security; but still a lot to learn ... :shock:

Posted on
Sat Jul 16, 2022 3:27 pm
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Electricity Device not able to validate any postcode

Hi Geoff,
Can you turn debug logging on in the plugin configuration and you should see the additional messages in the log as you try device creation that should help if you can post it here.
Thanks,
Neil

Posted on
Mon Jul 18, 2022 4:19 am
RedYuriPrime offline
Posts: 58
Joined: Oct 14, 2014
Location: Oxford

Re: Electricity Device not able to validate any postcode

Hi Neil,

OK, believe I have got it now. The (only) output to the log is:
Enabling plugin "Octopus Energy 0.2.15"
Starting plugin "Octopus Energy 0.2.15" (pid 2927)
Started plugin "Octopus Energy 0.2.15"
Octopus Energy Debug Starting concurrent thread

<Attempt to setup device with post code>

Octopus Energy Debug Other error('Connection aborted.', error(54, 'Connection reset by peer'))

Since this is clearly a communication issue, I note that plugin Better Email, and the remote indigo access, are working fine.

Z-wave system with 80+ devices, Indigo7 on a dedicated MacMini
Controlling lighting, heating, hotwater, security; but still a lot to learn ... :shock:

Posted on
Mon Jul 18, 2022 5:03 am
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Electricity Device not able to validate any postcode

Perfect - that helps.

As you say this is failing to make the basic api call (I start by requesting the region code and this does not require any account details or authentication).

Can you open a browser on the machine running indigo and enter the following

Code: Select all
https://api.octopus.energy/v1/industry/grid-supply-points/?postcode=SW1A2AA


This should result in

Code: Select all
count   1
next   null
previous   null
results   
0   
group_id   "_C"


or

Code: Select all
{"count":1,"next":null,"previous":null,"results":[{"group_id":"_C"}]}


in the browser (depending on which browser you use). I suspect that a firewall or something else is blocking the connection to the Octopus API for some reason, but this should point us in the right direction.

Also what version of MacOs are you running, this may be an issue if you are running Mac OS 10.13 or earlier.


Neil

Posted on
Tue Jul 19, 2022 3:20 am
RedYuriPrime offline
Posts: 58
Joined: Oct 14, 2014
Location: Oxford

Re: Electricity Device not able to validate any postcode

Running on a MAC 10 years old, with macOS version 10.12.6. I have done very little with the system for several years, but am now looking to update it, to include managing solar alongside an Eddi controller.

Literally today I should have a 2020 MAC delivered (which I hope will be 11.6.7 Big Sur rather than Monteray as I believe this will simplify migration), but could be a few days before this is up and running. However if it is a macOS issue, then it may be easiest to wait until I have the new machine up.

Running your first test:
https://api.octopus.energy/v1/industry/ ... de=SW1A2AA

results in:
":1,"next":null,"previous":null,"results":[{"group_id":"_C"}]}

which appears to be what you expect.

As a separate issue, do you have experience of the API associated with the Eddi device from MyEnergi

Z-wave system with 80+ devices, Indigo7 on a dedicated MacMini
Controlling lighting, heating, hotwater, security; but still a lot to learn ... :shock:

Posted on
Tue Jul 19, 2022 6:45 am
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Electricity Device not able to validate any postcode

Geoff,,
I believe this will go away on the new machine, you clearly can make a connection as the browser works, so it is the version of the Python requests libraries causing the issue. This blocked access to a number of public APi’s and once I saw the error that triggered me to check.

I haven’t looked at the Eddi API but this is an interesting area for me and something I am considering so happy to look into it.

Neil

Posted on
Tue Jul 19, 2022 6:56 am
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Electricity Device not able to validate any postcode

The Eddi (and zappi and Harvi ) API’s look pretty simple and I found a Python script that would be the basis for a simple plugin, it would just need the device definitions and config details added. In fact GhostXML may do what you need without a plugin. I would probably need temporary access to your account if we wanted to have a crack at a plugin. I am considering solar and a zappi at some point myself.

Neil

Posted on
Thu Jul 21, 2022 11:12 am
RedYuriPrime offline
Posts: 58
Joined: Oct 14, 2014
Location: Oxford

Re: Electricity Device not able to validate any postcode

Hi Neil,

Now running Indigo on the new mac. So IOS 12.3 (Monterey) and Indigo 2022.1.2. :D

As anticipated the migration from python 2.7 to 3.1 is proving a little painful, so only about 1/3 of the functionality currently working - but over the biggest hump. Also still having problems with a number of plugins which are supposedly compatible, despite having started Rosetta II. :roll:

However your Octopus plugin now appears to be working fine! Thanks for your support.

Its my son (who has an Indigo system managed by me) who currently has the solar panels and Eddi, so will check with him and get back to you, but I don't see any problems in providing you with an API key or whatever login details are needed to develop the plugin.

I am also looking at solar panels and, having seen what the Eddi provides in a system, I would specify one of these as well, and seek to integrate the use of the data into Indigo. Essentially, the cost per unit of elecgtricity you import is so much higher than the cost per unit you export, even with Agile Octopus, that maximising self-consumption is key to making solar panels cost effective, meaning that measuring and controlling your energy genertion and usage is key.

The Eddi is a clever standalone device since it varies energy use by varying the AC voltage applied to a fixed resistive load (e.g. water heater) - I think their advertising undersells it but the Eddi manual gives good detail - but it also acquires much of the input data you need in Indigo, and the rest can come from Z-wave devices on individual electrical loads.

So I would definitely encourage, and support as much as I can, the development of a suitable plugin for Eddie/Zappi.

Geoff

Z-wave system with 80+ devices, Indigo7 on a dedicated MacMini
Controlling lighting, heating, hotwater, security; but still a lot to learn ... :shock:

Posted on
Thu Jul 21, 2022 3:07 pm
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Electricity Device not able to validate any postcode

I am certainly open to working on this but it may not be for a while. I like the technology and may upgrade my charger to a Zappi at some point. I need to get the Octopus plugin upgraded (as well as adding support for Go / Go Faster) and I owe a new version of my Daikin plugin. Holidays and the hot weather have slowed my coding down!

Posted on
Wed Aug 03, 2022 1:16 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Electricity Device not able to validate any postcode

I have Zappi and hub so may have a crack at a plugin, or if not I can certainly support anyone else doing so.


Sent from my iPad using Tapatalk Pro

Posted on
Thu Aug 04, 2022 11:04 am
neilk offline
Posts: 714
Joined: Jul 13, 2015
Location: Reading, UK

Re: Electricity Device not able to validate any postcode

howartp wrote:
I have Zappi and hub so may have a crack at a plugin, or if not I can certainly support anyone else doing so.


Sent from my iPad using Tapatalk Pro


Peter - if you have the Zappi it may make more sense for you to have a crack. My Ohme appears to be phantom tripping (or it is the car causing it) and is 3 years old, so if I do need to replace it, it will be for a Zappi. It looks like the API while not official is pretty straightforward, and the Myenergi team engage in the dialogue https://myenergi.info/api-f54/ and https://github.com/twonk/MyEnergi-App-Api

Neil

Posted on
Thu Aug 04, 2022 2:23 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Electricity Device not able to validate any postcode

Consider it done.

I've knocked up a shell of a plugin that successfully talks to my Zappi and Harvi and tells me how they're feeling.

Jay is making me a subforum under my forum where I'll post details as I go.

Who is online

Users browsing this forum: No registered users and 2 guests