Add mysensors types (#1031)

* Add more types.
* Fix some rendering issues.
This commit is contained in:
Martin Hjelmare 2016-10-02 10:44:37 +02:00 committed by GitHub
parent 2fffb5d097
commit bb9533e546
6 changed files with 91 additions and 71 deletions

View File

@ -2,14 +2,13 @@
layout: page layout: page
title: "MySensors HVAC" title: "MySensors HVAC"
description: "Instructions how to integrate MySensors climate into Home Assistant." description: "Instructions how to integrate MySensors climate into Home Assistant."
date: 2016-09-14 18:20 +0100 date: 2016-10-01 15:00 +0200
sidebar: true sidebar: true
comments: false comments: false
sharing: true sharing: true
footer: true footer: true
logo: mysensors.png logo: mysensors.png
ha_category: Climate ha_category: Climate
featured: false
ha_release: 0.29 ha_release: 0.29
--- ---
@ -20,13 +19,13 @@ The following actuator types are supported:
##### MySensors version 1.5 and higher ##### MySensors version 1.5 and higher
S_TYPE | V_TYPE S_TYPE | V_TYPE
------------|------------- -------|-----------------------------------------------------------------------------
S_HVAC | V_HVAC_FLOW_STATE*, V_HVAC_SETPOINT_HEAT, V_HVAC_SETPOINT_COOL, V_HVAC_SPEED S_HVAC | V_HVAC_FLOW_STATE*, V_HVAC_SETPOINT_HEAT, V_HVAC_SETPOINT_COOL, V_HVAC_SPEED
V_HVAC_FLOW_STATE is mapped to the state of the Climate component in HA as follows: V_HVAC_FLOW_STATE is mapped to the state of the Climate component in HA as follows:
Home Assistant State | MySensors State Home Assistant State | MySensors State
-----------------------|---------------------- ---------------------|----------------
STATE_COOL | CoolOn STATE_COOL | CoolOn
STATE_HEAT | HeatOn STATE_HEAT | HeatOn
STATE_AUTO | Off STATE_AUTO | Off
@ -44,25 +43,32 @@ For more information, visit the [serial api] of MySensors.
```cpp ```cpp
/* /*
* Documentation: http://www.mysensors.org * Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org * Support Forum: http://forum.mysensors.org
* */
*/
#include <MySensor.h> #include <MySensor.h>
/* Include all the other Necessary code here. The example code is limited to message exchange for mysensors with the controller (ha)*/ /*
* Include all the other Necessary code here.
* The example code is limited to message exchange for mysensors
* with the controller (ha).
*/
#define CHILD_ID_HVAC 0 // childId #define CHILD_ID_HVAC 0 // childId
MyMessage msgHVACSetPointC(CHILD_ID_HVAC, V_HVAC_SETPOINT_COOL); MyMessage msgHVACSetPointC(CHILD_ID_HVAC, V_HVAC_SETPOINT_COOL);
MyMessage msgHVACSpeed(CHILD_ID_HVAC, V_HVAC_SPEED); MyMessage msgHVACSpeed(CHILD_ID_HVAC, V_HVAC_SPEED);
MyMessage msgHVACFlowState(CHILD_ID_HVAC, V_HVAC_FLOW_STATE); MyMessage msgHVACFlowState(CHILD_ID_HVAC, V_HVAC_FLOW_STATE);
/* Include all the other Necessary code here. The example code is limited to message exchange for mysensors with the controller (ha)*/ /*
* Include all the other Necessary code here.
* The example code is limited to message exchange for mysensors
* with the controller (ha).
*/
void setup() void setup()
{ {
// Startup and initialize MySensors library.
// Startup and initialize MySensors library. Set callback for incoming messages. // Set callback for incoming messages.
gw.begin(incomingMessage); gw.begin(incomingMessage);
// Send the sketch version information to the gateway and Controller // Send the sketch version information to the gateway and Controller
@ -74,6 +80,11 @@ void setup()
gw.send(msgHVACSpeed.set("Max")); gw.send(msgHVACSpeed.set("Max"));
} }
void loop() {
// Process incoming messages (like config from server)
gw.process();
}
void incomingMessage(const MyMessage &message) { void incomingMessage(const MyMessage &message) {
String recvData = message.data; String recvData = message.data;
recvData.trim(); recvData.trim();
@ -99,13 +110,6 @@ void incomingMessage(const MyMessage &message) {
break; break;
} }
} }
void loop() {
// Process incoming messages (like config from server)
gw.process();
}
``` ```
[main component]: /components/mysensors/ [main component]: /components/mysensors/

View File

@ -2,14 +2,14 @@
layout: page layout: page
title: "MySensors Cover" title: "MySensors Cover"
description: "Instructions how to integrate MySensors covers into Home Assistant." description: "Instructions how to integrate MySensors covers into Home Assistant."
date: 2016-09-25 11:30 +0100 date: 2016-10-01 15:00 +0200
sidebar: true sidebar: true
comments: false comments: false
sharing: true sharing: true
footer: true footer: true
logo: mysensors.png logo: mysensors.png
ha_category: Cover ha_category: Cover
ha_release: 0.30 ha_release: "0.30"
--- ---
Integrates MySensors covers into Home Assistant. See the [main component] for configuration instructions. Integrates MySensors covers into Home Assistant. See the [main component] for configuration instructions.
@ -17,13 +17,15 @@ Integrates MySensors covers into Home Assistant. See the [main component] for co
The following actuator types are supported: The following actuator types are supported:
##### MySensors version 1.4 ##### MySensors version 1.4
S_TYPE | V_TYPE S_TYPE | V_TYPE
------------|------------- --------|--------------------------------------------
S_COVER | V_UP, V_DOWN, V_STOP, [V_DIMMER or V_LIGHT] S_COVER | V_UP, V_DOWN, V_STOP, [V_DIMMER or V_LIGHT]
##### MySensors version 1.5 and higher ##### MySensors version 1.5 and higher
S_TYPE | V_TYPE S_TYPE | V_TYPE
------------|------------- --------|-------------------------------------------------
S_COVER | V_UP, V_DOWN, V_STOP, [V_PERCENTAGE or V_STATUS] S_COVER | V_UP, V_DOWN, V_STOP, [V_PERCENTAGE or V_STATUS]
All V_TYPES above are required. Use V_PERCENTAGE (or V_DIMMER) if you know the exact position of the cover in percent, use V_STATUS (or V_LIGHT) if you don't. All V_TYPES above are required. Use V_PERCENTAGE (or V_DIMMER) if you know the exact position of the cover in percent, use V_STATUS (or V_LIGHT) if you don't.

View File

@ -2,14 +2,13 @@
layout: page layout: page
title: "MySensors Light" title: "MySensors Light"
description: "Instructions how to integrate MySensors lights into Home Assistant." description: "Instructions how to integrate MySensors lights into Home Assistant."
date: 2016-04-13 14:20 +0100 date: 2016-10-01 15:00 +0200
sidebar: true sidebar: true
comments: false comments: false
sharing: true sharing: true
footer: true footer: true
logo: mysensors.png logo: mysensors.png
ha_category: Light ha_category: Light
featured: false
ha_release: 0.13 ha_release: 0.13
--- ---

View File

@ -2,7 +2,7 @@
layout: page layout: page
title: "MySensors" title: "MySensors"
description: "Instructions how to integrate MySensors sensors into Home Assistant." description: "Instructions how to integrate MySensors sensors into Home Assistant."
date: 2016-08-26 23:00 +0200 date: 2016-10-01 15:00 +0200
sidebar: true sidebar: true
comments: false comments: false
sharing: true sharing: true
@ -10,7 +10,7 @@ footer: true
logo: mysensors.png logo: mysensors.png
ha_category: Hub ha_category: Hub
featured: true featured: true
ha_iot_class: "Local Polling" ha_iot_class: "Local Push"
--- ---
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 devices to Home Assistant, after [presentation](#presentation) is done. 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 devices to Home Assistant, after [presentation](#presentation) is done.

View File

@ -2,7 +2,7 @@
layout: page layout: page
title: "MySensors Sensor" title: "MySensors Sensor"
description: "Instructions how to integrate MySensors sensors into Home Assistant." description: "Instructions how to integrate MySensors sensors into Home Assistant."
date: 2016-06-12 15:00 +0200 date: 2016-10-01 15:00 +0200
sidebar: true sidebar: true
comments: false comments: false
sharing: true sharing: true
@ -50,6 +50,15 @@ S_LIGHT_LEVEL | V_LEVEL
S_AIR_QUALITY | V_LEVEL (replaces V_DUST_LEVEL) S_AIR_QUALITY | V_LEVEL (replaces V_DUST_LEVEL)
S_DUST | V_LEVEL (replaces V_DUST_LEVEL) S_DUST | V_LEVEL (replaces V_DUST_LEVEL)
##### MySensors version 2.0 and higher
S_TYPE | V_TYPE
----------------|--------------------------
S_INFO | V_TEXT
S_GAS | V_FLOW, V_VOLUME
S_GPS | V_POSITION
S_WATER_QUALITY | V_TEMP, V_PH, V_ORP, V_EC
### {% linkable_title Custom unit of measurement %} ### {% linkable_title Custom unit of measurement %}
Some sensor value types are not specific for a certain sensor type. These do not have a default unit of measurement in Home Assistant. For example, the V_LEVEL type can be used for different sensor types, dust, sound, vibration etc. Some sensor value types are not specific for a certain sensor type. These do not have a default unit of measurement in Home Assistant. For example, the V_LEVEL type can be used for different sensor types, dust, sound, vibration etc.

View File

@ -2,7 +2,7 @@
layout: page layout: page
title: "MySensors Switch" title: "MySensors Switch"
description: "Instructions how to integrate MySensors switches into Home Assistant." description: "Instructions how to integrate MySensors switches into Home Assistant."
date: 2016-06-12 15:00 +0200 date: 2016-10-01 15:00 +0200
sidebar: true sidebar: true
comments: false comments: false
sharing: true sharing: true
@ -19,7 +19,7 @@ The following actuator types are supported:
##### MySensors version 1.4 and higher ##### MySensors version 1.4 and higher
S_TYPE | V_TYPE S_TYPE | V_TYPE
---------|-------------- ---------|-------------------
S_DOOR | V_ARMED S_DOOR | V_ARMED
S_MOTION | V_ARMED S_MOTION | V_ARMED
S_SMOKE | V_ARMED S_SMOKE | V_ARMED
@ -30,7 +30,7 @@ S_IR | V_IR_SEND, V_LIGHT
##### MySensors version 1.5 and higher ##### MySensors version 1.5 and higher
S_TYPE | V_TYPE S_TYPE | V_TYPE
-------------|------------------ -------------|----------------------
S_LIGHT | V_STATUS S_LIGHT | V_STATUS
S_BINARY | [V_STATUS or V_LIGHT] S_BINARY | [V_STATUS or V_LIGHT]
S_SPRINKLER | V_STATUS S_SPRINKLER | V_STATUS
@ -39,6 +39,12 @@ S_SOUND | V_ARMED
S_VIBRATION | V_ARMED S_VIBRATION | V_ARMED
S_MOISTURE | V_ARMED S_MOISTURE | V_ARMED
##### MySensors version 2.0 and higher
S_TYPE | V_TYPE
----------------|---------
S_WATER_QUALITY | V_STATUS
All V_TYPES for each S_TYPE above are required to activate the actuator for the platform. Use either V_LIGHT or V_STATUS depending on library version for cases where that V_TYPE is required. All V_TYPES for each S_TYPE above are required to activate the actuator for the platform. Use either V_LIGHT or V_STATUS depending on library version for cases where that V_TYPE is required.
For more information, visit the [serial api] of MySensors. For more information, visit the [serial api] of MySensors.