Skip to content

Commit

Permalink
Generate some device notes (Koenkk#2054)
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk authored May 24, 2023
1 parent e7b4d01 commit 231d94d
Show file tree
Hide file tree
Showing 2,590 changed files with 9,164 additions and 5,173 deletions.
87 changes: 87 additions & 0 deletions docgen/device_page_notes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
const notes = {
awox: (definition) => {
if (definition.vendor.toLowerCase() === 'awox') {
return `
## Warning: degrades network performance
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.
`
}
},
hueRouterPair: (definition) => {
if (definition.vendor === 'Philips' && definition.exposes.find((e) => e.type === 'light')) {
const hueGo = `
### Button long-press
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).
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**.
`;
return `
## Pairing
New Bulbs are automatically in pairing mode.
Factory resetting a Hue bulb can be accomplished in 5 ways which are described below. After resetting the bulb will automatically connect.
### Touchlink factory reset
See [Touchlink](../guide/usage/touchlink.md)
### Hue bridge
When the bulb is still connected to the Hue bridge, you can simply factory reset the bulb
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.
### Hue dimmer switch
With [one](./324131092621.md) of the [two](./929002398602.md) Hue Dimmer switches it is possible to put the bulbs into a factory reset.
1. Power-supply the bulb
2. Bring the dimmer switch next to the bulb, as close as possible
3. Hold the I/On and 0/Off button pressed simultaneously for 10 to 12 seconds until…
4. The bulb flashes a couple of times. Don't release the buttons until the last flash + a safety second
5. Switch the bulb off and on again: it can now be paired again.
See also the [VIDEO: Factory reset a Hue bulb with Hue dimmer switch](https://www.youtube.com/watch?v=qvlEAELiJKs).
### Bluetooth (if supported by device)
Install the Philips Hue Bluetooth app for [Android](https://play.google.com/store/apps/details?id=com.signify.hue.blue)
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
mode for a couple of minutes after power-on)
### TRADFRI remote control
This may also be possible with the
[Tradfri Remote Control](https://www.ikea.com/us/en/images/products/tradfri-remote-control__0489469_PE623665_S4.JPG)
by pressing and holding the reset button on the bottom of the remote (next to the battery).
[This may not always work, even if the Hue bulb starts flashing](https://github.com/Koenkk/zigbee2mqtt/issues/296#issuecomment-416923751).
${definition.description.toLowerCase().includes(' go') ? hueGo : ''}
## Power-on behavior
This device allows you to set the power-on behavior. Note that this requires at least November/December '18 firmware update of the device.
Send a MQTT command to [\`zigbee2mqtt/FRIENDLY_NAME/set\`](../guide/usage/mqtt_topics_and_messages.md#zigbee2mqtt-friendly-name-set) with the following payload.
\`\`\`js
{
"hue_power_on_behavior": "on", // default, on, off, recover
"hue_power_on_brightness": 125, // same values as brightness
"hue_power_on_color_temperature": 280, // same values as color_temp
"hue_power_on_color": "#0000FF" // color in hex notation, e.g. #0000FF = blue
}
\`\`\`
Attribute Value | Description
----------------|-----------------------------------------------
default | reset to factory default value
on | bulb on after power loss with configured brightness, color-temperature and color
off | bulb off after power loss
recover | last running state after power loss
Rules:
- \`hue_power_on_behavior\` value always has to be provided
- \`hue_power_on_brightness\`, \`hue_power_on_color_temperature\` and \`hue_power_on_color\` can only be provided when \`hue_power_on_behavior\` = \`on\`
- \`hue_power_on_color_temperature\` and \`hue_power_on_color\` cannot be provided together, only one can be set
- When setting \`hue_power_on_behavior\` = \`on\`, any not provided values will be reset to their factory defaults
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.
`
}
},
}

export function getNotes(definition) {
return Object.values(notes).map((n) => n(definition)).filter((n) => n).join('\n');
}
2 changes: 2 additions & 0 deletions docgen/generate_device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { generatePage, getAddedAt, getImage, normalizeModel } from "./utils";
import { generateExpose } from "./device_page_exposes";
import { generateOptions } from "./device_page_options";
import { devicesBaseDir, imageBaseDir, imageBaseUrl } from "./constants";
import { getNotes } from "./device_page_notes";

export function resolveDeviceFile(model) {
return path.resolve(devicesBaseDir, `${ normalizeModel(model) }.md`);
Expand Down Expand Up @@ -69,6 +70,7 @@ ${ device.whiteLabel ? `| White-label | ${ device.whiteLabel.map((d) => `${ d.ve
<!-- Notes BEGIN: You can edit here. Add "## Notes" headline if not already present. -->
${ notes || "\n"}
<!-- Notes END: Do not edit below this line -->
${ getNotes(device) }
${ device.hasOwnProperty('ota') ? `
## OTA updates
This device supports OTA updates, for more information see [OTA updates](../guide/usage/ota_updates.md).
Expand Down
1 change: 1 addition & 0 deletions docs/devices/0140302.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pageClass: device-page
<!-- Notes END: Do not edit below this line -->



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

Expand Down
1 change: 1 addition & 0 deletions docs/devices/014G2461.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ To factory reset:
* Insert battery and hold button pressed for about 3 seconds (display will flash all symbols).
<!-- Notes END: Do not edit below this line -->


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

Expand Down
1 change: 1 addition & 0 deletions docs/devices/020B0B.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pageClass: device-page
<!-- Notes END: Do not edit below this line -->



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

Expand Down
1 change: 1 addition & 0 deletions docs/devices/02973.B.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pageClass: device-page
<!-- Notes END: Do not edit below this line -->



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

Expand Down
1 change: 1 addition & 0 deletions docs/devices/03981.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pageClass: device-page
<!-- Notes END: Do not edit below this line -->



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

Expand Down
1 change: 1 addition & 0 deletions docs/devices/0402946.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ To retrieve the state, send a `get` message to the device topic (`zigbee2mqtt/DE
<!-- Notes END: Do not edit below this line -->



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

Expand Down
28 changes: 15 additions & 13 deletions docs/devices/046677476816.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,22 @@ pageClass: device-page


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


### Pairing
Factory resetting a Hue bulb can be accomplished in 5 ways.
After resetting the bulb will automatically connect.
<!-- Notes END: Do not edit below this line -->

## Pairing
New Bulbs are automatically in pairing mode.
Factory resetting a Hue bulb can be accomplished in 5 ways which are described below. After resetting the bulb will automatically connect.

#### Touchlink factory reset
### Touchlink factory reset
See [Touchlink](../guide/usage/touchlink.md)

#### Hue bridge
### Hue bridge
When the bulb is still connected to the Hue bridge, you can simply factory reset the bulb
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.

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

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

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

#### Bluetooth (if supported by device)
### Bluetooth (if supported by device)
Install the Philips Hue Bluetooth app for [Android](https://play.google.com/store/apps/details?id=com.signify.hue.blue)
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
mode for a couple of minutes after power-on)

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


### Power-on behavior

## Power-on behavior
This device allows you to set the power-on behavior. Note that this requires at least November/December '18 firmware update of the device.
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.
Send a MQTT command to [`zigbee2mqtt/FRIENDLY_NAME/set`](../guide/usage/mqtt_topics_and_messages.md#zigbee2mqtt-friendly-name-set) with the following payload.

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

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.
<!-- Notes END: Do not edit below this line -->
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.


## OTA updates
This device supports OTA updates, for more information see [OTA updates](../guide/usage/ota_updates.md).
Expand Down
28 changes: 15 additions & 13 deletions docs/devices/046677551780.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,22 @@ pageClass: device-page


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


### Pairing
Factory resetting a Hue bulb can be accomplished in 5 ways.
After resetting the bulb will automatically connect.
<!-- Notes END: Do not edit below this line -->

## Pairing
New Bulbs are automatically in pairing mode.
Factory resetting a Hue bulb can be accomplished in 5 ways which are described below. After resetting the bulb will automatically connect.

#### Touchlink factory reset
### Touchlink factory reset
See [Touchlink](../guide/usage/touchlink.md)

#### Hue bridge
### Hue bridge
When the bulb is still connected to the Hue bridge, you can simply factory reset the bulb
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.

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

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

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

#### Bluetooth (if supported by device)
### Bluetooth (if supported by device)
Install the Philips Hue Bluetooth app for [Android](https://play.google.com/store/apps/details?id=com.signify.hue.blue)
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
mode for a couple of minutes after power-on)

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


### Power-on behavior

## Power-on behavior
This device allows you to set the power-on behavior. Note that this requires at least November/December '18 firmware update of the device.
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.
Send a MQTT command to [`zigbee2mqtt/FRIENDLY_NAME/set`](../guide/usage/mqtt_topics_and_messages.md#zigbee2mqtt-friendly-name-set) with the following payload.

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

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.
<!-- Notes END: Do not edit below this line -->
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.


## OTA updates
This device supports OTA updates, for more information see [OTA updates](../guide/usage/ota_updates.md).
Expand Down
1 change: 1 addition & 0 deletions docs/devices/046677552343.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Rules:
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.
<!-- Notes END: Do not edit below this line -->


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

Expand Down
28 changes: 15 additions & 13 deletions docs/devices/046677562229.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,22 @@ pageClass: device-page


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


### Pairing
Factory resetting a Hue bulb can be accomplished in 5 ways.
After resetting the bulb will automatically connect.
<!-- Notes END: Do not edit below this line -->

## Pairing
New Bulbs are automatically in pairing mode.
Factory resetting a Hue bulb can be accomplished in 5 ways which are described below. After resetting the bulb will automatically connect.

#### Touchlink factory reset
### Touchlink factory reset
See [Touchlink](../guide/usage/touchlink.md)

#### Hue bridge
### Hue bridge
When the bulb is still connected to the Hue bridge, you can simply factory reset the bulb
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.

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

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

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

#### Bluetooth (if supported by device)
### Bluetooth (if supported by device)
Install the Philips Hue Bluetooth app for [Android](https://play.google.com/store/apps/details?id=com.signify.hue.blue)
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
mode for a couple of minutes after power-on)

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


### Power-on behavior

## Power-on behavior
This device allows you to set the power-on behavior. Note that this requires at least November/December '18 firmware update of the device.
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.
Send a MQTT command to [`zigbee2mqtt/FRIENDLY_NAME/set`](../guide/usage/mqtt_topics_and_messages.md#zigbee2mqtt-friendly-name-set) with the following payload.

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

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.
<!-- Notes END: Do not edit below this line -->
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.


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

0 comments on commit 231d94d

Please sign in to comment.