From b44bd5c83b76b1b05107daef552c8ebac5b8a094 Mon Sep 17 00:00:00 2001 From: Federico Leoni Date: Thu, 31 Oct 2019 12:36:05 -0300 Subject: [PATCH 1/4] Added some details about changes done on 6.7.1 --- Home-Assistant.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Home-Assistant.md b/Home-Assistant.md index b3ed0c1c..ae8a9478 100644 --- a/Home-Assistant.md +++ b/Home-Assistant.md @@ -57,9 +57,28 @@ Automatic discovery is currently supported for: - In Tasmota console type the following command: `SetOption30 1` - Use Hass [light.switch](https://www.home-assistant.io/components/light.switch/) component - Sensor - Announced as Home Assistant `sensor` -- Button - Announced as Home Assistant `binary sensor` +- Button - Announced as Home Assistant `binary sensor` + - As normal behavior a button will automatically turn off after `one second` - Switch - Announced as Home Assistant `binary sensor` +Starting from release 6.7.1 to have `buttons` and `switches` discovered `switchtopic` or `buttontopic` must be set to default value `0` and they will listen to `sonoff/stat/RESULT` topic. +```yaml +MQT: sonoff/stat/RESULT = {"BUTTON1":"TOGGLE"} +MQT: sonoff/stat/RESULT = {"POWER":"ON"} +MQT: sonoff/stat/POWER = ON +``` +This option leave to the user the ability to get a more granular control over entities, for example with a simple rule: +```yaml +Rule1 ON Button1#STATE DO Var1 %value% ENDON +``` +With the rule enabled , on button press the result will be +```yaml +RUL: BUTTON1#STATE performs "var1 2" +MQT: sonoff/stat/RESULT = {"Var1":"2"} +MQT: sonoff/stat/RESULT = {"BUTTON1":"TOGGLE"} +``` +and the relay will NOT be switched. + For other type of devices, e.g iFan02, example entries for configuration.yaml is available in [[Home Assistant - Manual Config|Home-Assistant-‐-Manual-Config]] On each Tasmota device which should be automatically discovered by Hass, enter the following commands in the web console:\ @@ -76,18 +95,23 @@ You cannot use custom defined topics while `Setoption19` is on since it will alw ## Setup Tasmota devices through Home Assistant All automatically discovered entities will show up under:\ Configuration -> Integrations -> Configured -> MQTT\ -The entities are grouped by hardware, example for a Sonoff T1 2CH: +The entities are grouped by hardware, example for a Sonoff Basic: -![image](https://user-images.githubusercontent.com/14281572/50019947-bf27b400-ffd4-11e8-98b5-4bd5ef848cf1.png) +![image](https://user-images.githubusercontent.com/7702766/67961116-082b2b80-fbda-11e9-8552-ce2bd85d2a3f.png) By clicking on one of the entities, and then on the cog wheel, name in Hass and `entity_id` can be customized: ![image](https://user-images.githubusercontent.com/14281572/50020005-f4cc9d00-ffd4-11e8-9881-b04ed6e85468.png) + ![image](https://user-images.githubusercontent.com/14281572/50020040-09109a00-ffd5-11e8-8026-74293753783a.png) Note1: Lights currently show up under "Entities without devices", this will be fixed in Hass 0.85 [#19013](https://github.com/home-assistant/home-assistant/pull/19013)\ Note2: After changing `entity_id` Hass must be restarted, this will be fixed in Hass 0.85 [#19414](https://github.com/home-assistant/home-assistant/pull/19414) +For every device discovered with `setoption19` an informative sensor will be created automatically: + +![image](https://user-images.githubusercontent.com/7702766/67961156-124d2a00-fbda-11e9-8f41-19b3e98867b2.png) + ## Tips ### Tip: Sync power state From f58cec733cfb9150369fff503ebb02f95ab5c13d Mon Sep 17 00:00:00 2001 From: Federico Leoni Date: Thu, 31 Oct 2019 13:16:40 -0300 Subject: [PATCH 2/4] New picture added. --- Home-Assistant.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Home-Assistant.md b/Home-Assistant.md index ae8a9478..1b425acd 100644 --- a/Home-Assistant.md +++ b/Home-Assistant.md @@ -110,7 +110,7 @@ Note2: After changing `entity_id` Hass must be restarted, this will be fixed in For every device discovered with `setoption19` an informative sensor will be created automatically: -![image](https://user-images.githubusercontent.com/7702766/67961156-124d2a00-fbda-11e9-8f41-19b3e98867b2.png) +![image](https://user-images.githubusercontent.com/7702766/67965278-88ed2600-fbe0-11e9-9de5-29ecd2c78fac.png) ## Tips From f91e3b1224fd50d6eb1f4930e1efaeccf2bcc8f4 Mon Sep 17 00:00:00 2001 From: tiagofreire-pt <41837236+tiagofreire-pt@users.noreply.github.com> Date: Thu, 31 Oct 2019 16:19:17 +0000 Subject: [PATCH 3/4] Updated BlitzWolf SHP6 (markdown) --- BlitzWolf-SHP6.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/BlitzWolf-SHP6.md b/BlitzWolf-SHP6.md index d7ea9752..c4d75f67 100644 --- a/BlitzWolf-SHP6.md +++ b/BlitzWolf-SHP6.md @@ -77,6 +77,19 @@ It significantly reduces the effort of reflashing multiple SHP-6 units. [[https://raw.githubusercontent.com/wiki/RTurala/Sonoff-Tasmota/images/BlitzWolf-SHP6/BW-SHP6-08.jpg|Back]] [[https://raw.githubusercontent.com/wiki/RTurala/Sonoff-Tasmota/images/BlitzWolf-SHP6/BW-SHP6-09.jpg|All parts]] +## Template +[[https://blakadder.github.io/templates/blitzwolf_SHP6.html]] + +## Calibration fine tuning +Approach the calibration using the method 2. If not satisfied with the results, you could mod the SMD direct measure resistor or mitigate this using a Tasmota set of rules: + +``` +Rule1 ON energy#power<=100 DO Currentcal 2500 BREAK ON energy#power<=500 DO Currentcal 2635 BREAK ON energy#power<=1000 DO Currentcal 2788 BREAK ON energy#power<=1500 DO Currentcal 2942 BREAK ON energy#power<=2000 DO Currentcal 3095 BREAK ON energy#power<=2500 DO Currentcal 3249 BREAK ON energy#power>2500 DO Currentcal 3402 BREAK +Rule1 1 +``` + +Take the CurrentCal values above as a first approach and should be corrected through the Tasmota Method 2 calibration procedure. + ## Home Assistant configuration ```yaml switch: From 205ff8b14892dfcf44884edb7e935c3b5c3c9673 Mon Sep 17 00:00:00 2001 From: tiagofreire-pt <41837236+tiagofreire-pt@users.noreply.github.com> Date: Thu, 31 Oct 2019 16:20:37 +0000 Subject: [PATCH 4/4] Updated BlitzWolf SHP6 (markdown) --- BlitzWolf-SHP6.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BlitzWolf-SHP6.md b/BlitzWolf-SHP6.md index c4d75f67..c0086133 100644 --- a/BlitzWolf-SHP6.md +++ b/BlitzWolf-SHP6.md @@ -81,14 +81,14 @@ It significantly reduces the effort of reflashing multiple SHP-6 units. [[https://blakadder.github.io/templates/blitzwolf_SHP6.html]] ## Calibration fine tuning -Approach the calibration using the method 2. If not satisfied with the results, you could mod the SMD direct measure resistor or mitigate this using a Tasmota set of rules: +Approach the calibration using the Method 2. If not satisfied with the results, you could mod the SMD direct measure resistor or mitigate this using a Tasmota set of rules: ``` Rule1 ON energy#power<=100 DO Currentcal 2500 BREAK ON energy#power<=500 DO Currentcal 2635 BREAK ON energy#power<=1000 DO Currentcal 2788 BREAK ON energy#power<=1500 DO Currentcal 2942 BREAK ON energy#power<=2000 DO Currentcal 3095 BREAK ON energy#power<=2500 DO Currentcal 3249 BREAK ON energy#power>2500 DO Currentcal 3402 BREAK Rule1 1 ``` -Take the CurrentCal values above as a first approach and should be corrected through the Tasmota Method 2 calibration procedure. +Take the CurrentCal values above as a first approach and should be corrected through the Tasmota Method 2 calibration procedure: [[https://github.com/arendst/Tasmota/wiki/Power-Monitoring-Calibration]] ## Home Assistant configuration ```yaml