MySensors - Gateway to Domoticz

Moderator: leecollings

BluesBro
Posts: 54
Joined: Tuesday 13 August 2013 19:55
Target OS: -
Domoticz version:
Contact:

Re: MySensors - Gateway to Domoticz

Post by BluesBro »

Is there a way to skip ardunio via serial and connect the nrf24 directly to the Pi?
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: MySensors - Gateway to Domoticz

Post 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.
BluesBro
Posts: 54
Joined: Tuesday 13 August 2013 19:55
Target OS: -
Domoticz version:
Contact:

Re: MySensors - Gateway to Domoticz

Post 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
User avatar
gizmocuz
Posts: 2552
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post by gizmocuz »

that might work
Quality outlives Quantity!
User avatar
pendragon
Posts: 7
Joined: Sunday 22 March 2015 14:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany, Hanover
Contact:

Re: MySensors - Gateway to Domoticz

Post 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.
User avatar
gizmocuz
Posts: 2552
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post 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
Quality outlives Quantity!
User avatar
pendragon
Posts: 7
Joined: Sunday 22 March 2015 14:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany, Hanover
Contact:

Re: MySensors - Gateway to Domoticz

Post 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?
User avatar
gizmocuz
Posts: 2552
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post 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?
Quality outlives Quantity!
User avatar
pendragon
Posts: 7
Joined: Sunday 22 March 2015 14:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany, Hanover
Contact:

Re: MySensors - Gateway to Domoticz

Post 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
User avatar
gizmocuz
Posts: 2552
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post 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
Quality outlives Quantity!
User avatar
pendragon
Posts: 7
Joined: Sunday 22 March 2015 14:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany, Hanover
Contact:

Re: MySensors - Gateway to Domoticz

Post 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
User avatar
gizmocuz
Posts: 2552
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post by gizmocuz »

why would it take so long ? normal flashing will take up to 10 seconds (direct from the arduino ide)
Quality outlives Quantity!
User avatar
pendragon
Posts: 7
Joined: Sunday 22 March 2015 14:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany, Hanover
Contact:

Re: MySensors - Gateway to Domoticz

Post 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...
franzelare
Posts: 141
Joined: Thursday 19 February 2015 21:48
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: MySensors - Gateway to Domoticz

Post 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?
User avatar
gizmocuz
Posts: 2552
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post 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.
Quality outlives Quantity!
jopa
Posts: 2
Joined: Thursday 27 August 2015 3:37
Target OS: Windows
Domoticz version: 2.2762
Contact:

Re: MySensors - Gateway to Domoticz

Post 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.
flwvanes
Posts: 7
Joined: Saturday 07 March 2015 10:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: MySensors - Gateway to Domoticz

Post 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.
jopa
Posts: 2
Joined: Thursday 27 August 2015 3:37
Target OS: Windows
Domoticz version: 2.2762
Contact:

Re: MySensors - Gateway to Domoticz

Post 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.
maluko
Posts: 105
Joined: Sunday 02 February 2014 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Portugal
Contact:

Re: MySensors - Gateway to Domoticz

Post by maluko »

now a gateway can be done with esp8266

http://forum.mysensors.org/topic/1870/e ... -mysensors
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: MySensors - Gateway to Domoticz

Post 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?
I am not active on this forum anymore.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest