Dynamic add new device in poll

Is it possible to add dynamic a new device within the onPoll() ?

If I make a MQTT request at onSynchronizeDevices() new device will not be visible every time - so it would be nice to add it “on the fly” if not existing.
I have tried - but nothing happen.

If it is not possible - how it could be done? Even if new device will be added at MQTT server, how can it automatically appear in the device list?

Thanks!
Michael

No. You’ll have to use onSynchronizeDevices. The only way to synchronize new devices for a given source is by clicking the Sync button on the mobile app’s Settings page or right-clicking the function in the Designer.

ok, understand. It is not a problem to add the elements from MQTT broker, but the capabilities are not available every time.

Most of my devices are reporting in JSON format and while scanning only one (or none - only rssi…) is available with name and id of device.
Full JSON with all capabilities is for most devices never existing.
That’s why would be nice to add the capability for an existing device “on the fly”.
Is this possible - or have you a workaround?

Thanks!

I would just assign all the possible capabilities for that device on sync. Then when it’s online, you’ll have access to it.