I’m going to be getting another Raspberry Pi to run openHABian on. Right now, I’m doing research to figure out how this all works and what I need to get things running together. The Pi will be connected to the router through ethernet and the router has wifi. I know how to build the Pi and install openHABian on it. This is also going to be in an RV where some of the devices I’d like to control are DC powered lights (and not AC powered switches). There are some AC powered outlets in here as well.
Here’s what I’d like to be able to do, I’m just not sure how or if I can do them:
Light control. All of the lights, internal and external are DC 12v. I’m trying to figure out if there is a way to put a control in the lights so I can turn them on and off remotely. Right now, they have a manual switch on each individual light except the one outside. I don’t think they are very complex, just simple switch built into the light’s housing. The outside light has a switch near the door inside, along with switches for two other lights.
Music control. I’d love to be able to control something to play music inside or outside, be able to change the radio station (internet radio is fine), or access the Plex library I have running on another Pi. I think, not sure, but think, I can control Kodi through the openHAB mobile app, so if I install the Plex add-on for Kodi on yet another Pi, I might able to use that as the music player.
Temperature monitoring and control. We have a portable electric heater that we use to save on propane. It has a IR sensor and came with a remote, though we’ve never used. I think I can put the heater somewhere semi-permanently and mount some sort of IR transmitter that copies the codes from the remote and sends them out according to commands from the mobile openHAB app. In addition, I’d like to be able to have something that monitors the temperature, sends the result to openHAB, and that in turn tells the IR transmitter to send out the right code to increase, decrease, or shut off the heat output. If we could do something that would tell us the outside temperature as well, that would be a bonus. Eventually we’ll be doing something similar with an air conditioner, but that’s down the road.
Adding some smart kitchen appliances. When we can afford it, I’d like to upgrade some of the appliances in the kitchen to smart devices, but I really have no idea what the options are for that or what they can do.
Video monitoring. I’d love to have a network of cameras recording both inside and outside all the time and be able to view them remotely if possible, or else just record them and maybe back them up to a hard drive hidden somewhere not so obvious in case someone breaks in and thinks taking the main hard drive will remove the evidence.
I think that is it. I know its a lot, but these are all long term goals. I’m trying to do this all in our RV since we live in it and I’d like things to be as smart as possible. My main issue though is how to do all these things talk to each other?
Like I’ve seen the Z-wave devices and I assume they use their own protocol to connect, but do other devices do it easier or more affordably? If I can do it all over the local wifi network, that would be best since its already set up. I can also run ethernet cable almost anywhere in here if I have to, but I’d prefer to have it wirelessly. I know for things like the video feeds, a wired connection would be better, so I’ll plan on doing that.
If I can do this a little at a time, I should be able to handle it. I’ll probably start by getting the Pi all set up and figuring out how to do the lighting. I don’t need to do it all right away, can’t really afford to anyway, but if I can find some sort of DC 12v powered switch to turn a light on and off, get it working, then I should be able to figure out how to add more. Then I can do zones and such and expand outward.
I’m just not sure all this is possible, or where the best place and who the best supplies are to get the parts I need. I’m not really comfortable soldering anything together, but I can connect pins and jumpers no problem.
Checkout itead.cc look at the sonof f sv or the one that says inching it also switches 12v.
Sonoff will work for some a.c. Options also. You can reflas h with tasmota or write your own software.
Very interesting project ! Keep us updated.
To answer your questions :
- Easy, basically any mechanical relay rated for 220V AC will also be able to switch 12V DC (most of these I see are rated 10A 220V AC / 10A 30V DC). Use either the model Thedannymullen talked about or the 4CH Pro.
- and 5. are not really specific to OH. You’ll need some external hardware and/or software. Once you have that, you may control it through Openhab.
- What happens when unplug the heater while it was running ? Does it start when you plug it back in ? If so, than abandon the IR remote thingy and just switch the electricity with a relay. If not, then… they are a lot of solutions around, but none I would really recommend.
- You’re doing home automation the wrong way… start with a problem then find the solution, not the other way around.
I’m really a fan of the combination of the Sonoff’s + Tasmota firmware. It requires a minimal amount of one-time fiddling but once setup is really awesome and cheap. I use it to smarten something that I can’t cable back to a central location. If it is easy to route multiple relay wires back to a central location, put a Raspberry Pi and connect a relay board to it.
Haven’t use Z-wave, so can’t comment on that (or compare them to Sonoff’s.)
Heh, thanks for the input. Part of this project is to boost my blog, so I’m doing things I don’t need to do so I can report back to my readers and let them decide what they want to add. I’m starting small, but I want to keep options open so I can add things later as new tech comes out or I find new ways to do things.
For the relays, for some reason I was under the impression that there were AC or DC switches, not ones that do both. If I can just get some and figure out a way to install them, then that part should be easy enough at least. I will have to figure out how to mount them though. Many of the lights are underneath cabinets, so there is some room above them as there is a void between the bottom of the cabinet and the floor inside the cabinet where the wires are run. Some however are in the ceiling, and I have no idea how much space is between the ceiling and the roof. I’ll have to take one down and figure out what is behind it and if I can fit a relay in there. I will probably have to leave the lights switched on all the time though so the relay always has power, though I may need to swap out the light housing itself anyway. Its an old RV, they look old and there are better looking housings out there now.
and 5. I thought I saw somewhere that there was a way to control Kodi through openHAB. I’d like to do that if possible, but if I need to use some other option, that’s fine too. I’d like to be able to remotely control a Pi through a tablet though without having to go inside, turn on a TV, use the GUI, and select whatever. If I can control it all on the tablet, that would be best, just change the radio, select a different playlist, whatever. Still not sure how to do that.
The video monitoring is a long ways away. I think I can do it with a couple Pi Zeroes and cameras, but I thought openHAB had a way to view video feeds. I’ll probably just start with one Zero/camera, figure out how to make it work, then expand outward and add cameras. I might be able to make it remotely accessible, but still working on that. I do have a webhost and can make a secure video feed, but often times our internet connection sucks so that wouldn’t always work.
When the heater is unplugged it shuts off, but when plugged back in, it doesn’t automatically start running. It turns on, but we have to press a button on it to start it. The remote can be used to turn it on, change the auto temp, change it to just fan, so that’s why I figured I’d build something that can replicate the signals from the remote and be controlled through openHAB. I had looked into IR transmitters before and I did find some that could work with a Pi Zero, but life got in the way and the project stalled. I am planning on putting the heater in a ducted compartment that it has its own breaker, so it will be out of the way but still able to heat the RV. That way it’ll be away from the cats and I can hide a transmitter in there and it won’t be a box out in the middle of the room with cables all over the place. If I can add temp gauges throughout the RV, I might be able to set it so if one area gets below a certain temp, it turns the heater on.
We are doing it this way because I hate using the builtin propane heater since its expensive and we never have to pay for electricity. We might even go so far as to remove the propane system completely since we are also removing the propane stovetop and replacing it with an induction one, and the only other propane powered device is the water heater, which hasn’t worked since we bought the RV. It’ll likely be replaced with a tankless electric water heater too. Then we have no reason for propane at all.
Also, the heater is going to be on a breaker that I think is only for that one plug and has two outlets, so I should be able to plug in the heater and plug in the IR device and be fine.
Yeah, I know I’m going about this backwards, but well, I can handle that. I’ve gotten tech items from RV companies for review, so I figured if I send out requests for smart devices, be able to hook them into the openHAB system, and then write a thorough review of it, well then I’m good. I found a convection oven I really want, but its expensive and they aren’t sending out review samples at the moment. I’m not sure it even interacts with any smart home protocol or if its just smart in that it can determine how long to cook something automatically. There are other devices out there I’d like to be able to test out though and I’m sure there are many more I don’t know about. Trying to figure out what I can use and test out.
I’ll look at Sonoff though. I don’t have a problem tinkering for the initial setup and editing lines of commands, but reliability is key. If I can start with the lights, that’s probably easiest. I’d like to be able to turn an individual light on/off, then add zones. That’s really about it. Its not like its really that far to walk to turn on a light, but this is more an experiment of what can be done, not what needs to be done.
The music is not a big deal, just more of a convenience than anything. I might have to look into something else completely, I just really like setting up Pis for various services.
For the heater, I have looked into setting up the IR transmitter and it doesn’t seem too complicated. I found a few that were USB so I wouldn’t even have connect anything to pins. I’d basically just be building a new remote that was mounted somewhere to send the signal. The heater we have even has a builtin thermostat, so we can set it to a temperature and it’ll heat until the ambient temp gets there and then shuts off. I’m just hoping to mount it somewhere that the cats can’t get to it but I can still control it completely. I have a spot in the RV where I want to put and have it permanently be there, but put a screen or something in front of it so the cats can’t get behind it or mess with it. Right now we pull it out when we need it, put it back when we don’t but I’d rather have a place for it to go that is out of the way. I may be going for more convenience than I need, but I’m kind of trying to figure out what I can do and if its worth it to invest time and money in.
There were relays I saw somewhere, but I can’t remember what they were called. Started with E-something. I think they were DC power designed though and had wifi builtin. The only other issue with those is that the light power lines are 1amp and I’m not sure if that’s enough for the relays. I assume they are 12volt though.
So here’s something I thought of. Someone on an RV group said something about adding a fan to their vents. A DC powered fan would be easy enough, usually the vents in the bathroom at least already have or had one and so the power is already there. Note that running an electric cable through a RV ceiling would be difficult. Not impossible, but difficult at least.
So I commented about how it would be awesome to add a fan that I could control through openHAB. Maybe add fans to all four vents and be able to turn them all on at once when it gets really hot in here and we need some help exhausting the heat.
But oh crap, that leads to another idea. I’m replacing the vents anyway since they are old and crappy and the inner bezel is horribly yellowed from age. So while I’m replace the vents, I might be able to run a power cable through the ceiling since I’ll have access to the void between the roof and ceiling anyway.
Now, is there a motor I can remotely control with openHAB that would open and close the vents? The vents have a handle that I turn manually to open or close, but it would be freaking awesome if I was inside and it started raining and I could push a button and all the vents closed and the fans shut off. Or do the reverse if it was getting hot inside. Push one button, vents open, fans kick on!
And then, and this it where it gets really experimental, would there be a way I could add some sort of sensor that would determine if it was raining, so I could just have a rule written so when the sensor detected rain, all the vents closed? I know that would be more work since its not like rain would hit a small sensor every time there was a drop, but maybe there is a weather gauge or something out there already that could do that and I don’t know about it. I’m planning on adding something that monitors the temperature outside anyway, so if I could add rain detection to that as well, that would be great.
Because I’m not giving up on this project and things keep evolving, here’s an update.
I got a job at a campground, so we are going there on Friday and setting up. We will be there as long as we possibly can. That means I’ll have more time and money to work on this project, so I can get things going finally. I’ve been in the design phase for far too long.
I think I can get my Pi this month to start setting up openHAB, but I’ll have nothing to connect it to. I’ll have to get a couple of modules to control a couple of lights and start working with things, just to figure out what I am doing. Start small, I guess.
One key thing I want to do though is set up a system so that openHAB checks with a website, knows what time sunrise is, and then turns the lights on low at sunrise and gradually brightens them over an hour or half an hour or something. Since we need to cover our windows with insulation to keep the heat out, we will also be blocking out most of the light and it’ll be pretty dark in here. I would prefer to know if its light out or dark or cloudy or whatever, but I’d rather have it not be unbearably hot in here.
So I think I can set up a few lights with LEDs that have the ability to dim, then have openHAB send them a command to turn on at the lowest setting at sunrise and step up 10% or whatever every five minutes until they are at full brightness. I can do it with lights out in the living room instead of the bedroom too, so it won’t be really bright early in the morning, but I’ll still have the illusion of the sun traversing the sky.
Oh, and it looks like we will be in Florida for a long time, so no need for the heat for awhile. I can figure that out later. However, now I have to replace the air conditioner (it was dead anyway), and I’d like to put in a smart thermostat that can interface with the AC and openHAB. I don’t think RV thermostats are exactly the same as household units, so I’m not sure if I can plug in something like a Nest and just get it to work, it might end up being more complicated than that. Once we get the new roof AC unit installed, I can mess around with things to figure out how it works and if something like a Nest would work, in which cause I’d just go with that.
Have a look at the openha b bindings Since you are purchasing an ac unit there might be one that just plugs in.
So you may be able to purchase an openha b friendly unit from the start.
Oh I wish, but I’m pretty sure there are not. There are literally three manufacturers of RV AC units. One sucks horribly, the other two have been making the same units for years with very little change. The RV lifestyle does not seem to be one where product manufacturers care much about smart tech.