Provide a trigger for thing Online/Offline status in rule. #3001
Commits on Feb 12, 2017
-
RunEngineImple subscribes to ThingStatusInfoChangedEvent.
We're going to expose thing status to rule. This is the first step toward the goal. The rule engine needs to subscribe to the event. Bug: eclipse-archived#1654 Signed-off-by: Maoliang Huang <hellomao@outlook.com>
-
The syntax is "Thing <thingUid> changed [from <oldState>] [to <newState>]" Bug: eclipse-archived#1654 Signed-off-by: Maoliang Huang <hellomao@outlook.com>
-
Similar to how ItemRegistry is exposedin RulesJvmModelInferrer, ThingRegistry is exposed in RulesJvmModelInferrer.xtend Bug: eclipse-archived#1654 Signed-off-by: Maoliang Huang <hellomao@outlook.com>
-
Refactor and add RulesThingRefresher.
RulesThingsRefresher acts like RulesItemRefresher. It listens to things changes (added/removed) and schedules to reload the rules. Bug: eclipse-archived#1654 Signed-off-by: Maoliang Huang <hellomao@outlook.com>
-
Infer whether an event trigger is ThingStateChangedEventTrigger.
Bug: eclipse-archived#1654 Signed-off-by: Maoliang Huang <hellomao@outlook.com>
-
RuleEngine listens to ThingStatusChangedEvent and execut the rule.
Convert the thing status from online to Online which is used in the rule. Other thing status are converted to Offline. The rule engine also supports the rule with trigger thing state change. Bug: eclipse-archived#1654 Signed-off-by: Maoliang Huang <hellomao@outlook.com>
-
Support to handle thing state update in rule engine.
Add the syntax 'Thing' <thingUid> 'received update' in the syntax file. This is similar to item status update. Handle the thing status event and execute thing update rule in rule engine. Bug: eclipse-archived#1654 Signed-off-by: Maoliang Huang <hellomao@outlook.com>
-
Fix issues in thing update/change rules.
The rule is changed to take thingUid as a string instead of an ID. And we don't use the type Thing internally to pass the information in the rule. This is done so because when the thing is removed, it can occur before the rule is checked and executed. When it occurs, we cannot get the Thing from thingUid. Fix an issue in storing thing related rules and retrieve them. Bug: eclipse-archived#1654 Signed-off-by: Maoliang Huang <hellomao@outlook.com>
Commits on Feb 20, 2017
-
Fix a test org.eclipse.smarthome.model.script.tests.
- Need to add the bundle org.eclipse.smarthome.thing to the plugin in pom.xml. Signed-off-by: Maoliang Huang <hellomao@outlook.com>
Commits on Apr 1, 2017
-
-
Change thing changed event syntax.
- Use a pre-defined list as the thing status. the list is the same as ThingStatus. Bug: eclipse-archived#1654 Signed-off-by: kceiw <hellomao@outlook.com>
-
Expose ThingStatusInfo via an action.
- The thing uid contains ':' which cannot be used as an identifier. So we cannot use something like "ThingType:Thing" in the script and interpreset it as a thing. So we need to create an action to accept the thing uid and return its status. - This is to allow the user to create more restrains using ThingStatusInfo in the script. Bug: eclipse-archived#1654 Signed-off-by: kceiw <hellomao@outlook.com>
-
remove org.eclipse.smarthome.core from required package.
Bug: eclipse-archived#1654 Signed-off-by: kceiw <hellomao@outlook.com>
Commits on Apr 8, 2017
-
Add missing activate functions in ThingActionService.
Bug: eclipse-archived#1654 Signed-off-by: kceiw <hellomao@outlook.com>