Help Getting Into Smart Home / Home Automation

DavidDavid

Getting comfortable
Joined
Jan 29, 2017
Messages
605
Reaction score
267
Location
Ohio
I’d like to experiment a bit with some home automation but would like a little help to get started. I’m not so concerned right now about actually controlling much, I really just want to gather data at this point, but I’m hoping I can get some advice before I go spending any money. Currently I have a Raspberry PI with Raspbian that we primarily use for media streaming. I installed Domoticz onto the PI when I got my cameras set up and have them connected, but that’s as far as I’ve gotten.

What I’d like to do right now:

1) Install temperature sensors in a few locations to track the current and past temperature.
- Chest freezer in my basement
- Chicken coop behind the shed
- Pond (I’d really like something a foot below the surface and since I’m there, maybe 10 feet below surface. This is probably a stretch though)

2) Install a switch on my mailbox so that I can get an alert whenever it is opened.

3) Install a light sensor outside (probably on the shed) to have it turn some outdoor lights on and off automatically at dusk/dawn.

I’ve seen on this forum that some of you use these really cheap temperature sensors (Amazon.com: WINOMO DS18B20 Digital Thermometer Temperature Sensor IC, Pack of 10: Home Improvement) but how are they wired into your network? Would I need a Raspberry PI relatively close to each location that I needed one of these sensors?

For the other sensors (light/mailbox) I think Z Wave would be my best bet. I see some Z Wave temperature sensors but at around $30 each that’s way out of my price range for the simple things I want to watch (might be worthwhile to put on in the chest freezer though). From what I have read I will need some sort of controller to connect my devices (multiple temperature sensors, mailbox sensor, ect) to my network so that Domotocz can listen to them and alert me. What I think will work for me would be the Aeon Labs Z Wave USB Stick ( Amazon.com: Aeotec by Aeon Labs ZW090 Z Stick, Small, White: Home Improvement ). It’s only $45 and I could plug it into my PI which is roughly in the middle of my house on the 1st floor or in my router which is on the second floor, just above the PI.
My concern is that the Aeon USB stick says it has a range of 100ft which will not be nearly enough to reach all of the buildings on my property. My biggest question right now is, how do I get all these devices connected to my network so that Domoticz can listen to them? Will I need a 2nd and 3rd PI and Aeon USB stick at each location (shed and barn) and just hope that the one in the house can see the sensor at the mailbox 150ft away? I have network access in the shed and barn so that helps. I feel like I have an idea of what I want to do, but it just isn’t quite clicking on exactly what I need to do to get there.

Any help pointing me in the right direction would be appreciated! I'm pretty good at making things work for me if I know what im trying to do is possible in the first place. Does what I'm trying to do seem possible? Reasonable?

IMG_20170606_105725498.jpg
 
As an Amazon Associate IPCamTalk earns from qualifying purchases.

logbuilder

Getting the hang of it
Joined
Sep 30, 2016
Messages
125
Reaction score
30
Location
In the Cascades 90 miles NE of Seattle
David,

In terms of home automation and hooking all the parts together, you have proposed a uniquely difficult situation. First, you have locations that are 100+ feet from your house. To do this, you need two things. First is power, the second is communications. Just take the mailbox. Do you have power down there? 150 feet is quite a ways for a wireless device such as a z-wave door/window sensor. I assume you have power in the shed. But how to get comms there? And the pond, you would want to attach temp probe sensors to some type of sender unit in the shed. But 100 feet away, that would be wire. And the barn, 200+ feet is a real long way for wifi.

Think about and focus on the power and connectivity. Figure out how to connect those dots and the rest is doable.
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,524
I agree. As this is IP Cam Talk the obvious suggestion would be to run ethernet to the shed and barn and of course add a few cameras.

This makes more sense than the bare IC Amazon.com: Vktech DS18b20 Waterproof Temperature Sensors Temperature Transmitter (5pcs): Home Improvement
1-wire can go pretty far but I don't remember off the top of my head.
You could run wire a decent distance or hook a pi zero or esp8266 near the sensor.
Note "waterproof" above doesn't mean it's adequate for submersion in water as you describe. I'm sure there are products that would do the job though.

freezers may block the signal most of the time, a remote probe inside may be required.

As you add wired devices to a zwave network range improves. it's a mesh network, but battery powered sensors don't relay messages as much obviously.
 
As an Amazon Associate IPCamTalk earns from qualifying purchases.

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,524
if you have electricity in the shed/barn other options include point to point wifi back to the house and homeplug av2 adapters
 

DavidDavid

Getting comfortable
Joined
Jan 29, 2017
Messages
605
Reaction score
267
Location
Ohio
I should probably have been more clear in the first post, i do have power in the shed and barn along with a hard line Ethernet to each location as well. In both the barn and the shed i currently have a dd-wrt router acting as a wireless access point (which includes a few hardline ports) and i also have 1-2 cameras on the shed and barn (with more to come once i pony up money for some poe switches at each location)

I definitely do not have power at the mailbox, but have see others online that have Wi-Fi devices hooked up to a battery, so that was kind of my plan for the mailbox (although I'm not sure what my wifi signal is like at the mailbox... Probably not good)
 

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
Hey David
I have a Pi running Domiticz.
Lately, I have been adding ESP's to my HA system.

I like the Wemos mini D1 and mini D1 pro, but there are ton's of ESP's out there, and they are pretty inexpensive, especially if you can wait for shipping from aliexpress/china.

I then install ESP Easy on the ESP card. Configure it, and then you can use the ESP IO pins.
ESP Easy supports quite a few sensors natively, so you just have to connect them to power and an IO pin, and configure and you're off and running. I have a DS18b20 connected to one,
and it measures my spa water temperature. For others, I use magnetic reed switches to tell if the garage or gate is open, or if someone didn't close the garage freezer.
I also use relays to close the garage door, and control my spa.
The ESP cards have built in wifi, so you just have to power them, and they connect to your wifi network as long as you have coverage.
I have one in my backyard, it controls my spa, and it connects fine.
The d1 pro version has a better antenna, and provisions for an external antenna if coverage is a concern. You could stick an antenna out of the back of your mailbox if you had to.

If you do go with ESP, I recommend the mega beta version, instead of the stable 120 version. I just made something work by going beta from 120.

I should caveat this by saying I'm a Electrical Engineer so the wiring part is pretty easy for me, and ESP Easy makes the SW pretty easy too.
And I have had some problems, and had to spend some time troubleshooting things. But that seems to be the nature of going this route. I could have spent a LOT more money to buy ready made solutions, but what's the fun in that lol.

In the end, this has been an inexpensive way to add lots of functionality to my Domoticz system.

I also created some Lua scripts using DzVents in Domoticz. This adds even more to what you can do.
I get text messages if garage is open too long, or freezer. Spa pump is on a "timer", and runs every other day for a few mins.

Randy
 

logbuilder

Getting the hang of it
Joined
Sep 30, 2016
Messages
125
Reaction score
30
Location
In the Cascades 90 miles NE of Seattle
Like Randy, I also have been working with the ESP8266 nodeMCU version of the Arduino. As we noted earlier, you need power and comms for a remote device. The ESP solves the comms issue without cables but it still needs power. What I really like about this solution is that if I can find a sensor that works with an Arduino, I can add it to a nodeMCU. For home automation, I use HomeSeer ver 3. There is a really nice plugin for HS3 that supports the Arduino and integrates nicely into the trigger and event engine. I currently have 6 nodes working in my 'production' environment doing a variety of functions.
 

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
Didn't mention this before, but power is easy with the Wemos cards. They can run off of 5V. So I have been buying cheap USB power plugs (apple clones), cut the end off an old USB cable, and then use the now exposed red and black wires to power the card.
Some ESP cards require 3.3V, and then you would need some converter to generate the 3.3V.
I have one esp-01 card, and I had to wire up a converter for it.
 

DavidDavid

Getting comfortable
Joined
Jan 29, 2017
Messages
605
Reaction score
267
Location
Ohio
Thank your for the input. Im still think about this, just haven't actually done anything yet.

How far can i run wire from the wemos to a sensor? The first project I'd like to do is get the temperature of the inside of one shed sitting behind another one. I don't think batteries will be the best way for me to go because it seems that they might only last 1-2 months. That's no good for me. The first one has power and i could easily out a wemos board there, but to run a sensor out to the other shed would require roughly 60-70 ft (i know this from running cst5e for cameras out there.)
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,342
Reaction score
3,524
Thank your for the input. Im still think about this, just haven't actually done anything yet.

How far can i run wire from the wemos to a sensor? The first project I'd like to do is get the temperature of the inside of one shed sitting behind another one. I don't think batteries will be the best way for me to go because it seems that they might only last 1-2 months. That's no good for me. The first one has power and i could easily out a wemos board there, but to run a sensor out to the other shed would require roughly 60-70 ft (i know this from running cst5e for cameras out there.)
Depending on how you set up a wireless sensor you potentially have a lot of control over battery life in the form of how frequently it wakes up and sends data. Once an hour might be good enough.

As for wired, depends on what kind of sensor you're trying to use I'd probably go for a 1-wire sensor. Twisted pair should help you with noise (your wire turning into an antenna), but it'd be a good idea to ground all unused wires. You could always level shift if needed.
 

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
Or get a BIG battery lol. But like tangent said, I think there could be ways to work around the battery problem, people run ESPs on batteries a lot.

But I've used a DS18B20 which uses the 1 wire bus. It has three pins, power, ground and data. Connect the data pin to one of the ESP IO pins. Set up ESP Easy for a DS18B20, and ESP Easy will read the temperature. For one device, 70 feet should not be a problem. I would put a cap from power to ground close to the DS. Oh, and power the DS from 3.3V, not from 5V.

I use a DS18B20 to measure my spa water temp, potted it with epoxy to protect it, and it's been working great for me.

Randy
 

DavidDavid

Getting comfortable
Joined
Jan 29, 2017
Messages
605
Reaction score
267
Location
Ohio
Thats the plan, that "one" wire temp sensor in the shed.

My thinking is that with the wemos in the shed with power, i could use that for any other outdoor sensors i wanted (rain, light, wind? Idk whatever else is available that i get into down the road) and just run them a couple feet thru the wall. The only one with any distance on it would be the temp in the other shed.
 

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
Well there are quite a few sensors supported
Devices - Let's Control It
Shipping takes a little while through aliexpress, so you may want to order a wemos soon so you have it when you're ready to try it.
And although it takes up more space, this base is pretty cool
Aliexpress.com : Buy Tripler Base V1.0.0 for WEMOS D1 mini from Reliable d1 mini suppliers on WEMOS CC Store
I used it in my last build. One slot is to mount the wemos d1, and then you can use the other slots to hook up wires for switches, relays, etc. It made the build much easier.
If you are going to want to add any chips, these will make it easier
Aliexpress.com : Buy ProtoBoard Shield for WEMOS D1 mini double sided perf board from Reliable d1 mini suppliers on WEMOS CC Store
One other thing I do is to install sockets in the base, then pins in the d1, so you can plug and unplug the d1 into the base. If the d1 every dies on you, makes it easy to replace. It also helps in troubleshooting.
 

DavidDavid

Getting comfortable
Joined
Jan 29, 2017
Messages
605
Reaction score
267
Location
Ohio
Ok I've come to the conclusion that i just need to order some stuff to play around with to make this all click in my head.

I'm getting 3 Wemos D1 minis

Online Shop WEMOS D1 mini V2.3.0 - WIFI Internet of Things development board based ESP8266 ESP-12S 4MB FLASH | Aliexpress Mobile

1 breadboard for initial testing
Online Shop Quality mini bread board / breadboard 8.5CM x 5.5CM 400 holes | Aliexpress Mobile

Some 20cm jumper wires for testing
Online Shop Free Shipping 120pcs 20cm Male to Male,Female to Male and Female to Female Jumper Wire Connector Dupont Cable for arduino | Aliexpress Mobile

10 DS18b20 Waterproof temp sensors (skipping the cheaper non Waterproof because at least one Will go outside in the elements to get outdoor temp and then i can play with possibly trying to get the pond temp at some point in the future)

https://www.amazon.com/gp/aw/d/B00CHEZ250/ref=ox_sc_act_image_1?smid=A2W8GBH769XLCV&psc=1

Soldering iron. Been wanting one for a while for other small projects.. Nows a good a time as any to get one i guess.

https://www.amazon.com/gp/aw/d/B01C9P7HDQ/ref=ox_sc_act_image_2?smid=A1YF10IMA0HOJK&psc=1

An electronics wizard friend of mine is going to give me some resistors since i think I'll need some of those too to hook up multiple temp sensors on the same line.

After buying all this junk, i am thinking i should be able to get some temperature sensors going on my network. The plan ks to put a wemos in a shed with power, connect one temp sensor that runs thru the wall and gets stuck outside to measure outdoor temp, buy and run some runs of 24gauge wire to the second shed to get the internal temp of that shed, then directly connect 3 other temp sensors to my raspberry pi that's inside the house and run some more 24gauge wiring to the basement, first and second floor of the hose to measure those temps.

I'll have a few temp sensors left over and a pair of wemos left over for future projects.

Does it at least sound like im on the right track? Anything else i should consider buying?

I really appreciate your help and input. This electronic crap is way out of my element (obviously) but I'm confident i can get it working once I get my hands on some of the actual hardware. I've just put it off for so long because im afraid i Wil buy the wrong stuff or not everything i need all at once.
 
As an Amazon Associate IPCamTalk earns from qualifying purchases.

DavidDavid

Getting comfortable
Joined
Jan 29, 2017
Messages
605
Reaction score
267
Location
Ohio
My first and main goal is to get some temperature readings of my home environment, and then make Domoticz send that data to my camera streams so i can see the temperature while viewing my camera streams. I'll figure that out once i successfully get real temp readings in Domoticz.

If that's all i end up doing I'll consider it a success. If i end up getting a grasp of this and build more sensors into my system that'll be a bonus.
 

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
I find a dvm to be REALLY useful for these little projects. A little cheap one is fine, but you electronics buddy might have one you can borrow.

For power, you can use a little usb plug and a micro usb cable to provide 5v to the mini d1. I've been cutting the ends off of old usb cables, and soldering the wires directly to +5 and ground on the boards.
In one of my first projects, it didn't work using a micro usb trying the power a d1 and a relay board, but when I soldered wires directly, worked fine. Plus soldering the power lines will be better for long term reliability.

I've also have been using in line connectors on the wires between the mini d1 box and any external devices. Makes it easier to remove the box for troubleshooting.

I think you can only connect one b20 per io line, but I could be wrong. I haven't tried to connect multiple devices to an io line. One wire will support it, I just don't know if easy esp does.

Troubleshoot and get as much working as possible before you install it in the shed. It's a lot easier to get things working when its sitting in your shop, or family room or wherever, versus installed with wires going all over.
 

DavidDavid

Getting comfortable
Joined
Jan 29, 2017
Messages
605
Reaction score
267
Location
Ohio
Ive got a cheapo voltmeter from harbor freight that should work just fine, but good suggestion. And yes forgot to mention I'm planning on using old phone chargers for power. And if i have to run multiple io lines from the wemos to a different sensor that'll be fine. Maybe what i remember reading was being able to power them and ground them off of single lines....needed a resistor for some reason thou. I'll look that up again when i get there. I think the wemos has room for like 8 sensors?

And yes, I've made plenty of mistakes in the past where i run everything permanently then its a bitch to troubleshoot. Breadboard being under $1 made the decision to test it out first an easy one to make.
 

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
Wemos has 9 GPIO pins. But if you can, avoid using GPIO 0, 2 and 15. IO 0 and 2 have to be high at boot up, 15 low. It may work fine with a b20 connected to them, but it's easiest to not use them, and not have to worry about it.

I make a configuration spreadsheet for each ESP I have, to track how things are connected on it.

I would also not recommend the breadboard for the final version. Makes it easy to test stuff out, but may not be reliable outside. I have been trying to make my ESP's "modular". In all of my newer builds, I can unplug the wemos module. Will make it easy to replace them if they fail. Its why I recommended the triple base, I make the connections to the base, but that is passive and really has nothing on it that could fail.

For esp easy, I recommend using the beta version, instead of r120. I had problems passing parameters to rules in 120, and then I switched to the beta and it just worked. Also UI in beta is much better.
 

DavidDavid

Getting comfortable
Joined
Jan 29, 2017
Messages
605
Reaction score
267
Location
Ohio
Ive read that about those pins elsewhere, but your explanation made sense to me. Thanks.

Being an engineer i love my spreadsheets and am definitely planning on doing the same thing haha

And yep, breadboard just for testing. Now i finally understand why you got the dual base... But i didn't order any. Oh well.

And i haven't done anything with downloading espeasy yet, but I'll keep that in mind.

I got the sensors from Amazon so they'll be here Monday... Planning to work on getting one sensor wired up to my pi (and then into Domoticz) next week.

Thanks again for all the help.
 
Top