Closed metbril closed 7 years ago
Originally submitted here:
On a first glance it looks like the GenericThingProvider still "knows" about the old Thing being there, so it informs its listeners about an update
. On the other hand, the ThingManager (being of of these listeners) does NOT seem know the old version (anymore?).
I'm wondering why the ThingManager maintains its own cache at all and does not use the ThingRegistry.
I'm now trying to figure out why the data model became inconsistent... Maybe the root-case could be the dispose()
-initialize()
taking too long, but I'm not sure yet.
Okay, wrong guess as it turns out...
It seems that the GenericThingProvider does not catch Things nested within the Bridge, assumes they are removed and informs its listeners accordingly. As a result, the "update" later on fails.
Now I'm only wondering if and why this ever worked an will provide a fix.
PS: As a work-around if you don't want to restart your OH every time, you could temporarily define your things like this:
Bridge rfxcom:bridge:1 [ serialPort="/dev/ttyUSB1" ] {}
Thing rfxcom:lighting2:remote1_1 (rfxcom:bridge:1) [deviceId="12260194.1", subType="AC"]
Thing rfxcom:lighting2:remote1_2 (rfxcom:bridge:1) [deviceId="12260194.2", subType="AC"]
Thing rfxcom:lighting2:remote1_3 (rfxcom:bridge:1) [deviceId="12260194.3", subType="AC"]
Thing rfxcom:lighting2:remote1_0 (rfxcom:bridge:1) [deviceId="12260194.0", subType="AC"]
Just keep in mind that you will end up with different UIDs in that case.
I actually copied this syntax from the example for the Hue binding, that has been there ages ago.
Bridge hue:bridge:1 [ ipAddress="192.168.0.64" ] {
0210 bulb1 [ lightId="1" ]
0220 bulb2 [ lightId="2" ]
}
Yes, and this syntax is correct and your are fully right to use it - and until 3 weeks ago it actually was working. I only wanted to tell you about a workaround until the fix reaches your OH2 installation.
Running latest snapshot on RPi, with apt-get install
On startup of service, things file loads perfectly. When I edit the file and save it, I get an error (see below)
demo.things
openhab.log