MQTT
Mqtt options can be edited in settings page.
Broker Url
Broker url should be in format
mqtt://example.com:1883
mqtts://example.com:8883
client id
If not provided, it will be automaticaly generated
Azure
According to docs, Username needs to be in format <hub-name>/<device-id>/?api-version=2021-04-12
Note
for hubname probably you need to append .azure-devices.net
For password SAS token needs to be used which can be generated by.
az iot hub generate-sas-token -d <device-id> -n <hub-name> --du 31536000
Note
--du is token lifetime, so keep this value high and remember to rotate it once expires.
Events can be monitored using (web) console.
az iot hub monitor-events -n <hub-name> -d <device-id>
Warning
You can not connect more than one device with same credentials, because they will keep disconnecting.