IR node



  • Hi
    I have connected my IR node to my serial gateway, however I have a wish that my controller(Opnehab on RPI) can send out NEC,xxxxxx to my gateway which then forwards it to the node. This way I do not need to recompile my node everytime I want to add a new IR command. Is it possible to achieve this? I had a glance at the IR code provided here:

    void incomingMessage(const MyMessage &message) {
      // We only expect one type of message from controller. But we better check anyway.
      if (message.type==V_LIGHT) {
         int incomingRelayStatus = message.getInt();
         if (incomingRelayStatus == 1) {
          irsend.send(NEC, 0x2AA22DD, 32); // Vol up yamaha ysp-900
         } else {
          irsend.send(NEC, 0x1EE1F807, 32); // Vol down yamaha ysp-900
         }
         // Start receiving ir again...
        irrecv.enableIRIn(); 
      }
    }
    

    How has other people implemented IR commands?


  • Mod

    There are several threads on IR in the forum. https://forum.mysensors.org/topic/2413/ir-record-and-playback-module Is probably a good starting point.



  • @mfalkvidd , Thanks for the tip:) I saw some other IR codes in the forum, but @BartE code seems the most promissing. Do you think I can modify his code to achieve what I want?

    On OpenHab which I use as controller I will then send something similiar to this then when I want(single button in OH): to turn on my TV, select correct input source on my stereo, select correct hdmi channel:

    12;7;1;1;32;NEC,0xa8bca
    12;7;1;1;32;NEC,0xa54bca
    12;7;1;1;32;NEC,0xa62ca
    


  • Has anyone done any testing with having your IR codes stored at the controller?

    A while back I had played with having my IR codes stored on the controller in a mapping file so I wouldn't have to recode my IR blaster each time I wanted a new IR code added.

    However, this was all done with my blaster being over network not RF.

    Has anyone done anything with this type of setup over the mysensors RF?


  • Plugin Developer


  • Mod

    @Jason-Brunk said:

    Has anyone done any testing with having your IR codes stored at the controller?

    Yes. See the link I posted above your post.



  • Thanks! The looks alot like what I did with my non-mysensors stuff. So that is perfect!!


Log in to reply
 

Suggested Topics

  • 1
  • 5
  • 3
  • 6
  • 3
  • 2

64
Online

11.4k
Users

11.1k
Topics

112.7k
Posts