Digital inputs best solution?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
franzelare
Posts: 139
Joined: Thursday 19 February 2015 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Digital inputs best solution?

Post by franzelare »

I like to use multiple (mainly wired) digital signals inside domoticz and I'm searching for the best reliable sollution...?
(signals like door sensors, doorbel, glas break sensor, rain sensor, state of my washing machine and so on)

What is your solution? how fast is the response on an input and how reliable is the system?

I have tried a couple of sullutions but nothing seems to work very reliable.
What I tried so far are:
- Fibaro Z-wave universal binaire sensor
I have 3, but all of them have issues over time, stopping reporting totally or only for the Di's but not for the temperature signals
the failing mechanism is not the same all the time, sometimes a power cycles solves the issue and sometimes I need to exclude and include the sensor again
so this is a nogo
viewtopic.php?f=24&t=7421

- Piface digital 2
this worked fine on a Pi B+ but I did not get it working on a Pi2 so far
on the Pi B+ it only works when I don't run lua scripts during startup... I can delete them at startup and copy them back once domoticz is up and running
you can run up to 32 inputs with 4 boards that work fine, this can work on a Pi B+ and I still have 2 boards ....but it's not the best way to run it..
viewtopic.php?f=6&t=7750

- arduino uno
Currently the arduino can not be directly monitored from domoticz, you need to set up a gateway and having a wired sensor going into one board, transmitted to a board 2cm away and transfered through a gateway on a second arduino.... it seems a bit overdone and secondly sensitive for RF issues and that's why I have wired most of my sensors
I have been checking how to read the inputs throuhg a serial monitor and use python to control virtual switches, but this will take more time than I like to spend on this
There must be an easier way!

- GPIO with wiringpi
inputs are not always read inside domoticz while gpio from command line does read the inputs correctly
adding a script that reads the inputs and toggels swtiches can be used but that will be to slow for signals like a doorbel that is only triggered for a second
I already electrically debounced the inputs and isolated them with optocouplers to get rid of noise picked up by some unshielded cables... but if there is no interupt to domoticz the solution is to slow
viewtopic.php?f=32&t=6074

- Haibrain TWM4 (X10 protoicol 4 Di's)
This is not a potential free system, the switches are toggle using 220V, so I need to add an additional relay to switch the inputs
Since I have wired my lighting using X10 devices I have the interface available, but it is a costly solution and not very fast responding, so not prefered
for now I only use this to control lights that cannot be directly wired from that location (like garden lights from the inside)

- Kaku
I have tried this, but the protocal is not shielded at all, so don't want to use this for wired signals

only open I still have and want to try is inputs through onwire protocol, but don't know how well this is supported in domoticz
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Digital inputs best solution?

Post by gizmocuz »

for the rpi2, you need the a new piface2

for arduino, you could use mysensors as layer
Quality outlives Quantity!
franzelare
Posts: 139
Joined: Thursday 19 February 2015 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Digital inputs best solution?

Post by franzelare »

I have a piface digital 2, so that's not the issue, that should work on a Pi B+ and Pi2 according to the specs
I have 1*Pi B+ and 2*Pi2's and 2* piface digital 2
can start again with a clean install on a Pi2 and add the piface digital... and see where I get stuck setting up domoticz with scripts and so on...

for the arduino, I would still need to set up a gateway on one arduino and attache the inputs to a second, correct?
so making my wired sensors wireless first... what seems a waste of time, parts, responsetime and so on
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Digital inputs best solution?

Post by gizmocuz »

Then one wire could be a solution.... dont have experience with this
from the one-wire code it seems that switches are supported
Quality outlives Quantity!
Jan Jansen
Posts: 229
Joined: Wednesday 30 April 2014 20:27
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

Re: Digital inputs best solution?

Post by Jan Jansen »

In my case >> door contacts >> wire >> piface are much more reliable than z-wave door contacts. You also have no battery hassles. My piface works fine with the latest version of kernel 3.12. In my case piface, domoticz and kernels > 3.12 does not work. That's too bad. I still hope for a solution.

I use rpi B rev 2 and piface
User avatar
bbqkees
Posts: 407
Joined: Sunday 17 August 2014 21:01
Target OS: Linux
Domoticz version: 4.1x
Location: The Netherlands
Contact:

Re: Digital inputs best solution?

Post by bbqkees »

I experimented a while with the Pi GPIO but I did not like it. Slow and made the Pi unstable.

For me several Arduinos with Ethernet shield are the most rock-solid solution.
Bosch / Nefit / Buderus / Junkers / Worcester / Sieger EMS bus Wi-Fi MQTT Gateway and interface boards: https://bbqkees-electronics.nl/
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Digital inputs best solution?

Post by Thomasdc »

see this,

viewtopic.php?f=38&t=7514&p=50484&hilit=mother#p50469

toppic is clossed, but they are still working on it i think (i sure hope so! )

for now i am also using mysensors for inputs ( with a sensor node and gateway next to each other)
franzelare
Posts: 139
Joined: Thursday 19 February 2015 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Digital inputs best solution?

Post by franzelare »

I got the piface 2 working on the Pi2, turned out to be the same issue as I found on the Pi B+...
If I have Lua scripts active when domoticz boots, the inputs from the piface get all messed up!
deleting the files from the Lua folder in /etc/rc.local makes the piface boot fine

only placing the scripts back from a backup folder after domotizc has started is harder... got that working on a Pi by setting a GPIO pin in domoticz.sh with an internal pull up and responding with a delay after the pin was initialized in domoticz (plus chaning the pin status to closed, not matching the real open state) but the trick did not work on a second Pi, so not a reliable sollution...
next plan for the Piface is to add an RC circuit with a 5V relay, enabling the pin during boot, charging the circuit with a known time delay, switch an input and respond to that change with a blocky script to copy back the files and switching the pin back off for the circuit to discharge until the next boot

so I might just order a ethernet shield for my arduino for now until I have the whole piface thing sorted...
franzelare
Posts: 139
Joined: Thursday 19 February 2015 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Digital inputs best solution?

Post by franzelare »

In the end I now use 2 solutions for slow signals and fast signals, the fast signal solution should also work for slow signals... but I got started on the slow signals because they are easier

The slow signals (status always stable for >1second), like is appliences are on or off I connecet to the GPIO of a Pi2 and check the inputs using a python script since the status change of GPIO in domoticz was not to reliable and generated a lot of interupts. with this i now read the status of my washing machine, dryer, rain sensor, airflow sensor in my ventilation outlet and more to come
See here for details on the project:
viewtopic.php?f=38&t=8378

For fast signals, like doorbel that are almost only the interupt, I now use mysensor digital inputs on a arduino nano with ethernet shield
Since I don't want the signals (unsecure) flying around, from a my sensor board to the mysensor gateway and only then ending up on my network, i use the development branch of the mysensor project to allow me to connect the signals directly to the gateway. the nano board I now use only has 8 unused digital in/outputs if you have the ethernet shield attached, but that is enough for my first small project.
http://forum.mysensors.org/topic/2112/n ... thout-nf24
pj-r
Posts: 140
Joined: Wednesday 17 December 2014 17:30
Target OS: Linux
Domoticz version: V3.8650
Location: Jyväskylä, Finland
Contact:

Re: Digital inputs best solution?

Post by pj-r »

I would suggest mysensors and rs485 bus. Perhaps it coule be possible to replace the gateway with usb-rs485 adapter and python script feeding data to virtual serial port what domoticz could read.
LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors
franzelare
Posts: 139
Joined: Thursday 19 February 2015 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Digital inputs best solution?

Post by franzelare »

thanks!
I will check it out when I'm finished with my current project!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest