Smart Home on Wheels

Is it possible something like this would work? I know nothing of Zigbee.

http://citygrowsys.com/ProductDetails.php?model=CG102IR

Most of the other IR devices I found just work with Air Conditioners for some reason, so I’ll have to figure out what I can do.

There are USB IR Blasters you can plug in and use the LIRC binding to generate the IR pattern. One could even use an IR LED wired to the GPIOs to an Arduino or RPi.

The hard part will be figuring out the pattern of 1s and 0s needed to control the device. For that you will probably want an IR receiver that you can use to capture the signal.

The Harmony Hub might also be a good, if expensive option worth looking into.

Zigbee support is a work in process and because Zigbee is not as strict of a standard as Zwave, just because it is Zigbee compliant does not guarantee compatibility.

For some reason, the idea of a USB powered blaster went past me. That’s a great idea though, I could easily use a Raspberry Pi Zero W in the place where the devices would have line of sight to it. It might require more than one, but its still far cheaper than buying a dedicated Z-Wave IR blaster that may be far more complicated than it needs to be.

I’ll figure out some way I can record and edit the signals sent out. My brother happens to work as a high end A/V installer, so there’s a good chance he has one. Some of the stuff he does now involves a little of what we are trying to do in the RV anyway. I should probably ask him for some input.

What about this: https://www.adafruit.com/product/157

Might require a little work, but I could easily build a small Pi Zero that I just use as an IR decoder.

Or this also: https://www.amazon.com/Xantech-286D-Blink-IR-Designer-Emitter/dp/B002RCXINK/ref=sr_1_7?ie=UTF8&qid=1513647937&sr=8-7&keywords=xantech

My brother says I’m overhtinking this. I may be, but I want to make it robust.

I haven’t done anything with AV in a very long time. But these look like they would work from a physical perspective.

Personally, I’d stick with one of the devices listed in the LIRC site and know for certain that interpreting the signal received and sending the signal out would all be captured in library code I wouldn’t have to write myself.

So one thing I hadn’t considered: A physical Z-Wave device. Am I correct in assuming that the raspberry pi has no way to interact with Z-Wave devices out of the box? I’ve seen some USB and even a daughter card to hook into it, so I guess I need one of those to connect it to the network. If that’s the case, I might start more simply and just have the openHABian Pi set up, and then see about adding Pi’s or something wifi for the rest of the stuff. I’ve looked at things like the Nest Thermostat, and it doesn’t say what it uses, so I think that means it uses wifi.

Is there any reason to use Z-Wave, or can I use a different protocol? I’m going to start ordering stuff to work on this after the new year, so I’m trying to figure out what I all need. I just want to start simple though, one openHABian Pi, and one other device for now, just to get my feet wet and make sure I know what I’m doing.

Yes you need a ZWave stick or daughterboard to stick to your Pi, but it is simple to install. No you don’t have to use ZWave, or not exclusively, that’s the great thing about openHAB, you can mix & match devices. Select the best devices for your purposes. ZWave has advantages over WiFi, though, w.r.t. energy consumption and security.

I know I don’t have to use Z-Wave, but unfortunately, that is the only protocol I’ve seen that has DC powered switches. Since we are working on an RV, I want as much as possible to be run off the batteries so it will work if the shore power goes out. We will be eventually adding solar panels, so even if we lose power for a longer period of time, it should still be able to run the smart devices and LTE modem, so we’ll still have our working system.

I’m going to start working on the setup though, figuring out what devices are best for our system. It is going to require a lot of work though, but I’m hoping I can streamline it so others can follow along.

You have an very interesting project wich bears in detail some complex problems.

Allover restrictions:

  • DC powered devices
  • No continuous network (internet) connections (because of the mobile character)

Requirements:

  • Fileserver
  • Mediaserver
  • VPN/Router (assumed for outside connectivity)
  • openHAB
  • Some WLAN access point and mobile network modem (I will not cover this here)

Networking/Infrastructure (proposal):
Because you cant rely on a stable internet connection, you have to build some kind of Intranet and implement some very basic services like DNS and DHCP.

The Banana Pi R1 board is supported by the [IPfire project].(https://downloads.ipfire.org/release/ipfire-2.19-core116). There is a successor board (R2) which has better hardware but until now only beta state on the side of IPfire integration.
This gives you a central network management solution including DNS, DHCP and VPN services. You have to decide which technology/device you like to use for “outside” connectivity - if you want it.

File server:
Consider using Banana boards too, some of them provide a native SATA interface. On the RPi your’e limited to USB.

Media server:
If you have a TV with HDMI connectors in your RV, consider a Kodi distribution for RPi. The nice part is: You can control it with your TV remote and this works out of the box.

Openhab server:
RPi3 is not bad, but you may consider a Pine64 board. It’s supported by openhabian and contains 2GB of main memory compared to the 1GB of the RPi.

All these devices are DC-Powered.

From the viewpoint of overall power consumption:
For the smarthome sensors/actors you may consider some simple components which you can connect directly to the RPi GPIO. There are a lot of sensors and switches - The Adafruit pages will give you good hints. So you could use the PiZero W as kind of sensor nodes or sensor heads because long wiring from sensors to GPIO will cause problems.
You can use these kind of switches which you can connect directly to RPi GPIO. They come in many kinds: single, double, quad (as shown) and more. I think this will be not only cheap but will save power too.

I will stop now even if there would be much more to say. I just intended to give some hints and help to “structure” thinking. One last thing: All mentioned hardware is proven to work together by my very own experience. :slight_smile:

What if instead of having a bunch of separate devices that had different functions, I instead built one computer using a small form factor and running Ubuntu with openHAB? It could work as file server, media server, openHAB box, all together. It might cost a little more, but I could upgrade it later if i needed to and I wouldn’t have to worry as much about the errors caused in Pi’s SD cards that seem to happen.

Still working on the other details, but I found this: https://www.amazon.com/EZYKOO-Charger-12V-24V-Vehicles-Motorcycle/dp/B0734PKM9Y/ref=sr_1_15?ie=UTF8&qid=1514148919&sr=8-15&keywords=USB+12+volt+outlet+motorcycle Which should answer the power issue.

I’ll have a fuse box from an old Jetta in between the batteries and whatever devices I end up with, so hopefully I can power them on USB and 4.2 amps. I don’t thats an issue though since most USB are 2.1 amps. If I put in 20Amp or even 10Amp fuses, I should be okay.

For having so many different Pis doing different things, I’ve tapered it down a bit. I’m going to have one for file/media, but I’m still going to somehow figure out a way to have a NAS or backup for them, just in case data gets lost. I had looked into ways to build a small PC, but for some reason, internal hard drives are actually more expensive than external ones for larger sizes. If I can do the power right, I can have three hard drives connected to one Pi. Two for media (somehow set in RAID) and one for Time Machine backup from the macbooks we have. That one doesn’t need to be very large as we have a combined storage of 728GB on our laptops.

I still want to make a openHABian Pi though. If I get the motivation, I’ll work on that today. I have a Pi 3 I can work with that isn’t doing anything, but I don’t have any devices yet to set up rules and such. I might order something small to start with though, I’ll just have to figure out what to get to start with. I’d like to do the temperature gauge first, but that would require more work, so I might just try it first with a light instead. I’m getting bits and pieces from sponsors for some of this, so as new stuff comes in, I install it. Hasn’t been enough for a complete system yet, but I’ve got a bunch of stuff in the mail.

No it’s not, because even 2.1A is way out of the primary interface definition. Sockets and plugs are not built to this load, the contacts may burn out (even if never plugged out). There is an important reason for fuses, namely fire protection, please google ‘usb cause of fire’.

I’m not sure I understand what you are saying. Do mean having a fuse is a good thing? Cause I plan on putting fuses in between. Or do you mean powering things through USB is a bad idea?

Neither the former nor the latter, what I meant was, it’s a bad idea to put 4.2 amps over a connection, which is made for 0.5 amps.
Even 2.1 amps are heavy load for common USB ports. In question of “high power supply” through USB, these adapters work with higher voltage to deliver much more power as possible when using 5 volts. You need special wiring for not to get burning cables nor connectors. It’s not that easy to build a save energy distribution…

So would it be okay if I ran everything through an inverter and then through a USB adapter back to 12volt? Right now I have a few DC outlets in the RV. The are cigarette lighter types and I have our cell booster and modem running through one of them. I assumed it was fine that way since it was running a TV through one previously.

No, you just should use the right fuses… :slight_smile:

That is how I ran for a long time using an old laptop. It worked quite well. To make it easier to manage I used Docker quite successfully. I now run on VMs running on a desktop server running VMWare ESXi.

But the tl;dr is that this would work just fine to host your services.

Just be aware that the USB Bus on a RPi is probably not going to be up to the task for serving HD sized video. The RPi only supports USB 2 and the network and hard drive will have to share the same USB bus. I once set up a NAS on an RPi and quickly abandonded it because it couldn’t keep up with video streaming.

Most of the time if you take the case off of an external hard drive you will find a standard internal style HD inside. You can also build a NAS and RAID using all external drives if you have enough USB ports (USB 3 is better).

Better to have 3 drives set up in RAID 5 than RAID 1 with just disk mirroring. Recovery is much easier with RAID 5. Just my two cents.

You don’t need any. You can get started with Astro, Weather, Network, and a host of other bindings that do not require any hardware. You can also get started with Items and Rules and Sitemaps to start working out how it ought to work for you and then link up your Items to the hardware later once you get it.

After some tooling around, I think I am going to go the route with one computer built to handle as much as possible. I just got a inverter/converter today, so I’m going to have to figure out how to install that and then I’ll have backup power in the event that we lose shore power. The inverter will supply power from the batteries, so that should be fine. I had wanted to go the DC route because of the power lose in the inversion, but I think that’s fine if it makes it easier. And this way, everything will be powered on in the event of shore power loss, not just the DC stuff.

So now I have to figure out what to build, how to build it, and what badassery to include in it. I still want it to be as small as possible, that’s a given. AC power is fine. I need to be able to remotely access it so I can control everything. I’m leaning towards Ubuntu with openHAB as I still think that is my best solution. I want plenty of RAM though and a decent processor. Lots of hard drives. ZWave adapter. Might not need to bother with Wifi if its going to be hardwired into a switch. I can probably start ordering components for the core, like a case, motherboard, processor and ram. I’m thinking about changing my demands of it being small though, since that would cost more in the long run. I have to do some custom carpentry anyway, so I can figure out somewhere to put a bigger tower.

I am going to start with a simple temp/humidity/motion sensor though, then work my way out from there.

So yeah. I’ll go shopping now.

Well I found an older Xeon server. Quad core 2.66ghz, two processors, 8GB ram. I’m going to install Ubuntu on it and then openHAB and then figure out what I’m doing. I still need to figure out a way to interface with Z-wave devices though, but I’m not sure I’ll mess with that right away. I did find a USB Z-Wave transmitter, so I’m hoping that will work with Ubuntu.

One thing though, does anyone know if I should install Ubuntu Server or Desktop? I’m not sure the difference, but I’m pretty sure I’ll rarely be using a desktop environment on this computer, so most things will be remotely handled.

Would suggest the server version; the desktop will come with a lot of GUI stuff that you likely won’t need. I have the server installed on a headless server and it runs well. You can always add the GUIs later if you need them, but for my (modest) needs the command line interface that the server package provides suffices.