Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Building an IR Blaster

Building an IR Blaster

Scheduled Pinned Locked Moved My Project
60 Posts 10 Posters 36.7k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    steets250
    wrote on last edited by
    #31

    Hek - Thanks for the advice with the sendProntoCode! I will work on it today.

    Bulldoglowell and Hek - I was just testing to see if the code would go through. I plan to have the Vera send out a number that represents a larger code stored in the Arduino.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      steets250
      wrote on last edited by
      #32

      I changed the files, and am now testing it out. Log says:

      08 06/06/14 10:25:29.361 JobHandler_LuaUPnP::HandleActionRequest argument ProntoCode=0000 0071 0000 001A 0080 0080 0020 0020 0020 0020 0020 0020 0020 0060 0020 0020 0020 0060 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0060 0020 0060 0020 0060 0020 0060 0020 0020 0020 0060 0020 0020 0020 0060 0020 0060 0020 0060 0020 0060 0020 0060 0020 0020 0020 04DF <0x2ca29680>
      02 06/06/14 10:25:29.362 Device_LuaUPnP::HandleActionRequest 38 none of the 1 implementations handled it <0x2ca29680>
      01 06/06/14 10:25:29.551 ZZZ-A2 83 <0x2ca29680>
      01 06/06/14 10:25:29.551 ZZZ-1 83 <0x2ca29680>
      01 06/06/14 10:25:29.551 ZZZ-1b 0xe1b888 <0x2ca29680>
      08 06/06/14 10:25:29.552 JobHandler_LuaUPnP::HandleActionRequest device: 38 service: urn:micasaverde-com:serviceId:IrTransmitter1 action: SendProntoCode <0x2ca29680>

      Last line looks promising. I guess I will try a shorter code, and see what I get.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        steets250
        wrote on last edited by
        #33

        Still nothing... I changed the some of the TV's IR codes (channel number buttons 1-6) to single digit numbers so that it would not be too big for serial. I case anyone wants to give it a shot, I attached the modified files.

        I_Codeset_2.xml
        D_Codeset_2.xml
        I_Arduino1.xml
        L_Arduino.lua
        S_IR_Serial.ino

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #34

          Not sure if it matters but shouldn't deviceType be "urn:schemas-micasaverde-com:device:IrDevice:1" ?

          IR = 		  {20, "urn:schemas-micasaverde-com:device:IrDevice:1", "D_IrTransmitter1.xml", "IR "}, 
          

          And what is the difference between "D_IrDevice1.xml" and "D_IrTransmitter1.xml"? (source: http://wiki.micasaverde.com/index.php/Luup_UPNP_Files)

          1 Reply Last reply
          0
          • S Offline
            S Offline
            steets250
            wrote on last edited by
            #35

            I believe that Ir device is the tV or DVD that is created , and transmittersend out the ir codes.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              steets250
              wrote on last edited by steets250
              #36

              Might this be the problem?

              Screen Shot 2014-06-06 at 5.35.09 PM.png

              The IR transmitter has no implementation file.

              How do I get MySensors to create a device with I_IrTransmitter1.xml?

              1 Reply Last reply
              0
              • hekH Offline
                hekH Offline
                hek
                Admin
                wrote on last edited by
                #37

                If you create a IR device as a "child" to Arduino you must handle all implementation yourself (like we just did for sendprotocode in the Arduino plugin).

                I would suggest you create a thread or PM guessed on the micsa-forum who has good experience with the IR-device and is a really nice chap.

                1 Reply Last reply
                0
                • S steets250

                  IMPORTANT: After forum data loss deleting half of this topic I recreated a newer and updated topic intro. If you haven't read this topic before, I recommend starting here: http://forum.mysensors.org/topic/146/building-an-ir-blaster/50

                  After discovering that I could create an IR device using MySensors, I wondered if I would use this as a substitute to SQ Blaster, iTACH, or USB-UIRT.

                  I tossed together an Arduino Nano, the NRF24L01, and an IR LED. I then created a simple program based to see what I could do with the IR device, and if I could get the Vera to use the Arduino as an IR transmitter.

                  Here is the program: I got rid of the # because it made the text a weird size in the forum.

                  include <Sensor.h>
                  include <SPI.h>
                  include <EEPROM.h>
                  include <RF24.h>

                  define ID 1
                  Sensor gw;

                  void setup()
                  {
                  gw.begin();
                  gw.sendSensorPresentation(ID, S_IR);
                  }

                  void loop()
                  {
                  delay(10000); // Wait 10 seconds
                  }

                  After adding the Arduino to the gateway, I encountered a problem. As soon as I add the IR device to Vera, the whole MySensors plugin glitches out, preventing all of my sensors from working. The first picture shows what the IR device looks like right after I add it, and then 20 seconds later, the second picture shows what happens until I delete the IR device from Vera.

                  Screen Shot 2014-05-31 at 6.05.25 PM.png

                  Screen Shot 2014-05-31 at 6.05.41 PM.png

                  Does anybody know what I am doing wrong? Thanks for your help!!

                  Steven

                  DvbitD Offline
                  DvbitD Offline
                  Dvbit
                  wrote on last edited by
                  #38

                  @steets250 Hi there
                  I did not notice this interesting topic til today.

                  This might help:

                  http://blog.univers-domotique.com/2013/10/plugin-vera-arduir/

                  Give it a google translate ;-)

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    steets250
                    wrote on last edited by
                    #39

                    @Dvbit said:

                    http://blog.univers-domotique.com/2013/10/plugin-vera-arduir/

                    Thanks for the suggestion, however, the project talked about is going the wrong way. I want signals from Vera to the transmitter, not transmitter to Vera.

                    I got an IR receiver and programmed my codes into an Arduino program. For anyone wondering, I had no storage issues (previously talked about).I haven't given up on this yet (saving $200 is a pretty good motivation)! Still trying to find out how to get Vera to send a message to Vera with Vera's IR remote UI. Seeing as how I have been trying with absolutely no luck for the past few days, I might have to make me own remote UI.

                    I haven't contacted guessed yet but I will soon, still playing around with it myself.

                    Has anyone tried this yet?? Instructions above.

                    1 Reply Last reply
                    0
                    • DvbitD Offline
                      DvbitD Offline
                      Dvbit
                      wrote on last edited by
                      #40

                      Ok. Please note that the guy in the post above talks about bidirectional signal "easily doable" in his post.
                      You may want to ask him ;-)
                      Tx for your wrk

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        steets250
                        wrote on last edited by
                        #41

                        @Dvbit I didn't see anything talking about a bidirectional signal. Where did you see that? I am going to check out what it says as well as the plugin files to see what I can find.

                        FWI: The IR receiver I ordered from RadioShack came, so I am able to program in the codes. It was mentioned earlier that the codes would take up a lot of space on the Arduino, but using the IRRemote library, receiving a remote signal gives me a hex that will work with some of my devices, so I don't see a storage issue. I have to remotes set up so far.

                        BulldogLowellB DvbitD 2 Replies Last reply
                        0
                        • S steets250

                          @Dvbit I didn't see anything talking about a bidirectional signal. Where did you see that? I am going to check out what it says as well as the plugin files to see what I can find.

                          FWI: The IR receiver I ordered from RadioShack came, so I am able to program in the codes. It was mentioned earlier that the codes would take up a lot of space on the Arduino, but using the IRRemote library, receiving a remote signal gives me a hex that will work with some of my devices, so I don't see a storage issue. I have to remotes set up so far.

                          BulldogLowellB Offline
                          BulldogLowellB Offline
                          BulldogLowell
                          Contest Winner
                          wrote on last edited by
                          #42

                          @steets250

                          If you need space, you could always attach external memory (SD card perhaps) .

                          Compressing the codes would be nice.

                          Cannot wait until you have this worked out!

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            steets250
                            wrote on last edited by
                            #43

                            So I got the Arduino side of it done! Did I make any mistakes?

                            MySensors_IR.ino

                            BulldogLowellB 1 Reply Last reply
                            0
                            • S steets250

                              So I got the Arduino side of it done! Did I make any mistakes?

                              MySensors_IR.ino

                              BulldogLowellB Offline
                              BulldogLowellB Offline
                              BulldogLowell
                              Contest Winner
                              wrote on last edited by
                              #44

                              @steets250 said:

                              So I got the Arduino side of it done! Did I make any mistakes?

                              MySensors_IR.ino

                              the codes all do what they need to?

                              interesting that the length of the codes vary so much

                              TV 1 = B10000

                              TV 0 = B101110011101001

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                steets250
                                wrote on last edited by
                                #45

                                I was quite surprised when I saw that. All of the codes work properly when used with the send sony command. On my second remote, it uses the NEC protocol, and has a longer code. Another remote I tested was coming in as only raw code, so if someone tried to use remotes with only raw code it could be pretty space consuming.

                                The sd card was a good idea! The program could also possible use multiple ir LEDs in different locations to get the signal to multiple devices, which is when the sd card might be needed.

                                I'm now checking over what changes hek suggested earlier, and comparing it with some other mysensors devices. It seems like the vera is not sending a message through the send pronto code function that is described below.

                                @hek said:

                                I think you have to create your own implementation of SendProntoCode.

                                You must take care of and handle all actions in D_IrTransmitter1.xml. Edit the I_Arduino.xml where you will find the actions defined.

                                <action>
                                    <serviceId>urn:micasaverde-com:serviceId:IrTransmitter1</serviceId>
                                   	<name>SendProntoCode</name>
                                   	<run>if (p ~= nil) then p.sendProntoCode(lul_device, lul_settings.ProntoCode) end</run>
                                 </action> 
                                

                                And then implement sendProntoCode in L_Arduino.lua which sends the actual code using sendCommand to gateway for further processing.

                                function sendProntoCode(device, prontoCode)
                                  sendCommand(luup.devices[device].id,"IR_SEND",prontoCode)
                                end
                                
                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  steets250
                                  wrote on last edited by
                                  #46

                                  Trying to change the code that Vera transmits, I discover this: :angry::angry::angry::angry::angry:
                                  Screen Shot 2014-06-12 at 2.51.42 PM.png
                                  Right after selecting it here:
                                  upload-2ae92c9a-dafe-4b38-bbed-6cbdcb1f6028.png

                                  I'm not sure why Vera refuses to accept the Arduino as an IR transmitter. I will give the SQ blaster plugin another look at to see what they have.

                                  BulldogLowellB 1 Reply Last reply
                                  0
                                  • S steets250

                                    @Dvbit I didn't see anything talking about a bidirectional signal. Where did you see that? I am going to check out what it says as well as the plugin files to see what I can find.

                                    FWI: The IR receiver I ordered from RadioShack came, so I am able to program in the codes. It was mentioned earlier that the codes would take up a lot of space on the Arduino, but using the IRRemote library, receiving a remote signal gives me a hex that will work with some of my devices, so I don't see a storage issue. I have to remotes set up so far.

                                    DvbitD Offline
                                    DvbitD Offline
                                    Dvbit
                                    wrote on last edited by
                                    #47

                                    @steets250

                                    La librairie IRremote permet la reception et l’émission de codes IR (Infrarouges) selon différents protocoles, la rendant compatible avec la plupart des télécommandes IR, et des appareils télécommandés par IR disponibles sur le marché.

                                    Dans ce plugin, seule la partie réception de la librairie est utilisée (rien n’empêche la réalisation d’une interface d’émission, sauf que je n’en ai pas l’usage J ).
                                    Irrlib supports input and output...then
                                    The last sentence is "nothing blocks from developing an output interface but I do not need it"

                                    Cheers

                                    hekH 1 Reply Last reply
                                    0
                                    • DvbitD Dvbit

                                      @steets250

                                      La librairie IRremote permet la reception et l’émission de codes IR (Infrarouges) selon différents protocoles, la rendant compatible avec la plupart des télécommandes IR, et des appareils télécommandés par IR disponibles sur le marché.

                                      Dans ce plugin, seule la partie réception de la librairie est utilisée (rien n’empêche la réalisation d’une interface d’émission, sauf que je n’en ai pas l’usage J ).
                                      Irrlib supports input and output...then
                                      The last sentence is "nothing blocks from developing an output interface but I do not need it"

                                      Cheers

                                      hekH Offline
                                      hekH Offline
                                      hek
                                      Admin
                                      wrote on last edited by
                                      #48

                                      @Dvbit
                                      The problem isn't really doing bi-directional sending of ir-codes between vera/arduino. The problem is getting a dynamic presentation on vera-side up and running. What @steets250 is trying to do is getting the built-in ir device working.. which probably is the most flexible solution.

                                      Cheerio

                                      1 Reply Last reply
                                      0
                                      • S steets250

                                        Trying to change the code that Vera transmits, I discover this: :angry::angry::angry::angry::angry:
                                        Screen Shot 2014-06-12 at 2.51.42 PM.png
                                        Right after selecting it here:
                                        upload-2ae92c9a-dafe-4b38-bbed-6cbdcb1f6028.png

                                        I'm not sure why Vera refuses to accept the Arduino as an IR transmitter. I will give the SQ blaster plugin another look at to see what they have.

                                        BulldogLowellB Offline
                                        BulldogLowellB Offline
                                        BulldogLowell
                                        Contest Winner
                                        wrote on last edited by
                                        #49

                                        @steets250 said:

                                        Trying to change the code that Vera transmits, I discover this: :angry::angry::angry::angry::angry:
                                        Screen Shot 2014-06-12 at 2.51.42 PM.png
                                        Right after selecting it here:
                                        upload-2ae92c9a-dafe-4b38-bbed-6cbdcb1f6028.png

                                        I'm not sure why Vera refuses to accept the Arduino as an IR transmitter. I will give the SQ blaster plugin another look at to see what they have.

                                        you could try to look at the TiVo plugin, too.

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          steets250
                                          wrote on last edited by
                                          #50

                                          So about half of this topic got cut off. To catch people up: The main goal of this topic is to create an IR transmitter device in Vera that can be used to send IR codes to a TV, DVD, DVR, etc. The transmitter is easy to assemble by attaching an IR LED and IR receiver (for learning codes) to an Arduino. The cost of this is about $15. Normal IR blasters range from $50 (USB UIRT - not wireless) to over $100 (Global Cache WF2IR - wireless). Seeing that I could save $85, a MySensors IR blaster looked great.

                                          When trying to connect the IR blaster to Vera, and get it to transmit, I encountered some problems. The MySensors program currently does not support IR blasters, so I tried to edit the code and make it work. After looking at the SQ Blaster plugin, it gave me an idea of how to get the IR blaster to work. I edited lump files in an attempt to create an IR blaster device. I have so far been able to have Vera create an IR blaster device that shows up on the devices page. upload-064ef888-f02c-4f43-9adc-12910d5b9bee.png
                                          However, when trying to use it to create an IR device (TV) I can go through the initial setupupload-2ae92c9a-dafe-4b38-bbed-6cbdcb1f6028.png
                                          But then click on any of the remote's buttons gets me this error message.
                                          upload-e1cbb9e9-bc57-4a29-89cc-7875680a7d46.png
                                          I have been stuck with this for a while now. Also, the Vera appears to be sending the IR command:
                                          08 06/06/14 10:25:29.361 JobHandler_LuaUPnP::HandleActionRequest argument ProntoCode=0000 0071 0000 001A 0080 0080 0020 0020 0020 0020 0020 0020 0020 0060 0020 0020 0020 0060 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0060 0020 0060 0020 0060 0020 0060 0020 0020 0020 0060 0020 0020 0020 0060 0020 0060 0020 0060 0020 0060 0020 0060 0020 0020 0020 04DF <0x2ca29680>
                                          02 06/06/14 10:25:29.362 Device_LuaUPnP::HandleActionRequest 38 none of the 1 implementations handled it <0x2ca29680>
                                          01 06/06/14 10:25:29.551 zzz-A2 83 <0x2ca29680>
                                          01 06/06/14 10:25:29.551 zzz-1 83 <0x2ca29680>
                                          01 06/06/14 10:25:29.551 zzz-1b 0xe1b888 <0x2ca29680>
                                          08 06/06/14 10:25:29.552 JobHandler_LuaUPnP::HandleActionRequest device: 38 service: urn:micasaverde-com:serviceId:IrTransmitter1 action: SendProntoCode <0x2ca29680>
                                          But the IR code never arrives at the Arduino. I am currently trying to fix this problem, and was wondering if anyone could help. Hek suggested I send guessed (from Vera forums) a message which I will do.

                                          If any one wants to give this a try, here are the files to upload and test: Please let me know if you see something wrong with the code!

                                          L_Arduino.lua
                                          Which contains:
                                          function sendProntoCode(prontoCode, device)
                                          sendCommand(luup.devices[device].id,"IR_SEND",prontoCode)
                                          end

                                          I_Arduino1.xml
                                          Which contains:
                                          <action>
                                          <serviceId>urn:micasaverde-com:serviceId:IrTransmitter1</serviceId>
                                          <name>SendProntoCode</name>
                                          <run>sendProntoCode(lul_settings.ProntoCode, lul_device)</run>
                                          </action>

                                          D_Arduino1.xml
                                          Which contains:
                                          <service>
                                          <serviceType>urn:schemas-micasaverde-com:service:IrTransmitter:1</serviceType>
                                          <serviceId>urn:micasaverde-com:serviceId:IrTransmitter1</serviceId>
                                          <SCPDURL>S_IrTransmitter1.xml</SCPDURL>
                                          </service>

                                          MySensors_IR.ino
                                          Which creates the IR device (S_IR) and then serial prints whatever message it receives.

                                          Quick side note:There are two IR codes that Vera might be sending right now. A short code, 0x2ca29680 (in Vera log), or 0000 0071 0000 001A 0080 0080 0020 0020 0020 0020 0020 0020 0020 0060 0020 0020 0020 0060 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0020 0060 0020 0060 0020 0060 0020 0060 0020 0020 0020 0060 0020 0020 0020 0060 0020 0060 0020 0060 0020 0060 0020 0060 0020 0020 0020 04DF (also in Vera log). In the event that Vera is sending the longer code which is too big to send over the air, my solution to that was to have Vera send a single digit representing a longer IR code to send, for example 1 = power button, 2 = volume up, 3 = volume down, etc. The single digit method is already in the Arduino program so that I can change the IR codes on the Arduino easily without needing to change them in Vera.

                                          Let me know if you have any questions. Thanks for your help!

                                          Z 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          31

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular