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
title: "MySensors HVAC"
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
comments: false
sharing: true
footer: true
logo: mysensors.png
ha_category: Climate
featured: false
ha_release: 0.29
---
@ -20,13 +19,13 @@ The following actuator types are supported:
##### MySensors version 1.5 and higher
S_TYPE | V_TYPE
------------|-------------
-------|-----------------------------------------------------------------------------
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:
Home Assistant State | MySensors State
-----------------------|----------------------
---------------------|----------------
STATE_COOL | CoolOn
STATE_HEAT | HeatOn
STATE_AUTO | Off
@ -46,23 +45,30 @@ For more information, visit the [serial api] of MySensors.
/*
* Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org
*
*/
#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
MyMessage msgHVACSetPointC(CHILD_ID_HVAC, V_HVAC_SETPOINT_COOL);
MyMessage msgHVACSpeed(CHILD_ID_HVAC, V_HVAC_SPEED);
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()
{
// Startup and initialize MySensors library. Set callback for incoming messages.
// Startup and initialize MySensors library.
// Set callback for incoming messages.
gw.begin(incomingMessage);
// Send the sketch version information to the gateway and Controller
@ -74,6 +80,11 @@ void setup()
gw.send(msgHVACSpeed.set("Max"));
}
void loop() {
// Process incoming messages (like config from server)
gw.process();
}
void incomingMessage(const MyMessage &message) {
String recvData = message.data;
recvData.trim();
@ -99,13 +110,6 @@ void incomingMessage(const MyMessage &message) {
break;
}
}
void loop() {
// Process incoming messages (like config from server)
gw.process();
}
```
[main component]: /components/mysensors/

View File

@ -2,14 +2,14 @@
layout: page
title: "MySensors Cover"
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
comments: false
sharing: true
footer: true
logo: mysensors.png
ha_category: Cover
ha_release: 0.30
ha_release: "0.30"
---
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:
##### MySensors version 1.4
S_TYPE | V_TYPE
------------|-------------
--------|--------------------------------------------
S_COVER | V_UP, V_DOWN, V_STOP, [V_DIMMER or V_LIGHT]
##### MySensors version 1.5 and higher
S_TYPE | V_TYPE
------------|-------------
--------|-------------------------------------------------
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.

View File

@ -2,14 +2,13 @@
layout: page
title: "MySensors Light"
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
comments: false
sharing: true
footer: true
logo: mysensors.png
ha_category: Light
featured: false
ha_release: 0.13
---

View File

@ -2,7 +2,7 @@
layout: page
title: "MySensors"
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
comments: false
sharing: true
@ -10,7 +10,7 @@ footer: true
logo: mysensors.png
ha_category: Hub
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.

View File

@ -2,7 +2,7 @@
layout: page
title: "MySensors Sensor"
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
comments: false
sharing: true
@ -50,6 +50,15 @@ S_LIGHT_LEVEL | V_LEVEL
S_AIR_QUALITY | 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 %}
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
title: "MySensors Switch"
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
comments: false
sharing: true
@ -19,7 +19,7 @@ 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
@ -30,7 +30,7 @@ S_IR | V_IR_SEND, V_LIGHT
##### MySensors version 1.5 and higher
S_TYPE | V_TYPE
-------------|------------------
-------------|----------------------
S_LIGHT | V_STATUS
S_BINARY | [V_STATUS or V_LIGHT]
S_SPRINKLER | V_STATUS
@ -39,6 +39,12 @@ S_SOUND | V_ARMED
S_VIBRATION | 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.
For more information, visit the [serial api] of MySensors.