Integration with Minut Point?

Yes, when you contacted Minut you did state http://localhost:8000 as redirect_url. It is ok though, you can redo it and take the code (code=TQP..f0 up to but not including &state) and access http://your-home-assistant:8183/api/minut/?code=TQP..f0 (replacing the code and url accordingly).

Sorry about this hassle but it will all get better once oauth2 authentication can be done via the HomeAssistant cloud.

Thanks for the super quick reply!

Unfortunately, I get a 404 error when going to:
https://HASSURL:8123/api/minut/?code=ar6...afe

Are you running the latest 0.83?

Running 0.83.0b1

You must have the dialog in Integrations open to initiate the authentication endpoint.

This is what it looks like for me (using Marcus Test credentials).

And with changed url (note the downloaded file which is the confirmation)

Sorry for this hassle, but atm it is not possible to do it in a nicer way (if you give the right callback url to minut the process will be automatic).

Finally managed! Just had to remove one of the / in the callback!

So when it directed me to: http://localhost:8000/?code=m...F&state=Z...n , I changed it to:
https://hassurl:8123/api/minut?code=m...F&state=Z...n and it suddenly worked!

Unfortunately, only 1 of my 3 points shows up in HA with the new component. With the old custom component they all showed.

2 Likes

Connection went smoothly, but the integration only connects one of the points in my account…

1 Like

That is strange, I’ve written the code to support multiple devices. I only have one myself though so it’s quite hard to debug what might be happening. You don’t see anything interesting in the logs?

I sent an IM with the log entries. ('Config entry has already been setup!' for all but the first point. Is the email used as identifier? Haven’t checked the code but perhaps a typo is omitting the differentiation of the subsequent registrations?)

The new code which fixes this have been merged into the dev branch and I hope it will be part of 0.83.4.

1 Like

The fixes for multiple Points reached 0.84 unfortunatly it introduced another issue (a stupid typo) so the sensors does not load correctly. I’ve submitted a fix for this and will keep you posted when the new version reaches the stable branch.

2 Likes

Hi,

First of all thanks for integrating Minut Point into Home Assistant.

I’ve just configured my Point, and I struggled a bit, just like Sam_Van_Herzele did, so I thought I’ll post exactly what I did to get i working for future reference and aiding other Point users. All credit goes to fredrike, Sam_Van_Herzele, gaffe, and who else posted in this thread.

Step 1: Update configuration.yaml with:
point:
client_id: INSERT ID
client_secret: INSERT SECRET

Step 2: Reboot Home Assistant

Step 3: After the reboot, Home Assistant has discovered your point, start configuring it by following the instructions. Leave the window with Home Assistant open.

Step 4: At some point you’ll be redirected to localhost:8000/point?code=RANDOM_TEXT&state=LONGER_RANDOM_TEXT which fails. BTW, it is by no means random :slight_smile: Do not edit the anything after “code=”, instead replace “localhost:8000/point?” with "https://hassurl:8123/api/minut?". If succeeding, a file is downloaded. Note, it didn’t work in Firefox, I tried in MS Edge which worked perfectly fine.

Step 5: Back in Home Assistant, press “submit” and you are now good to go.

Note: I was using Hassio 0.84.2 when I did this.

4 Likes

Thank you @Jorgensen for writing up this guide.

Are you sure you gave the right URL to Minut when creating the API-keys (you should have given them the url https://hassurl:8123/api/minut, as I tried to explain in the documentation:

To connect Point, you will have to sign up for a developer account and get a client_id and client_secret using the callback url as base_url + /api/minut eg. http://localhost:8123/api/minut . The client_id and client_secret should be used as below.

I really hope that we can get Cloud Authentication but according to @balloob it will take some time.

If the documentation can be made clearer please help and update it.

Hi fredrike.

You’re welcome, I’m just glad I now have Point integrated in HA.

And yes you are right, I didn’t give Minut the correct URL. In fact, I didn’t give Minut any URL, as I just asked for the client_id and client_secret. When they replied the client_id and client_secret back, I was told they could also configure the callback URL. Thus, Step 0 in this guide should be:

Step 0:
Ask Minut for your client_id and client_secret and ask them to configure the callback URL to https://hassurl:8123

Instead of waiting for Minut to update the callback URL, I just went ahead and tried integrating Point ASAP. I’ll see if I can help with documentation.

1 Like

Any news when the 0.84 fix will be implemented?

I really don’t know.

@balloob, when will this patch be added to a release?

It is part of the 0.85.0 beta so it will be released soon…

@fredrike, thank you for the great work. I was wondering if you see any way of turning the alarm on/off via the API?

Yes, I actually found a way to toggle the alarm (must have missed that when I implemented the support though).

I’ll take a look and see if I can implement it as a switch. Do note that the alarm is per home and not per Point device.

(for my own reference)
curl -X PUT -H "Authorization: Bearer $token" -H "Content-Type: application/json" -d '{ "alarm_status":"on"}' https://api.minut.com/draft1/homes/<home_id>

Great, I guess we can then find a way to use it with the Manual Alarm Control Panel.