I’ve installed OH2 now and have been playing but I’m a little confused on the best way to go about adding additional hardware like zigbee hub to expand the IOT devices used.
Firstly, is there some kind of client I can use to connect my devices (macbook, windows PC etc) to OpenHAB to act as ‘things’ and allow me to control those devices, and also trigger rules etc?
I’m thinking things like: computer turned on/off, login, battery level, etc and also be able to display notifications on the computer, or use it as a voice control channel?
Secondly, when it comes to adding zigbee and other iot devices, is it best to have these directly connected e.g. zigbee usb stick in the PC running OH or a hub on the network?
Is there a good guide on how to use OH as the basis for a voice AI - perhaps something which can take a text string and pass it into the rules system to determine which commands should be executed?
There’s quite a few things I’m looking to integrate, from alexa, lights, engerguine plugs, and ideally a range of 3rd party APIs for data sources and manipulation - just a bit stuck on how to best tackle the process!
There’s no openHAB client app to control Mac or PC devices, but I found a way to send some basic commands to a PC using IFTTT. However, I don’t recommend this as a starting point for your openHAB experience. More on that in a minute.
For Zigbee, I’d recommend getting a USB stick instead of using a separate hub. However, if you already have the hub then it might be possible to integrate it if there’s a binding.
The best advice I can give is to put aside all of the complex stuff you’re envisioning for the moment and start with something simple, such as an openHAB-friendly WiFi plug. Too often, people try to tackle significant challenges without having a good understanding of the basics. That’s like going on the highway in your very first driving lesson–it could go well, but it probably won’t.
What are you planning to run openHAB on? You mentioned putting a “ZigBee USB stick in the PC”, which makes me think that you’ve installed it on a Windows PC.
openHAB will absolutely run on Windows, but there are fewer people doing that in the community so there will be times when the help you receive will be limited. Whereas if you run openHAB on a Linux computer, there will be lots of help available. Going even further, many of us use Raspberry Pis with the preconfigured openHABian image, which enables you to quickly get into items, rules, sitemaps, etc. It’s a great way for beginners to start out with lots of help from the community.
Currently I have it installed on a windows PC, but I am running Hyper-v and have spent 10+ managing linux/centos servers so no issue spinning up a VM to run OpenHAB if that offers a better experience.
I do also have a couple of fairly old Pis laying about but thought best to stick to the PC to not have to worry about resource usage and keep the Pis to use as sensor nodes/smart mirror project I’ll get to one day!
If you’ve got a Pi3 laying around then openHAB will work perfectly well on it without resource problems. openHABian uses Z-RAM to minimize writes to the SD card (to avoid disk corruption). If you’d rather do your own install, lots of folks use Docker.
You almost certainly have more technical expertise than I do, so I imagine you’ll pick up the concepts quickly regardless of the route you take!
I use Docker and there’s lots of people on here who are very helpful you run into problems.
One thought for this is a NodeRED instance on each computer you want to interact with. I believe you can interact with AppleScript for Macs and you can execute command line items on Macs and Linux computers (and maybe Windows?) from NodeRED.
From there it’s just a matter of connecting NodeRED and openHAB. There’s a node designed for that so it’s pretty easy. There’s examples on this forum if you get stuck.
I did something similar but much less complicated - I used NodeRED on my main Mac to play notification sounds sent from my openHAB setup on a separate server.
Otherwise, if you’re more interested in collecting metrics than controlling them, take a look at Telegraf. It collects metrics and records them in an influxdb database. You can then display graphs using grafana and integrate them into your openHAB dashboards and sitemaps. Lots of good info on this on the forum!
I completely agree. I tend to dive in headfirst but it can cause frustration. If it’s well supported where you live, I really like z-wave. It’s very well supported on openHAB and there are pretty inexpensive z-wave usb sticks that would work with a Pi or with a container. Zigbee is now supported but z-wave has a much longer history on this platform.
Most people here using Linux use a Debian based system. I am running OpenHAB in a Debian VM on Hyper-V. My stick has Windows drivers and the resulting serial port is mapped to the VM. You cannot share USB devices with Hyper-V but you can map serial devices.