Page 9 of 16

Re: MySensors - Gateway to Domoticz

Posted: Monday 03 August 2015 14:38
by BluesBro
Is there a way to skip ardunio via serial and connect the nrf24 directly to the Pi?

Re: MySensors - Gateway to Domoticz

Posted: Monday 03 August 2015 14:51
by Justintime
BluesBro wrote:Is there a way to skip ardunio via serial and connect the nrf24 directly to the Pi?
No, you have to have a serial gateway which communicates with the nodes. The serial gateway talks with Domoticz.

Re: MySensors - Gateway to Domoticz

Posted: Monday 03 August 2015 15:11
by BluesBro
Justintime wrote:
BluesBro wrote:Is there a way to skip ardunio via serial and connect the nrf24 directly to the Pi?
No, you have to have a serial gateway which communicates with the nodes. The serial gateway talks with Domoticz.
I was thinking along the lines of this:

http://forum.mysensors.org/topic/1151/t ... connection

Re: MySensors - Gateway to Domoticz

Posted: Saturday 08 August 2015 11:02
by gizmocuz
that might work

Re: MySensors - Gateway to Domoticz

Posted: Tuesday 18 August 2015 11:14
by pendragon
gizmocuz wrote:If this works the same as connecting the usb via ser2net, then this will be included in the next version.
(Tested here, and working)

But it could take a few days because currently domoticz is undergoing some changes that needs to be tested good

Are there any disantvantages with using ser2net with a serial gateway conneted to the raspberry?
The advantage would be the possibility to debug the sensors parallel from the pc.
Can I switch from the serial to the ethernet gateway wothout having to reconfigure the nodes?

I experienced that I cannot use ser2net and the serial gateway locally in parralel. The ser2net consumes all the attention from the serial connection.

Re: MySensors - Gateway to Domoticz

Posted: Wednesday 19 August 2015 8:41
by gizmocuz
i mostly debug the new node with serial debug messages and the arduino serial port monitor

i also give this node a specific ID (for example 254), so you know in your production system that you can delete this later

if i have to debug big time, i also plug the serial gateway in my develop system (with domoticz), and do testing.

Its best then to build an ethernet gateway

Re: MySensors - Gateway to Domoticz

Posted: Wednesday 19 August 2015 9:05
by pendragon
For this kind of debug is the serial monitor the best.

Now I am investigating the influence of failed transmissions, the best place for repeaters and systematical errors (e.g. timing). That can only be testet in the whole working system and the domoticz log is not really good for that.

So I startes using the MYSController on my windows machine. The second part is the wonderful possibility of OTA updates, which consumes a lot of time in which the switches wont work, if I unplug the serial monitor.

The best way would be possibly really the ethernet gateway.
But: Can the gateway used by two controllers? Domoticz and MYSController in parallel?

Re: MySensors - Gateway to Domoticz

Posted: Wednesday 19 August 2015 9:22
by gizmocuz
I can not confirm this, as i'm using the serial gateway
OTA updates is one of the features on my todo list
is it correct that this will only work for sketches that are programmed with the 1.5 api?

Re: MySensors - Gateway to Domoticz

Posted: Wednesday 19 August 2015 10:21
by pendragon
No, it should work with any sketch.
It is pretty simple (took me only one afternoon :D )

Here are very good instructions: http://forum.mysensors.org/topic/838/wi ... sensors/75

I sucessfully got things working with two nanos.

Important points:
  • ser2net works good, but the serial gateway is then no longer acessible from the raspberry
    After burning the mysbl Bootloader you cannot program the Arduino with isp anymore until you change back the bootloader
    The flashing takes very very long time (about 30minutes)
    I could not flash a new sketch on one nano. I think the nrf clone was a cheap one

Re: MySensors - Gateway to Domoticz

Posted: Wednesday 19 August 2015 11:11
by gizmocuz
That takes too long :P
In that time i have walked to the sensor, plugged it in my arduino ide, uploaded the sketch, tested, and placing the sensor back ;)

... and during this time no control... hmmm

Re: MySensors - Gateway to Domoticz

Posted: Wednesday 19 August 2015 21:18
by pendragon
If that is possible: Ok
My sensors, ok the one in the final version, are in plastic enclosures screwed to the wall. And my switch/RF-Sniffer had problems with the soldering points to the switches on the lid because of the repeatedly opening for flashing.

That was my motivation for using OTA updates

Re: MySensors - Gateway to Domoticz

Posted: Friday 21 August 2015 19:19
by gizmocuz
why would it take so long ? normal flashing will take up to 10 seconds (direct from the arduino ide)

Re: MySensors - Gateway to Domoticz

Posted: Friday 21 August 2015 20:01
by pendragon
The payload of the nrfs is only a few bytes. There were about 1000 messages sent in with a frequency of about 0,5Hz-1Hz (just guessing from memory)...

But I dont't know if this time is normal...

Re: MySensors - Gateway to Domoticz

Posted: Wednesday 26 August 2015 13:36
by franzelare
I want to get started with adding mysensors to my network and have been reading how to setup a serial gateway.
I currently have an arduino uno that I want to hook up to a Raspberry Pi 2 and would like to use the digital input pins for some status detection of sensors.

Is it possible to read the status of the pins while the arduino is also acting as serial gateway? or do I need a second module for status detection?
If so, has anyone an example sketch to share how to do this?

Re: MySensors - Gateway to Domoticz

Posted: Wednesday 26 August 2015 19:03
by gizmocuz
franzelare wrote:I want to get started with adding mysensors to my network and have been reading how to setup a serial gateway.
I currently have an arduino uno that I want to hook up to a Raspberry Pi 2 and would like to use the digital input pins for some status detection of sensors.

Is it possible to read the status of the pins while the arduino is also acting as serial gateway? or do I need a second module for status detection?
If so, has anyone an example sketch to share how to do this?
Best to post this in the MySensors forum.

You should make a dedicated gateway (serial or ethernet), so its maybe cheaper to use a nano for this....

then you can add extra arduino's for the sensors.

Re: MySensors - Gateway to Domoticz

Posted: Thursday 27 August 2015 4:35
by jopa
I'm trying to get several MySensors gateways to work simultaneosly with Domoticz. For testing purpose I have prepared two Ethernet Gateways and some basic sensors. Each gateway with sensors works fine separately. But when I use the two Hardwares (MySensors Ethernet Gateways) in Domoticz one or both stops working. Is this supported in current version?

I'm planning to connect several MySensors gateways in different geographical locations with a group of sensors connected to each gateway. I really like the user friendly and flexible solution offered by Domoticz and it covers my needs. I'm using MySensors software package 1.5 and Domoticz Windows 10, version 2.2762. Later on I'm planning to move to a Linux environment. Thanks for an excellent project.

Re: MySensors - Gateway to Domoticz

Posted: Thursday 27 August 2015 17:23
by flwvanes
jopa wrote:I'm trying to get several MySensors gateways to work simultaneosly with Domoticz. For testing purpose I have prepared two Ethernet Gateways and some basic sensors. Each gateway with sensors works fine separately. But when I use the two Hardwares (MySensors Ethernet Gateways) in Domoticz one or both stops working. Is this supported in current version?

I'm planning to connect several MySensors gateways in different geographical locations with a group of sensors connected to each gateway. I really like the user friendly and flexible solution offered by Domoticz and it covers my needs. I'm using MySensors software package 1.5 and Domoticz Windows 10, version 2.2762. Later on I'm planning to move to a Linux environment. Thanks for an excellent project.
I tried the same, but I think it is a MySensor isseu.....per MySensor network there is only 1 gateway allowed. What you can do is to make different networks by giving every gateway and his connected nodes a unique network channel. Within version 1.4 you have to change a setting for the channel id in one of the files in the MySensord library folder, I thougth that within 1.5 there was a setting available that you can use within the arduino sketch....but better is to check the MySensor site for this.

Re: MySensors - Gateway to Domoticz

Posted: Friday 28 August 2015 4:26
by jopa
Thanks. :) Yeah, I get the point. If two gateways with their sensors are in the same room they need to operate on different Radio Frequency Channels. I did take care of that to make sure they won't interfere one with another.
It seems to me to be something else. Something between Domoticz over the TCP/IP protocol and the Gateways. Activating one at the time in Domoticz everything is working fine.
It looks as if Domoticz isn't prepared to handle two MysSensors Gateways at the same time.

One gateway has the IP Address 192.168.0.91 and the other works with 192.168.0.93. Each Gateway activated separately gets correct registers in the Domoticz Log showing to be connected and sensors are being recognized automatically and shows up in the Log. But when I activate in the Hardware Menu both Gateways at the same time it stops working correctly and stops to register any new Logs. Even when I unplug or reset the MySensors Gateways Domoticz doesn't register any-longer the loss of connection.

Could I activate some recommended Debugging to capture more Data? And if someone please from the development team could confirm if Domoticz is prepared to handle various MySensors Gateways simultaneously. I can't find an answer in the documentation or at the Forum.

Re: MySensors - Gateway to Domoticz

Posted: Tuesday 01 September 2015 15:08
by maluko
now a gateway can be done with esp8266

http://forum.mysensors.org/topic/1870/e ... -mysensors

Re: MySensors - Gateway to Domoticz

Posted: Tuesday 01 September 2015 15:13
by ThinkPad
maluko wrote:now a gateway can be done with esp8266

http://forum.mysensors.org/topic/1870/e ... -mysensors
Very cool!

Wouldn't the nRF24L01+ and ESP8266 conflict, because they are both sending/receiving on 2,4Ghz?