LIQUIDATION SALE! FREE Shipping on orders over $49 USA $99 INTERNATIONAL USE CODE: "LIQUIDATION" for 50% OF

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 Plugs
Switch 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=MKiCleverLight1
Switch item=MKiCleverPlug1
Switch item=MKiCleverLight2
Switch 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 8pm
rule "iClever Lights On"
when
Time cron "0 0 20 1/1 * ? *"
then
     sendCommand(MKiCleverLight1, ON)
     sendCommand(MKiCleverLight2, ON)
end
//iClever Outlet turn on at 7pm on fri, sat, sun
rule "iClever Plugs On"
when
Time cron "0 0 19 ? * FRI,SAT,SUN *"
then
     sendCommand(MKiCleverPlug1, ON)
     sendCommand(MKiCleverPlug2, ON)
end
//iClever Lights turn off at 3am
rule "iClever Lights Off"
when
Time cron "0 0 3 1/1 * ? *"
then
     sendCommand(MKiCleverLight1, OFF)
     sendCommand(MKiCleverLight2, OFF)
end
//iClever Outlet turn off at 11:59pm on fri, sat, sun
rule "iClever Plugs Off"
when
Time cron "0 59 23 ? * FRI,SAT,SUN *"
then
     sendCommand(MKiCleverPlug1, OFF)
     sendCommand(MKiCleverPlug2, OFF)
end
10. sudo systemctl restart openhab2.service
PyFlasher:
If you are on mac click the latest dmg file and on windows click the latest exe file