-
Notifications
You must be signed in to change notification settings - Fork 25
/
index.html
153 lines (131 loc) · 7.55 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<script type="text/javascript">
RED.nodes.registerType('alexa-local',{
category: 'input',
color: '#3FADB5',
defaults: {
devicename: {value:"", required:true},
inputtrigger: {value:false}
},
inputs:1,
outputs:1,
icon: "alexa-local.png",
label: function() {
return this.devicename || "Alexa device";
}
});
</script>
<script type="text/x-red" data-template-name="alexa-local">
<div class="form-row">
<label for="node-input-devicename"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-devicename" placeholder="Ceiling light">
</div>
<div class="form-tips">Alexa uses this <strong>Name</strong> to indentify your device by voice. This has to be unique for each device. If you have renamed your device, please ask Alexa to discover again.</div>
<p></p>
<div class="form-row">
<label for="node-input-inputtrigger"><i class="icon-tag"></i> Input Trigger</label>
<input type="checkbox" id="node-input-inputtrigger">
</div>
<div class="form-tips">Enable execution of this node via <strong>Input</strong> signal. Please refer to node Info for valid formats for input parameter. Be careful of infinite loop if you enable this.</div>
</script>
<script type="text/x-red" data-help-name="alexa-local">
<p>This is a dead-simple node for adding Alexa capability to your flow.
<br/>
<strong>NO extra Alexa Skills required.</strong>
<br/>
<strong>NO account linking required.</strong>
</p>
<h3>How to use</h3>
<ul>
<li>Add this node to your flow</li>
<li>Give it a unique <strong>Name</strong></li>
<li>Ask "Alexa, discover devices"</li>
<li>That's it!</li>
</ul>
<p><a href="https://raw.githubusercontent.com/originallyus/node-red-contrib-alexa-local/master/screenshot2.png" target="_blank"><img src="https://raw.githubusercontent.com/originallyus/node-red-contrib-alexa-local/master/screenshot2.png"></a></p>
<p>
Developed by the super cool folks at <a href="http://originally.us" target="_blank"><strong>Originally US</strong></a>
<p/>
<h3>Known issue:</h3>
<ul>
<li>Doesn't support Echo Gen 2 & Echo Plus local devices discovery yet</li>
<li>Echo Show, Echo Spot, Sonos One do not have the capability to discovery devices locally</li>
</ul>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">string | on/off</span>
</dt>
<dd> "on" or "off" trigger from Alexa.
<br/>
when dimming command is issued, this payload stays "on" as long as <strong><i>bri</i></strong> > 0. In other words, payload == "off" only when <strong><i>bri</i></strong> == 0.
</dd>
<dt>bri <span class="property-type">int | 0-100</span></dt>
<dd> support for dimming commands
<br/>value ranges from 0 to 100 (percent). Use this property to get the variable level from dimming command such as "Alexa, dim the light to 49%".
<br/>
When dimming command is not used, this parameter will be 0 for "off" and 100 for "on" command.
</dd>
<dt>bri_normalized<span class="property-type">float | 0.0-1.0</span></dt>
<dd> support for dimming commands
<br/>value ranges from 0.0 to 1.0. Similar to above <strong><i>bri</i></strong> parameter, except this has been normalized to [0.0 - 1.0] range.
<br/>
When dimming command is not used, this parameter will be 0.0 for "off" and 1.0 for "on" command.
</dd>
<dt>change_direction<span class="property-type">int | -1/0/1</span></dt>
<dd> support for decrease/increase command
<br/>when decrease/increase command is issued, this parameter is set to -1/1 accordingly; normally it is 0.
</dd>
<dt>on_off_command<span class="property-type">boolean | true/false</span></dt>
<dd> indicate whether the command was an on/off command or a dimming/brightness command
<br/>eg. Alexa turn on/off light -> true
<br/> Alexa set light to 39% -> false
<br/> Alexa set light to 0% -> false
</dd>
<dt>others...</dt>
<dd> attach a Debug node for complete msg object to see other parameters available</dd>
</dl>
<h3>Input (optional)</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">on/off/0-100</span>
</dt>
<dd> This is for updating the 'bri' value when there are external changes to the device via other inputs.
<br/>If <strong>'Input Trigger'</strong> is enabled, this will also trigger this node. Accepted values are:
<br/> • number: 0-100
<br/> • "off": equivalent to input 0
<br/> • "on": equivalent to input 100
<br/> • "toggle": toggle between On and Off
<br/> • "increase": increase bri by 25%
<br/> • "brighter": increase bri by 25%
<br/> • "decrease": decrease bri by 25%
<br/> • "dimmer": decrease bri by 25%
<br/> • "+N": increase bri by N% (string)
<br/> • "-N": decrease bri by N% (string)
</dd>
<p><a href="https://raw.githubusercontent.com/originallyus/node-red-contrib-alexa-local/master/screenshot_input.png" target="_blank"><img src="https://raw.githubusercontent.com/originallyus/node-red-contrib-alexa-local/master/screenshot_input.png"></a></p>
</dl>
<h3>Notes</h3>
<p>Each Node ID is used to uniquely identify & persist each device seen by Alexa. If you delete and re-create this Node, the device is no longer the same. You would have to forget old device in Alexa app. Changing of <strong>Name</strong> is supported, but you would need to ask Alexa to re-discover devices again.</p>
<h3>FAQ</h3>
<p><strong>Does it support German or other languages?</strong>
<br/>Yes! As long as Alexa supports that language.
</p>
<p><strong>Does it support door lock/curtain/AV/TV or other types of devices?</strong>
<br/>Unfortunately no. In order to keep this node so simple to use, it was designed to emulate a Philips Hue bridge & device within local network. Amazon Echo is hardcoded to support only on/off/dimming command via this route. Any other type of support has to go through the Alexa Skills route (cloud-based). There is another node does just that <a href="https://github.com/hardillb/node-red-contrib-alexa-home-skill" target="_blank">node-red-contrib-alexa-home-skill</a>
</p>
<p><strong>Example dimming commands</strong>
<br/> • Alexa, set Kitchen Light to 40%
<br/> • Alexa, set Aircon temperature to 30
<br/> • Alexa, increase Kitchen Light
<br/> • Alexa, lower Kitchen Light by 15%
</p>
<p><strong>Do I need to enable any Alexa Skils?</strong>
<br/>No. Nah. Non. Nein. Never.
</p>
<p><strong>I have some suggestions, how do I contact you?</strong>
<br/>Please create an issue in <a href="https://github.com/originallyus/node-red-contrib-alexa-local/issues" target="_blank">Github</a>
</p>
<p><strong>How do I control my (non-smart) devices at home with NodeRED?</strong>
<br/>Check out <a href="https://play.google.com/store/apps/details?id=us.originally.tasker&hl=en" target="_blank">RMPlugin app</a> also developed by us. Here's an <a href="https://www.youtube.com/watch?v=QUKYKhK57sc" target="_blank">intro video</a> about the hardware.
</p>
</script>