@LifeOfPyro
Hi Scott
How did you get on?
As a result of thinking about your question, I have found a way to easily remotely control Jinx! from openHAB2.
I activated the Jinx! remote control and assigned the Art-Net or SaCN universe to listen to, and turned on the AUTO option in the scenes window (to automatically crossfade to the newly selected scene)
Then added a handful of Things and Items in to openHAB2 to send out a Master Dimmer control and a single DMX channel to select the chase.
In theory it is completely possible to replicate the Jinx! scene control UI in openHAB, if you switch off the AUTO mode in the scene window in Jinx! and use the appropriate DMX channels to select LEFT and RIGHT scene and cross-fade.
For reference, here are the Thing and Item files.
Bridge dmx:artnet-bridge:JinxBridge "JinxArtNet" [ mode="unicast", address="192.168.178.69", universe=0 ] {
dimmer JinxMaster "Jinx Master Dimmer" [dmxid="7", fadetime=1000, dimtime=1000 ]
dimmer JinxChaseChannel "Jinx Chase Channel" [dmxid="1" ]
chaser chase01 "Jinx Chase 01" [dmxid="1", steps="0:1:0" ]
chaser chase02 "Jinx Chase 02" [dmxid="1", steps="0:2:0" ]
chaser chase03 "Jinx Chase 03" [dmxid="1", steps="0:3:0" ]
chaser chase04 "Jinx Chase 04" [dmxid="1", steps="0:4:0" ]
chaser chase05 "Jinx Chase 05" [dmxid="1", steps="0:5:0" ]
chaser chase06 "Jinx Chase 06" [dmxid="1", steps="0:6:0" ]
chaser chase07 "Jinx Chase 07" [dmxid="1", steps="0:7:0" ]
chaser chase08 "Jinx Chase 08" [dmxid="1", steps="0:8:0" ]
chaser chase09 "Jinx Chase 09" [dmxid="1", steps="0:9:0" ]
chaser chase10 "Jinx Chase 10" [dmxid="1", steps="0:10:0" ]
chaser chase11 "Jinx Chase 11" [dmxid="1", steps="0:11:0" ]
chaser chase12 "Jinx Chase 12" [dmxid="1", steps="0:12:0" ]
chaser chase13 "Jinx Chase 13" [dmxid="1", steps="0:13:0" ]
chaser chase14 "Jinx Chase 14" [dmxid="1", steps="0:14:0" ]
chaser chase15 "Jinx Chase 15" [dmxid="1", steps="0:15:0" ]
chaser chase16 "Jinx Chase 16" [dmxid="1", steps="0:16:0" ]
chaser chase17 "Jinx Chase 17" [dmxid="1", steps="0:17:0" ]
chaser chase18 "Jinx Chase 18" [dmxid="1", steps="0:18:0" ]
chaser chase19 "Jinx Chase 19" [dmxid="1", steps="0:19:0" ]
chaser chase20 "Jinx Chase 20" [dmxid="1", steps="0:20:0" ]
}
Items
Switch JinxMasterMute "Jinx Master Mute" { channel="dmx:artnet-bridge:JinxBridge:mute" }
Number JinxChaseChannel "Jinx Chase Channel" { channel="dmx:dimmer:JinxBridge:JinxChaseChannel:brightness" }
Number JinxChaseChannel256 "Jinx Chase Channel as 256"
Dimmer JinxMaster "Jinx Master" { channel="dmx:dimmer:JinxBridge:JinxMaster:brightness" }
Switch JinxChase01 "Jinx Chase 01" { channel="dmx:chaser:JinxBridge:chase01:switch" }
Switch JinxChase02 "Jinx Chase 02" { channel="dmx:chaser:JinxBridge:chase02:switch" }
Switch JinxChase03 "Jinx Chase 03" { channel="dmx:chaser:JinxBridge:chase03:switch" }
Switch JinxChase04 "Jinx Chase 04" { channel="dmx:chaser:JinxBridge:chase04:switch" }
Switch JinxChase05 "Jinx Chase 05" { channel="dmx:chaser:JinxBridge:chase05:switch" }
Switch JinxChase06 "Jinx Chase 06" { channel="dmx:chaser:JinxBridge:chase06:switch" }
Switch JinxChase07 "Jinx Chase 07" { channel="dmx:chaser:JinxBridge:chase07:switch" }
Switch JinxChase08 "Jinx Chase 08" { channel="dmx:chaser:JinxBridge:chase08:switch" }
Switch JinxChase09 "Jinx Chase 09" { channel="dmx:chaser:JinxBridge:chase09:switch" }
Switch JinxChase10 "Jinx Chase 10" { channel="dmx:chaser:JinxBridge:chase10:switch" }
Switch JinxChase11 "Jinx Chase 11" { channel="dmx:chaser:JinxBridge:chase11:switch" }
Switch JinxChase12 "Jinx Chase 12" { channel="dmx:chaser:JinxBridge:chase12:switch" }
Switch JinxChase13 "Jinx Chase 13" { channel="dmx:chaser:JinxBridge:chase13:switch" }
Switch JinxChase14 "Jinx Chase 14" { channel="dmx:chaser:JinxBridge:chase14:switch" }
Switch JinxChase15 "Jinx Chase 15" { channel="dmx:chaser:JinxBridge:chase15:switch" }
Switch JinxChase16 "Jinx Chase 16" { channel="dmx:chaser:JinxBridge:chase16:switch" }
Switch JinxChase17 "Jinx Chase 17" { channel="dmx:chaser:JinxBridge:chase17:switch" }
Switch JinxChase18 "Jinx Chase 18" { channel="dmx:chaser:JinxBridge:chase18:switch" }
Switch JinxChase19 "Jinx Chase 19" { channel="dmx:chaser:JinxBridge:chase19:switch" }
Switch JinxChase20 "Jinx Chase 20" { channel="dmx:chaser:JinxBridge:chase20:switch" }
I have added a rule that reads back the chase channel % value and converts it back to a 256 value to confirm that the right channel is in use.
To take it a step further, I created a rule that steps through the chases when a power socket is ON in my house. (The socket powers other lights)
var int XmasInterval = 10
var int XmasSteps = 0
var Timer XmasTimer = null
var double Val256 = 0
var double chaseval = 0
rule "Convert percent to 256"
when
Item JinxChaseChannel changed
then
JinxChaseChannel256.postUpdate(256 * JinxChaseChannel.state as Number)
end
rule "Step sequence"
when
Item LoungeGreenSocket changed from OFF to ON
then
XmasInterval = 400
JinxMasterMute.sendCommand(OFF)
Thread::sleep(200)
JinxMaster.sendCommand("75")
JinxChase05.sendCommand(ON)
XmasTimer = createTimer(now.plusSeconds(XmasInterval))
[|
if(XmasSteps == 0){
JinxChase01.sendCommand(ON)
XmasSteps = 1
}else if(XmasSteps == 1){
JinxChase01.sendCommand(ON)
XmasSteps = 2
}else if(XmasSteps == 2){
JinxChase02.sendCommand(ON)
XmasSteps = 3
}else if(XmasSteps == 3){
JinxChase03.sendCommand(ON)
XmasSteps = 4
}else if(XmasSteps == 4){
JinxChase04.sendCommand(ON)
XmasSteps = 5
}else if(XmasSteps == 5){
JinxChase05.sendCommand(ON)
XmasSteps = 6
}else if(XmasSteps == 6){
JinxChase06.sendCommand(ON)
XmasSteps = 7
}else if(XmasSteps == 7){
JinxChase07.sendCommand(ON)
XmasSteps = 8
}else if(XmasSteps == 8){
JinxChase08.sendCommand(ON)
XmasSteps = 9
}else if(XmasSteps == 9){
JinxChase09.sendCommand(ON)
XmasSteps = 10
}else {
JinxChase09.sendCommand(ON)
XmasSteps = 0
}
XmasTimer.reschedule(now.plusSeconds(XmasInterval))
]
end
rule "Timer Stop" when
Item LoungeGreenSocket changed from ON to OFF
then
if(XmasTimer !== null){
XmasTimer.cancel()
XmasTimer = null
}
JinxMaster.sendCommand(OFF)
Thread::sleep(2000)
JinxMasterMute.sendCommand(OFF)
end