Thing enable/disable in binding

I’m currently trying to implement my first binding and I wonder how to detect when a Thing is enabled/disabled through the UI. Cannot find any status in ThingStatus which seem to match, nor is thingUpdated() called when enabling/disabling the Thing through UI. Any pointer to where I should look?

You can check if Thing status is online, but why do you need to check this ? Never did in all my bindings.

1 Like

IMO disabled things should be treated as „non-existing“.

@hmerk Because, when the Thing (a bridge in this case) is initialized I start polling and I would like to stop polling when the Thing is disabled through the UI but I cannot find how to catch that event…

When a thing is disabled, dispose is called. Any polling should be stopped when that method is called.

1 Like

Yes, you’re right - it turns out I had a previous instance of the binding still running on the server (updating new versions while developing) and in the previous instance there was an Exception thrown which left the poll running…thanks for fast response and sorry for binding developer newbie questions.

1 Like

Yes, that’s very unfortunate but to my knowledge there is no way to prevent that.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.