FREE Shipping on all orders over $99 & LIMITED TIME USE CODE "NEW" FOR 10% OFF

Tuya Plugs OpenHAB & Home Assistant

 Intro Statement
[Intro]
In this video I will show you how to connect TUYA smart plugs to Openhab and Homeassistant. Quick note Jinvoo, Smart Life and tuya are the same service. These plugs specifically are from a company called ZooZee. They work great and are in a very good form factor. I will leave a link in the description to where you can pick them up. At the time of this recording they are $34 for 4 of them which is a fantastic deal because it comes out to than $8.50 per plug. That's less than a sonoff on Amazon!
Also in the description follow @mksmarthouse on twitter instagram, snapchat and discord for things a true smart home enthusiast would appreciate.
In this video I will be showing you how to flash the plug with tasmota
Then show you how to setup tasmota.
And finally we are going to connect it to openhab and home assistant
The Zoozee plug is made on a custom PCB 
Speaking of PCB’s a company that i like to order PCB’s from is PCBway 
PCBWAY is a company that specializes in PCB Prototyping, PCB assembly and SMD Stencil. 
Boards are high quality, low cost and have fast turnaround time
Pcbway is currently holding an I can solder kit contest where the first place winner can get $500 and 5,000 beans
The link to PCBWAY and the contest is in the description. Also, you use the cash code on the screen you can get $5 on PCBWAY. 
Now lets get to the guide. 
Follow this guide to flash the tuya plug with tasmota firmware
https://www.youtube.com/watch?v=O5GYh470m5k&t=3s
A couple of notes, to put the device in pairing mode when it gets to it in the video hold down the button on the plug till it flashes
When he talks about the error unkown option logfile ignore it because it has been patched
Make sure when it comes to firmware you flash tasmota
Open wifi
Tap on the sonoff
Press scan for wifi networks
Tap on your wifi network
Enter the password for the wifi network in ap1
Enter a hostname I am going to call mine ZZSocket1
Press save
Go to your router look at the dhcp list and look for the hostname you typed in and see the corresponding ip address
Go to your web browser and enter the ip address
Then go to configuration -> configure module
In the module type select BlitzWolf SHP and press save
Then go to the main menu
Press configuration -> Configure MQTT
In the host type in the MQTT server ip
In the topic type in the topic you want to use I am just going to use the hostname
Press save
Openhab:
Open the paper ui
Press plus -> MQTT Binding
ADD Manually
Generic MQTT Thing
Name it ZZSocket1
Select the embeded bridge
Press the checkmark
Then go to configuration and things
Press the pencil next to the hostname of the device
Press the plus next to the channels
Channel type On/Off switch
Channel ID switch 
Label switch
State stat/ZZSocket1/POWER
Command cmnd/ZZSocket1/POWER
On is ON
Off is OFF
Press save
Press the circle 
In the drop down press create new item
In the label name what you want to show up in the Ui’s
In the category type in icon you want to show up for a list of icons check the openhab documentation
I am going to do poweroutlet_us
Press link
To add to basic ui
cd /etc/openhab2/sitemaps
sudo nano home.sitemap
Switch item=ZZSocket1_Switch
Homeassistant
Go to your home assistant web user interface and then into the configurator
In the configuration.yaml paste in this block
switch ZZSocket1:
  - platform: mqtt
    name: "ZZ Socket 1"
    icon: mdi:power-plug
    state_topic: "stat/ZZSocket1/POWER"
    command_topic: "cmnd/ZZSocket1/POWER"
    availability_topic: "tele/ZZSocket1/LWT"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    retain: true
That is it for this complete guide to tuya plugs
If you have any questions or need help join my discord server.
In the description you will find links to all the parts and devices used in the video as well as a link to mksmarthouse.com/shop where I have a wide range of smart home kits that you can put together such as this one. Alright, if you found this video helpful click that like button and if you are a smart home enthusiast you belong on this channel so hit that subscribe button. If you have any questions leave them in the comments section below or join the community over at mksmarthouse.com/forum. Good bye!