From 7add925e2f717ad92f3d0362c23becc0568361a5 Mon Sep 17 00:00:00 2001 From: Brett Sheleski Date: Tue, 27 Feb 2018 07:43:44 -0600 Subject: [PATCH] Update readme.md --- smartapps/BrettSheleski/tasmota.src/readme.md | 79 +++++-------------- 1 file changed, 19 insertions(+), 60 deletions(-) diff --git a/smartapps/BrettSheleski/tasmota.src/readme.md b/smartapps/BrettSheleski/tasmota.src/readme.md index 826b25fedbf..6398abd3e89 100644 --- a/smartapps/BrettSheleski/tasmota.src/readme.md +++ b/smartapps/BrettSheleski/tasmota.src/readme.md @@ -1,47 +1,12 @@ # Tasmota SmartApp -SmartThings SmartApp for controlling devices running the Sonoff-Tasmota firmware (see https://github.com/arendst/Sonoff-Tasmota) +SmartThings SmartApp for use with the SmartThings [Tasmota Device Handler](https://github.com/BrettSheleski/SmartThingsPublic/tree/master/devicetypes/BrettSheleski/tasmota.src) -## Supported Modules -I do not physically have all the modules that the Sonoff-Tasmota firmware supports. I was able to implement use for some modules listed below. -1. Sonoff Basic -2. Sonoff 4CH / Sonoff 4CH Pro -3. Sonoff RF Bridge +The Device Handler is used for updating devices running the [Sonoff-Tasmota](https://github.com/arendst/Sonoff-Tasmota) firmware. -(Please contribute to help create support for all modules supported by the Sonoff-Tasmota firmware) +See Tasmota Device Handler (https://github.com/BrettSheleski/SmartThingsPublic/tree/master/devicetypes/BrettSheleski/tasmota.src) for more details. ## Installation -This SmartApp works by creating several child devices that the user would interact with. - -### Install Necessary Device Handler(s) (Required) -#### Install the Tasmota Device Handler (Required) -This device handler is necessary for all module types. This device handler will make an HTTP call to the Tasmota device to determine the module type. Depending on the module type defined, it will create child devices. -1. Log in to the SmartThings IDE (https://graph.api.smartthings.com/) -2. Go to `My Device Handlers` -3. Click `Create New Device Handler` -4. In the `From Code` tab paste in the code from https://github.com/BrettSheleski/SmartThingsPublic/blob/master/devicetypes/BrettSheleski/tasmota.src/tasmota.groovy -5. Click `Create` -6. Click `Publish` --> `For Me` - -### Tasmota-Power Device Handler -For Sonoff-Basic, Sonoff-4CH, and Sonoff Dual devices this is required -1. Log in to the SmartThings IDE (https://graph.api.smartthings.com/) -2. Go to `My Device Handlers` -3. Click `Create New Device Handler` -4. In the `From Code` tab paste in the code from https://github.com/BrettSheleski/SmartThingsPublic/blob/master/devicetypes/BrettSheleski/tasmota.src/tasmota-power.groovy -5. Click `Create` -6. Click `Publish` --> `For Me` - -### Tasmota-RF-Bridge-Button Device Handler -For Sonoff-Basic, Sonoff-4CH, and Sonoff Dual devices this is required -1. Log in to the SmartThings IDE (https://graph.api.smartthings.com/) -2. Go to `My Device Handlers` -3. Click `Create New Device Handler` -4. In the `From Code` tab paste in the code from https://github.com/BrettSheleski/SmartThingsPublic/blob/master/devicetypes/BrettSheleski/tasmota.src/tasmota-rf-bridge-button.groovy -5. Click `Create` -6. Click `Publish` --> `For Me` - -## Install SmartApp (Required) -This is the brains of everything. +### Adding SmartApp to SmartThings 1. Log in to the SmartThings IDE (https://graph.api.smartthings.com/) 2. Go to `My SmartApps` 3. Click `New SmartApp` @@ -49,28 +14,22 @@ This is the brains of everything. 5. Click `Create` 6. Click `Publish` --> `For Me` -## Usage -Install the SmartApp, Tasmota Device Handler, and any othe necessary Device Handlers (see above). - -Then in the SmartThings mobile App go to -1. Automation Tab (bottom tab) -2. SmartApps (top tab) -3. Add a SmartApp (bottom of list) -4. My Apps (bottom of list) -5. Tasmota -6. Set the IP Address -7. (optional) set the Username and Password +### Installing SmartApp +Open the SmartThings app: +1. Select `Automation` tab (on bottom) +2. Select `SmartApps` tab (on top) +3. Scroll to the bottom and select `Add a SmartApp` +4. Scroll to the bottom and select `My Apps` +5. Find the `Tasmota` SmartApp +6. In the Devices input, select all devices using the `Tasmota` device handler. -Once done you may notice that there is at least 1 new device: -* Tasmota-Master device. -This is a device that may spawn other devices that the user would use. It is not intended to be used directly by the user, but is what is used by its child devices to send commands and deal with the responses. -* Tasmota-Power device(s). -These device(s) get spawned by Sonoff-Basic, Sonoff 4CH and Sonoff Dual devices. These are the actual Switch/Momentary devices the user would normally interact with. +### SmartApp Usage +The SmartApp exposes an HTTP endpoint which can be used to update the Tasmota devices. -## Contribute -As I don't have all the module types supported by the Sonoff-Tasmota firmware I currently do not have implementation for all module types. Please create any other child device(s) for the module. +TODO: Finish documenting this when finished. -See https://github.com/BrettSheleski/SmartThingsPublic/blob/master/devicetypes/BrettSheleski/tasmota.src/tasmota-base.groovy for a skeleton of a device handler to start with. +## Example Usages +### Node-Red +A Node-Red flow can be created which will subscribe to the appropriate MQTT topic(s) for the device(s) and call make an HTTP request to the SmartThings SmartApp endpoint. -## Future -I also plan for the 'Master' device to also check the GPIO configuration and spawn additional child devices depending. \ No newline at end of file +TODO: Document here.