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
Product Links:
iClever Light Plug: https://amzn.to/2ENiNMK
Arduino:https://www.mksmarthouse.com/shop/UNO-R3-CH340G-MEGA328P-Development-board-for-Arduino-p120510231
Amazon Echo: https://amzn.to/2EHG8PM
Google Home Mini: https://goo.gl/wW58Se
All Google Home Devices: https://goo.gl/ZLZxT1
Phone 1: https://amzn.to/2JFilOR
Phone 2: https://amzn.to/2qufv7o
SD Card Reader: http://amzn.to/2lqsvL1
Raspberry Pi 3: http://amzn.to/2m62Kg6
Power Adapter: http://amzn.to/2lIyh5E
Tool Links:
Soldering Iron: http://amzn.to/2qwmYk7
ST7 Soldering Tip: http://amzn.to/2qpxjz5
Solder Wire: http://s.click.aliexpress.com/e/eIyBUne
Solder Wire Holder: http://s.click.aliexpress.com/e/Ie6QzbA
Steel wire: http://s.click.aliexpress.com/e/R72vBQj
Helping Hands: http://amzn.to/2pATfcy
PyFlasher:
Download Link: https://github.com/marcelstoer/nodemcu-pyflasher/releases
If you are on mac click the latest dmg file and on windows click the latest exe file