Hi,
My binding creates channel types during runtime, after initialize() finishes, but before thing status goes to online, based on the information it obtains from the remote device (which takes some time). It calls editThing and updateThing to make the channel changes.
I such behavior allowed?
If yes, then it apparently causes issues with paperui. On the first creation of a thing, binding builds channel types and channels in runtime as stated above, and UI shows the channels correctly as they appear, but it does not allow to add new items for the channels. When I click + to add an item to a channel, there is a JS exception, because it can’t find the channel type in $scope. I tried to put breakpoints on where channel types are populated and it never gets updated in runtime, only when thing configuration is changed. It is also possible to force channel type reading, when I go to a page that needs explicitly this information. So, if I just click on “Items” menu and then go back to the thing channels, I will be able to create new items for the channels, because $scope will contain correct channel types.
Is this a problem with how I handle channel type updates in the binding, or UI issue?
Thank you
Pawel