Page 1 of 1
MySensors - only ethernet nodes
Posted: Wednesday 17 August 2016 8:25
by rolfo
Hi,
I really want to use MySensors in my home automation project, but main idea of the system is to not be wireless. I have new house and I can have cables where I want. I just want to have more reliable system. The idea is one cat. 5/6 cable to each room where will be Arduino and from Arduino cat. 5 cable to sensors/relays. What is more - few kilometers from the house I have my office. The house and office are connected with fiber. I'd like to have some sensors there - if it is over IP then it is possible to connect it. I will have the rPi with Domoticz as controller but in my project the element which is unnecessary is the gateway. So normal connection is:
Sensor <-> Node <--wireless--> Gateway <--wired--> Controller
And I'd like to have something like this:
Sensor <-> Node <--wired--> Controller
Is it possible to connect the system this way?
Re: MySensors - only ethernet nodes
Posted: Wednesday 17 August 2016 8:59
by trixwood
Yes
Re: MySensors - only ethernet nodes
Posted: Wednesday 17 August 2016 9:05
by trixwood
If you have a mysensors with ethernet and no radio, you essentially have. This...
(Sensor/Gateway) <--wired lan --> Domoticz
Or a gateway with sensors (without the radio)...
So no problems there, and you can reach your office if you have an ip connection to it from your home.
The only difference is that you need to create for each sensor a "mysensors lan" hardware instead of just one, cuz you gonna have a lot of gateways
Re: MySensors - only ethernet nodes
Posted: Wednesday 17 August 2016 9:58
by tlpeter
You could use one big board and connect a lot of sensors on it.
In the rooms use UTP and then you can use an patchcable to put the sensors on and the other end could be connected to the board.
Re: MySensors - only ethernet nodes
Posted: Wednesday 17 August 2016 9:59
by gizmocuz
costly, and depending on the sensors (temp/hum/baro/wind/uv/rain/...) also a lot of overhead, complicated and not needed
Re: MySensors - only ethernet nodes
Posted: Wednesday 17 August 2016 9:59
by gizmocuz
I also suggest to put 2 cat connections per room... wall boxes mostly also have two connectors, better to much, and regret later on
Re: MySensors - only ethernet nodes
Posted: Thursday 18 August 2016 7:49
by rolfo
I tried to connect my serial gateway this way, but I can't make it work. Today I will have ethernet shield for mega and I try to use it. Do you have some sample sketches for this connection?
Re: MySensors - only ethernet nodes
Posted: Thursday 18 August 2016 8:46
by gizmocuz
Why did you not got the serial gateway to work ? Maybe start with this...
Did you debug the gateway ? (Did you open the serial monitor in the arduino IDE, does it say anything ? does it receive a node ?)
The sample sketch you're requesting is the default ethernet gateway from mysensors
Re: MySensors - only ethernet nodes
Posted: Thursday 18 August 2016 10:18
by rolfo
It says some strange characters - I tried on original Arduino Mega and chinese nano. But the serial gateway was just for fun, I want to make it via ethernet. I have the shield, but maybe today I will have more time to play with it
Re: MySensors - only ethernet nodes
Posted: Thursday 18 August 2016 11:34
by gizmocuz
Please, do some research first. Your sketch is running at 115200 baud ? or 9600 ? Did you set the baudrate correct?
Re: MySensors - only ethernet nodes
Posted: Thursday 18 August 2016 12:27
by rolfo
I tried both. But I will try to make ethernet gateway, serial is not necessary for me now
Re: MySensors - only ethernet nodes
Posted: Thursday 18 August 2016 19:06
by rolfo
Ok, I stuck... I managed serial gateway to work, it is ok now. But when I connected W5100 shield, the Domoticz log shows this:
Code: Select all
2016-08-18 19:01:10.031 MySensors: connected to: 192.168.0.200:5003
2016-08-18 19:01:10.032 MySensors: Connection reset!
2016-08-18 19:01:10.032 TCP: Reconnecting in 30 seconds...
And serial monitor this (and repeats continuously):
Code: Select all
0;255;3;0;9;Starting gateway (R-NGA-, 2.0.0)
IP: 192.168.0.200
0;255;3;0;9;No registration required
0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
1
0;255;3;0;9;Starting gateway (R-NGA-, 2.0.0)
IP: 192.168.0.200
0;255;3;0;9;No registration required
0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
1
Any ideas what can be wrong? Power? I use USB for powering it, maybe 12V adapter?
Re: MySensors - only ethernet nodes
Posted: Thursday 18 August 2016 19:13
by trixwood
The radio is wired differently,
- Screen Shot 2016-08-18 at 19.09.50.png (182.38 KiB) Viewed 6081 times
Did you do that? I forgot the first time cuz I have a shield... and wired it as normal serial... that does not work.
Re: MySensors - only ethernet nodes
Posted: Thursday 18 August 2016 19:23
by rolfo
No, I don't use radio - I commented the radio part. In serial gateway it works
EDIT: Ok, it is no power problem I think. I connected 12V 2A adapter and the problem still exist. The board is original Arduino Mega. Ping stats:
Code: Select all
--- 192.168.0.200 ping statistics ---
106 packets transmitted, 106 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.833/3.820/43.013/4.737 ms
Re: MySensors - only ethernet nodes
Posted: Thursday 18 August 2016 20:08
by rolfo
Ok, I found the solution - I loaded code with Arduino IDE 1.6.8 and it works now
Re: MySensors - only ethernet nodes
Posted: Thursday 18 August 2016 20:10
by trixwood
Re: MySensors - only ethernet nodes
Posted: Monday 22 August 2016 17:33
by djdehaan
gizmocuz wrote:costly, and depending on the sensors (temp/hum/baro/wind/uv/rain/...) also a lot of overhead, complicated and not needed
@Gizmocuz. You say: Costly and a lot of overhead. Please explain a litte more:
-Is using the MySensor hardware approach causing more overhead than creating Virual Devices and update these using API calls? Which approach would you advice?
-Is Domoticz performance better if all sensors are bundled first to one gateway, and have this gateway connect to Domoticz?
-Is MySensor MQTT with Domoticz faster or slower than API calls (when sending messages)? The MQTT messages are shorter thus faster, but what about the handling of these messages in Domoticz?
-is there any other difference relevant to know?
Thanks for sharing!
DJ
Re: MySensors - only ethernet nodes
Posted: Tuesday 02 May 2017 3:11
by luismariagonzalez
Hi @rolfo!
Could you please share your arduino sketch please? Im having troubles with the ethernet shield...
Thanks in advance