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

hubot-broadlink-rm

v0.7.2

Published

A hubot script to learn IR hex codes and to send them with Broadlink RM

Downloads

12

Readme

hubot-broadlink-rm

A hubot script to learn and send IR hex codes with Broadlink RM

This allows you to control your RM Mini with Hubot, Slack, IFTTT, Google Home, and Amazon Echo.

Overview

No global IP is neeeded

When using with Slack, Hubot relays messages between Slack servers. So it is not necessary to use tunneling services such as ngrok.

No programming is needed

You can control your RM Mini via Slack messages such as learn light:on and send light:on.

Easy to learn IR hex codes

Just use learn command.

user>> hubot learn light:on
ready light:on
set light:on to 2600ac00...

Several IR codes can be learned by one command.

user>> hubot learn tv:ch 1-8
ready tv:ch1
set tv:ch1 to ...
ready tv:ch2
set tv:ch2 to ...
:
ready tv:ch8
set tv:ch8 to ...

Detailed control

Several IR codes can be sent by one command.

user>> hubot send tv:off ac:off light:off
sent tv:off
sent ac:off
sent light:off

Easy to schedule sending IR codes in detail.

user>> hubot send [7h] ac:on
wait 7h
sent ac:on

user>> hubot send tv:ch1 [3s] tv:source [2500ms] tv:source
sent tv:ch1
wait 3s
sent tv:source
wait 2500ms
tv:source

Easy to repeat sending IR codes.

user>> hubot send tv:vol:up*4
sent tv:vol:up
sent tv:vol:up
sent tv:vol:up
sent tv:vol:up

user>> hubot send tv:ch1 [3s] tv:source[2500ms]*2
sent tv:ch1
wait 3s
sent tv:source
wait 2500ms
sent tv:source

Easy to specify each RM Mini devices.

user>> hubot set @kitchen 01:23:45:67:89:ab
user>> hubot light:on@kitchen

UNIX commands can be used in send

You can control smart devices that do not have an IR reciever together with IR devices. For example, you can name a UNIX command curl -s https://SMART.DEVICE/API/on smart:device:on.

user>> hubot command smart:device:on curl -s https://SMART.DEVICE/API/on

Then the smart device can be used in send.

user>> send smart:device:on() light:on tv:on
curl -s https://SMART.DEVICE/API/on
sent light:on
sent tv:on

A UNIX command can take an argument #. The special character # is expanded when the command is called.

user>> hubot command say bin/google-home-notifier.sh "#"
user>> hubot send say(hello, world!)
bin/google-home-notifier.sh "hello  world "
said hellow  world

For security reasons, a text of the given argument is sanitized. All Symbols of hello, world! (, and !) are replaced with a space.

Documentation

For more details, see a comprehensive guide to exploiting your RM Mini with Hubot, Slack, IFTTT, Google Home, and Amazon Echo.

See src/broadlink-rm.coffee for full documentation.

Installation

In hubot project repo, run:

npm install hubot-broadlink-rm --save

Then add hubot-broadlink-rm to your external-scripts.json:

[
  "hubot-broadlink-rm"
]

Sample Interaction

user>> hubot learn light:on                    - Learns IR hex code and names it light:on.
user>> hubot send light:on                     - Sends IR hex code of light:on.
user>> hubot send tv:off aircon:off light:off  - Sends three codes in turn.
user>> hubot learn tv:ch 1-8                   - Learns eight codes tv:ch1, tv:ch2, ..., tv:ch8 in turn.
user>> hubot leran aircon:warm 14-30           - Also Useful to learn many codes of air conditioner.
user>> hubot send [7h] aircon:warm24           - Will sends aircon:warm24 in seven hours.
user>> hubot send [7 hours] aircon:warm24
user>> hubot send [7時間] aircon:warm24
user>> hubot send tv:ch1 [2s] tv:source        - Sends tv:ch1 then sends tv:source in two seconds.
user>> hubot send tv:ch1 tv:source*3           - Sends tv:ch1 then sends tv:source three times
user>> hubot send tv:ch1 tv:source[2s]*3       - Sends tv:ch1 then sends tv:source three times in two seconds.
user>> hubot cancel                            - Cancels all unsent codes.
user>> hubot get aircon:warm22                 - Shows IR hex code of aircon:warm22.
user>> hubot set aircon:clean 123abc...        - Names IR hex code of aircon:clean 123abc... .
user>> hubot set @kitchen 192.168.1.23         - Names IP address 192.168.1.23 kitchen.
user>> hubot set @bedroom xx:xx:xx:xx:xx       - Names MAC address xx:xx:xx:xx:xx bedroom.
user>> hubot learn light:off @kitchen          - Learns IR hex code of light:on at kitchen.
user>> hubot send light:off@kitchen            - Sends IR hex code of light:on at kitchen.
user>> hubot send light:off@kitchen light:on@bedroom - Sends light:off at kitchen and light:on at bedroom.
user>> hubot delete aircon:clean               - Deletes the code of aircon:clean.
user>> hubot list                              - Shows all names of codes and rooms.
user>> hubot help                              - Shows usage.

NPM Module

https://www.npmjs.com/package/hubot-broadlink-rm

Credits

Some parts of the code are from @lprhodes Homebridge Broadlink RM and broadlinkjs-rm

His module for the communication is used.

Also the code is inspired by @jor3l Broadlink RM server for IFTTT

LICENSE

Licensed under the Apache License, Version 2.0

Copyright (c) 2017-2018 Tak Jaga