Control: iClever Light Plug
iClever Light Plug:
Connect To OpenHAB Notes:
*MUST HAVE MQTT ALL SET UP*
1. SSH into openhab
2. Go to sudo nano /etc/openhab2/items/home.items
3.
//iClever Light PlugsSwitch MKiCleverLight1 "iClever Light 1" <light> [ "Switchable" ] {mqtt=">[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug1:command:ON:LEDON],>[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug1:command:OFF:LEDOFF],<[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug1/state:state:ON:LEDON],<[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug1/state:state:OFF:LEDOFF]", autoupdate="false"}Switch MKiCleverPlug1 "iClever Plug 1" <poweroutlet_us> [ "Switchable" ] {mqtt=">[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug1:command:ON:RELAYON],>[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug1:command:OFF:RELAYOFF],<[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug1/state:state:ON:RELAYON],<[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug1/state:state:OFF:RELAYOFF]", autoupdate="false"}Switch MKiCleverLight2 "iClever Light 2" <light> [ "Switchable" ] {mqtt=">[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug2:command:ON:LEDON],>[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug2:command:OFF:LEDOFF],<[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug2/state:state:ON:LEDON],<[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug2/state:state:OFF:LEDOFF]", autoupdate="false"}Switch MKiCleverPlug2 "iClever Plug 2" <poweroutlet_us> [ "Switchable" ] {mqtt=">[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug2:command:ON:RELAYON],>[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug2:command:OFF:RELAYOFF],<[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug2/state:state:ON:RELAYON],<[broker:MK-SmartHouse/utilities/MK-iCleverLightPlug2/state:state:OFF:RELAYOFF]", autoupdate="false"}
4. Press control x then y and enter
5. Go to sudo nano /etc/openhab2/sitemaps/home.sitemap
6. Put the following in a sitemap frame I put mine in dining room
Switch item=MKiCleverLight1Switch item=MKiCleverPlug1Switch item=MKiCleverLight2Switch item=MKiCleverPlug2
7. Press control x then y and enter
8. Go to sudo nano /etc/openhab2/rules/home.rules
9. Put the following at the bottom of the rules
//iClever Lights turn on at 8pmrule "iClever Lights On"whenTime cron "0 0 20 1/1 * ? *"thensendCommand(MKiCleverLight1, ON)sendCommand(MKiCleverLight2, ON)end//iClever Outlet turn on at 7pm on fri, sat, sunrule "iClever Plugs On"whenTime cron "0 0 19 ? * FRI,SAT,SUN *"thensendCommand(MKiCleverPlug1, ON)sendCommand(MKiCleverPlug2, ON)end//iClever Lights turn off at 3amrule "iClever Lights Off"whenTime cron "0 0 3 1/1 * ? *"thensendCommand(MKiCleverLight1, OFF)sendCommand(MKiCleverLight2, OFF)end//iClever Outlet turn off at 11:59pm on fri, sat, sunrule "iClever Plugs Off"whenTime cron "0 59 23 ? * FRI,SAT,SUN *"thensendCommand(MKiCleverPlug1, OFF)sendCommand(MKiCleverPlug2, OFF)end
10. sudo systemctl restart openhab2.service