You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

Introduction

Alarming systems can connect to our Nx70 via the MQTT protocol.

This MQTT interface will be License and Password protected.

Since software 2.35, the MQTT interface is available for starting the first tests. It is not protected by a license but you need to enable it via auto-provisioning.


How to enable the application server web-page


You need to create the provisioning file below and start provisioning (Can be done via the web-interface)

Enable MQTT web-page via provisioning

<?xml version="1.0" encoding="UTF-8"?>
<provisioning version="1.1" productID="e2">

<nvm>

<oper name="set_webui_visibility">

<param name="menu.settings/online-services/application-servers" value="visible" />

</oper>

</nvm>
</provisioning>


After the provisioning, the Application Servers page is now visible.

FAQ Nx70 - Application servers (Hidden)


Create an Application server

You now can create an application server access.

  • Id: id for external clients are: "as1", "as2" ...
  • Application server name (username) (At least one character is needed)
  • Password (has to be at least 32 characters using hexadecimal digits only: 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F)

FAQ Nx70 - Application servers (Hidden)


Add MQTT client via provisioning

<?xml version="1.0" encoding="UTF-8"?>
<provisioning version="1.1" productID="e2">

<nvm>

<oper name="set_external_client">

<param name="Username" value="as1" />
<param name="Password" value="123456789012345678901234567890ab" />

</oper>

</nvm>
</provisioning>

Example

The following test environment is used for the documentation.

environment is used.


Ubuntu preparation

First we installed the mosquitto client: sudo apt install mosquitto-clients

Host file:

Add the N870 to your host file. (/etc/hosts)

127.0.0.1       localhost
127.0.1.1       eric-VirtualBox
192.168.178.192 int-589ec60e71c0

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Location service

With the following command you can ask for the location information from the handset with IPUI 029e74a599


sudo mosquitto_pub -u as1 --psk-identity as1 --psk 123456789012345678901234567890ab -t 'as1/location/ipui/029e74a599/req/position' -m '{"msgId":"pos_2","params":{"ipui":"029e74a599","mode":"dps"}}' -p 8884 -h int-589ec60e71c0 
  • "as1" proper external_client id
  • "123456789012345678901234567890abEEEE" proper external client password
  • "{}" inside You can specify the message
  • "8884" messages can be only sent on port 8884


The following answer is received


dm2/029e74a599/as1/location/res/position {"msgId":"pos_2","payload":{"ble":{},"dm_id":"dm2","dps":{"bases":[{"fpn":"215","rpn":"66","rssi":"60"},{"fpn":"215","rpn":"67","rssi":"59"}],"bs_fpn":"215","bs_mac":"7c2f80e0d6d7","bs_name":"BSDM2","bs_rpn":"66","time":"1593602403"},"ipui":"029e74a599","sip_id":"1023"}}
dm2/1023/as1/location/res/position {"msgId":"pos_2","payload":{"ble":{},"dm_id":"dm2","dps":{"bases":[{"fpn":"215","rpn":"66","rssi":"60"},{"fpn":"215","rpn":"67","rssi":"59"}],"bs_fpn":"215","bs_mac":"7c2f80e0d6d7","bs_name":"BSDM2","bs_rpn":"66","time":"1593602403"},"ipui":"029e74a599","sip_id":"1023"}}



{"msgId":"pos_2","payload":{"ble":{},"dm_id":"dm1","dps":{"bases":[{"fpn":"215","rpn":"2","rssi":"58"},{"fpn":"215","rpn":"67","rssi":"60"},{"fpn":"215","rpn":"66","rssi":"60"}],"bs_fpn":"215","bs_mac":"589ec60d8c73","bs_name":"BSDM1","bs_rpn":"2","time":"1593602685"},"ipui":"029e74a599","sip_id":"1023"}}
dm1/1023/as1/location/res/position {"msgId":"pos_2","payload":{"ble":{},"dm_id":"dm1","dps":{"bases":[{"fpn":"215","rpn":"2","rssi":"58"},{"fpn":"215","rpn":"67","rssi":"60"},{"fpn":"215","rpn":"66","rssi":"60"}],"bs_fpn":"215","bs_mac":"589ec60d8c73","bs_name":"BSDM1","bs_rpn":"2","time":"1593602685"},"ipui":"029e74a599","sip_id":"1023"}}
  • No labels