Page 1 of 1
Light control with Domoticz
Posted: Tuesday 05 April 2016 0:40
by chippey5
Hello fellow D.I.Y.:ers!
I have some questions regarding wireless light control through domoticz and what is to be recommended. I watched MySensors tutorial and some other tutorials of having a Raspberry (though with other software than Domoticz) to do the same thing. What I want to do, is the easiest way of implenting this into Domoticz of course. I have following in mind:
(Server) Raspberry connected with an Arduino Mini Pro with a nRF24L01+ connected to it. (Don't mind the resistors and capacitors just yet)
(Control unit) Arduino Mini Pro with a nRF24L01+ and a relay to the Lamp power source.
My first question is:
Will this work? And if it does, how does the Arduino communicate with the Raspberry or will Domoticz take care of that?
I'm grateful for any help or suggestions, this is after all my first rodeo

Re: Light control with Domoticz
Posted: Tuesday 05 April 2016 16:14
by superkris
I'm not exactly sure what the purpose of your drawing is, but if you want to turn on or turn of a light with domotics and mysensors it is very simple. Everything is on the mysensors website.
Just build yourself a serial gateway with a Arduino Nano. You can connect it trough USB to your raspberry. All the instructions, and the arduino sketch are available on the mysensors website. There is even a step by step video of it. The relay module is also available as a standard sketch on the mysensors website. Just look under "build".
Both work straight form the standard sketches in domoticsz. Instalation is very simple.
Re: Light control with Domoticz
Posted: Tuesday 05 April 2016 17:37
by chippey5
Hello superkris! Thanks for your answer, I will look further into their website

Re: Light control with Domoticz
Posted: Tuesday 05 April 2016 17:48
by chippey5
It was petewills video that inspired the drawing, I wasn't able to find it yesterday but there it is!

Okay, now I understand everything except the part for the Arduino to communicate with the Raspberry (Domotciz). I have tinkered with Arduinos before, and as far as I understand, It has to send some kind of signal to the raspberry. Thats the part I'm unsure about

Re: Light control with Domoticz
Posted: Tuesday 05 April 2016 19:52
by superkris
You connect it trough the USB cable, so you have to use a Arduino with USB. I picked a Nano.
Edit: off course you can also build a ethernet gateway, but serial over USB is much more simple, smaller, and cheaper.
I also added a extra 3V psu, but the 3v from the arduino should be fine.

- 414745.jpg (350.69 KiB) Viewed 3049 times
Re: Light control with Domoticz
Posted: Tuesday 05 April 2016 20:27
by chippey5
Beatiful (and comic) build!

Yes, I am going to use the Arduino mini pro 3v and a 3v-230v relay as well as the transceiver. But my actual question is, does the MySensors sketch to the arduino take care of transmitting and Domoticz on the raspberry of interpreting once something is being transmitted from the Arduino?
Re: Light control with Domoticz
Posted: Tuesday 05 April 2016 21:09
by superkris
Thanks! I'm sure there must be some way to hook up a PRO MINI, but you should use a ARDUINO WITH USB. like a nano or Uno. You can connect it you your raspberry trough USB. You can add the mysensor USB gateway in domotics. Its fully supported hardware.
Edit: Oh, and personaly i would not use a 3V relay directly on the arduino output.
edit2: Oh boy... that really is not how to connect a relay at all.
Just use the standard build on the mysensor website and use the prebuild aliexpress/ebay modules, or i'm afraid you will not be happy with the results.
Re: Light control with Domoticz
Posted: Tuesday 05 April 2016 22:47
by chippey5
Definitely, theres an adapter like this one:
http://www.ebay.com/itm/320907184616?rmvSB=true, suited to connect/power the Mini Pro with USB. If you don't mind me asking: Say, if I have 2 or more wireless temperature sensors for instance, would the Gateway Arduino be able to handle all of them simultaniously with MySensors sketch?
Btw, the sketch is definitely not the final version, I will buy the recommended relays, with a fuse of course

Re: Light control with Domoticz
Posted: Tuesday 05 April 2016 23:01
by superkris
I'm not sure those adapters give the same result. Anway, a nano clone can be bought for under 2,- so dont bother using anything else than a nano, uno, or mega if you are going to build a serial gateway.
I understand most of the mysensor stuff seems complicated if your new to it. I had the same thing about 2 months ago. Just read the guide on the mysensors website. When you have read all the pages a lot will be clear.
http://www.mysensors.org/about/
Re: Light control with Domoticz
Posted: Tuesday 05 April 2016 23:04
by chippey5
Alright, was thinking about using a Uno as a gateway and Minis for nodes anyway after seeing complications. Once again, thanks a lot!

Re: Light control with Domoticz
Posted: Tuesday 05 April 2016 23:12
by chippey5
The reason why I was confused, is because the raspberry is (that I use) uses Linux (An OS) and the Arduino is just programmable (No OS). I didn't quite understand that MySensors software was controller-ready, I just presumed I had to add some specific lines of code. I'm just glad I was wrong
