Arm/disarm Xiaomi Gateway alarm

Dear, thank you very much for this component. But i have a problem. I have done everything like the instructions, but my hassio doesnt restart with the service home assistant.restart. So i can NOT activate it. The host is the ip adresse of the hub? Can you please help me. Thx

1 Like

Yes, that’s right.

1 Like

Thx hekm77. I have an other question. I see now that the alarm is sometimes unavailable in home assistent. Is this normal? What could be the reason? Can we use Mac in stead of host in Configuration? Thx again! My regards.

Hi hekm77 thanks for your component, I having trouble with the token, I am using a iphone and my key contain 16 characters, when I check my configuration it shows a message that my token should be a 32 characters key, can you help me with it, thanks

Hé hem77, is it normal that the alarm, sometimes is unavailable? Thx

I didn’t have a problem with the switch.
Are sensor.gateway_illumination and light.gateway_xxxx always available?

Hoi hekm77, as you see, the, gateway is a lot unavailable… The gateway is on the Mainland China server…

Check your network settings.
Set the gateway to a static IP.
Try changing the wifi channel.

Hey hekm77, i tried everything on my router. Also the app mi home doesnt respond at that moment. What are the best settings for my router? Thx again…!

When I add the component and configuration I get an error message when doing configuration validation.

The message is the following
Configuration validation

Validate your configuration if you recently made some changes to your configuration and want to make sure that it is all valid

Configuration invalidCHECK CONFIGURATION

Invalid config for [switch.xiaomi_gateway_alarm]: length of value must be at least 32 for dictionary value @ data[‘token’]. Got ‘XXXXXXXXXXXXXXXX’. (See ?, line ?).

For the gateway the tokens aren’t 32 but 16 long.

How did all of you handle this ? or how do I translate my 16 length toten which is correct and works for the standard gateway functionalities (sensors) into the required 32 length one ?

1 Like

@rswennen Retrieving the Access Token

@hekm77 that’s where I went and when you read that page it also explicitely mentions

The Xiaomi Gateway uses another security method and requires a key (16 alphanumeric chars), which can be obtained easily via a hidden menu item at the Mi-Home app or using the miio command line tool.

When I enter that 16 alphanumeric token/key I get the error message above.

Can someone who has the Xiaomi Gateway Alarm custom coponent working confirm whether they have a 16 char token or a 32 char token configured.

@tioje78 I’m having the same issue, how did you resolve it eventually ?

@rswennen token != key

You’re absolutely right. It worked now, didn’t realize Token is not the same as key


Hello
I can t upload files
how can i do?
thanks

In HA 0.110.0 I get this warning:

2020-05-20 20:16:41 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify XiaomiMiioGenericDevice to extend SwitchEntity

@majkers
The Xiaomi miio Alarm Control Panel has been added to Home Assistant 0.110
The custom component will be removed.

1 Like

alarm_control_panel.alarm_trigger doesn’t work with the alarm control panel so far? Or is it just me?

2 Likes

Same for me :frowning:

1 Like