npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-http-irblaster

v0.1.39

Published

ESP8266 based IR Blaster for HomeBridge: https://github.com/nfarina/homebridge

Downloads

9

Readme

homebridge-HTTP-IRBlaster Plugin

NPM Downloads

img_1640

I wrote this plugin as a wrapper around https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster to allow remote control of InfraRed controlled devices by HomeKit. To use this plugin, you need to build the ESP8266 based IR Blaster device documented by mdhiggins on the github for the blaster. Once you have it built, you can control it via HomeKit.

IRBlasterCircuit

The plugin will create different types of accessories in HomeKit, depending on the configuration and features of the device. For simple accessories, a switch is configured, allowing on and off control. While for more advanced accessories a FAN is configured allowing on, off and a level to be set. For the fireplace I connected, I use the level to control the flame height, and for the Panasonic stereo the volume.

Circuit Diagrams

RF and LED Transmitter

RF-LED

DHT-YL

Installation

More detailed instructions are available here https://www.instructables.com/id/Control-Your-Fireplace-With-HomeKit-and-Alexa/

  1. sudo npm install -g homebridge-http-irblaster

configuration

The configuration is very straight forward, you need just a Button name and the command to control the blaster.

Example config.json containing the configuration for several of my devices, including my Panasonic SA-PM53 stereo, Fireplace and LG TV/Yamaha receiver.

{
  "accessory": "http-irblaster",
  "name": "Power",
  "irBlaster": "ESP_869815",
  "command": "/msg?repeat=2&rdelay=100&pdelay=1&address=16388&code=538BC81:PANASONIC:48"
}, {
  "accessory": "http-irblaster",
  "name": "Panasonic",
  "irBlaster": "ESP_869815",
  "on_busy": 5000,
  "off_busy": 5000,
  "up_busy": 400,
  "down_busy": 400,
  "steps": 50,
  "rdelay": 100,
  "count": 1,
  "off_data": [{
    "type": "PANASONIC",
    "out": 1,
    "data": "538BC81",
    "length": 48,
    "address": 16388
  }],
  "on_data": [{
    "type": "PANASONIC",
    "out": 1,
    "data": "538BC81",
    "length": 48,
    "address": 16388
  }],
  "up_data": [{
    "type": "PANASONIC",
    "out": 1,
    "data": "5000401",
    "length": 48,
    "address": 16388
  }],
  "down_data": [{
    "type": "PANASONIC",
    "out": 1,
    "data": "5008481",
    "length": 48,
    "address": 16388
  }]
}, {
  "accessory": "http-irblaster",
  "name": "Fireplace",
  "irBlaster": "ESP_869815",
  "on_busy": 32000,
  "off_busy": 5000,
  "up_busy": 600,
  "down_busy": 600,
  "start": 100,
  "steps": 10,
  "rdelay": 600,
  "off_data": [{
    "type": "raw",
    "out": 1,
    "khz": 500,
    "data": [200, 700, 700, 200, 700, 200, 700, 200, 200, 700, 700, 200, 200, 700, 200, 700, 200, 700, 700, 200, 200, 700, 700, 200, 700, 200, 700, 200, 200, 700, 200, 700, 200, 700, 700, 200, 700, 200, 200, 700, 700, 200, 700, 200, 700, 200],
    "pulse": 10,
    "pdelay": 30
  }],
  "on_data": [{
    "type": "raw",
    "out": 1,
    "data": [200, 700, 700, 200, 700, 200, 700, 200, 200, 700, 700, 200, 200, 700, 200, 700, 200, 700, 700, 200, 200, 700, 700, 200, 700, 200, 700, 200, 200, 700, 200, 700, 200, 700, 700, 200, 700, 200, 200, 700, 200, 700, 700, 200, 700, 200],
    "khz": 500,
    "pulse": 10,
    "pdelay": 30
  }],
  "up_data": [{
    "type": "raw",
    "out": 1,
    "data": [200, 700, 700, 200, 700, 200, 700, 200, 200, 700, 700, 200, 200, 700, 200, 700, 200, 700, 700, 200, 200, 700, 700, 200, 700, 200, 700, 200, 200, 700, 200, 700, 200, 700, 700, 200, 700, 200, 700, 200, 200, 700, 700, 200, 700, 200],
    "khz": 500,
    "pulse": 10,
    "pdelay": 30
  }],
  "down_data": [{
    "type": "raw",
    "out": 1,
    "data": [200, 700, 700, 200, 700, 200, 700, 200, 200, 700, 700, 200, 200, 700, 200, 700, 200, 700, 700, 200, 200, 700, 700, 200, 700, 200, 700, 200, 200, 700, 200, 700, 200, 700, 200, 700, 200, 700, 200, 700, 200, 700, 200, 700, 200, 700],
    "khz": 500,
    "pulse": 10,
    "pdelay": 30
  }]
}, {
  "accessory": "http-irblaster",
  "name": "TV",
  "irBlaster": "ESP_869815",
  "on_busy": 1000,
  "off_busy": 1000,
  "off_data": [{
    "out": 1,
    "data": "20DFA35C",
    "type": "NEC",
    "length": 32
  }, {
    "out": 1,
    "data": "5EA17887",
    "type": "NEC",
    "length": 32
  }],
  "on_data": [{
    "out": 1,
    "data": "20DF23DC",
    "type": "NEC",
    "length": 32
  }, {
    "out": 1,
    "data": "5EA1B847",
    "type": "NEC",
    "length": 32
  }]
}

Please note, this command is an example from my configuration controlling my Panasonic SA-PM53 mini system. These will not work for you, unless you have the same stereo. And the fireplace is one with a radio remote [https://valorfireplaces.com/features/remote-controls.php] with this FCC ID Rtd-g6rh. To control the fireplace, I just wired in a 315MHZ Transmitter module in place of the LED/Transistor.

Options - Simple devices that toggle

  • accessory - Must be "http-irblaster"
  • name - Name of the accessory in HomeKit
  • irBlaster - Name or ip address of your IRBlaster Device
  • command - Command to control the device ie "/msg?repeat=2&rdelay=100&pdelay=1&address=16388&code=538BC81:PANASONIC:48"
  • stateful - The default behavior of the plugin is to turn itself off one second after being turned on. However you may want to create a dummy switch that remains on and must be manually turned off. ie "stateful": true
  • busy - How long should the switch stay on in HomeKit ( in seconds ), defaults to 5 seconds.

Example LG TV Buttons

{
  "accessory": "http-irblaster",
  "name": "Tuner",
  "irBlaster": "ESP_08EE8D.local",
  "command": "/msg?repeat=2&rdelay=100&pdelay=1&code=20DF6B94:NEC:32"
}, {
  "accessory": "http-irblaster",
  "name": "HDMI1",
  "irBlaster": "ESP_08EE8D.local",
  "command": "/msg?repeat=2&rdelay=100&pdelay=1&code=20DF738C:NEC:32"
}, {
  "accessory": "http-irblaster",
  "name": "HDMI2",
  "irBlaster": "ESP_08EE8D.local",
  "command": "/msg?repeat=2&rdelay=100&pdelay=1&code=20DF33CC:NEC:32"
}

Options - Complex devices with levels

  • "accessory" - Must be "http-irblaster"

  • "name" - Name of the device

  • "irBlaster" - Name or ip address of your IRBlaster Device

  • "on_busy" - How long the device should be busy for when turning on, in milliseconds ie 30000

  • "off_busy" - How long the device should be busy for when turning off, in milliseconds ie 1000

  • "up_busy" - How long the device should be busy for when turning up, in milliseconds ie 600

  • "down_busy" - How long the device should be busy for when turning down, in milliseconds ie 600

  • "start" - When turned on, where does the volume start at - If missing unit turns on during homebridge restart, and sets level to 0, and turns off agin.

  • "steps" - How many steps for the level control

  • "rdelay" - delay between repeated operations - See https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster for details

  • off_data, on_data, up_data, down_data - Commands to turn device on, off, up and down.

  • "type" - See https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster for details

  • "out" - See https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster for details

  • "data" - See https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster for details

  • "khz" - See https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster for details

  • "pulse" - See https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster for details

  • "pdelay" - See https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster for details

  • "length" - See https://github.com/mdhiggins/ESP8266-HTTP-IR-Blaster for details

Credits

  • mdhiggins - Creating the ESP8266 based IR Blaster, sharing your plans and source.
  • nfarina - For creating the dummy plugin which I used as base for this plugin.