diff --git a/source/_components/climate.mysensors.markdown b/source/_components/climate.mysensors.markdown index 4620a13a46f7..0f39382c8b17 100644 --- a/source/_components/climate.mysensors.markdown +++ b/source/_components/climate.mysensors.markdown @@ -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 --- @@ -19,18 +18,18 @@ 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 +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 -STATE_OFF | AutoChangeOver +Home Assistant State | MySensors State +---------------------|---------------- +STATE_COOL | CoolOn +STATE_HEAT | HeatOn +STATE_AUTO | Off +STATE_OFF | AutoChangeOver Currently humidity, away_mode, aux_heat, swing_mode is not supported. This will be included in later versions as feasible. @@ -44,67 +43,72 @@ For more information, visit the [serial api] of MySensors. ```cpp /* - * Documentation: http://www.mysensors.org - * Support Forum: http://forum.mysensors.org - * - */ +* Documentation: http://www.mysensors.org +* Support Forum: http://forum.mysensors.org +*/ #include -/* 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. + gw.begin(incomingMessage); - // Startup and initialize MySensors library. Set callback for incoming messages. - gw.begin(incomingMessage); - - // Send the sketch version information to the gateway and Controller - gw.sendSketchInfo("HVAC", "0.1"); + // Send the sketch version information to the gateway and Controller + gw.sendSketchInfo("HVAC", "0.1"); - gw.present(CHILD_ID_HVAC, S_HVAC, "Thermostat"); - gw.send(msgHVACFlowState.set("Off")); - gw.send(msgHVACSetPointC.set(target_temp)); - gw.send(msgHVACSpeed.set("Max")); -} - -void incomingMessage(const MyMessage &message) { - String recvData = message.data; - recvData.trim(); - switch (message.type) { - case V_HVAC_SPEED: - if(recvData.equalsIgnoreCase("auto")) fan_speed = 0; - else if(recvData.equalsIgnoreCase("min")) fan_speed = 1; - else if(recvData.equalsIgnoreCase("normal")) fan_speed = 2; - else if(recvData.equalsIgnoreCase("max")) fan_speed = 3; - processHVAC(); - break; - case V_HVAC_SETPOINT_COOL: - target_temp = message.getFloat(); - processHVAC(); - break; - case V_HVAC_FLOW_STATE: - if(recvData.equalsIgnoreCase("coolon") && (!Present_Power_On )){ - togglePower(); - } - else if(recvData.equalsIgnoreCase("off") && Present_Power_On ){ - togglePower(); - } - break; - } + gw.present(CHILD_ID_HVAC, S_HVAC, "Thermostat"); + gw.send(msgHVACFlowState.set("Off")); + gw.send(msgHVACSetPointC.set(target_temp)); + gw.send(msgHVACSpeed.set("Max")); } void loop() { + // Process incoming messages (like config from server) + gw.process(); +} - // Process incoming messages (like config from server) - gw.process(); - +void incomingMessage(const MyMessage &message) { + String recvData = message.data; + recvData.trim(); + switch (message.type) { + case V_HVAC_SPEED: + if(recvData.equalsIgnoreCase("auto")) fan_speed = 0; + else if(recvData.equalsIgnoreCase("min")) fan_speed = 1; + else if(recvData.equalsIgnoreCase("normal")) fan_speed = 2; + else if(recvData.equalsIgnoreCase("max")) fan_speed = 3; + processHVAC(); + break; + case V_HVAC_SETPOINT_COOL: + target_temp = message.getFloat(); + processHVAC(); + break; + case V_HVAC_FLOW_STATE: + if(recvData.equalsIgnoreCase("coolon") && (!Present_Power_On )){ + togglePower(); + } + else if(recvData.equalsIgnoreCase("off") && Present_Power_On ){ + togglePower(); + } + break; + } } ``` diff --git a/source/_components/cover.mysensors.markdown b/source/_components/cover.mysensors.markdown index 59861272eca0..15e873710171 100644 --- a/source/_components/cover.mysensors.markdown +++ b/source/_components/cover.mysensors.markdown @@ -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,14 +17,16 @@ 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] + +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] + +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. diff --git a/source/_components/light.mysensors.markdown b/source/_components/light.mysensors.markdown index b66c1b93401f..dbf689f0362a 100644 --- a/source/_components/light.mysensors.markdown +++ b/source/_components/light.mysensors.markdown @@ -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 --- diff --git a/source/_components/mysensors.markdown b/source/_components/mysensors.markdown index 65ea4dab2dd9..8e0dad4a470f 100644 --- a/source/_components/mysensors.markdown +++ b/source/_components/mysensors.markdown @@ -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. diff --git a/source/_components/sensor.mysensors.markdown b/source/_components/sensor.mysensors.markdown index 1420e0372796..5e40de148fc5 100644 --- a/source/_components/sensor.mysensors.markdown +++ b/source/_components/sensor.mysensors.markdown @@ -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. diff --git a/source/_components/switch.mysensors.markdown b/source/_components/switch.mysensors.markdown index 1e9b9a11dd05..078af164984f 100644 --- a/source/_components/switch.mysensors.markdown +++ b/source/_components/switch.mysensors.markdown @@ -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.