- Samsung SmartThing Hub (model: STH-ETH-250)
- Samsung SmartThings Outlet (ZigBee)
- Yale Assure Lock YRD226 (Z-Wave)
- Nortek S&C HUSBZB-1 dongle (Works as Zigbee & Z-Wave Coordinator)
- Raspberry Pi
- Smartphone
- MITOSYS (https://github.com/hammadmazhar1/mosquitto)
- SmartThings MQTT Bridge (https://github.com/stjohnjohnson/smartthings-mqtt-bridge)
- openHAB
- Install Raspberry Pi OS on the Raspberry Pi.
- Download and compile MITOSYS on the Raspberry Pi.
- Install openHAB on the Raspberry Pi.
- Copy files in openhab/things, openhab/items, and openhab/rules to the corresponding openHAB configuration folder (
/etc/openhab) on the Raspberry Pi. The configuration should be loaded automatically, and you will see Things, Items, and Rules on the openHAB portal. If not, please usesudo systemctl restart openhabto restart openHAB. - Copy files in mosquitto to the mosquitto folder on the Raspberry Pi.
- Plug the Nortek dongle into the Raspberry Pi's USB 2.0 port (USB 3.0 port may not work).
- Open the openHAB management portal, and install ZigBee Binding in Things.
- Then in the ZigBee Binding, add Ember EM35x Coordinator manually. The related configuration can be found at https://www.openhab.org/addons/bindings/zigbee/.
- Similarly, install Z-Wave Binding, then add Z-Wave Serial Controller manually. The related configuration can be found at https://community.openhab.org/t/how-to-configure-the-nortek-husbzb-1-zigbee-zwave-radio-on-oh-3/112118/4.
- Pair SmarThings outlet with openHAB. When the outlet is in the pairing mode, click the Scan button in the ZigBee Binding, and the device should be discovered automatically.
- Click the SmartThings outlet we just added in the Things tab, then click Channels, link the Switch and Binary Input channels to the Outlet item, and choose Default as Profile for both.
- Pair Yale lock with openHAB. When the lock is in the pairing mode, click the Scan button in the Z-Wave Binding, and the lock should be discovered automatically.
- Click the Yale lock we just added in the Things tab. We first link the Door Lock channel to the Door Lock item with Default Profile. Then we link the Alarm (raw) channel, choose "Create a new Item" for Item and use DoorLock_Alarm_Raw for the Name to match the name in the rules file (check
/etc/openhab/rules/phy_st.rulesfor detail). For the Profile, choose Default. - Launch MITOSYS with the physical testbed configuration file:
./mosquitto -c phy_st_mosq.conf.
- Clone the SmartThings MQTT Bridge repo, and replace the
server.jsfile with our smartthings-mqtt-bridge/server.js file. - In the SmartThings MQTT Bridge with our modified
server.jsfile. When using Docker, simply create an image usingdocker build -t mqtt-bridge .command in thesmartthings-mqtt-bridgecode folder. - Launch the SmartThings MQTT Bridge using our configuration file mqtt-bridge/config.yml (replace
hostconfiguration with the MITOSYS Raspberry Pi's IP address). When using docker, you can place the file at/opt/mqtt-bridge/config.ymlthen executesudo docker run -d --name="mqtt-bridge" -v /opt/mqtt-bridge:/config -p 8080:8080 mqtt-bridgecommand to start a container. - Download SmartThings App on your smartphone and set up the SmartThings hub.
- Configure the MQTT Bridge follow the Usage section on https://github.com/stjohnjohnson/smartthings-mqtt-bridge to configure the MQTT Bridge on SmartThings.
- In addition, we need to create three simulated devices in the My Devices IDE by clicking the "New Device" button on the IDE.
-
A device with the following configuration for the "away from home" mode:
- Name: Away
- Label: Away
- Type: Simulated Switch
- Version: Published
- Hub: (choose your SmartThings hub)
-
A device with the following configuration for the outlet:
- Name: Outlet
- Label: Outlet
- Type: Simulated Switch
- Version: Published
- Hub: (choose your SmartThings hub)
-
A device with the following configuration for the door lock:
- Name: DoorLock
- Label: DoorLock
- Type: Simulated Lock
- Version: Published
- Hub: (choose your SmartThings hub)
-
- Add those three devices to the Smart App in the SmartThings APP on your phone.
- Download the IFTTT App and register.
- Connect your SmartThings account to IFTTT.
- Create an Applet that unlocks the DoorLock with one tap.
- Create an Applet that turns off the Outlet with on tap.
- Turn off the Away mode.
- Turn on/off the outlet on the SmartThings App. The outlet can be turned on/off without any issue and remain its status after each action.
- Turn on/off the outlet physically by hand. The outlet remains its status after each action.
- Lock/unlock the door lock on the SmartThings App. The lock can be locked/unlocked without any issue and remain its status after each action.
- Lock/unlock the door lock physically by hand. The lock can be locked/unlocked without any issue and remain its status after each action.
- Turn on the Away mode.
- Turn on the outlet on the SmartThings App. The outlet can be turned on without any issue and remain its status after each action.
- Turn on the outlet physically by hand. The outlet can be turned on without any issue and remain its status after each action.
- Turn off the outlet on the SmartThings App. The action is blocked by the MITOSYS and the outlet remains on.
- Turn off the outlet physically by hand. The outlet is quickly turned back on by MITOSYS.
- Lock the door lock on the SmartThings App. The lock can be locked without any issue and remain its status after each action.
- Lock the door lock physically by hand. The lock can be locked without any issue and remain its status after each action.
- Unlock the door lock on the SmartThings App. The action is blocked by the MITOSYS, and the door lock remains locked.
- Unlock the door lock physically by hand. The lock is quickly locked by MITOSYS.
- Turn off the Away mode.
- Turn off the outlet using IFTTT. The outlet can be turned off without any issue and remain its status after each action.
- Unlock the door lock using IFTTT. The door can be unlocked without any issue and remain its status after each action.
- Turn on the outlet and lock the door lock.
- Turn on the Away mode.
- Turn off the outlet using IFTTT. The action is blocked by the MITOSYS, and the outlet remains on.
- Unlock the door lock using IFTTT. The action is blocked by the MITOSYS, and the door lock remains locked.