Skip to content

Get your user token for ICONA Bridge

Pierpaolo Follia edited this page Apr 17, 2022 · 1 revision

Get your user token for ICONA Brigde communication

WARNING: ICONA CLI only works with the Comelit HUB. Serial Bridge is not supported.

To be able to use the ICONA CLI command, you need to get your user token. The token is generated when you create a mobile user for your phone application (IOS or Android) and it's stored in the HUB memory. To access the configuration, you need to navigate in the admin WEB interface of your HUB. If you don't know the address of the HUB on your network, you can use the scan command:

comelit-cli scan

You should get an output similar to this:

Found hardware D407 MAC 0025291701ec, app HSrv version 1.5.0, system id ViP_, Home server - Comelit Hub 1 at IP X.X.X.X

Use the provided IP and navigate to http://X.X.X.X:8080/ in your preferred browser. You will be prompted for a password: if nobody changed it, the default one is comelit. Otherwise, you might need to reach out to those who installed your system and get the right password.

Once you are in, click on the "Backup/Restore" section (Backup/Ripristino in Italian) and create a backup of your configuration. When ready, download it by clicking on its name. It's a tar file, you need to uncompress it. You should find a list of configuration files in it: what you need to look for is the users.cfg file, which is the one containing the token we are looking for. This file is gzipped, so you need to rename it to users.gz and gunzip it (you can use whatever you want to uncompress it, I used the command-line tool gunzip). Once expanded, open it with your preferred text editor, you should find something similar to this:

mspUsersMap.0.0 = 4:2:2 5:2:0 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.1 = 4:2:2 5:2:1 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.2 = 4:2:1 5:2:2 6:4:"MY USER" 7:2:2 8:2:0 9:4:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 10:4:"" 11:4:"email@test.com" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.3 = 4:2:1 5:2:2 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.4 = 4:2:2 5:2:2 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.5 = 4:2:1 5:2:2 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.6 = 4:2:2 5:2:0 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.7 = 4:2:2 5:2:0 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.8 = 4:2:2 5:2:0 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.9 = 4:2:2 5:2:0 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.10 = 4:2:2 5:2:0 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.11 = 4:2:2 5:2:0 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.12 = 4:2:2 5:2:0 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.13 = 4:2:2 5:2:0 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.14 = 4:2:2 5:2:0 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0
mspUsersMap.0.15 = 4:2:2 5:2:0 6:4:"" 7:2:2 8:2:0 9:4:"" 10:4:"" 11:4:"" 12:4:"" 13:2:0 14:4:"" 15:2:0 16:2:0 17:4:"" 18:4:"" 19:2:2 20:4:"" 21:2:0

grab the token (the one I marked with xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) where you see the user you are using on your phone app. It's a 32 char long string.

Get your device token for ICONA communication (PUSH)

After grabbing the config file (see above) decompress the file pushinfo.cfg file using the command gunzip -S .cfg pushinfo.cfg and get the token from the expanded file (the second field, it's a 64 long string).