Raspberry pi MySensors gateway on SPI + Domoticz ?

Moderator: leecollings

Post Reply
User avatar
Redguy
Posts: 33
Joined: Saturday 19 November 2016 21:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Maassluis
Contact:

Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by Redguy »

Just started using domoticz on a raspberry pi 3 and would like to add a mysensors network to it.
The mysensors site shows multiple options to do this : https://www.mysensors.org/build/raspberry

Personally, I like the option of directly connecting an NRF module to the pi through 1 of its SPI interfaces + 3 status LEDs onto some free GPIO pins.

I cant find the page anymore, but I remember reading that Domiticz is able to communicate with a mysensors gateway either through an ethernet based gateway or a serial gateway (using an Arduino through it's usb based serial port)..

Is this true ? Or does it work using an NRF module connected directly to the PI's SPI interface as well ?
trixwood

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by trixwood »

If you install the raspberry pi mysensors you can choose between setting it up as a serial gateway or lan gateway... I choose lan (port 5003)

I run this:

https://github.com/marceloaqno/MySensors/

(the mysensors official should work also..., but this is the guy who ported it)

using

https://forum.mysensors.org/topic/2759/ ... estions/25

which is basically

Code: Select all

git clone https://github.com/marceloaqno/MySensors.git
cd MySensors
./configure --help
make
sudo make install
wired with

https://forum.mysensors.org/topic/2437/ ... ensors-1-x

then I bought this:

https://oshpark.com/shared_projects/183xUT60

and to reduce the antenna... used this

https://nl.aliexpress.com/item/2Pcs-2-4 ... 37354.html

all fits nicely in the pi...
trixwood

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by trixwood »

This a photo of an old test version, with the cheapest radio I had (80 cents)...
and I moved the ground and power pins... to make room for a rtc...
IMG_0189.jpg
IMG_0189.jpg (222.2 KiB) Viewed 9020 times
also note that a rtc which you see hanging on the left side costs between 80 cents and 3 euro (make sure battery is included)....
if you search on aliexpress using "rtc raspberry pi" you will find rtc with ready made shield for the pi... (note: not like on this picture, it has no shield...)
trixwood

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by trixwood »

You could also build a separate gateway and plug it in with usb, if that what you mean with other options to connect... but why? Essentially you only need the radio chip... (which cost less the a euro) and plug it in..
User avatar
Redguy
Posts: 33
Joined: Saturday 19 November 2016 21:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Maassluis
Contact:

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by Redguy »

About the rtc : thanks for the tip!

I have ds2331 hooked up to the i2c bus as well, works great, fully supported in the pi overlays so it took seconds to get it working.. Thinking about hooking up and old usb GPS to setup my own stratum 0 ntp time server :-)

Bit overkill but hey....
Last edited by Redguy on Sunday 20 November 2016 8:38, edited 1 time in total.
User avatar
Redguy
Posts: 33
Joined: Saturday 19 November 2016 21:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Maassluis
Contact:

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by Redguy »

That is my point.. I would like to use the radio module(s) hooked up directly to the SPI of my Rpi instead of using the serial gateway with an arduino plugged into usb.

However, i got the impression from the wiki/manual that this is not supported in domoticz???

It states that only the serial and networked mysensors gateway options are supported..
User avatar
gizmocuz
Posts: 2546
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by gizmocuz »

As far as i can read in the forum link above, you can compile it as an ethernet gateway, and use the default domoticz mysensor lan option
Quality outlives Quantity!
trixwood

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by trixwood »

Yes directly on the pins. The mysensors raspberry pi software creates a lan interface (or serial if you config that), you can use that in domoticz... works great. Just plug the radio on the right pins, install the software... (configure security if you use that) and go. Took me about 5 minutes to set up...

Did not though about the ntp server and a gsp chip :-) Look into that...
User avatar
Redguy
Posts: 33
Joined: Saturday 19 November 2016 21:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Maassluis
Contact:

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by Redguy »

you can use a basic USB GPS.. But the best solution is to get a gps module that has a PPS output (pulse per second).. aliexpress sells gps modules with a serial interface + pps output for around 8 euros.
wergeld
Posts: 14
Joined: Thursday 31 December 2015 23:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by wergeld »

I have compiled this as a serial gateway with my radio directly attached to the GPIO pins (via a daughter board). Works great. Domoticz picks it up when you got Settings - Hardware. It is about the easiest setup ever.
piokuc

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by piokuc »

No good that Gateway MySensors on RPI now not support radio RFM69HW and RS485. Only support NRF24L01.
trixwood

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by trixwood »

Did you check out the new official version?

RFM69 and NRF24L01+

https://www.mysensors.org/build/raspberry

Haven't checked if the new RFM95 or RS485 is supported. But this is the wrong forum for that :-)
piokuc

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by piokuc »

Obs: RFM69 is not yet supported.
trixwood

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by trixwood »

That I didn't notice... well if they put it on the page with this notice, they probably working on it :-) You probably could find out more or ask on their forum.

As a side note with the new release: I am very excited about the new lora RFM95 radio support :-)
trixwood

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by trixwood »

I am just updating, and I notice that when running

./configure --help

Looks like RS485 is supported, at least it looking at the various options you can choose for RS485.
piokuc

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by piokuc »

Ok but how connect to Raspberry ? For what pin...?
trixwood

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?

Post by trixwood »

I am guessing, buy a USB-> serial port RS485, or google for a rapsberry gpio rs485 guide...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest