Example step by step to add a hardware device to newly installed openhab2

Hi guys. Can anyone point me to a place with step by step examples for adding devices(outlet, thermostat, Etc) to a newly configured openhab2 on raspberry pi2?

That’s pretty open ended without knowing more about the devices, zwave, mqtt, http etc.

I would start with the item documentation: http://docs.openhab.org/configuration/items.html

1 Like

Hi Moxified

It is not clear to me if I need another device / controller connected to my rp2 or the WiFi dongle connected to my rp2 it’s enough. Also, I’m not sure I have to set up samba server or not.
I’m a very beginner here, so pretty much clueless. Thanks for.helping me.

What are you trying to connect to?

OpenHAB is an automation engine. It doesn’t talk to anything directly. Addons allow you to talk to networkable devices directly like hue, nest, harmony, weather etc. If you have something like zwave you will need additional hardware to connect to it.

You can setup Samba IF you want to access the config files from a different machine. Makes it easier to run designer on a windows or mac and access the files remotely. You don’t have to do this. You can use paperui or create and modify items files directly on the pi via nano, vim or your favorite text editor.

So far I managed to install openhab2 on my rp2. Now I want to buy an outlet compatible with my openhab2 as well as a thermostat.
My understanding is that I just need to buy the devices and they will connect magically to my home network where is also my openhab2. I don’t know if I’m correct about this or I need to attach some sort of controller to my rp2.

I don’t know what compatible devices to buy that would work directly with my setup so far without any additional device attached to my rp2. Can you suggest some?
Thank you.

Home automation isn’t easy and definitely not magical. It is, for the most part, complicated and finiky which is why it hasn’t seen general adoption.

There are LOTS of paths and devices you can purchase.

I personally have a mix of ZWave, MQTT (home grown arduino based) DSC, Harmony and others.

If you are looking for an outlet, I would suggest zwave or insteon. I don’t have much experience with insteon though. If you want to do zwave, you will need a zwave transceiver such as http://aeotec.com/z-wave-usb-stick and then the outlet itself.

I’m sure others will have different opinions as well. Ask 10, get 10 different opinions :slight_smile:

Ok. I was just watching a video saying that I need a 433MHz transmitter and receiver to connect it to my rp2. I don’t understand if I need this for all the devices are want to connect or just for some.

I also need a mqtt server.

Ok. So the zway USB is the transmitter and receiver. I attach it to my rp2. After that I can add zway devices to my openhab2 and that is all. Can you confirm?

If you want to use zwave devices, yes, a USB zwave tranciever hooked to your pi running openhab is all you need to communicate with zwave devices.

You don’t need mqtt for zwave. That would be for mqtt enabled devices. Mostly home grown IOT devices. Common for ESP8266 based homemade sensors.

Thank you
I know a little bit more now. What is your experience with zwave prices for socket outlets, etc? Are they cheap? Are there any other smart devices cheaper?

You mentioned you also have mqtt devices. Why didn’t you stayed with zwave only?

Zwave: a little bit pricey, but very reliable and off the shelf
MQTT devices: if you like soldering, you may use some of the very cheap ESP8266 microcomputers and build your own devices.
Also take a look at: https://www.mysensors.org/about/components but there are many more do it yourself hardware components available.

sihui is right.

ZWave is pretty easy but a little pricey… I would say $35 USD and up for a switch, dimmer or outlet.
MQTT stuff can be VERY cheap. I think I have about $10 invested in my wifi sensor in the garage. That includes project box, adafruit huzzah, power supply, DHT22 temp/humidity sensor and some other various parts. BUT, unless you like c programming and usb/serial stuff, this path is not easy.

I started on the MiCasa Verde Vera platform with zwave gear. As my needs/wants outgrew that platform I transitioned to OH in 2015 opening up MQTT for custom projects.

Basically I leverage zwave for my in-wall stuff as my house was already wired and building MQTT based wall switches and outlets that LOOK GOOD… just isn’t worth it to me. They have been quite reliable so I have no need to replace them. I also still use my vera as the zwave controller. I find it easier than working with zwave directly in OH. OH is also a VM making usb passthrough of zwave sticks a pain.

I use MQTT anywhere I need something custom. It involves some form of arduino, ethernet or wifi connectivity and usually temp sensors, relays, buttons and motion sensors.

I built a custom MQTT sensor that runs my home theater. I have an equipment rack with exhaust fan so it monitors temps and controls the fan as well as does IR stuff, turns my sub on and off as well as monitors my doorbell (close to the doorbell transformer so it made sense) and room motion. It communicates with OH which also communicates with a Logitech Harmony hub. They work together to control all the fans, equipment power, room lights etc. Sounds complicated and it was to setup but now my wife can be trusted to operate my theater without me. Point is… good luck finding that in zwave… even if you could, it would be VERY expensive and fill a lot of space.

Hi Moxified,

I have 15 light switches,16 socket outlets, and a thermostat. If I buy the ZWave solution it is going cost me a lot. Like you said if I just consider $35 per device it will be a little bit over $1000. I’m looking for a cheaper solution. What would you recommend me? Are there any wall switches that I can integrate with the MQTT solution you mentioned? What about socket outlets?

Thank you.

Unfortunately home automation is expensive. Trust me. I have far more switches and outlets than that AND I have 3 thermostats. This “hobby” isn’t going to save money like manufacturers like to tout. (unless you live someplace where electricity is super expensive and your automation rules will reduce electrical consumption a lot)

Honestly, there is no cheaper off the shelf options than zwave or maybe insteon that I’m aware of. I think zwave gear is the best price you are going to get unless you are capable of building your own.

If you have strong skills in electronics, coding and fabricating, you can build your on solution around mqtt, zigbee or a plethora of other DIY options. I’m not getting the feeling you fall into this category.

Based on what I’m hearing from you, my recommendation for you is zwave.

Sorry, wish there was a cheaper alternative! I would automate every outlet and switch in my house if it was.

Just noticed this post: Smart light switch based on ESP8266

Tutorial so to speak on building an mqtt ac switch. FYI.

Exactly. Home automation is a hobby which will cost you. Nobody really needs lights that can be remote controlled from 1000km away, but hey, that will not stop us :smile: (Of course there are more serious use cases).

There are cheaper technologies than Z-Wave but you need to think about the big picture. You will invest money, work and time into hardware that will be around you every day. The choice should be reliable, versatile and actively supported and extended - besides costing a few bucks less than some other. Your technology will also need to be connected to and controlled by your openHAB instance, for most technologies you’ll need a radio transceiver. I’ve had my fair share of iterations and settled with Homematic a few years back. Nowadays I’d probably go with Z-Wave but as I already have my Homematic base, I’m extending on that when needed. One exception is power switching, which I use Sonoff modules for.

My recommendation would be to choose one technology for a start, buy a few switches and sockets and have a test run. Get a feel for the technology and the possibilities and decide further from there. You do not need to replace your 15 light switches all at once, even though you should do that at some point.

Decide for a technology that will be able to cover all your needs (power measuring, shades motor, water detector, you name it) and make sure the technology has good reviews and good support by openHAB. You’ll find that there are dozens out there. Z-Wave is the safest choice for sure.

Regarding the Sonoff modules: they are an amazing choice to control power. Because they are working via Wifi+MQTT you do not need a special transceiver, therefore you can use them in parallel to the above mentioned base technology. Be aware that the Sonoff modules need to be reprogrammed with a custom firmware and connected via MQTT. There are no tripwires or limitations, you should just be aware, that they are not set up in 2 minutes.