Exec bindings issue: Order or RegEx Kills other Exec Things with logged exception

Log follows.

I have 3 things, that I am debugging to control a tp-link plug, currently linked to a backlight for my desk. They are defined as follows:

exec:command:office_desk_backlight “TP-PlugSwitch” [command="/enlistments/TpLink/TpLink/TpLink/bin/Debug/tplink.exe %2$s", interval=0, timeout=5, autorun=false]
exec:command:office_desk_backlight_check “TP-PlugStatus” [command="/enlistments/TpLink/TpLink/TpLink/bin/Debug/tplink.exe check", interval=15, timeout=5, transform=“REGEX(.stateX":"(.)”.)", autorun=true]
exec:command:office_desk_backlight_ping “TP-PlugPing” [command="/enlistments/TpLink/TpLink/cping/bin/Debug/cping.exe --ip 192.168.2.3", interval=30, timeout=30", transform="REGEX(.sent(.)replies.
)", autorun=true]

The items to go along with this are:

String Office_DeskBackLight “Office Desk Light [%s]” {channel=“exec:command:office_desk_backlight:input”}
String Office_DeskBackLight_Status “Office Desk Light Status [%s]” {channel=“exec:command:office_desk_backlight_check:output”}
String Office_DeskBackLight_Ping_Out “Office Desk Light Ping [%s]” {channel=“exec:command:office_desk_backlight_ping:output”}
String Office_DeskBackLight_Ping_Last “Office Desk Light Ping Last [%s]” {channel=“exec:command:office_desk_backlight_ping:lastexecution”}

In their current configuration, I can turn on and off the light (using a rule btw… not sure why I can’t do it with the thing binding itself) and I get a notification of when the status changes.

For the ping, I am seeing the script being run as verified by the log entry:

13:13:57.443 [INFO ] [marthome.event.ItemStateChangedEvent] - Office_DeskBackLight_Ping_Last changed from 2017-01-15T13:13:23.128-0800 to 2017-01-15T13:13:57.435-0800

The value of Office_DeskBackLight_Ping_Out is always set to {“sent”:5,“replies”:5,“state”:“online”}, which is the correct value before any RegEx transformation. I know the RegEx transform is working as I use it for Office_DeskBackLight_Status without any issues, and I have verified the regex itself using RegEx Tester which I used to tune the status variable.

I tried moving the thing for ping (exec:command:office_desk_backlight_ping) before the one for status, and status stops working, and the regEx is still not working.

I have turned up general logging using “log:set trace” and not seen any regex debug or anything else that would give any extra information why the regex fails, or why the thing kills any other exec things after it.

Two issues here:

  1. Why is the regex not working?
  2. Why does the ping thing provide the following exception when placed before another thing?

13:06:26.491 [ERROR] [ore.thing.internal.ThingRegistryImpl] - Could not inform the ThingTracker ‘org.eclipse.smarthome.core.thing.internal.ThingManager@13ad5b2’ about the ‘THING_UPDATED’ event!
java.lang.NullPointerException
at org.eclipse.smarthome.core.thing.internal.ThingManager.thingUpdated(ThingManager.java:542)[105:org.eclipse.smarthome.core.thing:0.9.0.201701140927]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:227)[105:org.eclipse.smarthome.core.thing:0.9.0.201701140927]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:150)[105:org.eclipse.smarthome.core.thing:0.9.0.201701140927]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.201701140927]
at org.eclipse.smarthome.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:167)[98:org.eclipse.smarthome.core:0.9.0.201701140927]
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:57)[98:org.eclipse.smarthome.core:0.9.0.201701140927]
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutUpdatedElement(AbstractProvider.java:82)[98:org.eclipse.smarthome.cor
e:0.9.0.201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.acces
s$4(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.201
701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$21.ap
ply(GenericThingProvider.java:1044)[133:org.eclipse.smarthome.model.thing:0.9.0.
201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$21.ap
ply(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.201
701140927]
at org.eclipse.xtext.xbase.lib.IteratorExtensions.forEach(IteratorExtens
ions.java:363)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtens
ions.java:333)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.creat
eThingsFromModelForThingHandlerFactory(GenericThingProvider.java:1054)[133:org.e
clipse.smarthome.model.thing:0.9.0.201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.acces
s$1(GenericThingProvider.java:1008)[133:org.eclipse.smarthome.model.thing:0.9.0.
201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1$1.a
pply(GenericThingProvider.java:236)[133:org.eclipse.smarthome.model.thing:0.9.0.
201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1$1.a
pply(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.20
1701140927]
at org.eclipse.xtext.xbase.lib.IteratorExtensions.forEach(IteratorExtens
ions.java:363)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtens
ions.java:333)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1.app
ly(GenericThingProvider.java:239)[133:org.eclipse.smarthome.model.thing:0.9.0.20
1701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$1.app
ly(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.2017
01140927]
at org.eclipse.smarthome.config.core.BundleProcessorVetoManager.applyAct
ionFor(BundleProcessorVetoManager.java:121)[94:org.eclipse.smarthome.config.core
:0.9.0.201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$6.app
ly(GenericThingProvider.java:320)[133:org.eclipse.smarthome.model.thing:0.9.0.20
1701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$6.app
ly(GenericThingProvider.java:1)[133:org.eclipse.smarthome.model.thing:0.9.0.2017
01140927]
at org.eclipse.xtext.xbase.lib.IteratorExtensions.forEach(IteratorExtens
ions.java:363)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtens
ions.java:333)[146:org.eclipse.xtext.xbase.lib:2.9.2]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.creat
eThingsFromModel(GenericThingProvider.java:323)[133:org.eclipse.smarthome.model.
thing:0.9.0.201701140927]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.modelChanged(GenericThingProvider.java:901)[133:org.eclipse.smarthome.model.thing:0.9.0.201701140927]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:207)[122:org.eclipse.smarthome.model.core:0.9.0.201701140927]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:120)[122:org.eclipse.smarthome.model.core:0.9.0.201701140927]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:270)[122:org.eclipse.smarthome.model.core:0.9.0.201701140927]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:264)[122:org.eclipse.smarthome.model.core:0.9.0.201701140927]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:145)[122:org.eclipse.smarthome.model.core:0.9.0.201701140927]
at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[98:org.eclipse.smarthome.core:0.9.0.201701140927]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]