Opinions on Arduino based cable connection

Others (MiLight, Hue, Toon etc...)
Post Reply
febalci
Posts: 317
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Opinions on Arduino based cable connection

Post by febalci » Saturday 14 October 2017 14:40

Hi all,

Planning a Domoticz installation on Raspberry Pi. For sensors, i have cabled reed switches and cabled PIRs. What i am planning is to collect all sensor cables to an Arduino Mega IO, and send all switch status from the Arduino to Rpi from ethernet shield. I have no intention of using wireless in any sensors or Domoticz connections. So;

May i get your suggestions on the protocol for the Arduino Mega+ Ethernet Shield to Raspberry Pi connection? Should i use direct JSON calls from arduino to domoticz, or should i use MQTT or anything else? Which would be the more efficient way? As i understand from mysensors, it is mainly for wireless sensors. What would be the way to go for wired sensors?

freijn
Posts: 355
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Opinions on Arduino based cable connection

Post by freijn » Saturday 14 October 2017 19:28

EASY ESP ?

Exactly as you wanted only not an ethernetshield but Wifi instead and no programming skills required.

I have several ones and one with 4 sensors connected to my domotics.

https://www.letscontrolit.com/

febalci
Posts: 317
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Opinions on Arduino based cable connection

Post by febalci » Sunday 15 October 2017 13:11

freijn wrote:
Saturday 14 October 2017 19:28
EASY ESP ?

Exactly as you wanted only not an ethernetshield but Wifi instead and no programming skills required.

I have several ones and one with 4 sensors connected to my domotics.

https://www.letscontrolit.com/
Thanks frejin,

i checked it out; looks great. However, any wireless protocol is not wanted specifically. The cables for the sensors in the house are already laid out and it is specifically wanted that these cables are to be used. As i understand from Easy ESP it is wifi connected with ESP8266. So, unfortunately it won't be of use for me in this project, but it is great for my own usage in other projects, i will try it. Thanks again...

freijn
Posts: 355
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: Opinions on Arduino based cable connection

Post by freijn » Monday 16 October 2017 10:39

aha,

understand your goal..

Perhaps.. as the sources are available you can use that to rewrite from wifi to serial communication ?

User avatar
bbqkees
Posts: 511
Joined: Sunday 17 August 2014 21:01
Target OS: Linux
Domoticz version: 3.8x
Location: The Netherlands
Contact:

Re: Opinions on Arduino based cable connection

Post by bbqkees » Monday 16 October 2017 11:25

I have several Arduino's with Ethernet connected to Domoticz.
One reads my electricity meter, one my boiler, one another controller and there are 3 others used for sensors/actuators.

All of them work with JSON GET requests, but I am am going to reprogram one of them for MQTT to test the difference.
The problem I have with JSON is that although sending data from the Arduino to Domoticz works fine every time, sending a command back to the Arduino from Domoticz is not fail safe in my case.

In my opinion MQTT is not really superior to JSON.
MQTT does have more overhead than a simple GET request with JSON.
The major benefit of MQTT is that it is not specific to Domoticz.
So if you create a MQTT device it can interact with many systems, whereas the JSON type is fixed to Domoticz.

My advice would also be to stick with the Wiznet ethernet shields, these have the best compatibility with Arduino.
Intel NUC-> Philips Hue, Aeon Zwave stick V2, Qubino, Fibaro, Everspring, Philio, RFXCom, X10, Harmony Hub, Xiaomi Flora + Gateway, BS440. And P1 / Resol VBus / Nefit EMS bus / DHT21 / DS18B20 / Sonoff / I2C display, all via Arduino/ESP8266.

febalci
Posts: 317
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Opinions on Arduino based cable connection

Post by febalci » Monday 30 October 2017 19:16

bbqkees wrote:
Monday 16 October 2017 11:25
I have several Arduino's with Ethernet connected to Domoticz.
One reads my electricity meter, one my boiler, one another controller and there are 3 others used for sensors/actuators.

All of them work with JSON GET requests, but I am am going to reprogram one of them for MQTT to test the difference.
The problem I have with JSON is that although sending data from the Arduino to Domoticz works fine every time, sending a command back to the Arduino from Domoticz is not fail safe in my case.

In my opinion MQTT is not really superior to JSON.
MQTT does have more overhead than a simple GET request with JSON.
The major benefit of MQTT is that it is not specific to Domoticz.
So if you create a MQTT device it can interact with many systems, whereas the JSON type is fixed to Domoticz.

My advice would also be to stick with the Wiznet ethernet shields, these have the best compatibility with Arduino.
Hi bbqkees, is it possible if you can send sample arduino sketches with the JSON calls? Thanks...

User avatar
bbqkees
Posts: 511
Joined: Sunday 17 August 2014 21:01
Target OS: Linux
Domoticz version: 3.8x
Location: The Netherlands
Contact:

Re: Opinions on Arduino based cable connection

Post by bbqkees » Wednesday 01 November 2017 10:38

febalci wrote:
Monday 30 October 2017 19:16
Hi bbqkees, is it possible if you can send sample arduino sketches with the JSON calls? Thanks...
See my Github page.
Intel NUC-> Philips Hue, Aeon Zwave stick V2, Qubino, Fibaro, Everspring, Philio, RFXCom, X10, Harmony Hub, Xiaomi Flora + Gateway, BS440. And P1 / Resol VBus / Nefit EMS bus / DHT21 / DS18B20 / Sonoff / I2C display, all via Arduino/ESP8266.

ILoveIOT
Posts: 2
Joined: Sunday 25 March 2018 17:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Opinions on Arduino based cable connection

Post by ILoveIOT » Sunday 25 March 2018 18:01

There is a plugin available for the Nodo-Mega V3.7, with nodo shield and Ethernet shield, I use it for many years.

http://www.nodo-domotica.nl/forum/viewt ... 120#p15109

The forum is dutch, not sure how google translate will solve it, and they stopped working on it.

febalci
Posts: 317
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Opinions on Arduino based cable connection

Post by febalci » Sunday 25 March 2018 21:46

In the end i managed to do it. Connected a total of 24 reed and PIR sensors to an arduino mega. The arduino reads on/off status of the sensors with GPIO ports and sends to domoticz with json calls. Since some of the sensor cables are long, the they required an optocoupler before connecting to the GPIO ports; because of the length related noise on the cables. The sensors were sending nanosecond on/off signals before the optocouplers.

For the lights, another arduino mega is used (a total of 20 lights, cable connection again). This time i used mysensors, stripping out the wireless parts in the .ino. Works perfectly so far. Anyone needing the .ino files and details, just ask for it...

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests