Hardware Selection help for beginner

Hello,

I have 2 apartments that are both on the same LAN. I was wondering if I need 2 installs of openHAB or would one be enough? I alread have a QNAP NAS. Can install the java app onto that easily enough or should I buy a Rasberry Pi v3? Whats the benifits?

The hardware I am purchasing is as follows.

  1. Amazon Echo Dots (ordered)
  2. Logitec Harmony Elite (ordered)
  3. Kwikset Kevo doorknob (ordered)
  4. Fibaro Motion detector
  5. Milight wifi LED downlights (ordered)

I wish to control the LED’s, Kodi stereo system (use echo and openhap to control them and turn on the tv and stereo), heating cooling(via remote also) and in general have fun.

Suggestions are welcomed. I have good programming experience so don’t mind getting dirty there.

That’s quite a lot of requirements :slight_smile:

You do have your work cut out for you and your greatest resource is this forum so get reading :slight_smile:

Start small, get the install of openHAB working with just the MiLights first. Configuring the Harmony to work with your kit before adding it to openHAB is going to make you want to claw your face off (worst interface ever, not helped by Logitech completely deleting the years of helpful knowledge that was the old forum and replacing it with their own “interpretation” of what a forum should be with no archive or way to view the old posts)

I would suggest a dedicated device for your install and the Pi is perfect

If you are new to the Pi they are great and can be very robust, but when I started I burned through SD cards either through my negligence (using the power cable to restart) or the constant hammering of the logs from openHAB being written to the card. If something is going wrong in your setup Java will spew constantly into your logs (and might not stop until it fills your available space (as happened to me at least twice when i first started)).

Once a card is corrupt you might be able to use it again, but you will usually wave goodbye to anything that was on there.

So learn how to configure backups (Rsnapshot) and if you can get a external USB HDD, only use the SD for boot (https://learn.adafruit.com/external-drive-as-raspberry-pi-root/what-youll-need?view=all)

Confused about the two apartments being on the same LAN, are they physically close together networked with ethernet? If so then one install should work. Though if using the internet to fake the “LAN” then two.

Good luck

1 Like

Big picture first then I’ll address your specific technologies.

One of the nice things about OH is it will run pretty well almost anywhere you put it, though it is a little memory hungry. However, I think you would be happier with a dedicated server for OH. Raspberry Pis are a good choice, just pay attention to the SD card. OH is write heavy, particularly with logging turned up and persistence also being hosted on the Pi. Because of the way flash wear levels you will burn though the SD card faster than usual if all those writes go to the card. So you either want to way overprovision the SD card (e.g. 64 or 128 Gig) or move these writes to an external HDD.

A lot of people recommend running off of a beefier platform like a Nuc. I personally run it off of an old laptop running Ubuntu and Docker. You will have more options to fine tune performance, host additional services you may want (e.g. InfluxDB, MySQL, Mosquitto MQTT Broker, nginx, …), etc.

You can easily run the two apartments off of one openHAB install. Whether or not that makes sense will largely depend on your desired architecture and requirements. How stable is the network between the apartments? Do you need to interact with devices in one apartment while located in the other (e.g. turn off a light in one when you arrive in the other)? Or are they completely separate environments?

It is possible, though a lot more work, to even deploy with a master/slave OH where all of your main rules are run on a master OH while the slave mainly acts as a relay between the devices local in the apartment and the main controller. This is particularly handy for mesh networked devices like zwave where it isn’t easy or possible to streatch the network to both locations. In this case you would have two controllers, one for each apartment.

Now, as to the hardware:

  1. Amazon Echo Dots - lots of people have had success integrating with Echo, search the forum for details
  2. Logitec Harmony Elite - There is a Harmony binding which should work
  3. Kwikset Kevo doorknob - Probably is not going to work with openHAB. Lock support is not quite there in OH and I know of no one who has a BT lock working with OH. The existing BT binding will not for sure and I’m 95% sure the in progress OH 2.0 binding will not. the big problem is a lack of a standardized API for the devices meaning each and every device needs separate integration. However, if it works with another hub like Vera or Wink, there are ways for OH to interact with those hubs to control and receive information for devices OH doesn’t support natively.
  4. Fibaro Motion detector - If it is zwave you will need to get a zwave controller as well.
  5. Milight wifi LED downlights - there is a Milight binding so you should be OK there.

My overall advice is to go slow and gradually build up your environment. Start with some lights and add in more gradually. Give a thought to long term maintenance (backup/restore, migration to new hardware, disaster recovery now, etc.) now. It will pay dividends in the long run. Also think about SCM. I use git and it works great for OH 1. OH 2 has some stuff stored in DBs so it works less well but not terribly. Be prepared to refactor as you learn things.

2 Likes

Hello Sam and Rich,

Thanks for you big warm welcome with loads of great information.

You have both covered up some of my unknown concerns. First I am satisfied with my hardware choices(I did do research on OH to see if bindings exist for the devices before I bought them (except the Kevo I just bought that one) so I agree that research is key to the success of these ventures :slight_smile:

My LAN, It is a stable wired LAN(between level 15 and 18) and not a VPN between two LANs.

I have a good NUC with kodi on it already so I will take your direction Rich and run OH in docker and ship MySQL dumps to my NAS and keep everything else in bitbucket.

I can control each apartment with different Echo Wake commands so to stop confusion. Eg. Alexa for level 15 and Echo for 18 will be the wake words.

My biggest desire is control of the kodi/stereo and lights. If latency appears to be a issue for apartment 2 then I will simply install a second OH but I will get to that hurdle if it appears.

I am also interested in a cheap and efficient way to perform motion detection. I think the fibaro is way overkill for my use case of just turning on the bathroom lights at night and making it mimic C.FLUX (low red light).

But all in all I am super pleased with this forum…wow. Your responses are amazing and detailed. I feel welcomed and hope that I can offer some contribution back to the forum.

Hello, i am using Openhab for a few months(3-6) have been using 2 SDcards on my Pi and with the third i recognized i should put the directories /var/log and /tmp to a ramdisk. you can google that by entering “linux tmp on ramdisk” and also “linux log on ramdisk”. At 3a.m. i reboot my raspberry pi automatically to make sure everything is in a fresh state and the ramdisks are clean. so far i never had any SD card break anymore. If you have a NAS running anyways you might also look into linux syslog server to ship the raspberry log files on the fly onto the NAS (if your nas will accept remote syslogs and play syslog server). That way you can keep the logs and not wear out the SD card of the raspberry pi

Openhab is running at my home with 11 sensors/switches connected mostly with wifi devices, 433Mhz AC switches and arduinos with bluetooth connections mixed. So far a raspberry pi model B is enough. Starting openhab takes like 3-4 minutes on the raspberry pi model b… depending on the plugins you have/etc

Motion detection can be done either with either self built arduino stuff, which i would do. If you only need something like presence detection, i would use bluetooth to detect the presence of a mobile phone in an apartment and then conclude someone is home. Another possibility would be using some app thing like IFTTT (on Android) to push location data of your phone to the openhab server. This would require an open port to the internet and static IP (or dynamic dns) for your openhab server

I don’t have any experience with D-Link wifi motion detectors, so i can’t tell you about that.

Regards,
M

Hi schmirgo,

I have a syslog server on the web that I ship all logs to so I will do that… great suggestion.

I like your arduino idea. Get my hands dirty!!! I really just need something simple so i think that the fibaro is overkill.

I will be using IFTTT and Amazon Skills for weather and custom greetings and such as I get bored :slight_smile:

I’ve looked briefly at the D-Link ones. Cheap but I’d like to get dirty with arduino.

Loving this!!!

I use the RFXtrx433E which opens up access to send and recieve signals to most devices that use 433.92MHz.

There are loads out there and they can be quite cheap (sometimes cheap and nasty)

When searching for PIR or switches throw 433 into the query and you will find all sorts on ebay and amazon

I use these in my setup:

HomeEasy PIRs http://buyhomeeasy.co.uk/catalog/product_info.php?cPath=1&products_id=33

A few wall switches http://buyhomeeasy.co.uk/catalog/product_info.php?cPath=1&products_id=141 that are used for lights, volume control etc

Lightwave dimmer sockets http://www.ebay.co.uk/itm/Siemens-JSJS-LightwaveRF-2x-Dimmable-Light-Socket-Remote-Kit-BNIP-/182276642800?hash=item2a7088d7f0 (with the remote that you can use to send signals to openHAB to control what you want) shop around as the prices vary dramatically.

A weather station transmitter http://www.ebay.co.uk/itm/Extra-Sensor-for-Weather-Station-with-temp-humidity-f-cast-base-Baro-press-/261788376051?hash=item3cf3cd9bf3:g:1jQAAMXQUmFSjAJ6

A dusk/dawn sensor http://www.ebay.co.uk/itm/SALE-PRICE-HomeEasy-HE311-Byron-Dusk-to-Dawn-Sensor-NEW-BNIP-/172349229627

Wall sockets https://www.amazon.co.uk/Energenie-Remote-Control-Sockets-Pack/dp/B004A7XGH8

I can also see my neighbours energy meters and door bells… i expect I could trigger the doorbell if i was feeling mischievous :smiling_imp:

Re presence detection: the problem with using phones for presence detection is (certainly in the case of the iPhone) that the device is not constantly broadcasting its ip.

Also there is an IFTTT channel for openHAB that you can use to flick switches and feed strings to without opening up your home network (though it sounds like you would know how to do that securely yourself if needed)

Top tip, using IFTTT with Google Calendar you can schedule actions anywhere you can access your calendar, you can also set the various recycling days. Link that into your “good night” house shutdown scene and get a vocal reminder to put the relevant coloured bin out before you go to bed :slight_smile:

1 Like

Hi Sam, That is a lot to digest.

I get my harmony hub and milights this week so I will start setting everything up on my NUC soon.

This will be a slow process as I am renovating and a bit busy with life in general but I will stay true to the path :slight_smile:

bows

Answering questions on this forum has been the number one way I’ve learned. My personal HA system is pretty modest compared to most but through answering questions my knowledge has expanded way beyond my personal needs. Especially when it comes to coding rules. Don’t hold back.

NOTE: The Docker deployed OH does have some limitations. See this posting for my experiences with it. Overall I’m really happy but if I needed to use the Exec binding or Network binding I would be disappointed.

If you are not afraid of a little DIY, you probably can’t get any cheaper than a PIR and an ESP8266 and some MQTT comms. However, unless you have a 3D printer or are good at fabrication the aesthetics of the commercial units, overkill or not, will be much better than most DIY projects.

I posted an Ansible playbook that does that (and a bit more) here:

Your approach works as long as you make light use of persistence. If you are using rrd4j or MapDB to store the state of every Item every minute that will be a lot of writes as well. However, you most likely do not want to wipe these out every day at 3 am.

Or the Network Health binding to detect when your phone is home through pings. Scripts running on routers are also commonly used. I have a Python script that does this for BT as well.

Or use the My.openhab binding which supports OAuth2 connectivity to IFTTT (there is an openHAB channel). No open ports or dyndns mess to deal with along with all the security risks that comes with that.

The security engineer in me see this as an argument against my using this technology. Also, due to interference, it is important to limit the number of wireless technologies you are using. I’ve got WiFi, Zwave, and RFM69HW and I can already see some evidence of interference between the three.

There is a long thread on how to get that to work using hping.

However, I rely on a combo of just standard Network Health and BT detection and it works like a champ.

There is also a Caldav binding that will let you connect to your calendar directly rather than going through IFTTT, if you so choose. However, I don’t think there is a working version of this binding for OH 2 yet.

Update: I just received my Kevo’s and installed one last night…

My Harmony Elite arrives tomorrow and wifi-downlights for electrician to install arrive tomorrow also.

Time to get OH installed :slight_smile:

I completely agree security is and always should be considered.

When I mentioned that I could potentially ring a neighbour’s doorbell to a friend he was initially appalled at the lack of security. Though he then made a good point by saying that is was also possible and much easier for someone to throw a brick through a window.

I thought it was an interesting reflection, one that I often use when talking about security.

I was more appalled at another friend who when I was helping him out with his network told me that his router password was whatever it came with.

Yes, it was still admin/admin

:scream:

Sadly ISP’s don’t promote this good practice of changing default passwords.

My ISP complained to me that I changed it. I then read out to them my generated pwd from LastPass so they could log into it. I had disconnected all connected devices prior to calling and they were suprised someone would go to that extreme…

Don’t trust everyone all the time.

Do you use this image? Docker

That’s the one. I wrote up somewhat of a how-to and lessons learned here:

The above post will be submitted to the official docs this weekend.

Wow, in that case I would put my own router after the ISP router and treat the gateway as dirty like the Internet. If my ISP demanded I keep my router PW set as the default (or demanded my password) that means that pretty much everyone knows that password. Furthermore, that means the router is open to being administered remotely so any two-bit script kiddie could get into my network. No thank you. Let them do what they want with “their” gateway, but I won’t let my network touch it without going through a good firewall first.

If you are in the US, I’m sadly aware that often we have only one choice for broadband so changing ISPs is almost never an option. But that policy is frankly appalling. And we wonder why we have a computer security problem.

Hi Rich,

Great tutorial. A question about the ping issue.

Why not just install ping in the container and push back to the contrib?

I’m not sure I care enough to do it. The 1.9 SNAPSHOT NH binding works just fine and frankly I don’t really need it. My Bluetooth detection works better anyway and now that I’ve installed DD-WRT I can and probably will move that behavior to my router.

If someone really needs it I’d be willing to do it. It is pretty trivial to add. Of course that won’t solve the DHCP limitation, though I think there may be another way around that. But again, I’ve external ways to do this so I have no pressing need to do that either, beyond curiosity to know if it can be done.