ux4iot
Search…
Configure your existing IoT Hub
In order to use the following hooks, you need to perform additional setup steps:
In both cases, the IoT Hub routing must be configured.

Device Twin Changed Events

For 'Device Twin Changed Events', which are required for the useDeviceTwin hook, a routing rule must be added as follows:
If you want to use Azure CLI, you can accomplish the same in the following way:
AZ CLI
1
az iot hub route create \
2
--route-name ux4iot-twinchanges \
3
--hub-name IOT_HUB_NAME \
4
--resource-group RESOURCE_GROUP_OF_IOT_HUB \
5
--condition true \
6
--endpoint events \
7
--source twinchangeevents
Copied!

Connection State Events

For 'Connection State Events', which are required for the useConnectionState hook, a routing rule must be added as follows:
If you want to use Azure CLI, you can accomplish the same in the following way:
AZ CLI
1
az iot hub route create \
2
--route-name ux4iot-connectionevents \
3
--hub-name IOT_HUB_NAME\
4
--resource-group RESOURCE_GROUP_OF_IOT_HUB \
5
--condition true \
6
--endpoint events \
7
--source deviceconnectionstateevents
Copied!