From 5e5380917bb4a8e4c9b0f594f21128773f9370fb Mon Sep 17 00:00:00 2001 From: MartinHjelmare Date: Fri, 29 Jan 2016 01:51:27 +0100 Subject: [PATCH] Update mysensors documentation * Specify config defaults and supported protocol versions. * Add guide for presenting a sensor. * Specify supported S_TYPES and V_TYPES for sensors and switches. --- source/_components/mysensors.markdown | 27 ++++++++++-- source/_components/sensor.mysensors.markdown | 44 ++++++++++++++++++++ source/_components/switch.mysensors.markdown | 27 ++++++++++++ 3 files changed, 95 insertions(+), 3 deletions(-) diff --git a/source/_components/mysensors.markdown b/source/_components/mysensors.markdown index 83482b97904..26214db8b51 100644 --- a/source/_components/mysensors.markdown +++ b/source/_components/mysensors.markdown @@ -14,6 +14,8 @@ featured: true The [MySensors](https://www.mysensors.org) project combines Arduino boards with NRF24L01 radio boards to build sensor networks. The component will automatically add all available switches and sensors to Home Assistant. +### Configuration + Integrate your Serial MySensors Gateway by adding the following to your `configuration.yaml` file: ```yaml @@ -32,13 +34,32 @@ mysensors: Configuration variables: - **port** (*Required*): The port where your board is connected to your Home Assistant host. -- **debug** (*Optional*): Enable or disable verbose debug logging. -- **persistence** (*Optional*): Enable or disable local persistence of sensor information. If this is disabled, then each sensor will need to send presentation messages after Home Assistant starts. +- **debug** (*Optional*): Enable or disable verbose debug logging. Default is false. +- **persistence** (*Optional*): Enable or disable local persistence of sensor information. If this is disabled, then each sensor will need to send presentation messages after Home Assistant starts. Default is true. - **persistence_file** (*Optional*): Path to a file to save sensor information. The file extension determines the file type. Currently supported file types are 'pickle' and 'json'. -- **version** (*Optional*): Specifies the MySensors protocol version to use (ex. 1.4, 1.5). +- **version** (*Optional*): Specifies the MySensors protocol version to use. Supports 1.4 and 1.5. Default is 1.4. If you are using an original Arduino the port will be named `ttyACM*`. The exact number can be determined with the command shown below. ```bash $ ls /dev/ttyACM* ``` + +### Presentation + +Present a MySensors sensor or actuator, by following these steps: + +1. Connect your gateway to your computer. +2. Configure the MySensors component in configuration.yaml. +3. Start hass. +4. Wait for "gateway started" in the log output. +5. Write and upload your MySensors sketch to the sensor. Make sure you: + - Either use a manual node id, or AUTO for requesting a node id from the controller, in gw.begin(). + - Send sketch name. + - Present the sensor's S_TYPE. + - Send at least one initial value per V_TYPE. +6. Start the sensor. + +Visit the [library api] of MySensors for more information. + +[library api]: https://www.mysensors.org/download/sensor_api_15 diff --git a/source/_components/sensor.mysensors.markdown b/source/_components/sensor.mysensors.markdown index 26538464526..bc58715d98b 100644 --- a/source/_components/sensor.mysensors.markdown +++ b/source/_components/sensor.mysensors.markdown @@ -14,4 +14,48 @@ featured: false Integrates MySensors sensors into Home Assistant. See the [main component] for configuration instructions. +The following sensor types are supported: + +##### MySensors version 1.4 and higher + +S_TYPE | V_TYPE +-------------------|--------------------------------------- +S_DOOR | V_TRIPPED +S_MOTION | V_TRIPPED +S_SMOKE | V_TRIPPED +S_TEMP | V_TEMP +S_HUM | V_HUM +S_BARO | V_PRESSURE, V_FORECAST +S_WIND | V_WIND, V_GUST +S_RAIN | V_RAIN, V_RAINRATE +S_UV | V_UV +S_WEIGHT | V_WEIGHT, V_IMPEDANCE +S_POWER | V_WATT, V_KWH +S_DISTANCE | V_DISTANCE +S_LIGHT_LEVEL | V_LIGHT_LEVEL +S_IR | V_IR_SEND, V_IR_RECEIVE +S_WATER | V_FLOW, V_VOLUME +S_AIR_QUALITY | V_DUST_LEVEL +S_CUSTOM | V_VAR1, V_VAR2, V_VAR3, V_VAR4, V_VAR5 +S_DUST | V_DUST_LEVEL +S_SCENE_CONTROLLER | V_SCENE_ON, V_SCENE_OFF + +##### MySensors version 1.5 and higher + +S_TYPE | V_TYPE +---------------|---------------------------------- +S_COLOR_SENSOR | V_RGB +S_MULTIMETER | V_VOLTAGE, V_CURRENT, V_IMPEDANCE +S_SPRINKLER | V_TRIPPED +S_WATER_LEAK | V_TRIPPED +S_SOUND | V_TRIPPED, V_LEVEL +S_VIBRATION | V_TRIPPED, V_LEVEL +S_MOISTURE | V_TRIPPED, V_LEVEL +S_LIGHT_LEVEL | V_LEVEL +S_AIR_QUALITY | V_LEVEL (replaces V_DUST_LEVEL) +S_DUST | V_LEVEL (replaces V_DUST_LEVEL) + +For more information, visit the [serial api] of MySensors. + [main component]: /components/mysensors/ +[serial api]: https://www.mysensors.org/download/serial_api_15 diff --git a/source/_components/switch.mysensors.markdown b/source/_components/switch.mysensors.markdown index 00b90022d5b..43de6457344 100644 --- a/source/_components/switch.mysensors.markdown +++ b/source/_components/switch.mysensors.markdown @@ -14,4 +14,31 @@ featured: false Integrates MySensors switches into Home Assistant. See the [main component] for configuration instructions. +The following actuator types are supported: + +##### MySensors version 1.4 and higher + +S_TYPE | V_TYPE +---------|-------------- +S_DOOR | V_ARMED +S_MOTION | V_ARMED +S_SMOKE | V_ARMED +S_LIGHT | V_LIGHT +S_LOCK | V_LOCK_STATUS + +##### MySensors version 1.5 and higher + +S_TYPE | V_TYPE +-------------|------------------ +S_LIGHT | V_STATUS +S_BINARY | V_STATUS, V_LIGHT +S_SPRINKLER | V_STATUS +S_WATER_LEAK | V_ARMED +S_SOUND | V_ARMED +S_VIBRATION | V_ARMED +S_MOISTURE | V_ARMED + +For more information, visit the [serial api] of MySensors. + [main component]: /components/mysensors/ +[serial api]: https://www.mysensors.org/download/serial_api_15