kpoppel / homeassistant-novafos

Homeassistant wrapper around the Novafos KMD water metering data warehouse.
Apache License 2.0
10 stars 3 forks source link

Unable to find supplierID #6

Closed jakobmoll closed 2 years ago

jakobmoll commented 2 years ago

I'm currently unable to find the supplier ID during the login process. No url matching the "https://<6-digit number>.webtools.kmd.dk/wts/..." appears in the network part of the dev tool.

I have tried inspecting the rest of the requests/responses for any sign of the supplier ID, but have been unsuccessful. Do you know of another way of getting this?

Otherwise really cool app for getting data out of the water meter - looking forward to getting it up and running

/jakob

kejXero commented 2 years ago

I have the same issue as jakobmoll with no succes in locating the supplier ID.

kpoppel commented 2 years ago

I see.. Try this please, and let me know if it works for you. I just searched for my utility to see where it appears in the data stream.

Make sure to press F12 to get the debugger window opened. Go to novafos.dk, select your utility, login using email, MitId or whatever.

Now you should hopefully see something like this right at the top of the Network tab: image

Check the "Response Header" and here the "Location" header. You would in that very long string find "utility=" in there. For me this is a 6-digit number.

There is also another way: Go to https://novafos.dk/selvbetjening/mit-forbrug Click the image button. You will get to the login options. Check out the URL in the browser:

https://easy-energy-identity.kmd.dk/Identity/Account/Sign/Login?ReturnUrl=<bla bla>utility%3D999999%26<bla bla>

The '999999' is what you are looking for. Let me know please what is the easier method for you, and I will update the README file.

jakobmoll commented 2 years ago

Logging in with nemID using the "Klik her og login" on: novafos login made me get the actual utility id using the Response Headers.

Integration is now up and running - thanks!

jakobmoll commented 2 years ago

Update for Readme.MD

Get the supplier id

Method 1.

  1. In chrome press F12, and select the "Network" tab.
  2. Login on the https://minforsyning-2.kmd.dk webpage.
  3. Inspect the first few entries. You should see something along the lines of: https://<6-digit number>.webtools.kmd.dk/wts/... The 6 digit number is your supplier ID.

Method 2.

  1. In chrome press F12, and select the "Network" tab.
  2. Login on https://novafos.dk/selvbetjening/mit-forbrug using the "Klik her og login" button
  3. Login using nemID, and look for the request "ExternalLogin?returnUrl...."
  4. Inspect the "Headers" tab and under "General" -> "Request URL" you should see a parameter in the URL "...utility=<6-digit number>&...."
  5. The 6 digit number is your supplier ID
kejXero commented 2 years ago

I dont see either of the lines you have shown in the pictures. This is what I see:

@.***

/Henrik

Fra: kpoppel @.> Sendt: Friday, August 5, 2022 9:32 AM Til: kpoppel/homeassistant-novafos @.> Cc: kejXero @.>; Comment @.> Emne: Re: [kpoppel/homeassistant-novafos] Unable to find supplierID (Issue #6)

I see.. Try this please, and let me know if it works for you. I just searched for my utility to see where it appears in the data stream.

Make sure to press F12 to get the debugger window opened. Go to novafos.dk, select your utility, login using email, MitId or whatever.

Now you should hopefully see something like this right at the top of the Network tab: [image]https://user-images.githubusercontent.com/4174578/183024074-2152c645-3ee9-4561-91c2-e3ed4a816a27.png

Check the "Response Header" and here the "Location" header. You would in that very long string find "utility=" in there. For me this is a 6-digit number.

There is also another way, but that makes an assumption of how these 6 digits are made: Go to https://novafos.dk/selvbetjening/mit-forbrug Click the [image]https://user-images.githubusercontent.com/4174578/183024864-62b2edb4-688c-4c80-87c6-bd8aa6cdbc62.png button. You will get to the login options. Check out the URL in the browser:

https://easy-energy-identity.kmd.dk/Identity/Account/Sign/Login?ReturnUrl=<blahttps://easy-energy-identity.kmd.dk/Identity/Account/Sign/Login?ReturnUrl=%3cbla bla>utility%3D999999%26

The '999999' is what you are looking for. Let me know please what is the easier method for you, and I will update the README file.

— Reply to this email directly, view it on GitHubhttps://github.com/kpoppel/homeassistant-novafos/issues/6#issuecomment-1206137554, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APF2NKNQZHEDKZ7BVZ5YX53VXS7NHANCNFSM55SOKCZQ. You are receiving this because you commented.Message ID: @.**@.>>

kejXero commented 2 years ago

It is working now. Punched F4 a couple of time and then ‘ExternalLogin…’ showed up.

I have water reading in my HA now, thanks a lot for your help and support.

/Henrik

Fra: kpoppel @.> Sendt: Friday, August 5, 2022 9:32 AM Til: kpoppel/homeassistant-novafos @.> Cc: kejXero @.>; Comment @.> Emne: Re: [kpoppel/homeassistant-novafos] Unable to find supplierID (Issue #6)

I see.. Try this please, and let me know if it works for you. I just searched for my utility to see where it appears in the data stream.

Make sure to press F12 to get the debugger window opened. Go to novafos.dk, select your utility, login using email, MitId or whatever.

Now you should hopefully see something like this right at the top of the Network tab: [image]https://user-images.githubusercontent.com/4174578/183024074-2152c645-3ee9-4561-91c2-e3ed4a816a27.png

Check the "Response Header" and here the "Location" header. You would in that very long string find "utility=" in there. For me this is a 6-digit number.

There is also another way, but that makes an assumption of how these 6 digits are made: Go to https://novafos.dk/selvbetjening/mit-forbrug Click the [image]https://user-images.githubusercontent.com/4174578/183024864-62b2edb4-688c-4c80-87c6-bd8aa6cdbc62.png button. You will get to the login options. Check out the URL in the browser:

https://easy-energy-identity.kmd.dk/Identity/Account/Sign/Login?ReturnUrl=<blahttps://easy-energy-identity.kmd.dk/Identity/Account/Sign/Login?ReturnUrl=%3cbla bla>utility%3D999999%26

The '999999' is what you are looking for. Let me know please what is the easier method for you, and I will update the README file.

— Reply to this email directly, view it on GitHubhttps://github.com/kpoppel/homeassistant-novafos/issues/6#issuecomment-1206137554, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APF2NKNQZHEDKZ7BVZ5YX53VXS7NHANCNFSM55SOKCZQ. You are receiving this because you commented.Message ID: @.**@.>>