Skip to content

Commit

Permalink
docs: update Readme with pioneer config and out node information
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmattmatt committed Dec 2, 2018
1 parent 190ce56 commit 3f7d984
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 44 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 mattmattmatt
Copyright (c) 2018 mattmattmatt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
71 changes: 28 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,65 @@
[![npm version](https://img.shields.io/npm/v/node-red-contrib-yeelight-compat-hue.svg)](https://www.npmjs.com/package/node-red-contrib-yeelight-compat-hue)
[![Travis build status](https://img.shields.io/travis/mattmattmatt/node-red-contrib-yeelight-compat-hue/master.svg)](https://travis-ci.org/mattmattmatt/node-red-contrib-yeelight-compat-hue)
[![GitHub last commit](https://img.shields.io/github/last-commit/mattmattmatt/node-red-contrib-yeelight-compat-hue.svg)](https://github.com/mattmattmatt/node-red-contrib-yeelight-compat-hue)
[![npm downloads](https://img.shields.io/npm/dt/node-red-contrib-yeelight-compat-hue.svg)](https://www.npmjs.com/package/node-red-contrib-yeelight-compat-hue)
[![npm version](https://img.shields.io/npm/v/node-red-contrib-avr-pioneer.svg)](https://www.npmjs.com/package/node-red-contrib-avr-pioneer)
[![Travis build status](https://img.shields.io/travis/mattmattmatt/node-red-contrib-avr-pioneer/master.svg)](https://travis-ci.org/mattmattmatt/node-red-contrib-avr-pioneer)
[![GitHub last commit](https://img.shields.io/github/last-commit/mattmattmatt/node-red-contrib-avr-pioneer.svg)](https://github.com/mattmattmatt/node-red-contrib-avr-pioneer)
[![npm downloads](https://img.shields.io/npm/dt/node-red-contrib-avr-pioneer.svg)](https://www.npmjs.com/package/node-red-contrib-avr-pioneer)

[![nodeyeelight-compat-hue](https://img.shields.io/badge/Node--RED-yeelight--compat--hue-ee0077.svg)](https://flows.nodered.org/node/node-red-contrib-yeelight-compat-hue)
[![nodeavr-pioneer](https://img.shields.io/badge/Node--RED-avr--pioneer-ee0077.svg)](https://flows.nodered.org/node/node-red-contrib-avr-pioneer)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

# node-red-contrib-yeelight-compat-hue
# node-red-contrib-avr-pioneer

[Node-RED](http://nodered.org) nodes to control [MiHome/Xiaomi Yeelights](https://www.yeelight.com/) from your smart home, somewhat [API compatible with node-red-contrib-node-hue nodes](https://github.com/jdomeij/node-red-contrib-node-hue#input-node).
[Node-RED](http://nodered.org) nodes to control Pioneer audio/video receivers from your smart home. Tested with the Pioneer VSX-824.


## Install

Run the following command in your Node-RED user directory – typically `~/.node-red`:

```bash
npm i node-red-contrib-yeelight-compat-hue -S
npm i node-red-contrib-avr-pioneer -S
```

## Usage

Provides two palette nodes – one to send control commands to a Yeelight, and one to receive messages when a Yeelight's state changes.
Provides two palette nodes – one to send control commands to a Pioneer AVR, and one to receive messages when receiver's state changes.

![](https://github.com/mattmattmatt/node-red-contrib-yeelight-compat-hue/blob/master/tooling/nodes.png?raw=true)
![](https://github.com/mattmattmatt/node-red-contrib-avr-pioneer/blob/master/tooling/nodes.png?raw=true)


### Output node

Sets the state of the selected Yeelight device.
Sets the state of the receiver.

`msg.payload` must be an object containing the new state's properties of the selected Yeelight device.

| Property | Details |
| :---| :---|
| `on` | Sets the `on` state where the value is `true` or `false`|
| `bri` | Sets the brightness value from `0` to `255` |
| `ct` | Sets the color temperature value in Kelvin from `1700` to `6500` |
| `hue` | Sets the hue value from `0` to `65535` |
| `sat` | Sets the saturation value from `0` to `255` |
| `hex` | Sets the rgb value from `#00000` to `#FFFFFF` |
| `duration` | Sets a transition time in milliseconds, e.g. `4500` means 4.5 seconds. Defaults to `500` |
| `on` | Sets the `on` state where the value is `true` or `false` |
| `muted` | Sets the `muted` state where the value is `true` or `false` |
| `volume` | Sets the volume from `0` to `153` |
| `channel` | Sets the active input channel, must be one of `CD`, `TUNER`, `DVD`, `TV`, `SAT/CBL`, `VIDEO`, `DVR/BDR`, `IPOD/USB`, `BD`, `ADAPTER`, `NETRADIO`, `MEDIA SERVER`, `FAVORITE`, `GAME` |

#### Example payloads

```JSON
{
"on": true,
"bri": 255,
"hue": 913,
"sat": 255,
"duration": 5000
"on": true
}
```
```JSON
{
"on": true,
"bri": 120,
"hex": "#AA00CC",
"channel": "CD",
"volume": 111
}
```
```JSON
{
"ct": 2200,
"muted": true
}
```
The node supports sending [color temperature values](http://www.erco.com/service/rgbw/), [hex values](http://htmlcolorcodes.com/) and [HSV values](https://alloyui.com/examples/color-picker/hsv).
The brightness value will always have to be provided separately and will not be deducted from e.g. a hex value's brightness component.

##### References
This node's input payload structure is based on [node-red-contrib-node-hue](https://github.com/jdomeij/node-red-contrib-node-hue#input-node), which is based on [Node Hue API](https://github.com/peter-murray/node-hue-api#lightstate-options).


<!--
### Input node
Returns the current state of the selected Yeelight device.
Expand Down Expand Up @@ -112,31 +100,28 @@ Additionally, a fresh state can be requested from the connected Yeelight by send
```
The `raw` property of `msg.payload` contains the raw state information retrieved from the Yeelight for advanced usage.
Note that value scales are not compatible with _node-red-contrib-node-hue_, and that `hue` value and `rgb` value will not match since only the correct color per `color_mode` is returned by the lamp.
Note that value scales are not compatible with _node-red-contrib-node-hue_, and that `hue` value and `rgb` value will not match since only the correct color per `color_mode` is returned by the lamp. -->


### Configuration node

Configures a Yeelight connection to one light in the local network.
Configures a Pioneer connection to one receiver in the local network.

#### Options

| Property | Details |
| :--- | :--- |
| Hostname | An IP address or other hostname that points to a Yeelight on the network |
| Port number | Port number the Yeelight is accessible over, default being `55443` |

#### Details
**Developer mode/LAN control** has to be activated (usually from within the Yeelight app) to allow local control of the Yeelight through Node-RED. You can <a href="https://www.yeelight.com/en_US/developer" target="_blank">learn more about Yeelight developer options</a> here.
| Hostname | An IP address or other hostname that points to a Pioneer receiver in the network |
| Port number | Port number the Pioneer receiver is accessible over, default being `8102` |

## Support
If something is not working as expected, if you think there is a feature missing, or if you think this node could be improved in other ways, [please create an issue](https://github.com/mattmattmatt/node-red-contrib-yeelight-compat-hue/issues) on GitHub.
If something is not working as expected, if you think there is a feature missing, or if you think this node could be improved in other ways, [please create an issue](https://github.com/mattmattmatt/node-red-contrib-avr-pioneer/issues) on GitHub.

### Links

- Find [node-red-contrib-yeelight-compat-hue in the Node-RED flow library](https://flows.nodered.org/node/node-red-contrib-yeelight-compat-hue)
- Find [node-red-contrib-yeelight-compat-hue on npm](https://www.npmjs.com/package/node-red-contrib-yeelight-compat-hue)
- Find [node-red-contrib-yeelight-compat-hue on GitHub](https://github.com/mattmattmatt/node-red-contrib-yeelight-compat-hue)
- Find [node-red-contrib-avr-pioneer in the Node-RED flow library](https://flows.nodered.org/node/node-red-contrib-avr-pioneer)
- Find [node-red-contrib-avr-pioneer on npm](https://www.npmjs.com/package/node-red-contrib-avr-pioneer)
- Find [node-red-contrib-avr-pioneer on GitHub](https://github.com/mattmattmatt/node-red-contrib-avr-pioneer)

### Hello bear
![](https://www.reactiongifs.com/r/hello-bear.gif)

0 comments on commit 3f7d984

Please sign in to comment.