Skip to content
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

Struggling to make this work? #1

Open
mcaddy opened this issue Sep 10, 2021 · 31 comments
Open

Struggling to make this work? #1

mcaddy opened this issue Sep 10, 2021 · 31 comments

Comments

@mcaddy
Copy link

mcaddy commented Sep 10, 2021

I suspect this isn't an issue with the integration more of a confusion regarding the documentation.

I had initially assumed this was all up and running but skimming the code I see references to sandbox and not the consumer-api url?

When I try to configure using the Integrations GUI I get "User input malformed" if I leave the Start and End dates empty.

I didn't want to specify as I was keen to leave it run and not have to update the config.

Grateful of a quick discussion to understand where I'm going wrong.

I've never done any Python but have coded in many other languages, so if there is work needed to get this working I would like to help.

@stikonas
Copy link

Yes, I think end field should be optional. API allows requesting data without end field.

@mcaddy
Copy link
Author

mcaddy commented Sep 10, 2021

leaving the end date blank results in the same malformed data error, I've put a date a long time in the future, it seemed happier with that

@mcaddy
Copy link
Author

mcaddy commented Sep 10, 2021

I've now seem some data appear, will eave it run for a bit and see where we get to.

My next issue is how do I fetch both gas and electric, if I try to add a second integration I get a warning that one has already been added.

@smartechru
Copy link
Owner

@mcaddy and @stikonas
I developed this integration about half a year ago.
Obviously, there is no option to fetch both gas and electric usage data. I might add those features easily but these days I am super busy working on other stuff. I will check again once I am available. The start and end parameters are optional though.

@tungmeister
Copy link

tungmeister commented Sep 11, 2021

@mcaddy I tried getting this up and running a while ago but could never get any data - could you share your config steps?
After setting up I see Invalid API request: 403 in the logs with no data - did you change the host url?

@Njibhuvgy
Copy link

I'm able to download my data from the n3rgy consumer site by logging in with my MPAN and IHD MAC address. Can anyone point me in the direction of where to find the API Key?

@stikonas
Copy link

I'm able to download my data from the n3rgy consumer site by logging in with my MPAN and IHD MAC address. Can anyone point me in the direction of where to find the API Key?

IHD MAC is API key.

@Njibhuvgy
Copy link

Thank you. I have used IHD MAC as API and changed the host URL to https://consumer-api.data.n3rgy.com. I now get one sensor entity with status unknown. Any idea where I go from here?

@stikonas
Copy link

Thank you. I have used IHD MAC as API and changed the host URL to https://consumer-api.data.n3rgy.com. I now get one sensor entity with status unknown. Any idea where I go from here?

No, that's where I'm stuck. Probably at this point you need to start debugging, try to enable more logging.

@mcaddy
Copy link
Author

mcaddy commented Sep 14, 2021

I'm not sure I trust the data I'm getting. however I'm not using much gas at the moment so it might e right, the graph is a little weird in how it presents.

gas

@stikonas
Copy link

stikonas commented Sep 14, 2021

I'm not sure I trust the data I'm getting. however I'm not using much gas at the moment so it might e right, the graph is a little weird in how it presents.

Can you share what configurations have you used? Somehow with configuration options that I used the sensor is still in Unknown state.

@mcaddy
Copy link
Author

mcaddy commented Sep 14, 2021

I've now reconfigure for electric meter to see if the graph shows better usage with different data.

API-KEY : Mac address of In home device
Property ID : is the MPAN
Host Url : https://consumer-api.data.n3rgy.com

I checked all the above worked using the n4rgy site before setting up the integration

@mcaddy
Copy link
Author

mcaddy commented Sep 14, 2021

Sadly with what I thought to be the same config as before I now also have Unknown.

@stikonas
Copy link

Sadly with what I thought to be the same config as before I now also have Unknown.

Hmm, maybe something was configured later in Configure flow... (Where there is an option to set LiveData, Daily updates, start and end.)

@mcaddy
Copy link
Author

mcaddy commented Sep 14, 2021

I thought that two, have ticked all the boxes and set some Start and end dates and will leave for a day as I'm still not entirely sure when the data actually syncs.

@Njibhuvgy
Copy link

I left mine running and after 24 hours data started to appear. I have configs ‘live environment’ and ‘daily updates’ ticked with a start and end date a year apart. The below is the data I’m getting for my power meter, not sure what it’s showing but certainly doesn’t look correct for my usage. Interestingly it also shows data close to live (last half hour).
IMG_0167

@seamus65
Copy link

I am also getting an Invalid API request: 403.

I have re-done the configuration several times.

URL: https://consumer-api.data.n3rgy.com
MAC as API Key and MPAN as property id.

I can download my data directly from N3RGY site.

@rlewis187
Copy link

I can't even find the integration on HACS, has it been pulled?

@mcaddy
Copy link
Author

mcaddy commented Dec 4, 2021

I can't even find the integration on HACS, has it been pulled?

Have you added this as a custom repo in hacs?

@rlewis187
Copy link

I can't even find the integration on HACS, has it been pulled?

Have you added this as a custom repo in hacs?

I have, the documentation says to search though, I did and it's not listed.

@mcaddy
Copy link
Author

mcaddy commented Dec 4, 2021

I can't even find the integration on HACS, has it been pulled?

Have you added this as a custom repo in hacs?

I have, the documentation says to search though, I did and it's not listed.

Ok, maybe a typo in the repo name, just checked mine and it's being listed.

I don't know anyone who has got meaningful stats out of this so I'd not spend too long trying to get things working.

@rlewis187
Copy link

OK Thanks

@bandvillage
Copy link

I have found that I needed to change the the URL used in the call_api() function in n3rgy_api.py to remove the MPxN.

Change:
url = f'{self.base_url}/{self.mpxn}'

To:
url = self.base_url

It does not appear to work well with the 30 minute readings I get with my SSE smart meter. Will continue to investigate.

@jzeeman01
Copy link

Hi - I have it in HACS - I have updated the config.YAML
but I still cannot get the integration under config-integration +...
Anyone else find this?

@rlewis187
Copy link

As stated above, this integration is broken and it doesn't look like anyone is going to maintain it. I switched to using Hildebrand Glow off HACS. That seems to work just fine.

@jzeeman01
Copy link

As stated above, this integration is broken and it doesn't look like anyone is going to maintain it. I switched to using Hildebrand Glow off HACS. That seems to work just fine.

OK - what smartmeter have you got - I'm looking for it to work with my Chameleon IHD6?
Thx for the help

@rlewis187
Copy link

Doesn't matter what smart meter you have, it downloads the data from online records. You just need some info from your in home display and to create an account.

@mcaddy
Copy link
Author

mcaddy commented Feb 10, 2022

I've done the same, wierdly I was only getting data for 05:00 - 06:00 when I first setup the integration, however the last couple of days have been full detail.

@rlewis187
Copy link

I've done the same, wierdly I was only getting data for 05:00 - 06:00 when I first setup the integration, however the last couple of days have been full detail.

Mine is sometimes patchy. Smart meters use 3G for their connectivity and I'm out in the sticks with terrible mobile signal, I blame that.

@mcaddy
Copy link
Author

mcaddy commented Feb 13, 2022

It wasn't the meter, the data is available when checking the n3rgy site or the loop app, it just didn't make it in to the HA database other than 0500-0600 for the first three days off operation. Given that the n3rgy data for my meter only used to update at 0400ish the following morning for the previous day, I feared that it might be something similar. It's been good for the last week but threw another wobler this morning recording no data between 0400 and 1000.

@adequatelyrusty
Copy link

re: 'Struggling to make this work?'
TLDR; gave up, and used Hildebrand Glow (DCC) after registering for account on the mobile app: "Bright" by Hildebrand.

The longer version:
I managed to get n3rgy installed (using this thread, after reading the documentation, because as a new user to HA and never used HACS I didn't know I had to add as a custom repository).
Set up my smart meter details with n3rgy. Waited a bit of time - then I could pull data myself from their site.
API key: IHD MAC, Property ID: MPxN, API Host: https://consumer-api.data.n3rgy.com/

Once installed, using the GUI to install, couldn't pull any data using any URL for the API host, including the one here - I got 40x something, which I found only after enabling debug logging - as a new person to HA it would be good if the n3rgy docs could do with hinting on how to do this for HA globally or just for custom_components!

Adding the configuration.yaml entry for one sensor - HA just seems to ignore this. Adding a second set of data under the n3rgy: section, also ignored. Nothing in the logs I could find.

So.. then remove the config from .yaml, added n3rgy integration via the GUI for HA.
This only allowed once sensor, so gas OR electric, and refuses to accept empty start and end dates/times.
I couldn't add a second instance as suggested was also the case above, it doesn't let you add multiples.

I too gave up, and used Hildebrand after registering on the App, which just worked, no problems, their documentation addresses the issues mentioned above - i.e. how to debug log just this one integration, and so on.

hope this comment helps someone else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants