Skip to content

Commit 231d94d

Browse files
authored
Generate some device notes (Koenkk#2054)
1 parent e7b4d01 commit 231d94d

File tree

2,590 files changed

+9164
-5173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,590 files changed

+9164
-5173
lines changed

docgen/device_page_notes.ts

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
const notes = {
2+
awox: (definition) => {
3+
if (definition.vendor.toLowerCase() === 'awox') {
4+
return `
5+
## Warning: degrades network performance
6+
AwoX devices are known to cause network instability. If your Zigbee network has poor performance or you are seeing errors like \`NO_NETWORK_ROUTE\` you should remove this device from the network.
7+
`
8+
}
9+
},
10+
hueRouterPair: (definition) => {
11+
if (definition.vendor === 'Philips' && definition.exposes.find((e) => e.type === 'light')) {
12+
const hueGo = `
13+
### Button long-press
14+
The first-generation Hue Go can be reset by long pressing the button on the bottom of the unit, [as advised by Philips on Twitter](https://twitter.com/tweethue/status/937713840728559621).
15+
They suggest keeping the button pressed for 35 seconds. After about 25 seconds the light will start doing some flashes: keep pressing anyway for the whole 35. **The power cord has to be connected while doing this procedure**.
16+
`;
17+
return `
18+
## Pairing
19+
New Bulbs are automatically in pairing mode.
20+
Factory resetting a Hue bulb can be accomplished in 5 ways which are described below. After resetting the bulb will automatically connect.
21+
22+
### Touchlink factory reset
23+
See [Touchlink](../guide/usage/touchlink.md)
24+
25+
### Hue bridge
26+
When the bulb is still connected to the Hue bridge, you can simply factory reset the bulb
27+
by removing it from the bridge via the Hue app. Orphaned bulbs (configured to connect to a non-existing Zigbee network) can be adopted by a Hue bridge by entering the 6 character serial number in the Philips Hue app.
28+
29+
### Hue dimmer switch
30+
With [one](./324131092621.md) of the [two](./929002398602.md) Hue Dimmer switches it is possible to put the bulbs into a factory reset.
31+
32+
1. Power-supply the bulb
33+
2. Bring the dimmer switch next to the bulb, as close as possible
34+
3. Hold the I/On and 0/Off button pressed simultaneously for 10 to 12 seconds until…
35+
4. The bulb flashes a couple of times. Don't release the buttons until the last flash + a safety second
36+
5. Switch the bulb off and on again: it can now be paired again.
37+
38+
See also the [VIDEO: Factory reset a Hue bulb with Hue dimmer switch](https://www.youtube.com/watch?v=qvlEAELiJKs).
39+
40+
### Bluetooth (if supported by device)
41+
Install the Philips Hue Bluetooth app for [Android](https://play.google.com/store/apps/details?id=com.signify.hue.blue)
42+
or [iOS](https://apps.apple.com/us/app/philips-hue-bluetooth/id1456604186). You can use the app to trigger a factory reset on a paired light. (Note: The light will only be in bluetooth pairing
43+
mode for a couple of minutes after power-on)
44+
45+
### TRADFRI remote control
46+
This may also be possible with the
47+
[Tradfri Remote Control](https://www.ikea.com/us/en/images/products/tradfri-remote-control__0489469_PE623665_S4.JPG)
48+
by pressing and holding the reset button on the bottom of the remote (next to the battery).
49+
[This may not always work, even if the Hue bulb starts flashing](https://github.com/Koenkk/zigbee2mqtt/issues/296#issuecomment-416923751).
50+
51+
${definition.description.toLowerCase().includes(' go') ? hueGo : ''}
52+
53+
## Power-on behavior
54+
This device allows you to set the power-on behavior. Note that this requires at least November/December '18 firmware update of the device.
55+
Send a MQTT command to [\`zigbee2mqtt/FRIENDLY_NAME/set\`](../guide/usage/mqtt_topics_and_messages.md#zigbee2mqtt-friendly-name-set) with the following payload.
56+
57+
\`\`\`js
58+
{
59+
"hue_power_on_behavior": "on", // default, on, off, recover
60+
"hue_power_on_brightness": 125, // same values as brightness
61+
"hue_power_on_color_temperature": 280, // same values as color_temp
62+
"hue_power_on_color": "#0000FF" // color in hex notation, e.g. #0000FF = blue
63+
}
64+
\`\`\`
65+
66+
Attribute Value | Description
67+
----------------|-----------------------------------------------
68+
default | reset to factory default value
69+
on | bulb on after power loss with configured brightness, color-temperature and color
70+
off | bulb off after power loss
71+
recover | last running state after power loss
72+
73+
Rules:
74+
- \`hue_power_on_behavior\` value always has to be provided
75+
- \`hue_power_on_brightness\`, \`hue_power_on_color_temperature\` and \`hue_power_on_color\` can only be provided when \`hue_power_on_behavior\` = \`on\`
76+
- \`hue_power_on_color_temperature\` and \`hue_power_on_color\` cannot be provided together, only one can be set
77+
- When setting \`hue_power_on_behavior\` = \`on\`, any not provided values will be reset to their factory defaults
78+
79+
Note: if \`hue_power_on_behavior\` is set to \`off\`, then the only way to turn the bulb on will be through a paired smart device (see pairing above). You will NOT be able to turn the bulb on by sequentially switching power on and off.
80+
`
81+
}
82+
},
83+
}
84+
85+
export function getNotes(definition) {
86+
return Object.values(notes).map((n) => n(definition)).filter((n) => n).join('\n');
87+
}

docgen/generate_device.ts

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { generatePage, getAddedAt, getImage, normalizeModel } from "./utils";
77
import { generateExpose } from "./device_page_exposes";
88
import { generateOptions } from "./device_page_options";
99
import { devicesBaseDir, imageBaseDir, imageBaseUrl } from "./constants";
10+
import { getNotes } from "./device_page_notes";
1011

1112
export function resolveDeviceFile(model) {
1213
return path.resolve(devicesBaseDir, `${ normalizeModel(model) }.md`);
@@ -69,6 +70,7 @@ ${ device.whiteLabel ? `| White-label | ${ device.whiteLabel.map((d) => `${ d.ve
6970
<!-- Notes BEGIN: You can edit here. Add "## Notes" headline if not already present. -->
7071
${ notes || "\n"}
7172
<!-- Notes END: Do not edit below this line -->
73+
${ getNotes(device) }
7274
${ device.hasOwnProperty('ota') ? `
7375
## OTA updates
7476
This device supports OTA updates, for more information see [OTA updates](../guide/usage/ota_updates.md).

docs/devices/0140302.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pageClass: device-page
2828
<!-- Notes END: Do not edit below this line -->
2929

3030

31+
3132
## Options
3233
*[How to use device type specific configuration](../guide/configuration/devices-groups.md#specific-device-options)*
3334

docs/devices/014G2461.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ To factory reset:
3838
* Insert battery and hold button pressed for about 3 seconds (display will flash all symbols).
3939
<!-- Notes END: Do not edit below this line -->
4040

41+
4142
## OTA updates
4243
This device supports OTA updates, for more information see [OTA updates](../guide/usage/ota_updates.md).
4344

docs/devices/020B0B.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pageClass: device-page
2828
<!-- Notes END: Do not edit below this line -->
2929

3030

31+
3132
## Options
3233
*[How to use device type specific configuration](../guide/configuration/devices-groups.md#specific-device-options)*
3334

docs/devices/02973.B.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pageClass: device-page
2828
<!-- Notes END: Do not edit below this line -->
2929

3030

31+
3132
## Options
3233
*[How to use device type specific configuration](../guide/configuration/devices-groups.md#specific-device-options)*
3334

docs/devices/03981.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pageClass: device-page
2828
<!-- Notes END: Do not edit below this line -->
2929

3030

31+
3132
## Options
3233
*[How to use device type specific configuration](../guide/configuration/devices-groups.md#specific-device-options)*
3334

docs/devices/0402946.md

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ To retrieve the state, send a `get` message to the device topic (`zigbee2mqtt/DE
4646
<!-- Notes END: Do not edit below this line -->
4747

4848

49+
4950
## Options
5051
*[How to use device type specific configuration](../guide/configuration/devices-groups.md#specific-device-options)*
5152

docs/devices/046677476816.md

+15-13
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,22 @@ pageClass: device-page
2323

2424

2525
<!-- Notes BEGIN: You can edit here. Add "## Notes" headline if not already present. -->
26-
## Notes
2726

2827

29-
### Pairing
30-
Factory resetting a Hue bulb can be accomplished in 5 ways.
31-
After resetting the bulb will automatically connect.
28+
<!-- Notes END: Do not edit below this line -->
29+
30+
## Pairing
31+
New Bulbs are automatically in pairing mode.
32+
Factory resetting a Hue bulb can be accomplished in 5 ways which are described below. After resetting the bulb will automatically connect.
3233

33-
#### Touchlink factory reset
34+
### Touchlink factory reset
3435
See [Touchlink](../guide/usage/touchlink.md)
3536

36-
#### Hue bridge
37+
### Hue bridge
3738
When the bulb is still connected to the Hue bridge, you can simply factory reset the bulb
3839
by removing it from the bridge via the Hue app. Orphaned bulbs (configured to connect to a non-existing Zigbee network) can be adopted by a Hue bridge by entering the 6 character serial number in the Philips Hue app.
3940

40-
#### Hue dimmer switch
41+
### Hue dimmer switch
4142
With [one](./324131092621.md) of the [two](./929002398602.md) Hue Dimmer switches it is possible to put the bulbs into a factory reset.
4243

4344
1. Power-supply the bulb
@@ -48,21 +49,22 @@ With [one](./324131092621.md) of the [two](./929002398602.md) Hue Dimmer switche
4849

4950
See also the [VIDEO: Factory reset a Hue bulb with Hue dimmer switch](https://www.youtube.com/watch?v=qvlEAELiJKs).
5051

51-
#### Bluetooth (if supported by device)
52+
### Bluetooth (if supported by device)
5253
Install the Philips Hue Bluetooth app for [Android](https://play.google.com/store/apps/details?id=com.signify.hue.blue)
5354
or [iOS](https://apps.apple.com/us/app/philips-hue-bluetooth/id1456604186). You can use the app to trigger a factory reset on a paired light. (Note: The light will only be in bluetooth pairing
5455
mode for a couple of minutes after power-on)
5556

56-
#### TRADFRI remote control
57+
### TRADFRI remote control
5758
This may also be possible with the
5859
[Tradfri Remote Control](https://www.ikea.com/us/en/images/products/tradfri-remote-control__0489469_PE623665_S4.JPG)
5960
by pressing and holding the reset button on the bottom of the remote (next to the battery).
6061
[This may not always work, even if the Hue bulb starts flashing](https://github.com/Koenkk/zigbee2mqtt/issues/296#issuecomment-416923751).
6162

6263

63-
### Power-on behavior
64+
65+
## Power-on behavior
6466
This device allows you to set the power-on behavior. Note that this requires at least November/December '18 firmware update of the device.
65-
Send a MQTT command to [`zigbee2mqtt/FRIENDLY_NAME/set`](https://www.zigbee2mqtt.io/../guide/usage/mqtt_topics_and_messages.md#zigbee2mqttfriendly_nameset) with the following payload.
67+
Send a MQTT command to [`zigbee2mqtt/FRIENDLY_NAME/set`](../guide/usage/mqtt_topics_and_messages.md#zigbee2mqtt-friendly-name-set) with the following payload.
6668

6769
```js
6870
{
@@ -86,8 +88,8 @@ Rules:
8688
- `hue_power_on_color_temperature` and `hue_power_on_color` cannot be provided together, only one can be set
8789
- When setting `hue_power_on_behavior` = `on`, any not provided values will be reset to their factory defaults
8890

89-
Note: if `hue_power_on_behavior` is set to `off`, then the only way to turn the bulb on will be through a paired smart device (see pairing above). You will NOT be able to turn the bulb on by sequentially switching power on and off.
90-
<!-- Notes END: Do not edit below this line -->
91+
Note: if `hue_power_on_behavior` is set to `off`, then the only way to turn the bulb on will be through a paired smart device (see pairing above). You will NOT be able to turn the bulb on by sequentially switching power on and off.
92+
9193

9294
## OTA updates
9395
This device supports OTA updates, for more information see [OTA updates](../guide/usage/ota_updates.md).

docs/devices/046677551780.md

+15-13
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,22 @@ pageClass: device-page
2323

2424

2525
<!-- Notes BEGIN: You can edit here. Add "## Notes" headline if not already present. -->
26-
## Notes
2726

2827

29-
### Pairing
30-
Factory resetting a Hue bulb can be accomplished in 5 ways.
31-
After resetting the bulb will automatically connect.
28+
<!-- Notes END: Do not edit below this line -->
29+
30+
## Pairing
31+
New Bulbs are automatically in pairing mode.
32+
Factory resetting a Hue bulb can be accomplished in 5 ways which are described below. After resetting the bulb will automatically connect.
3233

33-
#### Touchlink factory reset
34+
### Touchlink factory reset
3435
See [Touchlink](../guide/usage/touchlink.md)
3536

36-
#### Hue bridge
37+
### Hue bridge
3738
When the bulb is still connected to the Hue bridge, you can simply factory reset the bulb
3839
by removing it from the bridge via the Hue app. Orphaned bulbs (configured to connect to a non-existing Zigbee network) can be adopted by a Hue bridge by entering the 6 character serial number in the Philips Hue app.
3940

40-
#### Hue dimmer switch
41+
### Hue dimmer switch
4142
With [one](./324131092621.md) of the [two](./929002398602.md) Hue Dimmer switches it is possible to put the bulbs into a factory reset.
4243

4344
1. Power-supply the bulb
@@ -48,21 +49,22 @@ With [one](./324131092621.md) of the [two](./929002398602.md) Hue Dimmer switche
4849

4950
See also the [VIDEO: Factory reset a Hue bulb with Hue dimmer switch](https://www.youtube.com/watch?v=qvlEAELiJKs).
5051

51-
#### Bluetooth (if supported by device)
52+
### Bluetooth (if supported by device)
5253
Install the Philips Hue Bluetooth app for [Android](https://play.google.com/store/apps/details?id=com.signify.hue.blue)
5354
or [iOS](https://apps.apple.com/us/app/philips-hue-bluetooth/id1456604186). You can use the app to trigger a factory reset on a paired light. (Note: The light will only be in bluetooth pairing
5455
mode for a couple of minutes after power-on)
5556

56-
#### TRADFRI remote control
57+
### TRADFRI remote control
5758
This may also be possible with the
5859
[Tradfri Remote Control](https://www.ikea.com/us/en/images/products/tradfri-remote-control__0489469_PE623665_S4.JPG)
5960
by pressing and holding the reset button on the bottom of the remote (next to the battery).
6061
[This may not always work, even if the Hue bulb starts flashing](https://github.com/Koenkk/zigbee2mqtt/issues/296#issuecomment-416923751).
6162

6263

63-
### Power-on behavior
64+
65+
## Power-on behavior
6466
This device allows you to set the power-on behavior. Note that this requires at least November/December '18 firmware update of the device.
65-
Send a MQTT command to [`zigbee2mqtt/FRIENDLY_NAME/set`](https://www.zigbee2mqtt.io/../guide/usage/mqtt_topics_and_messages.md#zigbee2mqttfriendly_nameset) with the following payload.
67+
Send a MQTT command to [`zigbee2mqtt/FRIENDLY_NAME/set`](../guide/usage/mqtt_topics_and_messages.md#zigbee2mqtt-friendly-name-set) with the following payload.
6668

6769
```js
6870
{
@@ -86,8 +88,8 @@ Rules:
8688
- `hue_power_on_color_temperature` and `hue_power_on_color` cannot be provided together, only one can be set
8789
- When setting `hue_power_on_behavior` = `on`, any not provided values will be reset to their factory defaults
8890

89-
Note: if `hue_power_on_behavior` is set to `off`, then the only way to turn the bulb on will be through a paired smart device (see pairing above). You will NOT be able to turn the bulb on by sequentially switching power on and off.
90-
<!-- Notes END: Do not edit below this line -->
91+
Note: if `hue_power_on_behavior` is set to `off`, then the only way to turn the bulb on will be through a paired smart device (see pairing above). You will NOT be able to turn the bulb on by sequentially switching power on and off.
92+
9193

9294
## OTA updates
9395
This device supports OTA updates, for more information see [OTA updates](../guide/usage/ota_updates.md).

docs/devices/046677552343.md

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Rules:
5555
Note: if `hue_power_on_behavior` is set to `off`, then the only way to turn the bulb on will be through a paired smart device (see pairing above). You will NOT be able to turn the bulb on by sequentially switching power on and off.
5656
<!-- Notes END: Do not edit below this line -->
5757

58+
5859
## OTA updates
5960
This device supports OTA updates, for more information see [OTA updates](../guide/usage/ota_updates.md).
6061

docs/devices/046677562229.md

+15-13
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,22 @@ pageClass: device-page
2323

2424

2525
<!-- Notes BEGIN: You can edit here. Add "## Notes" headline if not already present. -->
26-
## Notes
2726

2827

29-
### Pairing
30-
Factory resetting a Hue bulb can be accomplished in 5 ways.
31-
After resetting the bulb will automatically connect.
28+
<!-- Notes END: Do not edit below this line -->
29+
30+
## Pairing
31+
New Bulbs are automatically in pairing mode.
32+
Factory resetting a Hue bulb can be accomplished in 5 ways which are described below. After resetting the bulb will automatically connect.
3233

33-
#### Touchlink factory reset
34+
### Touchlink factory reset
3435
See [Touchlink](../guide/usage/touchlink.md)
3536

36-
#### Hue bridge
37+
### Hue bridge
3738
When the bulb is still connected to the Hue bridge, you can simply factory reset the bulb
3839
by removing it from the bridge via the Hue app. Orphaned bulbs (configured to connect to a non-existing Zigbee network) can be adopted by a Hue bridge by entering the 6 character serial number in the Philips Hue app.
3940

40-
#### Hue dimmer switch
41+
### Hue dimmer switch
4142
With [one](./324131092621.md) of the [two](./929002398602.md) Hue Dimmer switches it is possible to put the bulbs into a factory reset.
4243

4344
1. Power-supply the bulb
@@ -48,21 +49,22 @@ With [one](./324131092621.md) of the [two](./929002398602.md) Hue Dimmer switche
4849

4950
See also the [VIDEO: Factory reset a Hue bulb with Hue dimmer switch](https://www.youtube.com/watch?v=qvlEAELiJKs).
5051

51-
#### Bluetooth (if supported by device)
52+
### Bluetooth (if supported by device)
5253
Install the Philips Hue Bluetooth app for [Android](https://play.google.com/store/apps/details?id=com.signify.hue.blue)
5354
or [iOS](https://apps.apple.com/us/app/philips-hue-bluetooth/id1456604186). You can use the app to trigger a factory reset on a paired light. (Note: The light will only be in bluetooth pairing
5455
mode for a couple of minutes after power-on)
5556

56-
#### TRADFRI remote control
57+
### TRADFRI remote control
5758
This may also be possible with the
5859
[Tradfri Remote Control](https://www.ikea.com/us/en/images/products/tradfri-remote-control__0489469_PE623665_S4.JPG)
5960
by pressing and holding the reset button on the bottom of the remote (next to the battery).
6061
[This may not always work, even if the Hue bulb starts flashing](https://github.com/Koenkk/zigbee2mqtt/issues/296#issuecomment-416923751).
6162

6263

63-
### Power-on behavior
64+
65+
## Power-on behavior
6466
This device allows you to set the power-on behavior. Note that this requires at least November/December '18 firmware update of the device.
65-
Send a MQTT command to [`zigbee2mqtt/FRIENDLY_NAME/set`](https://www.zigbee2mqtt.io/../guide/usage/mqtt_topics_and_messages.md#zigbee2mqttfriendly_nameset) with the following payload.
67+
Send a MQTT command to [`zigbee2mqtt/FRIENDLY_NAME/set`](../guide/usage/mqtt_topics_and_messages.md#zigbee2mqtt-friendly-name-set) with the following payload.
6668

6769
```js
6870
{
@@ -86,8 +88,8 @@ Rules:
8688
- `hue_power_on_color_temperature` and `hue_power_on_color` cannot be provided together, only one can be set
8789
- When setting `hue_power_on_behavior` = `on`, any not provided values will be reset to their factory defaults
8890

89-
Note: if `hue_power_on_behavior` is set to `off`, then the only way to turn the bulb on will be through a paired smart device (see pairing above). You will NOT be able to turn the bulb on by sequentially switching power on and off.
90-
<!-- Notes END: Do not edit below this line -->
91+
Note: if `hue_power_on_behavior` is set to `off`, then the only way to turn the bulb on will be through a paired smart device (see pairing above). You will NOT be able to turn the bulb on by sequentially switching power on and off.
92+
9193

9294
## OTA updates
9395
This device supports OTA updates, for more information see [OTA updates](../guide/usage/ota_updates.md).

0 commit comments

Comments
 (0)