Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » How to remove a thing correctly?(Link of deleted thing to an item isn't deleted.)
icon8.gif  How to remove a thing correctly? [message #1756071] Fri, 10 March 2017 15:20 Go to next message
Juergen Baginski is currently offline Juergen BaginskiFriend
Messages: 7
Registered: March 2017
Junior Member
I'm trying to work on the tankerkoening binding, which isn't released to the offical binding list so far.

Situation:
Removing a thing, from which a channel is linked to an item.

My Problem:
After the remove, the link is still there, and I'm geting log entries like this(even after a restart):

2017-03-07 15:27:50.444 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '1.129' for item 'Diesel_1' to handler for channel 'tankerkoenig:tankstelle:978acd9c:diesel', because no thing with the UID 'tankerkoenig:tankstelle:978acd9c' could be found.
@dolic Did you see this error?

A
The mentioned thing has been removed (so it can't correctly be found). The item gets updated by a rule now, but why would the (String-)Item try update the channel when it recieves a change? Isn't that the wrong way around?
B
Why is the link still there (rechecked with "smarthome:links")? My dispose routine looks like that:
@Override
public void dispose() {
this.pollingJob.cancel(true);
}


C
When trying to debug in Eclipse, I can't get the same setup because running in debug-mode I can't create the link from the thing-channnel to the (String-) Item??
Re: How to remove a thing correctly? [message #1756100 is a reply to message #1756071] Sat, 11 March 2017 08:45 Go to previous messageGo to next message
Marcel Verpaalen is currently offline Marcel VerpaalenFriend
Messages: 59
Registered: September 2014
Member
Why you don't call
super();

At the end of your override to invoke the regular dispose logic?
Re: How to remove a thing correctly? [message #1756103 is a reply to message #1756100] Sat, 11 March 2017 09:48 Go to previous messageGo to next message
Juergen Baginski is currently offline Juergen BaginskiFriend
Messages: 7
Registered: March 2017
Junior Member
..because I'm a Newbie!


Thanks, will try that.

However, by creating a MyThingHandler, which extends the BaseThingHandler, this super() in MyThingHandler.dispose would just make sure that the dispose method of the BaseThingHandler will also be used. Since this one doesn't have any code I don't see which effect it should have.

[Edit:]
Tested it with the line " super.dispose();" added to my dispose-method, however I don't see a change in the behaviour.

What is the expected behaviour when just deleting a thing via PaperUI, will the link to an item be deleted? I see that the corespondig entries in the file "org.eclipse.smarthome.core.thing.link.ItemChannelLink.json" as kept!

[Updated on: Sat, 11 March 2017 14:21]

Report message to a moderator

Re: How to remove a thing correctly? [message #1759695 is a reply to message #1756103] Sun, 16 April 2017 08:35 Go to previous message
Chris Jackson is currently offline Chris JacksonFriend
Messages: 256
Registered: December 2013
Senior Member
Note that there is a bug already open on this issue -:

https://github.com/eclipse/smarthome/issues/1018
Previous Topic:Extending States - adding state attributes?
Next Topic:Channel Configuration
Goto Forum:
  


Current Time: Thu Dec 05 00:53:59 GMT 2024

Powered by FUDForum. Page generated in 0.03524 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top