IR remote control


  • Hero Member

    Hi,
    I noticed there is an IRlib in the library.
    Is there also a hardware build for this library to use?
    Thanks in advance.


  • Admin

    http://www.mysensors.org/store/#light

    IR Transmitter modules


  • Hero Member

    Yes, but no fun tutorial is what I meant.


  • Admin

    No, sorry 😄


  • Hero Member

    If I build one of these IR modules, will it appear on my VERA interface? or that's something still in development.


  • Admin

    I've created an very simple example here (for inspiration).

    https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/examples/IrSensor/IrSensor.ino

    It creates an light-switch (on vera) which can control sending of two different ir-codes on the Arduino side. Any received ir-code is sent back to vera and is saved in VAR_1 of the device. This can be used (together with PLEG) to trigger scenes or actions based on received ir-code.


  • Hero Member

    Thank you @hek
    I'll take a look at it.



  • @hek is still it works in 1.4.
    after pressing one of light-switch buttons (on vera) next received IR code leads what sending are looped
    and only next light-switch buttons press stops it loop

    Vera

    			50      03/15/15 13:36:06.195   luup_log:27: Arduino: Set variable: 10;1;1;1;2;1 <0x3073c680>
    			50      03/15/15 13:36:21.179   luup_log:27: Arduino: Sending: 10;1;1;1;2;0 <0x2afdc000>
    			50      03/15/15 13:36:21.216   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:21.310   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:37.509   luup_log:27: Arduino: Set variable: 10;1;1;0;24;0410a857 <0x3073c680>
    			50      03/15/15 13:36:37.783   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:37.787   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:37.791   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:37.795   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:37.877   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:37.965   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:38.054   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:38.140   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:38.226   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:38.312   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:38.409   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:38.485   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:38.573   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:38.659   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:38.800   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:38.832   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:38.920   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.009   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.094   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.181   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.267   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.353   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.439   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.523   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.614   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.700   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.786   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.872   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:39.979   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:40.783   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:40.788   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:40.793   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:40.798   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:40.802   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:40.810   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:40.814   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:40.818   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:40.832   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:40.836   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:40.913   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.001   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.087   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.176   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.262   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.348   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.434   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.521   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.607   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.693   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.785   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.867   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:41.954   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.034   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.126   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.212   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.301   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.387   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.475   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.561   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.647   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.734   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.820   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.908   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:42.994   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:43.081   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:43.167   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    			50      03/15/15 13:36:43.253   luup_log:27: Arduino: Set variable: 10;1;1;1;2;0 <0x3073c680>
    

    Arduino

    			read: 0-0-10 s=1,c=1,t=2,pt=0,l=1:1
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:1
    			read: 0-0-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			Decoded NEC(1): Value:410A857 (32 bits)
    			Raw samples(68): Gap:38608
    			  Head: m8750  s4450
    			0:m500 s600	1:m500 s600		 2:m450 s600	3:m500 s600		 
    			4:m450 s650	5:m450 s1700		 6:m500 s600	7:m450 s600		 
    			8:m500 s600	9:m450 s600		 10:m500 s600	11:m450 s1750		 
    			12:m450 s600	13:m500 s600		 14:m450 s600	15:m500 s600		 
    
    			16:m450 s1700	17:m500 s600		 18:m500 s1700	19:m500 s550		 
    			20:m500 s1700	21:m500 s600		 22:m450 s600	23:m500 s600		 
    			24:m450 s600	25:m500 s1700		 26:m500 s600	27:m450 s1700		 
    			28:m500 s600	29:m500 s1700		 30:m450 s1700	31:m500 s1700		 
    
    			32:m500
    			Extent=59300
    			Mark  min:450	 max:500
    			Space min:550	 max:1750
    
    			send: 10-10-0-0 s=1,c=1,t=24,pt=0,l=8,st=ok:0410a857
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0
    			send: 10-10-0-0 s=1,c=1,t=2,pt=0,l=1,st=ok:0
    			read: 0-1-10 s=1,c=1,t=2,pt=0,l=1:0

  • Admin

    @derrij

    Wow, that was a strange behaviour. I have no idea why it should do like this.



  • I would like to receive IR code on pilot and based on this "value" trigger scenes for light relays etc.
    when i use this example the only thing which i have on the monitor is

    send: 4-4-0-0 s=3,c=1,t=24,pt=0,l=8,sg=0,st=ok:00ff30cf
    Decoded NEC: Value:FFFFFFFF (0 bits)
    Raw samples(4): Gap:38550
    Head: m8700 s2300
    0:m450
    Extent=11450
    Mark min:450 max:450
    Space min:32767 max:0

    send: 4-4-0-0 s=3,c=1,t=24,pt=0,l=8,sg=0,st=ok:ffffffff
    Decoded NEC: Value:FF30CF (32 bits)
    Raw samples(68): Gap:23684
    Head: m8750 s4500
    0:m450 s650 1:m450 s650 2:m450 s650 3:m450 s650
    4:m450 s650 5:m450 s650 6:m450 s650 7:m450 s650
    8:m450 s1750 9:m500 s1700 10:m500 s1750 11:m450 s1750
    12:m450 s1750 13:m450 s1750 14:m450 s1750 15:m450 s1750

    16:m500 s600 17:m500 s600 18:m500 s1750 19:m450 s1750
    20:m450 s650 21:m450 s650 22:m450 s650 23:m450 s650
    24:m450 s1750 25:m450 s1750 26:m500 s600 27:m500 s600
    28:m500 s1700 29:m500 s1750 30:m450 s1750 31:m450 s1750

    32:m450
    Extent=66650
    Mark min:450 max:500
    Space min:600 max:1750

    on vera side there is one light sensor created only.

    how this actually should work like?



  • Is any of this code archived someplace? Any direction to get started? I want to shut off my tv via Vera Edge.


Log in to reply
 

386
Online

7.4k
Users

8.2k
Topics

88.9k
Posts

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.