@Override
protected void createCommands() {
super.createCommands();
Command a = new Command();
a.setName("Set " + getPojo().getName() + " hue to 50%");
a.setDescription("the light " + getPojo().getName() + " changes its hue");
a.setReceiver("app.events.sensors.behavior.request.objects");
a.setProperty("object",
getPojo().getName());
a.setProperty("behavior", BEHAVIOR_HUE);
a.setProperty("value", "50");
Command b = new Command();
b.setName("Increase " + getPojo().getName() + " hue");
b.setDescription("increases " + getPojo().getName() + " hue of one step");
b.setReceiver("app.events.sensors.behavior.request.objects");
b.setProperty("object",
getPojo().getName());
b.setProperty("behavior", BEHAVIOR_HUE);
b.setProperty("value", Behavior.VALUE_NEXT);
Command c = new Command();
c.setName("Decrease " + getPojo().getName() + " hue");
c.setDescription("decreases " + getPojo().getName() + " hue of one step");
c.setReceiver("app.events.sensors.behavior.request.objects");
c.setProperty("object",
getPojo().getName());
c.setProperty("behavior", BEHAVIOR_HUE);
c.setProperty("value", Behavior.VALUE_PREVIOUS);
Command d = new Command();
d.setName("Set its hue to 50%");
d.setDescription("set its hue to 50%");
d.setReceiver("app.events.sensors.behavior.request.objects");
d.setProperty("object", "@event.object.name");
d.setProperty("behavior", BEHAVIOR_HUE);
d.setProperty("value", "50");
Command e = new Command();
e.setName("Increase its hue");
e.setDescription("increases its hue of one step");
e.setReceiver("app.events.sensors.behavior.request.objects");
e.setProperty("object", "@event.object.name");
e.setProperty("behavior", BEHAVIOR_HUE);
e.setProperty("value", Behavior.VALUE_NEXT);
Command f = new Command();
f.setName("Decrease its hue");
f.setDescription("decreases its hue of one step");
f.setReceiver("app.events.sensors.behavior.request.objects");
f.setProperty("object", "@event.object.name");
f.setProperty("behavior", BEHAVIOR_HUE);
f.setProperty("value", Behavior.VALUE_PREVIOUS);
Command g = new Command();
g.setName("Set its hue to the value in the event");
g.setDescription("set its hue to the value in the event");
g.setReceiver("app.events.sensors.behavior.request.objects");
g.setProperty("object", "@event.object.name");
g.setProperty("behavior", BEHAVIOR_HUE);
g.setProperty("value", "@event.value");
Command h = new Command();
h.setName("Set " + getPojo().getName() + " saturation to 50%");
h.setDescription("the light " + getPojo().getName() + " changes its saturation");
h.setReceiver("app.events.sensors.behavior.request.objects");
h.setProperty("object",
getPojo().getName());
h.setProperty("behavior", BEHAVIOR_SATURATION);
h.setProperty("value", "50");
Command i = new Command();
i.setName("Increase " + getPojo().getName() + " saturation");
i.setDescription("increases " + getPojo().getName() + " saturation of one step");
i.setReceiver("app.events.sensors.behavior.request.objects");
i.setProperty("object",
getPojo().getName());
i.setProperty("behavior", BEHAVIOR_SATURATION);
i.setProperty("value", Behavior.VALUE_NEXT);
Command l = new Command();
l.setName("Decrease " + getPojo().getName() + " saturation");
l.setDescription("decreases " + getPojo().getName() + " saturation of one step");
l.setReceiver("app.events.sensors.behavior.request.objects");
l.setProperty("object",
getPojo().getName());
l.setProperty("behavior", BEHAVIOR_SATURATION);
l.setProperty("value", Behavior.VALUE_PREVIOUS);
Command m = new Command();
m.setName("Set its saturation to 50%");
m.setDescription("set its saturation to 50%");
m.setReceiver("app.events.sensors.behavior.request.objects");
m.setProperty("object", "@event.object.name");
m.setProperty("behavior", BEHAVIOR_SATURATION);
m.setProperty("value", "50");
Command n = new Command();
n.setName("Increase its saturation");
n.setDescription("increases its saturation of one step");
n.setReceiver("app.events.sensors.behavior.request.objects");
n.setProperty("object", "@event.object.name");
n.setProperty("behavior", BEHAVIOR_SATURATION);
n.setProperty("value", Behavior.VALUE_NEXT);
Command o = new Command();
o.setName("Decrease its saturation");
o.setDescription("decreases its saturation of one step");
o.setReceiver("app.events.sensors.behavior.request.objects");
o.setProperty("object", "@event.object.name");
o.setProperty("behavior", BEHAVIOR_SATURATION);
o.setProperty("value", Behavior.VALUE_PREVIOUS);
Command p = new Command();
p.setName("Set its saturation to the value in the event");
p.setDescription("set its saturation to the value in the event");
p.setReceiver("app.events.sensors.behavior.request.objects");
p.setProperty("object", "@event.object.name");
p.setProperty("behavior", BEHAVIOR_SATURATION);
p.setProperty("value", "@event.value");
//effect related commands
Command q = new Command();
q.setName(getPojo().getName() + " next Effect");
q.setDescription("select the " + getPojo().getName() + " next Effect");
q.setReceiver("app.events.sensors.behavior.request.objects");
q.setProperty("object", getPojo().getName());
q.setProperty("behavior", BEHAVIOR_EFFECT);
q.setProperty("value", "next");
Command r = new Command();
r.setName(getPojo().getName() + " previous Effect");
r.setDescription("select the " + getPojo().getName() + " previous Effect");
r.setReceiver("app.events.sensors.behavior.request.objects");
r.setProperty("object", getPojo().getName());
r.setProperty("behavior", BEHAVIOR_EFFECT);
r.setProperty("value", "previous");
CommandPersistence.add(a);
CommandPersistence.add(b);