Announcement

Collapse
No announcement yet.

Network IR Server using NodeMCU and Arduino

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Network IR Server using NodeMCU and Arduino

    I currently use a few Global Cache Flex units and my house which work perfectly with the UltraGCIR3 plugin but I needed a couple more and decided to roll my own. I have seen lots of examples of ESP8266 boards or bigger Arduino boards used, I currently use a couple UNO boards with switches attached built into our nightstands using the Arduino plugin but that is the extent of my "Maker" knowledge using those boards. Amazon delivered a couple NodeMCU boards Saturday afternoon but I had not ordered any other parts yet, into the junk box I went of coarse. I pulled an old Directv remote and a RGB light strip controller that had an IR receiver in it and stripped it out then pulled the IR diodes out of the remote.
    I played around all day Sunday trying to figure this out with not much luck until I found this project https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster and I was up and running in 15 minutes.
    I downloaded the IRController Arduino project file, made sure I had the correct libraries installed and just sent it straight to the NodeMCU over USB from the Arduino software. It was supposed to boot in AP mode but connected straight to my WIFI without any changes, I did already have projects running on it from my testing various things that had my SSID and password along with an IP address assigned to its MAC, so I assume that stayed somehow. Anyway once running I hit the address in Chrome and was sending IR signals to the NodeMCU with all the info displayed in a web page, click the code you just sent to it and it opens a page with examples of how to resend that code back out through the emitter. Now back to HS3 and I just created an event that sends a web request to fire the IR to the TV. I have never set up an IR system this easily and have used probably every remote setup you can name, for $8 and an emitter I took from an old Directv remote, I have a network IR server.

    John
    Attached Files

  • #2
    I have had a couple running well over a week and they have been rock solid, really simple and clean. I put them in a couple small cases and added power and output plugs as well, very happy with this.
    Added a 9 volt battery for some scale

    John
    Attached Files

    Comment


    • #3
      Hi,
      Just started implementing this. I must say that it is great.
      Quick question:
      I have the ESP8266 set up and receiving codes. Good there.
      I am not particularly keen on setting up an account on
      https://tehpsyc.pythonanywhere.com/. This makes me then use the Alexa skill to implement this. Is this what you did, or did you eliminate that requirement in the sketch, so that you could directly send the command from homeseer to the ESP8255 website.
      If so, can you tell me which parts to delete in the sketch. May save me some trial and error and reflashing.
      Thanks
      Bruce

      Comment


      • #4
        I didn't set up the alexa side of this, I am only sending commands straight from HS3 to each Nodemcu. All my commands are set up as events so I just add them to other events and also call them from alexa using virtual devices and routines.
        Hope this helps
        John

        Comment


        • #5
          Hi,
          Thanks for the reply. That is exactly what I want to do. Only use my local network and send commands through Homeseer. But the sketch on https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster has it set up where it will only accept requests for transmitting IR codes that come from Alexa. You have to use an Amazon endpoint and ID.
          I assume you didn't use that sketch to upload to your ESP8266. Did you modify it so that this wasn't necessary or did you use another sketch?
          If you used a different sketch, would it be available for me to look at.
          Thanks
          Bruce

          Comment


          • #6
            Bruce, I believe the sketch I used was right before he added the Alexa support, I remember it was still testing, so I never messed with it. I will post back later today, I can copy mine for you to test out, when I'm back.

            John

            Comment


            • #7
              Hi,
              I was wondering about that. I would appreciate looking at that sketch.
              Thanks,
              Bruce

              Comment


              • #8
                Well, I got it to work. I basically cleaned the sketch of any references to Amazon or hashes for encryption as a requirement. It still requires a passcode, which you need to create when you first run the sketch on the ESP, but that is locally stored on it. This is required for sending the IR code in the http command. I don't see this in your pictures of your events, but not a big deal.
                Now just need to set up the events
                Thanks for this idea
                Bruce

                Comment


                • #9
                  Found this post from last year. I'm embarking on similar path. My need is to send HS3 event IR codes to A/V gear. I'm an Arduino newbie. Just got 3 ESP8266 boards, IR RX/TX LEDs and so far have IDE set up and was able to get a test sketch uploaded to blink the board LED, so it's talking. Now it's time for the breadboarding, hunt, peck, and swear phase.

                  Is 'https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster still the best Arduino code out there to do this? I don't want any of the Alexa Echo based stuff. I just want to send IR command from HS3 events to the WiFi connected Arduino, and blast the IR codes to the A/V gear. Seems like there's no harm leaving the Alexa code in but not using, and just use the HS3 script command and the "&hs.GetURL(..." string format shown above?

                  Comment


                  • #10
                    Hi Klafollette,
                    Actually my above post was premature, in that I could get it to recognize and report out IR codes, so receiving the codes, but I could never
                    get it to send them. I moved on to other things.
                    I don't know if John (lj502) still has his original sketch, as that might be helpful.
                    I need to revisit my sketch which I modified - probably caused a problem
                    I would be interested if you find out anything
                    Bruce

                    Comment


                    • #11
                      Well, good thing Arduinos come in packs like gum, cuz I just let the magic smoke out of the first one. Doing autopsy now. I was breadboarding it out with a high-power IR LED using 2N2222 to drive it, and thought I could power the NodeMCU with 5VDC, and it had a built-in regulator for 3.3VDC? Something went wrong.

                      Comment


                      • #12
                        I have done IR recognition with ESP8266 and have seen several ptoject that also do IR transmit. I understand that the IR needs to be modulated at a higher carrier frequency to get range and sunlight immunity. There was a video I saw by Andreas Spies that I thin was called Babel fish which was an IR translator. He usually has very practical videos. If you need a partner in your quest then let me know.

                        Comment


                        • #13
                          I was trying to work through compiling this code https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster and after hours still can't get it compiled without syntax/library errors. Given I don't want Alexa integration, I am on hunt for code that is perhaps simpler. This one looks like a possiblitity - https://github.com/axelerator/esp8266_ir_blaster. I do recall stumbling onto the video about that Babel Fish one, but passed it by for some reason, not thinking it was a good fit. I'll take another look at that.

                          Comment


                          • #14
                            I usually use Tasmota with ESP8266 (or ESP32). It has the IR libraries preinstalled. You are probably looking from something more like https://learn.adafruit.com/building-...board?view=all which is a good step by step discussion. Note that you indicated you have IR LEDs. I think you will want an IR receiver such as TSOP383 to demodulate the IR that was modulated by the sender to increase range and reduce interference.

                            Comment


                            • #15
                              Michael
                              So I am trying to understand. And this might explain my problem above. You can receive IR codes with the esp8266 (which is what I was using), but cannot send them. Correct? I could receive signals, but never get it to send. It seems that the OP (John lj502) could do both on an esp8266 with the above code. He had a different sketch than the one on GIT, but I never saw that one. If tasmota has the built in libraries, it can still only receive? I can try the tasmota softwear. Which version of tasmota? and how do you set up the module, ie what settings on the tasmota webinterface? Is it in your mcsMQTT manual, as I have that and will look again.
                              What about using the esp32? Still use a standard tasmota file? Will it send IR signals? That is really what I am looking to do.

                              Thanks, guess I will do some more work
                              Bruce

                              I like that it can send commands over ethernet with http commands

                              Comment

                              Working...
                              X