Ways to integrate wired sensors into automation system

hmjgriffon

Known around here
Joined
Mar 30, 2014
Messages
3,386
Reaction score
979
Location
North Florida
so I've got my pi and I can use zwave sensors wonderfully to do things but if I want to use some wired stuff does anyone have any experience with integrating wired sensors and things with either raspberry pi GPIO pins or some other way? Maybe something you put on the network like a sealevel device but that can talk to linux for checking when stuff is triggered or not? Don't have an immediate need but would love to be able to do it when I do.
 

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
Its on my list lol.

For me the harder part is passing the information into domoticz. Wiring and connecting should not be too hard.

I ordered a pi zero-w to install in my garage, plan to put sensors on the garage doors and side gate.
 

hmjgriffon

Known around here
Joined
Mar 30, 2014
Messages
3,386
Reaction score
979
Location
North Florida
Its on my list lol.

For me the harder part is passing the information into domoticz. Wiring and connecting should not be too hard.

I ordered a pi zero-w to install in my garage, plan to put sensors on the garage doors and side gate.
Yes, I believe @nayr has some stuff hard wired into some pi's with domoticz, maybe he can chime in.
 

aristobrat

IPCT Contributor
Joined
Dec 5, 2016
Messages
2,983
Reaction score
3,180
IIRC, he recommend a brand of zwave sensor where when you pop the cover off has two terminals to hook up a wired dry contact, essentially turning it from a wired sensor to a zwave sensor. I think he did that with the pressure mat at the front door maybe?

Check out this post:
Anyone using a Z-Wave doorbell or doorbell sensor?

For my Raspberry Pi, I added a Piface digital module to it and had 6 wired door sensors attached to it. It'd run a little script that would do a rest call to my home automation system, telling it which door had opened/closed.
 
Last edited:

aristobrat

IPCT Contributor
Joined
Dec 5, 2016
Messages
2,983
Reaction score
3,180
If either of you guys are interested in this version of the Piface, I'm selling mine for $30 shipped. I ended up moving my wired sensors over to an ELK security panel and don't have a use for it anymore.

@hmjgriffon, attached is a Python script that someone wrote on the ISY forum. The script waits around for an interrupt from the Piface (i.e. a sensor changed state), and then does a HTTP REST call to the ISY to update a variable so the ISY knows which sensor changed, and if it changed to open or closed. There is also a heartbeat loop, where if not interrupt has happened in 30 seconds, it sends a heartbeat, so the ISY can tell if the Pi stopped updating (for whatever reason). I'm guessing you just want to look at how it handles the interrupts, and then code your own from there.
 

Attachments

hmjgriffon

Known around here
Joined
Mar 30, 2014
Messages
3,386
Reaction score
979
Location
North Florida
If either of you guys are interested in this version of the Piface, I'm selling mine for $30 shipped. I ended up moving my wired sensors over to an ELK security panel and don't have a use for it anymore.

@hmjgriffon, attached is a Python script that someone wrote on the ISY forum. The script waits around for an interrupt from the Piface (i.e. a sensor changed state), and then does a HTTP REST call to the ISY to update a variable so the ISY knows which sensor changed, and if it changed to open or closed. There is also a heartbeat loop, where if not interrupt has happened in 30 seconds, it sends a heartbeat, so the ISY can tell if the Pi stopped updating (for whatever reason). I'm guessing you just want to look at how it handles the interrupts, and then code your own from there.
Are you conus?
 

tangent

IPCT Contributor
Joined
May 12, 2016
Messages
4,421
Reaction score
3,654
There are other opto isolator products you can use with the pi too.
 

logbuilder

Getting the hang of it
Joined
Sep 30, 2016
Messages
125
Reaction score
30
Location
In the Cascades 90 miles NE of Seattle
You might want to research a WIFI based Arduino. The ESP8266 nodeMCU is a really capable form of Arduino. They can be had for about $6 (eBay) and can communicate over wifi. The nodeMCU has nine digital pins and one analog. I'm currently working on a multi-sensor that will have wired sensors for carbon monoxide, PIR motion, temp, humidity, and multiple door/window sensors (in series so only one analog). It will communicate via wifi to HomeSeer3. I plan on having 6 of them around my place. It is currently working on a breadboard. I think I will be able to make them for about $20 each. I've only recently gotten into Arduino and am very impressed.

Here is a Fritzing (great free tool!) diagram:

DarringtonMultiSensor_bb.jpg
 

randytsuch

Pulling my weight
Joined
Oct 1, 2016
Messages
495
Reaction score
176
You might want to research a WIFI based Arduino. The ESP8266 nodeMCU is a really capable form of Arduino. They can be had for about $6 (eBay) and can communicate over wifi. The nodeMCU has nine digital pins and one analog. I'm currently working on a multi-sensor that will have wired sensors for carbon monoxide, PIR motion, temp, humidity, and multiple door/window sensors (in series so only one analog). It will communicate via wifi to HomeSeer3. I plan on having 6 of them around my place. It is currently working on a breadboard. I think I will be able to make them for about $20 each. I've only recently gotten into Arduino and am very impressed.
Hey LB
Are you going to integrate this in with Domoticz?
What sw are you going to run on the Arduino/ESP?
I like arduino's, I have some ESPs but haven't really used them yet.

I may use a pi zero w instead, but they are a little more expensive and still in short supply.
But a small, relatively inexpensive motion sensor would be very cool.

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
Hey LB
Are you going to integrate this in with Domoticz?
What sw are you going to run on the Arduino/ESP?
I like arduino's, I have some ESPs but haven't really used them yet.

I may use a pi zero w instead, but they are a little more expensive and still in short supply.
But a small, relatively inexpensive motion sensor would be very cool.

Randy
My home automation is based on HomeSeer. There are several ways to connect Arduinos to HS. The one I am using is a plugin that has a base app for the Arduino that handles wifi connectivity and messaging. I only have to add the code to manage the sensors themselves.
 
Top