No edit summary
Line 23: Line 23:
== Rules ==
== Rules ==


===Accent Lights ===
<pre>
// turn accent lights on at dusk
// turn accent lights on at dusk
rule "Accent Lights on @ Sunset"
rule "Accent Lights on @ Sunset"
when
when
     Channel 'astro:sun:local:nauticDusk#event' triggered START
     Channel 'astro:sun:local:astroDusk#event' triggered START
then
then
     logInfo("accent.rules", "Turning Lights On @ Sunset")
     logInfo("accent.rules", "Turning Lights On @ Sunset")
     Group_AccentLighting.sendCommand(On)
     Group_AccentLighting.sendCommand(ON)
end
end


Line 45: Line 43:
rule "Accent Lights on @ Sunset"
rule "Accent Lights on @ Sunset"
when
when
     Channel 'astro:sun:local:morningNight#event' triggered START
     Channel 'astro:sun:local:nauticDawn#event' triggered START
then
then
     logInfo("accent.rules", "Turning Lights On @ Sunset")
     logInfo("accent.rules", "Turning Lights On @ Early Morning")
     Group_AccentLighting.sendCommand(On)
     Group_AccentLighting.sendCommand(ON)
end
end


Line 56: Line 54:
     Channel 'astro:sun:local:daylight#event' triggered START
     Channel 'astro:sun:local:daylight#event' triggered START
then
then
     logInfo("accent.rules", "Turning Lights Off @ Sunrise")
     logInfo("accent.rules", "Turning Lights Off @ Daylight")
     Group_AccentLighting.sendCommand(Off)
     Group_AccentLighting.sendCommand(OFF)
end</pre>
end

Revision as of 00:00, 3 January 2019

Install Openhab

Just do it..

Allow Openhab to access Serial Devices by Adding 'openhab' to the Dialout Group

sudo vi /etc/group
dialout:x:20:openhab


Install Z Wave Bindings

PaperUI > Add Ons > Bindings > Z-wave Binding > install

Once the Binding is installed, add the Z-wave binding as a Thing and verify that the serial port is correct. If the serial port is missing or will not be accepted, make sure you added openhab to the dialup group in the previous step.

Add Items

  • Within PaperUI, Things should begin showing up in the Inbox.
  • Add each thing using the naming convention : Location_Type_Target (ie. LivingRoom_Dimmer_AccentLights)
  • Click each thing and add the appropriate items for each channel

Rules

// turn accent lights on at dusk rule "Accent Lights on @ Sunset" when

   Channel 'astro:sun:local:astroDusk#event' triggered START

then

   logInfo("accent.rules", "Turning Lights On @ Sunset")
   Group_AccentLighting.sendCommand(ON)

end

rule "Accent Lights Off @ 10" when

   Time cron "0 0 22 ? * *"

then

   logInfo("accent.rules", "Turning Lights Off @ 10")
   Group_AccentLighting.sendCommand(OFF)

end

// turn accent lights on at dusk rule "Accent Lights on @ Sunset" when

   Channel 'astro:sun:local:nauticDawn#event' triggered START

then

   logInfo("accent.rules", "Turning Lights On @ Early Morning")
   Group_AccentLighting.sendCommand(ON)

end

// turn accent lights on at dusk rule "Accent Lights on @ Sunset" when

   Channel 'astro:sun:local:daylight#event' triggered START

then

   logInfo("accent.rules", "Turning Lights Off @ Daylight")
   Group_AccentLighting.sendCommand(OFF)

end