User Tools

Site Tools


add_chacon_di.o_remote_control_support_in_domoticz

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
add_chacon_di.o_remote_control_support_in_domoticz [2017/01/02 13:43]
sgripon
add_chacon_di.o_remote_control_support_in_domoticz [2017/01/02 19:35] (current)
sgripon [Add Chacon DI.O remote control support in Domoticz]
Line 1: Line 1:
 ====== Add Chacon DI.O remote control support in Domoticz ====== ====== Add Chacon DI.O remote control support in Domoticz ======
- 
-**Page under construction** 
- 
-I use a 433MHz emitter connected to an Arduino Uno board to integrate Chacon DI.O wireless power plugs into Domoticz. 
- 
  
 ~~socialite~~ ~~socialite~~
  
 +The idea is to use a 433MHz transmitter connected to an Arduino Uno board to integrate Chacon DI.O wireless power plugs into Domoticz. For an easy integration with Domoticz, we will use [[http://​www.mysensors.org|MySensors]] library. Thanks to MySensors, new devices will be automatically detected in Domoticz.
 ===== Needed hardware ===== ===== Needed hardware =====
  
-  * Arduino Uno R3 board (available on [[http://​www.amazon.fr/​dp/​B008GRTSV6/​ref=pe_386181_40444391_TE_item|Amazon]]) with USB cable {{ :​arduino.jpg?​200|}} +  * Arduino Uno R3 board (available on [[http://​www.amazon.fr/​dp/​B008GRTSV6/​ref=pe_386181_40444391_TE_item|Amazon]]) with USB cable 
-  * 433Mhz RF transmitter and receiver (available on [[http://​www.ebay.com/​itm/​433Mhz-RF-transmitter-and-receiver-kit-for-Arduino-ARM-WL-MCU-Raspberry-pi-new-/​370685120131?​ssPageName=ADME:​X:​AAQ:​US:​1123|eBay]]) {{ ::​rf433.jpg?​200|}} +  * 433Mhz RF transmitter and receiver (available on [[http://​www.ebay.com/​itm/​433Mhz-RF-transmitter-and-receiver-kit-for-Arduino-ARM-WL-MCU-Raspberry-pi-new-/​370685120131?​ssPageName=ADME:​X:​AAQ:​US:​1123|eBay]]) ​ 
-  * DI.O by Chacon power plugs with remote+  * [[http://​www.chacon.be/​fr/​domotique/​63-set-de-3-prises-telecommandees-dio-5411478547952.html|DI.O by Chacon]] power plugs with remote  
 + 
 +{{:​arduino.jpg?​200|}}{{::​rf433.jpg?​200|}}{{::​set-de-3-prises-telecommandees-dio.jpg?200|}}
  
 ===== Assembly ===== ===== Assembly =====
Line 24: Line 22:
 Then I suppose you have the Arduino connected with a USB cable to a PC running the Arduino development environment. Then I suppose you have the Arduino connected with a USB cable to a PC running the Arduino development environment.
  
-{{ :​arduino-rf433-gateway_bb.png?​300 |}}+{{ :​arduino-rf433-gateway_bb.png?​400 |}} 
 + 
 +===== Find your remote address ===== 
 + 
 +To find your remote address, use example sketch "​ShowReceivedCode"​ from "​NewRemoteReceiver"​ library. Then, push remote buttons and you should see address in serial monitor: 
 + 
 +  Addr 14566078 unit 1 off, period: 272us. 
 +  Addr 14566078 unit 2 off, period: 272us. 
 +  Addr 14566078 unit 2 on, period: 272us. 
 + 
 +This address must be used in the final sketch to simulate remote.
  
 ===== Arduino sketch ===== ===== Arduino sketch =====
 +
 +The Arduino program is really simple: it configures MySensors serial gateway, then it presents 3 lights switches and finally, manage commands received from Domoticz by transmitting the command through RF433.
  
 <file cpp HomeBox.ino>​ <file cpp HomeBox.ino>​
Line 56: Line 66:
 ///////////////////////////////////////////////////////////////////////////​ ///////////////////////////////////////////////////////////////////////////​
 // RF433 emitter // RF433 emitter
-#define DIMMER_ADDRESS 14566078+#define DIMMER_ADDRESS 14566078 ​// You should use here the address of your remote
 #define DIMMER_PIN 11 #define DIMMER_PIN 11
 #define DIMMER_PERIOD 260 #define DIMMER_PERIOD 260
Line 93: Line 103:
  
 </​file>​ </​file>​
 +
 +===== Domoticz =====
 +
 +In domoticz, add a hardware "​MySensors USB Gateway"​. Check that serial port is properly configured. Default one should be good in raspberry pi. Then, plug the arduino on the raspberry pi with USB. You should see the detected MySensors gateway on domoticz logs:
 +
 +  2017-01-02 19:​21:​02.562 ​ MySensors: Using serial port: /​dev/​ttyACM0
 +  2017-01-02 19:​21:​04.214 ​ MySensors: Gateway Ready...
 +  2017-01-02 19:​21:​04.293 ​ (MySensors Gateway USB) Lighting 2 (DI.O Prise 1)
 +  2017-01-02 19:​21:​04.300 ​ MySensors: Gateway Version: 2.1.0
 +  2017-01-02 19:​21:​04.299 ​ (MySensors Gateway USB) Lighting 2 (DI.O Prise 2)
 +  2017-01-02 19:​21:​04.303 ​ (MySensors Gateway USB) Lighting 2 (DI.O Prise 3)
 +  2017-01-02 19:​21:​08.695 ​ Incoming connection from: 192.168.0.43
 +
 +And switches are properly detected. You should be able to add them in the devices domoticz view:
 +
 +{{ ::​domoticz-di.o.png |}}
 +
 +**Share this page:**
 +
 +~~socialite~~
add_chacon_di.o_remote_control_support_in_domoticz.1483360993.txt.gz · Last modified: 2017/01/02 13:43 by sgripon