Code Monkey home page Code Monkey logo

homebridge-broadlink-rm's Introduction

Homebridge Broadlink RM

Introduction

Welcome to the Broadlink RM Mini and Broadlink RM Pro plugin for Homebridge.

This plugin allows you to control your RM Mini and RM Pro with HomeKit using the Home app and Siri.

Like this plugin?

If you like this plugin and want to show your support then please star the Github repo, or better yet; buy me a drink using Paypal or crypto currency.

Working on open source projects like this is full-time for me so every bit helps.

Thank you, sincerely!

Newsletter

You can keep informed about HomeKit, homebridge and homebridge plugins by subscribing to my Works with newsletter.

Documentation

Full documentation can be found here.

Thanks

Thanks to @tattn (https://github.com/tattn/homebridge-rm-mini3), @PJCzx (https://github.com/PJCzx/homebridge-thermostat) @momodalo (https://github.com/momodalo/broadlinkjs) whose time and effort got me started.

homebridge-broadlink-rm's People

Contributors

alayshchen avatar duyleekun avatar ixzzd avatar lprhodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-broadlink-rm's Issues

Suggestion: Send Multiple Codes In A Sequence

Firstly, awesome, I picked up one of these little IR blasters a while ago hoping that it would make it into HomeBridge! So thanks so much for making this plugin.

I have a suggestion, adding the ability to send multiple IR codes from a single switch. This would allow someone to turn on a TV/Soundbar/Xbox etc… all with one switch. Would this be possible?

Thanks

Request: option to use files to store hex codes for config.json

Hi
I use my Broadlink both with this plugin and with HA Bridge, and at present I need to store the hex codes used by the Broadlink in two places. This is inelegant.

I use HA Bridge to create a Hue emulation which can be picked up by Amazon Alexa. I use MQTT inside HA Bridge together with a python script (paho-mqtt) which is capable of learning and replaying Broadlink hex codes.

It would be very useful to be able to specify the hex codes I create using either homebridge-broadlink-rm, paho-mq or even the RM Bridge app interchangeably. This would only be possible if I could optionally specify a file location in config.json for an individual hex code. There would be a happy side effect of making the config.json section for this plugin more human-readable.

Would this be a change you would be willing to consider?

Thanks

ip address of the RM learner

I following the 3 steps below

  1. Install homebridge using: sudo npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-broadlink-rm
  3. Update your configuration file. (See config-sample.json)

in the config.json
I put

"accessories": [{
"accessory": "Broadlink RM Learner",
"name": "Learn IR",
"host": "10.0.1.61"
}]}

what is the host ip should I put ? is it where the homebridge ip ?

V1.1.9 startup problem with Node 6.7.0

I can't start after an npm update -g :

 ERROR LOADING PLUGIN homebridge-broadlink-rm:
[4/16/2017, 6:07:12 PM] /usr/local/lib/node_modules/homebridge-broadlink-rm/accessories/accessory.js:34
  async setCharacteristicValue (props, on, callback) {
        ^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:528:28)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-broadlink-rm/accessories/aircon.js:1:92)
    at Module._compile (module.js:556:32)

Strange enough:

  • I can start and load the plugin on a local Mac installation (learn_ir works, the buttons appear, however sent IR codes don't work on the target device)

  • loading the plugin with the same configuration fails on a Raspberry Pi.

    npm list -g

shows identical versions at least for homebridge and homebridge-broadlink-rm:

Raspberry:

├─┬ [email protected]
....
├─┬ [email protected]
│ └─┬ [email protected] (git+https://github.com/lprhodes/broadlinkjs.git#a463147a6a71855722221da0f74adcba86d7bb5b)
│   └── @types/[email protected]

Mac: (with a local 1.1.9 homebridge-broadlink-rm installation):

├─┬ [email protected] (git+https://github.com/lprhodes/broadlinkjs.git#a463147a6a71855722221da0f74adcba86d7bb5b)
│ └── @types/[email protected]
├─┬ [email protected]

Error: We don't support accessories of type "switch-multi".

Using the new Switch Multi is giving me an error (I have updated to 1.0.5)

/usr/local/lib/node_modules/homebridge-broadlink-rm/index.js:71
          throw new Error(`We don't support accessories of type "${accessory.type}".`);
          ^

Error: We don't support accessories of type "switch-multi".
    at config.accessories.forEach (/usr/local/lib/node_modules/homebridge-broadlink-rm/index.js:71:17)
    at Array.forEach (native)
    at BroadlinkRMPlatform.accessories (/usr/local/lib/node_modules/homebridge-broadlink-rm/index.js:40:24)
    at Server._loadPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:354:20)
    at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:298:16)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:80:36)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

Config:

"accessories":[
        {
          "name":"Entertainment",
		  "type":"switch-multi",
          "interval":0.5,
          "data": [
            "260046009590…",
            "260070000001…"
          ]
        }
      ]

Can't install after update.

Hi

I remove previously version to install the new on.
I have a problem with installation, everything was working fine during installation on previously version.

pi@raspberrypi:~ $ sudo npm install -g homebridge-broadlink-rm
npm WARN addRemoteGit Error: not found: git
npm WARN addRemoteGit at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
npm WARN addRemoteGit at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
npm WARN addRemoteGit at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
npm WARN addRemoteGit at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
npm WARN addRemoteGit at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:114:15)
npm WARN addRemoteGit git+https://github.com/clkao/broadlinkjs.git#0ed810a resetting remote /root/.npm/_git-remotes/git-https-github-com-clkao-broadlinkjs-git-0ed810a-9ab06fa6 because of error: { Error: not found: git
npm WARN addRemoteGit at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
npm WARN addRemoteGit at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
npm WARN addRemoteGit at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
npm WARN addRemoteGit at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
npm WARN addRemoteGit at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
npm WARN addRemoteGit at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
npm WARN addRemoteGit at FSReqWrap.oncomplete (fs.js:114:15) code: 'ENOGIT' }
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror https://github.com/clkao/broadlinkjs.git /root/.npm/_git-remotes/git-https-github-com-clkao-broadlinkjs-git-0ed810a-9ab06fa6: undefined
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror https://github.com/clkao/broadlinkjs.git /root/.npm/_git-remotes/git-https-github-com-clkao-broadlinkjs-git-0ed810a-9ab06fa6: undefined
npm ERR! Linux 4.4.50+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge-broadlink-rm"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! code ENOGIT

npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! Please include the following file with any support request:
npm ERR! /root/.npm/_logs/2017-03-29T19_41_54_170Z-debug.log
pi@raspberrypi:~ $ npm install -g homebridge-broadlink-rm
npm ERR! git clone --template=/home/pi/.npm/_git-remotes/_templates --mirror https://github.com/clkao/broadlinkjs.git /home/pi/.npm/_git-remotes/git-https-github-com-clkao-broadlinkjs-git-0ed810a-9ab06fa6: undefined
npm ERR! git clone --template=/home/pi/.npm/_git-remotes/_templates --mirror https://github.com/clkao/broadlinkjs.git /home/pi/.npm/_git-remotes/git-https-github-com-clkao-broadlinkjs-git-0ed810a-9ab06fa6: undefined
npm ERR! Linux 4.4.50+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge-broadlink-rm"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! code ENOGIT

npm ERR! not found: git
npm ERR!
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/.npm/_logs/2017-03-29T19_45_19_953Z-debug.log
pi@raspberrypi:~ $

RF sending

how do I send the RF code to my broadlink? I have the code but it is not working.

Siri

Channel up down, Volume up down works on Apple Home apps
however, when I use Siri, it return "Your channel down is off"
Is it another glitch in Siri ?

Thanks
Edwin

help with config for air conditioner

Hi there,

I'm wanting to input a hex code just to turn the air con on. The problem is that I can't just say siri turn on the air con because it wants a temp and mode as well. When I turn the air con on it's at 19 degrees and cooling (the last state it was in before turning it off and this was the hex code learnt to turn it on) Off is not a problem. I can manually set it to cool, 19degrees and then it turns on but just want a hex code to turn it on. How do I do this?

Here is what i have so far.

"name": "Air Conditioner",
"type": "thermostat",
"data": {
"off": "260016026b370b2c0f0c0f0c0f0c0e0e0f0d0f0c0f0c0f0c0e0e0c0e0b100b2c0e0d0f0c1e0f0e0d0f0c0f0c0c0f0b100e0d0f0c0f0c0f0c0e0e0c0e0c110a100f0c0f280f0c0e290e2a0b2b0b2c0b2c0e290f0c0f280f290d2a0b2b0b2c0b2c0e290f280f280f0c0f0c0f0c100c0e0e0c0e0c100a100b100e0d0f280f280f0c0e0e0c2a0b2c0b2c0e290f0c0f0c0f280e2a0c0e0b100b100e290f0c0f0c0f28100c0f0c0e2b092c0b100e290f280f0c0f280e2a0c0e0b2c0b2c0b100e0d0f280f0c0e0e0c0e0f0c0f0c0f280e2a0e0c0f280f280e2a0c0e0c0f0b2c0e0d0b10130d0c0f0b100b2c0f280f0c0f280e290d2a0c2b0b2c0d0e0e0d0f0c0f0c0f0c0e0e0b0f0b100f280e290e2a0b2b0b2c0f280f280f280e0e0b0f0b100b100e0d0f0c0f0c0f0c0d2a0c2b0b2c0b2c0e290c2b0b2c0b2c0e0d0f0c0f0c0f0c0e0e0b0f0b100e0d0f280f280e2a0c2a0c2b0d2a0b2c0b2c0e0d0f0c0f0c0f0c0e0e0c0e0b100b100e290f280f280f280e2a0c2a0c2b0b2c0e0d0f0c0f0c0f0c0e0e0c0e0b100e0d0f280f280d2a0b2c0b2c0e290f280f280f280e2a0c2a0b100b2c0e0d0f280f0c0f0c0e0e0c0e0b2c0b100b2c0f0c0f280f280f0c0d0e0c0f0b100e0d0f280f280f0c0e2a0c2b0b2b0b2c0b2c0e0d0f0c0f0c0f0c0e0e0b0f0b100b100e0d0f0c0f280f280e2a0c2a0c2b0b2c0e290f280f0c0f0c0e0e0c0e0c0f0b100e0d0f0c0f280f280e290e290c2b0b2c0b2c0f280f000d050f28",
"temperature30": {
"mode": "heat",
"data": "2600500000012..."
},
"temperature19": {
"mode": "cool",
"data": "260016026b370b2c0e0d0f0c0f0c0f0c0e100e0c0f0c0e0e0c0e0c0f0b100c2b0b100b100e0d0f0c0f0c0f0c0e0e0c0e0b100b100e0d0f0c0f0c0f0c0e0e0c0e0b100b2c0e0d0f280f280f280e2a0c2a0c2b0b100b2c0e290f280f280f280d2a0c2c0a2c0b2c0f0c0f0c0e0e0b0f0b100b100e0d0f0c0f0c0f0c0e290c2b0b100b100e290f280f280f280e0e0b0f0b2c0b2c0e0d0f0c0f0c0f280e0e0b0f0b2c0b100e0d0f280f280f0c0f280f290d0e0e280e2a0b0f0b2c0b2c0e0d0f0c0f280f0c0e0e0c0e0c0f0b100b2c0e290f0c0f280f280e290c0f0f0d0e280e2a0c0e0f0c0f280f0c0e2a0b2b0f0c0f0c0f280c2b0b100b2c0e0d0f0c0e0e0d0e0b0f0b100b100e0d0f280f280f280e290c2b0b2c0b2c0e290f0c0f0c0f0c0e0e0b0f0b100b100e0d0f280f280f280e2a0b2b0b2c0b2c0e290f0c0f0c0f0c0e0e0c0e0b100b100e0d0f280f280f280e290e290c2b0b2c0e290f0c0f0c0f0c0f0c0e0d0c0f0b100b100e290f280f280f280e2a0b2b0b2c0b2c0e0d0f0c0f0c0f0c0e0e0b0f0b100b100e290f280f280f280e290c2b0b2c0b2c0e290f280f0c0f0c0f280f280d0e0e0e0b0f0b100b2c0e290f0c0f0c0f280e2a0c2a0b100b100b100f280f0c0f280e290d0e0c2b0b2c0e290f0c0f280f0c0e0e0c0e0c0f0b100b100e0d0f0c0f0c0c0f0b2c0b2c0e290f280f280f280e2a0b2b0b100b100e0d0f0c0f0c0f0c0e0e0b0f0b2c0b2c0e290f280f280f280e2a0c2a0b000d050f29"
}
}
},

Startup problems

Hi,

I keep getting startup errors and I don't know what I'm doing wrong.
Could you guys help me out?

Thanks!
screen shot 2017-04-13 at 18 17 18

screen shot 2017-04-13 at 18 15 58

broadlink-rm startup failure

I am not able to startup my broadlink plugin with the followings, any hints are welcome.

017-03-15 15:16:28 stdout �[37m[3/15/2017, 3:16:28 PM]�[39m �[1m�[31m====================�[39m�[22m
2017-03-15 15:16:28 stdout at Module._compile (module.js:556:32)�[39m�[22m
2017-03-15 15:16:28 stdout at Object. (/usr/lib/node_modules/homebridge-broadlink-rm/ThermostatService.js:1:78)
2017-03-15 15:16:28 stdout at require (internal/module.js:20:19)
2017-03-15 15:16:28 stdout at Module.require (module.js:483:17)
2017-03-15 15:16:28 stdout at Function.Module._load (module.js:424:3)
2017-03-15 15:16:28 stdout at tryModuleLoad (module.js:432:12)
2017-03-15 15:16:28 stdout at Module.load (module.js:473:32)
2017-03-15 15:16:28 stdout at Object.Module._extensions..js (module.js:565:10)
2017-03-15 15:16:28 stdout at Module._compile (module.js:528:28)
2017-03-15 15:16:28 stdout at Object.exports.runInThisContext (vm.js:76:16)
2017-03-15 15:16:28 stdout SyntaxError: missing ) after argument list
2017-03-15 15:16:28 stdout ^^
2017-03-15 15:16:28 stdout console.log(UDP message sent to ${host}:${PORT};
2017-03-15 15:16:28 stdout �[37m[3/15/2017, 3:16:28 PM]�[39m �[1m�[31m/usr/lib/node_modules/homebridge-broadlink-rm/sender.js:14
2017-03-15 15:16:28 stdout �[37m[3/15/2017, 3:16:28 PM]�[39m �[1m�[31mERROR LOADING PLUGIN homebridge-broadlink-rm:�[39m�[22m

Broadlink RM Pro, UDP packet send but nothing happened

Hi

I have a problem with sending command to braodlink rm pro.
When I put the TV On in home app iOS I can see on raspberry console UDP Packet send to "broadlink ip address" but on boradlink nothings happend red light not flashing....

Can anyone help me ?

It's working while I'm using home assistant, but not on this plugin...

Add multiple RM controllers feasibility

Is it possible to add multiple RM products in config.json? such as:
{
"bridge": {
"name": "Homebridge",
"username": "CD:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-156"
},

"description": "Homebridge",

"platforms": [],

"accessories": [{
	"accessory": "Broadlink RM Learner",
		"name": "Learn IR",
		"host": "192.168.1.100"
	},
	{
		"accessory": "Broadlink RM",
		"name": "Broadlink RM Pro 3",
		"host": "192.168.1.100",
		"data": [
			{
			  "name": "TV",
			  "type": "on",
				"on": "260054005211291217XXXX",
				"off": "260054005211291216XXX"
			},
                            ]
              },
              {
		"accessory": "Broadlink RM",
		"name": "Broadlink RM Pro 3",
		"host": "192.168.1.101",
		"data": [
			{
			  "name": "TV",
			  "type": "on",
				"on": "260054005211291217XXXX",
				"off": "260054005211291216XXX"
			},
                             ]
              }
             ]

}

Multiple switch services?

Firstly I'm completely new to Pi to apologies if this is a straight forward issue.

I've installed the plugin and am trying to use multiple switches in the config file to control various appliances. I'm getting 'Error: Cannot add a Service with the same UUID '00000049-0000-1000-8000-0026BB765291' as another Service in this Accessory without also defining a unique 'subtype' property.'

Are you only able to control one switch from the RM2? is the config.json file wrong?

both error and config file below


pi@raspberrypi:~ $ homebridge
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister
[3/21/2017, 12:48:12 PM] Loaded plugin: homebridge-accessory-neurio
[3/21/2017, 12:48:12 PM] Registering accessory 'homebridge-accessory-neurio.neurio'
[3/21/2017, 12:48:12 PM] ---
[3/21/2017, 12:48:12 PM] Loaded plugin: homebridge-broadlink-rm
[3/21/2017, 12:48:12 PM] Registering accessory 'homebridge-broadlink-rm.Broadlink RM'
[3/21/2017, 12:48:12 PM] Registering accessory 'homebridge-broadlink-rm.Broadlink RM Learner'
[3/21/2017, 12:48:12 PM] ---
[3/21/2017, 12:48:12 PM] Loaded plugin: homebridge-lockitron
[3/21/2017, 12:48:12 PM] Registering accessory 'homebridge-lockitron.Lockitron'
[3/21/2017, 12:48:12 PM] ---
[3/21/2017, 12:48:12 PM] Loaded config.json with 2 accessories and 0 platforms.
[3/21/2017, 12:48:12 PM] ---
[3/21/2017, 12:48:13 PM] Loading 2 accessories...
[3/21/2017, 12:48:13 PM] [Learn IR] Initializing Broadlink RM Learner accessory...
[3/21/2017, 12:48:13 PM] [Broadlink RM2] Initializing Broadlink RM accessory...
[3/21/2017, 12:48:13 PM] [Broadlink RM2] add switch service
[3/21/2017, 12:48:13 PM] [Broadlink RM2] add switch service
/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:131
throw new Error("Cannot add a Service with the same UUID '" + existing.UUID + "' as another Service in this Accessory without also defining a unique 'subtype' property.");
^

Error: Cannot add a Service with the same UUID '00000049-0000-1000-8000-0026BB765291' as another Service in this Accessory without also defining a unique 'subtype' property.
at Accessory.addService (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:131:15)
at /usr/local/lib/node_modules/homebridge/lib/server.js:418:19
at Array.forEach (native)
at Server._createAccessory (/usr/local/lib/node_modules/homebridge/lib/server.js:402:14)
at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:266:26)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:81:38)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)


{
"bridge": {
"name": "Homebridge",
"username": "B8:27:EB:40:74:7D",
"port": 51826,
"pin": "031-45-154"
},

"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",

"accessories": [{
	"accessory": "Broadlink RM Learner",
	"name": "Learn IR",
	"host": "192.168.1.109"
}, {
	"accessory": "Broadlink RM",
	"name": "Broadlink RM2",
	"host": "192.168.1.109",
	"data": [{
		"name": "Gates",
		"type": "on",
		"on": "e92f1c000f140e140e09180a19150d150d0a180a18150d0b17150d0b170001ee000000000000000000000000",
		"off": "e92f1c000f140e140e09180a19150d150d0a180a18150d0b17150d0b170001ee000000000000000000000000"
	}, {
		"name": "KitchenLED",
		"type": "on",
		"on": "e91334000e21250b0d23240c0d22240b0d230d230d22240c0c220d220d22240b0d23240b0d230d220d23240c0d23230c0d23240c0c00014900000000",
		"off": "e91334000e21250b0d23240c0d22240b0d230d230d22240c0c220d220d22240b0d23240b0d230d220d23240c0d23230c0d23240c0c00014900000000"
	}, {
		"name": "Pool Table",
		"type": "on",
		"on": "e91034000e22240b0e21240c0d22240c0d220d230c230c230d230d220d23240b0d22240c0d230d220d22240c0d22240c0c23240b0d00014800000000",
		"off": "e91034000e22240b0e21240c0d22240c0d220d230c230c230d230d220d23240b0d22240c0d230d220d22240c0d22240c0c23240b0d00014800000000"
	}, {
		"name": "Office Spots",
		"type": "on",
		"on": "e90022030b060b290b060b2a09070a2a0a290a08092a0a08092a0a08092b0908092b09090809082b0908092b082b0908092c0809082b0909082b09080909082c082b0809090a072b092b080a0809082b0909082c0809082b080a082b080a082b082d08090809082b080b072c0809072c092a09090809092c070a072c0809092c0709082c0800014e09560909092b08090a2a08090a2a092b0908092b0a07092b0a07092b0908092b09080909092b0809082c082b09090a290909092a0909082c080a0808092b092b090908080a2a092b090a0808092b0809092b08090a2a0809082d0709082c082b09090809082c0809082c080a072b092b080a080a072b0909092a0909082c0809082b0800014d0a550909082b0908092b09080a2a082b0908092b0908092b0908092b0908092b090809080a2a09080a2a082c0808092b0909092a0908092b0908090a072d072b09090809082d072b09080a09072c0809092a0909082d0808082b0909082b092b090a0709082b090a072b0909092a092b09080909082b0909082b090a082a0908092b0900014d09550a08092a09080b290908092b0a2a0908092b0908092b0909082c0709092a09090908092b0908092b082b0a07092c0808092b0908092b09080909082b092b080a0809082b092b08090909082b0909082b080a082b080b072d060a082b082b09090809082c080b062d070b062c092b080a0709082c0809082d0709082c0809082c0800014e08560908092b0908092c0808092c082a0a08082c0809082b0909082b0909082c0a070809092b08090a2a092a0909082b0909082b090a072b09080909082c082b080a0809092a082c08090809092b0809092b080a082b0908092b080a092b072c08090809092b0a08082b0809092b092a09090809082c0809082c0809082c0809092b0800014e085708080a2b08080b2909080a2b082b0908092a0b07092b0908092b0908092a0a0908080b29090a072b092b0908092b0908092b0809092b08090909082b0a2a08090a08082c082b080a0808092b0909092a0909082b0908092b09080a2a092b08090909082b0908092b0909082b092b090809080a2a0909082b0908092b0809092b080005dc0b29090a072b",
		"off": "e9002603041804090c050b290d050a290a09082b092a0a08092a090a082c07080a2a090a072c080909080a29090b072b082b0909082c0809082b0909092a09080909082c082c070a0809092b082b09090809082b0909082c0809082c0809082b0909092c062c08090909092a0909082c0809082c0809082c0809082b0909082b090a072b0909082c0800014e0855090a072c080a072b090a072b092b080a082b0809092a0b07092b0809092a0b080709092b0809092b082c0809082b0909082c0809082b09090809082c082b09090809082b0a2a08090908092b0908092b0809092b080a082a0a08092a082b09090809092b0809092b080a072c0809092b0809082c0809092a0909092b0908082c0800014c09560a08092a0909082b0909082b092b0908092a0a08092a0909092a0a08092b080a0808092b0909082b082b0908092b0908092b090a072b09080909092b082c07090909082b092c07090908092c080a072b0908092b08090a2a0809092b082b0909080a092a0809092b0809092b0809092b0a07092c070a082c0708092b0909082b0800014d095609080b290908092b0908092b092b09080a2a0908092a090a082a09080a2b08090809092c0709092a092b0908092b0908092b0809092c07090908092b082c08090809092b082d07090809092b0908082c0908082c0809082c0809082c082b080a080a082c070b062c0809082c0908082c0809082c0809082c0809082c0809082c0800014c0a550908092b0909092a0a08082c082a0a070a2a0908092b0909082b0809092b08090908092b0809092b082c0809082d0708092b0a07092b09090809082b092b080b06090a2a082c080a070a082b08090a2a0809082c0809082d0709082c082b08090909082b0908082c0809082b0909082c0808092b0a07092b0809082c080a072b0800014e08560b06092b09080a2a0908092c082a0a08092a09090a2a08080a2a0909092a09090908092a0909082c092a0908092c08080a2a0908092b09080909082b0a2a08090909082b092b08090909082b0908092b0908092d0709082b0a07092b092b08090908092b090a072c0809082b0809092b090a072b0809092b0809092b0809092b090005dc082c"
	}, {
		"name": "Bathroom Spots",
		"type": "on",
		"on": "e90027030607040d060b0e04190b070a290a070a2b092a09080a2a0908092a0b07092b0908092b09080909082b0909082b092b080a082b08090a2a0809092b08090908092b082c0809080a082c072c080a070a082c0709082c0809082d0709092b0809092c072b080b070a072c070a082b080a082b082d070a082b08090909082b0809092b0809082c0800014d08570908092b0a07092b0908092a092b0908092c0909072b0908092b0909082b0a080809082b090a072c082b0909082b0909082b090a072b08090909082c082b09080909082b092b080b0709082b0909082b0909092c0709082b0908092b092b08090909082b0909082b0a08092a092b0809092b08090809092b0809092b0809092b0800014d09560908092b0908092b0a07092b092a0909082b0909082b0909092a0909092a09090908092b09080a2a082b0a08082b0908092b0909082b09080909082c092b07090909082b092b080a0909072b0909082b0909082b0a07092c0808092b082c08090909082b0908092b0909082b082b0909092b09080809092b0809092b0a08082b0a00014c09550a09082b0908092b0908092b092a0909092a0908092b0a08092a0909082b0908090a082b0809092a092b0a08082b0909082c0809092b08090809092b082b09090908092b082b090a0709082c0809082d0709082c0809082c0909072c082c070a0908082c0809082b0909092c072c070b072b080b070a072c0809082d0709082c0800014e08560a07092b0908092b09080b29092b0809092b0809092a0909092c0709092b08090908092b0909092a092b0809082b09090a2a0809082c08090809082b092b0809090a072b082b09090809092b080b072b0809092c0709082c0809082d072c08090809092c0709092b0809092b082c0908082d07090809092c0709092b08090a2a0800014d095609080a2a0909092a0909092a092c0907092b0a07092b090a082a09080a2a090809080a2a09080a2a0a2a0908092b0a07092b09080a2a09090909082c092909090908092b092b09090809092b0809092b0809082c0a07092b0809092b092b09080a070a2b0809082c0809092b082b0a08092a09090809092b0908092b0a08092a090005dc2a",
		"off": "e90022030c050c280c050b290b08082b0a290a08092a0a070a2a0b08072b0a07092b09090809092c0808092b092b0809092b0809092c070a082b09080909092b082b09090809082c082b09090809082c0a07092b0809092c080a072c070a082c082b080a0809082b0909082c0809082b0909082c082b0a080908082c080a092b0809082b0800014f08570909082b0908092b0908092b082b0a08082b0909082b0809092a0909082d07080a08092b0809092c072b0908092b0909092a0908092c08090809082c092a09090809082c082b09080909082c0809082c0809082c0809082c0908082c092a09090809092b0809092b0809082b0809092b082c08090908092b0909082c0808092b0900014e07560909092a09080a2a0b070a29092b09080a2a0908092b090a072b0908092b09090809082b0a080a29092b0908092b0908092b0a07092b0a080809082b092b09080909082b092b0a070b07082c0908082b0909082d0709082b090a082b082d07080909092b0909092a0a070a2a0809092b082b0a090709092b0809092b0809092b0800014d095609080a2a0909082b0908092c092a0909082b0908092b0908092b0909082c08080b070a2909080b29092b0908092c0808092b0908092b09080908092c092a09080909082c092a090a0709082b0909082b0809092b0809082d0709082d072c070a0908082b080a082c070a082b080a082b082c0908080a082b080a082b080a082b0800014d09570908092a0a09072b0a070a2a092b0809082b0809092b08090a2a0809092b08090909082b0908092b092b0809082b0909082b0a07092b09080909082b092b08090909082b092b08090909082b0909082d0808082c0809082c0809082b092b09080909082c0809082b0909092b0809082b092b0a070909082c0809082b0909082c0900014b095708090a2a08080a2a0909092a092b0908092b0909082b0908092b0909082b09080909092a0909082b092b09080a2a0909092a0908092c08090809082b0a2a0a07090a072b092c08080909092a0909082b0a08082b0909082c0809082c082b080a0809082b0909082c0809082b0909082c082b09090809092a0909082c0809082d070005dc092a0909082b"
	}, {
		"name": "Lamp Left",
		"type": "on",
		"on": "e90e34000e21250b0d22240b0d22240c0d220d220d220d220d23240b0d220d230d230d230d220e220d23240b0d22240c0d22240c0c00014800000000",
		"off": "e90b34000e21250b0d22240b0d23230b0d220d220d220d220d23240b0d220d230d220d220d220d220d22240b0d22240c0d220d220d00014900000000"
	}, {
		"name": "Lamp Right",
		"type": "on",
		"on": "e90734000d22240c0c23230c0c23240c0c240c230d23230c0c24230c0c23230d0b23240c0d230b230c23240c0c23230c0c23230d0c00014a00000000",
		"off": "e90734000d22240c0c23230c0c23230c0c230c230c23230c0c23230c0c23230c0c23230c0c230c240c23240c0c23230c0c230c230c00014a00000000"
	}, {
		"name": "Kitchen Blue",
		"type": "on",
		"on": "260060000001329314111610141115101512150f151016111534153515361436141114361535153515361412133615341511161014111512141014381312131115361436153415361400052e0001344715000c1e0001354814000c3a0001344715000d050000000000000000",
		"off": "260060000001329314111610141115101512150f151016111534153515361436141114361535153515361412133615341511161014111512141014381312131115361436153415361400052e0001344715000c1e0001354814000c3a0001344715000d050000000000000000"
	}, {
		"name": "Pool Spots",
		"type": "on",
		"on": "e9004203080404040404040506040410040505060406040408070804040d07043d0405040b070a290b060b2a0a070b280a2a0a070a2a0a08092a09080a2a09080b29090809090a290908092c082b0908082b0909092b0908082c08090809092b082c0908080a072c082d08080809082d07090a2a0809082c0908082c0809082d072c08090809082d0709082d0809082b082b080a0809082c082b080a0809082d0709082c0800014d09560a07092b0908092b0908092a092b0908092b0908092b0908092b0908092b09090809092a090a072b092b08090a2a0809092b0809082c08090809092b082c080a0709092c072c0808090a072c0908082c0809082b0909082b0908092c072c090808090a2a080b072b0809092b082b09090809082c082c070a0809082b0909082b0800014d09560a07092c08080a2a0908092b092a0908092b0908092b0908092b0908092b090809080a2a0908092b092a090a072b0909092a0909092a09090809092b082d08070908092b092b08090909092a0a07092c08080a2b07090a2a0a07092b082d070908090a2a08090a2a08090a2a092a09080a08082b092b08090909082c0809082b0900014c0a550908092b0909082b0908092b092a0909092a09090a2a08080b2909080b2909080909092b0809092a092a0a08092b0809092b0809082c080a0709092b082b080a080a072b092c070a0709082c0809082c0809082c070a082b080a082c082a090a0808082d0709092b080a072b092b08090909082b082b09090809082c0908082c0800014c09570808092a0a08092a0908092b092b0908092a0909092a0909082c0808092b08090909082b0908092b092a090a082a0809092b080a082b09080809092b082b090909080a2a082b09090809082b09090a290908092b0909082b0809092b082c08090809082c080a072b0909082b092b08090809092b082b0909080a072c0809082c0800014c09560a07092b0908092b0908092b092a0908092c08080a290a08092b08080a2a090a0808092a0909082b092c0808092b0a07092a0909092b08090809092b082d0708090a0929092b08090908092b0908092b0809082b0909082b0909092a082c08090809092b0908092b0809082c082b08090909082b0a2909090809092b0809082c080005dc0929092b0809",
		"off": "e9006402040d0405070d15041025041e07040b060b290b060b2909080a2a092c0808092a0a070a2a0908092b0908092b0a070a08082b0a08082b092a0909092b0809082c0809082b0a08080a072b092c080a0709082d082a0a07090a072c0809082c070b082a080a082b080b072b082c080a0809082b0909082c0809082c080909090809082c082c08090809092b0908082c082c0809082c0809082c08090a08082c0800015009570808092b0908092c08080a2a092b0a07092b0908092b09080a2b0809092a09090809092b0809092b092b0809092a0909082c0809082b090a0709092b082b0a080809092b082c08090908092b0909082c0809092c0709082c080a072c082c09080809092b0908092d0709082b090908090909092a082c080a070a082b0908092b092b0809092b0909082c08090809082c0800014e09560a07092b0909092c0709092b092a0a08092a0909092b0908092b0909082b09080909092b0908092b092c0808092b0908092b0909092a0a080908092b092b08090909082b092b090908090a2b0709092b0809092b0908092b0909082b0a2a09080909092c0709082c0809092b080909090809082b092b0909080a072c0809082d072b0909092b0809082c09080809092b0900014d0a550909092a090a072b09090a29092b0908092b0908092b0908092b090a082a09080909082c080a072b092b0909082b0809092b080a082c07090909082c082b080b0709092c082a080a0908082b0909082c0909072b090a072c0809082c082b080a0908082c0809082b0909082c0809080a070a082b082c0908080a082b080a082b082c080a072c0908082c080a070a082b080005dc092b092a"
	}, {
		"name": "Wardrobe Light",
		"type": "on",
		"on": "e90a34000e21240c0d23240b0d22250b0d220d230d230c230d220d220d23240b0d220d220d220d220d22240c0d22250b0d22240c0c00014800000000",
		"off": "e90834000d22240c0d23230c0d22240c0d230c230c230c230c230c230d23230c0c230c230c230c230c23230c0c23240c0c240c230c00014900000000"
	}]
}]

}

Seeing shade stuck on opening…

I think I saw in another thread that you fixed an issue around the constant opening or closing status. I have updated to the latest with NPM but still seeing the issue. It is possible this is related to the fact I do not have a programmed stop button yet?

The Homebridge would be halted sometime after update to 1.0.2

Thanks for the new patch. I found an issue after update to 1.0.2 with the log:
[3/30/2017, 9:25:22 AM] [Broadlink RM Pro 3 MR] getSwitchState: 0
[3/30/2017, 9:25:22 AM] [Broadlink RM Pro 3 LR] getSwitchState: 0
[3/30/2017, 9:25:22 AM] [Broadlink RM Pro 3 MR] getCurrentTemperature (24.1)
[3/30/2017, 9:25:22 AM] [Broadlink RM Pro 3 LR] getCurrentTemperature (22.7)
events.js:326
throw new TypeError('"listener" argument must be a function');
^

TypeError: "listener" argument must be a function
at device.removeListener (events.js:326:15)
at Timeout.removeTemperatureListenerTimer.setTimeout [as _onTimeout] (/usr/local/lib/node_modules/homebridge-broadlink-rm/accessories/aircon.js:265:14)
at ontimeout (timers.js:380:14)
at tryOnTimeout (timers.js:244:5)
at Timer.listOnTimeout (timers.js:214:5)

and have to re-run sometime.

BroadLink SP Mini Wi-Fi switch and BroadLinkRM Mini 3

Every time I tried to use learn toggle switch on my iPhone, I would get following error.

Discovered Broadlink RM device at 192.168.1.4 (37:27:04:01:a8:c0)
/usr/local/lib/node_modules/homebridge-broadlink-rm/helpers/learnData.js:59
  device.enterLearning()
         ^

TypeError: device.enterLearning is not a function
    at Object.start (/usr/local/lib/node_modules/homebridge-broadlink-rm/helpers/learnData.js:59:10)
    at LearnIRAccessory.toggleLearning (/usr/local/lib/node_modules/homebridge-broadlink-rm/accessories/learnIR.js:19:17)
    at emitMany (events.js:127:13)
    at emit (events.js:201:7)
    at Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:155:10)
    at Bridge.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:740:22)
    at Array.forEach (native)
    at Bridge.Accessory._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:685:8)
    at emitMany (events.js:127:13)
    at HAPServer.emit (events.js:201:7)

I just noticed this plugin was picking up 2 of my BroadLink SP Mini Wi-Fi switch as well as BroadLinkRM Mini 3. The mac address for all 3 were incorrect but IP address was correct.

For example:
Discovered Broadlink RM device at 192.168.1.4 (37:27:04:01:a8:c0)

So, I turned off both of BroadLink SP Mini Wi-Fi switch, this plugin works. Looks like I found the root cause of the above conflict. It might be helpful for others. Let me know if you want me troubleshoot anything.

I was also wondering, can you control BroadLink SP Mini Wi-Fi with your plugin?

MAC address under "Host" is wrong capture

I believe the MAC for the 'host' configuration at config.json capture wrongly.
After checking from the error log, it seem like first and third number had been swap.
Actual MAC: AA:BB:CC:DD:EE
At the config reading MAC is : CC:BB:AA:DD:EE

can't set scene.

Hey @lprhodes

Trying out your new update and the TV codes are working great for on/off and volume. Thanks.

I'm having problems with the air con though. Previously I could have a hex code for 18 cooling and then have a scene with those parameters and it worked fine. Now it's not.

Here's my config:

screen shot 2017-03-30 at 9 18 26 pm

And heres what it looks like on the home app:

fullsizerender 2

startup error

I got the following error when loading with the new npm package. Is that something wrong with my config?

2017-04-06 06:19:29 stdout �[37m[4/6/2017, 6:19:29 AM]�[39m �[1m�[31m====================�[39m�[22m
2017-04-06 06:19:29 stdout at Module._compile (module.js:556:32)�[39m�[22m
2017-04-06 06:19:29 stdout at Object. (/usr/lib/node_modules/homebridge-broadlink-rm/accessories/aircon.js:1:92)
2017-04-06 06:19:29 stdout at require (internal/module.js:20:19)
2017-04-06 06:19:29 stdout at Module.require (module.js:483:17)
2017-04-06 06:19:29 stdout at Function.Module._load (module.js:424:3)
2017-04-06 06:19:29 stdout at tryModuleLoad (module.js:432:12)
2017-04-06 06:19:29 stdout at Module.load (module.js:473:32)
2017-04-06 06:19:29 stdout at Object.Module._extensions..js (module.js:565:10)
2017-04-06 06:19:29 stdout at Module._compile (module.js:528:28)
2017-04-06 06:19:29 stdout at Object.exports.runInThisContext (vm.js:76:16)
2017-04-06 06:19:29 stdout SyntaxError: Unexpected identifier
2017-04-06 06:19:29 stdout ^^^^^^^^^^^^^^^^^^^^^^
2017-04-06 06:19:29 stdout async setCharacteristicValue (props, on, callback) {
2017-04-06 06:19:29 stdout �[37m[4/6/2017, 6:19:29 AM]�[39m �[1m�[31m/usr/lib/node_modules/homebridge-broadlink-rm/accessories/accessory.js:34
2017-04-06 06:19:29 stdout �[37m[4/6/2017, 6:19:29 AM]�[39m �[1m�[31mERROR LOADING PLUGIN homebridge-broadlink-rm:�[39m�[22m

Switch for Shutter

Hi, is it possible for a shutter to create a switch or a special Devise in the Config?
My radio 433mhz shutter has three commands. Up, Down, and Stop ?

Troubles with setup

Hi! Thanks for this great plugin! Unfortunately it doesn't work on my pc. There are some errors. Can you, please, help me with that? (Windows 10, node v 6.10.2)
3

Air Conditioner config

I'm not really sure how to get Air Conditioner work properly. Maybe, I'm missing something or didn't setup correctly?

  • To get the off hex code, I turned on my aircon and turned it off and go the hex code for off
  • To get 16 degree (min on my aircon), I set my aircon to 17 degree, and capture hex code for 16 degree
  • To get 30 degree (max on my aircon and it only cools), I set my aircon to 29 degree, and capture hex code for 16 degree

The aircon I'm using is Piu' 14
http://www.olimpiasplendid.com.au/portable-air.html

I have few questions regarding Home app

  • what's the temperature inside blue circle? I get 12c. Is this static icon?
  • i can toggle between 0 and 30. I tried to add min temperature to be 16 just above data ie "minTemperature": 16, and "minTemperature": "16", but in both cases it crashed Home app.

At launch:

[3/31/2017, 1:17:19 PM] [Broadlink RM] getTargetHeatingCoolingState (off)
[3/31/2017, 1:17:19 PM] [Broadlink RM] getTargetTemperature (0)
[3/31/2017, 1:17:19 PM] [Broadlink RM] getTemperatureDisplayUnits (0)
[3/31/2017, 1:17:19 PM] [Broadlink RM] getCurrentHeatingCoolingState
[3/31/2017, 1:17:19 PM] [Broadlink RM] getCurrentTemperature (12.1)

Launching air conditioner:

[3/31/2017, 1:20:34 PM] [Broadlink RM] setTargetHeatingCoolingState (cool)
[3/31/2017, 1:20:34 PM] [Broadlink RM] Potentially sendTemperature (16)
[3/31/2017, 1:20:34 PM] [Broadlink RM] sendTemperature (16, cool)
[3/31/2017, 1:20:34 PM] [Broadlink RM] setTargetTemperature (16)
[3/31/2017, 1:20:34 PM] [Broadlink RM] Potentially sendTemperature (16)
[3/31/2017, 1:20:34 PM] [Broadlink RM] Payload message sent to Broadlink RM device (192.168.1.4; 37:27:04:01:a8:c0)

Asking Siri to set temperature to 20 degree but its still at 16.

[3/31/2017, 1:21:35 PM] [Broadlink RM] setTargetTemperature (20)
[3/31/2017, 1:21:35 PM] [Broadlink RM] Potentially sendTemperature (20)
[3/31/2017, 1:21:35 PM] [Broadlink RM] Update to default temperature (16)

From Home app, I tried to toggle from 16 to 20 but it still didn't work.

[3/31/2017, 1:23:52 PM] [Broadlink RM] getTargetHeatingCoolingState (cool)
[3/31/2017, 1:23:52 PM] [Broadlink RM] getTargetTemperature (16)
[3/31/2017, 1:23:52 PM] [Broadlink RM] getTemperatureDisplayUnits (0)
[3/31/2017, 1:23:52 PM] [Broadlink RM] getCurrentHeatingCoolingState
[3/31/2017, 1:23:52 PM] [Broadlink RM] getCurrentTemperature (12.2)
[3/31/2017, 1:27:05 PM] [Broadlink RM] setTargetTemperature (18)
[3/31/2017, 1:27:05 PM] [Broadlink RM] Potentially sendTemperature (18)
[3/31/2017, 1:27:05 PM] [Broadlink RM] Update to default temperature (16)
[3/31/2017, 1:27:06 PM] [Broadlink RM] setTargetTemperature (19)
[3/31/2017, 1:27:06 PM] [Broadlink RM] Potentially sendTemperature (19)
[3/31/2017, 1:27:06 PM] [Broadlink RM] Update to default temperature (16)
[3/31/2017, 1:27:07 PM] [Broadlink RM] setTargetTemperature (20)
[3/31/2017, 1:27:07 PM] [Broadlink RM] Potentially sendTemperature (20)
[3/31/2017, 1:27:07 PM] [Broadlink RM] Update to default temperature (16)

My config:

          {
             "name": "Air Conditioner",
             "type": "air-conditioner",
             "data": {
               "off": "260016016f370e0d0e0e0e0d0e0e0e0d0e0e0e290e0d0f0d0e0d0f0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e290e0d0e290f0d0e0d0f0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e290e290e290e0d0f0d0e0e0e0d0e290e0e0e290e0d0e0e0e290e0d0f0d0e0d0f290e0d0e0e0e290e0d0e290e290e0e0e0d0f0d0e0e0e0d0e0e0e0d0e0e0e290e0d0e0e0e0d0e0e0e0d0f0d0e0d0f0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0f0d0e0d0f0d0e0e0e290e0d0e290e290e0e0e0d0e0e0e0d0f0d0e0d0f0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0f0d0e0d0f0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0f0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e290e0d0e290f290e290e0d0e0e0e000d050000",
               "temperature30": {
                   "pseudo-mode": "heat",
                   "data": "260016016f360f0d0e0e0f0c0e0e0e0d0e0e0e29100b0e0e100b0e0e0e0d0f0d0e0e0e0d0e0e100b100c0e290e0d0e290e0e0e0d100c100b100c0e0e0e0d0e0e0e0d0e0e0e2910270e290e0d0e0e0e0d0f0d0e290e0e0e0d100c0e0d0e290e0e0e0d0e0e0e290e0e0e0d0e290e0e0e290e29100b0e0e0e0d0e0e0e0d0f0d0e0e0e0d10270e0e0e0d0e0e0e0d0e0e0e0d0e29100c0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d100c0e0d0e0e0e0d10270f0d0e290e290e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0f0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0f0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e100b0e0e0e0d0e0e0e0d100c0e0d0f0d0e0e0e0d0e290e29100c10270e290e290e0d0f0d0e000d050000"
                   },
               "temperature16": {
                   "pseudo-mode": "cool",
                   "data": "260016016e370e0e0e0d0e0e0e0d0e0e0e0d0f280f0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0f280f0d0e290e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0f280f2910270e0d0e0e0e0d0e0e0e290e0d0f0d0e0e0e0d0e290e0e0e0d0e0e0e290e0d0e0e0e0d0f280f290e0d0f0d0e0d0e0e0e0d0e0e0e0d0e0e0e0d0f280f0d0e0e0e0d0e0e100b0e0e0e290e0d100c100b0e0e0e0e0e0d0e0e100b0e0e0e0d0e0e0e0d0e0e0e290e0d0e290f280f0d0e0e0e0d0e0e0e0d100c0e0d0e0e0e0d0e0e0e0d0f0d0e0d0f0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0f0d100b0f0d0e0e100b0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0e0e0e0d0f0d0e0e0e290e0d0e290e290e290e290f0d0e0d0f000d050000"
                   }
               }
           },

No device found after restarting Homebridge

My Broadlink Mini3 was working until I restarted Homebridge to make a change to another accessories and now I see the following in the log:

[Broadlink Mini3] LearnIR (no device found at <IP>)

I can ping the IP address for the machine running Homebridge and get a successful response. The device is also still working through the e-control app.

Any idea why it would now no longer be able to locate the device? I verified and the IP address for the IR device is still the same.

Great project by the way and I appreciate the work you have put in!

TypeError:dev.device is not a function

I got the same problem.
It still go like this after run npm i broadlinkjs@"git+https://github.com/lprhodes/broadlinkjs.git" -g
/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:98 dev.device();
^
TypeError:dev.device is not a function at module.exports.Broadlink.genDevice (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:98:13)
at Socket.cs.on (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:187:29) at emitTwo (events.js:106:13)
at Socket.emit (events.js:194:7) at UDP.onMessage [as onmessage] (dgram.js:545:8)

maybe because I got an Glanz airconditioner oemed by broadlink?

Device discoverable, no code learned

Hi Luke,

With the latest 0.2.13, my RM Pro is discoverable and the device does enter learning mode (with orange indicator on). However, no code has been learned.

For the main plugin, it works like a charm with codes previously obtained using python-broadlink. Thanks for your great work!

Startup issue

Hi,

I'm a beginner to homebridge. When I try to launch homebridge with Broadlink plugin, it always has error like this:

Loaded plugin: homebridge-broadlink-rm
[2017-4-9 03:39:11] Registering platform 'homebridge-broadlink-rm.BroadlinkRM'
[2017-4-9 03:39:11] ---
[2017-4-9 03:39:11] Loaded config.json with 0 accessories and 1 platforms.
[2017-4-9 03:39:11] ---
[2017-4-9 03:39:11] Loading 1 platforms...
[2017-4-9 03:39:11] [Broadlink RM 2] Initializing BroadlinkRM platform...
[2017-4-9 03:39:11] [Broadlink RM 2] No accessories have been added to the Broadlink RM config. Only the Learn IR accessory will be accessible on HomeKit.
[2017-4-9 03:39:11] [Broadlink RM 2] Initializing platform accessory 'Learn IR'...
[2017-4-9 03:39:11] Loading 0 accessories...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:`

┌────────────┐     
│ 031-45-xxx │     
└────────────┘     

[2017-4-9 03:39:11] Homebridge is running on port 53xxx.
Discovered Broadlink RM device at 10.0.1.xx (xx:xx:xx:xx:xx:xx)
/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:98
dev.device();
^
TypeError: dev.device is not a function
at module.exports.Broadlink.genDevice (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:98:13)
at Socket.cs.on (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:187:29)
at emitTwo (events.js:106:13)
at Socket.emit (events.js:194:7)
at UDP.onMessage [as onmessage] (dgram.js:545:8)

And this is my config file:

{
"bridge":{
"name":"Homebridge",
"username":"xx:22:xx:xx:xx:xx",
"port":53xxx,
"pin":"031-4x-xxx"
},
"description":"Homebridge",
"accessories":[
],
"platforms":[
{
"platform":"BroadlinkRM",
"name":"Broadlink RM 2",
"accessories":[
]
}
]
}

I ran homebridge on Mac with 10.12.4, Node 7.8. I tried installing Wemo plugin and it works. Then I deleted all stuff and started to setup broadlink. However, every time it said: TypeError: dev.device is not a function.

Could you help me ?

Thank you.

upDown support?

First off, this is great. I have had a sun shade running on 433Mhz that I REALLY wanted to get working with Homekit. This is doing the trick (as a switch) I was digging through the code and noticed up/down accessories are commented out at the moment. I would really like to be able to use the appropriate "open the blind" and "close the bling" language with Siri, I am hoping an up/down accessory would allow that.

New install problem

Hi

I am trying out this plugin for the first time. Even with no amendments to my config.json I get the following errors in my homebridge log output:

Apr 09 18:05:58 raspberrypi homebridge[10067]: [4/9/2017, 6:05:58 PM] ====================
Apr 09 18:05:58 raspberrypi homebridge[10067]: [4/9/2017, 6:05:58 PM] ERROR LOADING PLUGIN homebridge-broadlink-rm:
Apr 09 18:05:58 raspberrypi homebridge[10067]: [4/9/2017, 6:05:58 PM] /usr/lib/node_modules/homebridge-broadlink-rm/accessories/accessory.js:34
Apr 09 18:05:58 raspberrypi homebridge[10067]: async setCharacteristicValue (props, on, callback) {
Apr 09 18:05:58 raspberrypi homebridge[10067]: ^^^^^^^^^^^^^^^^^^^^^^
Apr 09 18:05:58 raspberrypi homebridge[10067]: SyntaxError: Unexpected identifier
Apr 09 18:05:58 raspberrypi homebridge[10067]: at Object.exports.runInThisContext (vm.js:76:16)
Apr 09 18:05:58 raspberrypi homebridge[10067]: at Module._compile (module.js:542:28)
Apr 09 18:05:58 raspberrypi homebridge[10067]: at Object.Module._extensions..js (module.js:579:10)
Apr 09 18:05:58 raspberrypi homebridge[10067]: at Module.load (module.js:487:32)
Apr 09 18:05:58 raspberrypi homebridge[10067]: at tryModuleLoad (module.js:446:12)
Apr 09 18:05:58 raspberrypi homebridge[10067]: at Function.Module._load (module.js:438:3)
Apr 09 18:05:58 raspberrypi homebridge[10067]: at Module.require (module.js:497:17)
Apr 09 18:05:58 raspberrypi homebridge[10067]: at require (internal/module.js:20:19)
Apr 09 18:05:58 raspberrypi homebridge[10067]: at Object. (/usr/lib/node_modules/homebridge-broadlink-rm/accessories/aircon.js:1:92)
Apr 09 18:05:58 raspberrypi homebridge[10067]: at Module._compile (module.js:570:32)
Apr 09 18:05:58 raspberrypi homebridge[10067]: [4/9/2017, 6:05:58 PM] ====================

Any suggestions?

Also - it would be helpful to see a suggestion for config.json for first setup. :)

Thanks

Mqtt service request

Well done and thanks a lot you my friend are a hero. One tiny request if possible. MQTT ? Please can we have the ability to send codes through MQTT. This can help us by integrating it into node-red flows.
Thanks in advance on a job well done.

any queue issue?

I'm using UDP sender to communicate with my broadlink these days. I found out that when setting up a scene with a lot of accessories, some of the packets codes are not being sent (or received by broadlink device).
have you encountered this problem with your plugin? have you managed to make a queue of commands so that no code will be lost when using multiple devices in a scene?
Homebridge does not let the code of one accessory to be related to another so I found no reasonable way of making up a queue, though I found a tricky way around it. But I'm a noob so I hope you could do that better cause I'm considering changing all my accessories to use your plugin :)

Shades percentages

Hey, first of all, great work on the plug-in, thanks for making it!

I have a couple of questions regarding the window covering service that I'd appreciate if anyone could clear before going ahead and buying the rm pro:

Is the "off value" for windows coverings supposed to be the "Stop" button on my controller? Do percentages like opening a covering to 50% work? What about if I set a scene with 5 shades and set them all to close, will the codes overlap and cause none of them actually executing?

These are the problems I have with my current set up, GPIO transmitter and receiver connected to the homebridge-blinds plug in, so I wanted to know if buying an rm pro and using this plug in might solve that issue.

Also, is there a way to easily sniff the rf codes needed in the json with the broadlink?

Thanks in advance!

TypeError:dev.device is not a function

/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:98 dev.device();
^
TypeError:dev.device is not a function at module.exports.Broadlink.genDevice (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:98:13)
at Socket.cs.on (/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:187:29) at emitTwo (events.js:106:13)
at Socket.emit (events.js:194:7) at UDP.onMessage [as onmessage] (dgram.js:545:8)

Cannot start home bridge with

As soon as I add any of the two config entries to my config.json starting home bridge fails:

Initializing AquaraPlatform platform...
/usr/local/lib/node_modules/homebridge/lib/api.js:104
  if (name.indexOf('.') == -1) {
          ^

TypeError: Cannot read property 'indexOf' of undefined
    at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:104:11)
    at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:284:45)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:80:36)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
```
`

My home bridge version is:

`
~/.homebridge $ homebridge --version
....
0.4.16`

Cannot run properly with Homebridge

Thanks Iprhodes. I have been looking for RM plugin very long time. But after installed the plugin yesterday, the homebridge runs with following error. Any thoughts?

[3/17/2017, 9:56:14 AM] ERROR LOADING PLUGIN homebridge-broadlink-rm:
[3/17/2017, 9:56:14 AM] SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Plugin.load (/usr/local/lib/node_modules/homebridge/lib/plugin.js:65:22)
at Server. (/usr/local/lib/node_modules/homebridge/lib/server.js:132:14)
at Array.forEach (native)
[3/17/2017, 9:56:14 AM] ====================

Config schema refractor

There are two thing should be done.

  • The data should be more flexible (currently, we're very opinionated with the type of remote user have with the accessory)
  • We should implement some attribute naming convention based on the HAP-NodeJS lib.

For Boolean characteristic like Characteristic.On, sometimes we can do config like:

{ "on": "xxx", "off": "yyy"

But for other Boolean characteristic like Characteristic.SwingMode, we do the toggle style like:

{ "swingToggle: "xxx" }}}

It feels awkward because we've assumed the style of the remote user will have in the config (which we shouldn't do).

For the naming convention, it's quite a tradeoff thing between config readability and consistent with the HAP-NodeJS

I hopes after this issue, we can solve above internal problems so the plugin can move faster during development.

dev.on("deviceReady", () => { this.emit("deviceReady", dev); });

When I tried to run the homebridge, it throw me this error. May I know what happen?
dev.on("deviceReady", () => { this.emit("deviceReady", dev); });
^

TypeError: Cannot read property 'on' of undefined
at Socket.cs.on (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:183:16)
at emitTwo (events.js:106:13)
at Socket.emit (events.js:194:7)
at UDP.onMessage [as onmessage] (dgram.js:545:8)
root@mediahub:~/.homebridge# dev.on("deviceReady", () => { this.emit("deviceReady", dev); });
bash: syntax error near unexpected token `"deviceReady",'

hello~I got an Air con issues about cool and heat mode

while now I can set any temperature listed blow through SIRI , but not with any cooling or heating state. and I touch the "cool" and "heat" buttons in the AC icon within Home app but nothing happens.
here is my config.json:

{
"platform":"BroadlinkRM",
"name":"Broadlink RM",
"accessories":[
{
"name":"客厅空调",
"type":"air-conditioner",
"data":{
"off":"2600c800c8f21236.....",
"on":"2600c800c8f21236.....",
"temperature28":{
"pseudo-mode":"heat",
"data":"2600c800c8f21236....."
},
"temperature27":{
"pseudo-mode":"heat",
"data":"2600c800c8f21236....."
},
"temperature26":{
"pseudo-mode":"heat",
"data":"2600c800c8f21236....."
},
"temperature25":{
"pseudo-mode":"cool",
"data":"2600c800c8f21236....."
},
"temperature24":{
"pseudo-mode":"cool",
"data":"2600c800c8f21236....."
},
"temperature23":{
"pseudo-mode":"cool",
"data":"2600c800c8f21236....."
}
}
}
]
}

I thought maybe because it didn't define "cool" and "heat" hex code, so that I put
"cool":"2600c800c8f21236.....", "heat":"2600c800c8f21236....."
in the config.json but the whole homebridge service just went wrong.
so, is it something i put wrong? how should I define cool and heat mode hex code?
thank u very much!

Issues loading plugin with last update

tried running install and update. Also tried uninstalling and reinstalling the plugin but all roads lead me here:

[4/19/2017, 7:59:14 AM] ERROR LOADING PLUGIN homebridge-broadlink-rm:
[4/19/2017, 7:59:14 AM] /usr/local/lib/node_modules/homebridge-broadlink-rm/accessories/accessory.js:36
async setCharacteristicValue (props, value, callback) {
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/homebridge-broadlink-rm/accessories/aircon.js:1:92)
[4/19/2017, 7:59:14 AM] ====================

Enquires on supported types

Hi all,

May I know all available types supported?

In the sample config, there are on, thermostat, and channel. Any other supported types? Any link or reference would be helpful as well.

Btw, I am using a thermostat-typed accessory to control my aircon. Despite modes and temperatures, can I have control on other stuff like fan speed?
My current workaround is to map different temperatures to different fan speeds. For example, temperature16 is mapped to 22 deg C with high fan, temperature22 as 22 deg C with medium fan, temperature30 as 22 deg C with low fan.
I'd like to know if you have better solutions.

Thank you.

my Homebridge can't run with this plugin (with RM 3 Mini)

I had homebridge set up for another two plug-ins (aqara and yeelight) and they worked fine, but I can't seem to get homebridge-broadlink-rm to run properly under my clean setup.

I only installed homebridge,yeelight plugin, aqara plugin and broadlink-rm plugin on my raspberry pi (on latest raspian jesse), and I have git installed.

Could the dev or others please help me with this? Thanks a lot in advance.

My config is as follows:

{
    "bridge":
    {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:DD",
        "port": 51827,
        "pin": "XXX-XX-XXX"
    },

    "platforms":
[
    {
        "platform": "AqaraPlatform",
        "sid": ["286c0785e35e"],
        "password": ["1736D1890E264BFE"]
    },
    {
        "platform" : "yeelight",
        "name" : "yeelight"
    },
    {
        "platform":"BroadlinkRM",
        "name":"Broadlink RM"
    }
]
}

and when I run homebridge,it returns:

[4/5/2017, 5:02:53 PM] Loaded plugin: homebridge-aqara
[4/5/2017, 5:02:53 PM] Registering platform 'homebridge-aqara.AqaraPlatform'
[4/5/2017, 5:02:53 PM] ---
[4/5/2017, 5:02:53 PM] Loaded plugin: homebridge-broadlink-rm
[4/5/2017, 5:02:53 PM] Registering platform 'homebridge-broadlink-rm.BroadlinkRM'
[4/5/2017, 5:02:53 PM] ---
[4/5/2017, 5:02:53 PM] Loaded plugin: homebridge-yeelight
[4/5/2017, 5:02:53 PM] Registering platform 'homebridge-yeelight.yeelight'
[4/5/2017, 5:02:53 PM] ---
[4/5/2017, 5:02:53 PM] Loaded config.json with 0 accessories and 3 platforms.
[4/5/2017, 5:02:53 PM] ---
[4/5/2017, 5:02:53 PM] Loading 3 platforms...
[4/5/2017, 5:02:53 PM] Initializing AqaraPlatform platform...
[4/5/2017, 5:02:53 PM] [yeelight] Initializing yeelight platform...
[4/5/2017, 5:02:53 PM] [yeelight] YeePlatform Init
[4/5/2017, 5:02:53 PM] [Broadlink RM] Initializing BroadlinkRM platform...
[4/5/2017, 5:02:53 PM] [Broadlink RM] No accessories have been added to the Broadlink RM config. Only the Learn IR accessory will be accessible on HomeKit.
[4/5/2017, 5:02:53 PM] [Broadlink RM] Initializing platform accessory 'Learn IR'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐
│ XXX-XX-XXX │
└────────────┘

[4/5/2017, 5:02:53 PM] [yeelight] DidFinishLaunching
[4/5/2017, 5:02:53 PM] Homebridge is running on port 51827.
add to multicast group
listen on 0.0.0.0
no did or loc found!
[4/5/2017, 5:02:53 PM] [yeelight] cached accessory: 0x0000000002f8f81a
already in device list!
/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:336
this.prototype.set_power_mask = function(sid_mask, state){
^

TypeError: Cannot set property 'set_power_mask' of undefined
at device.mp1 (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:336:35)
at module.exports.Broadlink.genDevice (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:94:13)
at Socket.cs.on (/usr/lib/node_modules/homebridge-broadlink-rm/node_modules/broadlinkjs/index.js:181:29)
at emitTwo (events.js:106:13)
at Socket.emit (events.js:194:7)
at UDP.onMessage [as onmessage] (dgram.js:545:8)

Add frequency-scan variation of learning RF codes

First of all I have to say, what you did is quite impressive... I have few broadlink devices and the only way I was able to control them eventually is via UDP packets.
To do that, I had to learn the the codes on the app and the capture the packets in Wireshark connected to my phone. so what you did here really makes it easy to use in HomeKit!

another thing is that I wanted to know if it will be possible in the future to also learn some RF codes, since I also have the broadlink RM Pro, I'm using a lot of radio frequency devices, recording those hex codes would be great!

I'm also using this device to control blinds, locks & garage door, so have the ability to choose any type of accessory would really ramp this plugin up, something like emilletfr did in homebridge-httpeverything.

one last thing, if you'll be able to crack that S1C device (security system) and his sensors you will be my king! I'm willing to pay for that too :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.