Page 1 of 1
Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Saturday 19 November 2016 21:56
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 ?
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Saturday 19 November 2016 22:46
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...
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Saturday 19 November 2016 22:59
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 (222.2 KiB) Viewed 9023 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...)
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Saturday 19 November 2016 23:27
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..
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Sunday 20 November 2016 8:31
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....
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Sunday 20 November 2016 8:36
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..
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Sunday 20 November 2016 9:42
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
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Sunday 20 November 2016 12:23
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...
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Wednesday 23 November 2016 20:26
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.
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Thursday 01 December 2016 17:43
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.
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Tuesday 03 January 2017 23:14
by piokuc
No good that Gateway MySensors on RPI now not support radio RFM69HW and RS485. Only support NRF24L01.
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Tuesday 03 January 2017 23:48
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

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Tuesday 03 January 2017 23:51
by piokuc
Obs: RFM69 is not yet supported.
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Wednesday 04 January 2017 0:04
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

Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Wednesday 04 January 2017 0:43
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.
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Wednesday 04 January 2017 23:51
by piokuc
Ok but how connect to Raspberry ? For what pin...?
Re: Raspberry pi MySensors gateway on SPI + Domoticz ?
Posted: Thursday 05 January 2017 2:45
by trixwood
I am guessing, buy a USB-> serial port RS485, or google for a rapsberry gpio rs485 guide...