forked from tasmota/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
9 lines (9 loc) · 33.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
<!doctype html><html lang=en class=no-js> <head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=../_media/favicon.ico><meta name=generator content="mkdocs-1.1, mkdocs-material-5.0.0rc4"><title>Control a Sonoff using a remote button - Tasmota</title><link rel=stylesheet href=../assets/stylesheets/main.c1451e9e.min.css><link rel=stylesheet href=../assets/stylesheets/palette.4444686e.min.css><meta name=theme-color content=#2196f3><link href=https://fonts.gstatic.com rel=preconnect crossorigin><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Barlow:300,400,400i,700%7CRoboto+Mono&display=fallback"><style>body,input{font-family:"Barlow",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono",SFMono-Regular,Consolas,Menlo,monospace}</style><link rel="preconnect dns-prefetch" href=https://www.google-analytics.com><script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","UA-140681905-2","auto"),ga("set","anonymizeIp",!0),ga("send","pageview"),document.addEventListener("DOMContentLoaded",function(){document.forms.search&&document.forms.search.query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}),document.addEventListener("DOMContentSwitch",function(){ga("send","pageview")})</script><script async src=https://www.google-analytics.com/analytics.js></script></head> <body dir=ltr data-md-color-primary=blue data-md-color-accent=indigo> <input class=md-toggle data-md-toggle=drawer type=checkbox id=__drawer autocomplete=off> <input class=md-toggle data-md-toggle=search type=checkbox id=__search autocomplete=off> <label class=md-overlay for=__drawer></label> <div data-md-component=skip> <a href=#remote-button class=md-skip> Skip to content </a> </div> <div data-md-component=announce> </div> <header class=md-header data-md-component=header> <nav class="md-header-nav md-grid" aria-label=Header> <a href=.. title=Tasmota class="md-header-nav__button md-logo" aria-label=Tasmota> <img src=../_media/logo.svg alt=logo> </a> <label class="md-header-nav__button md-icon" for=__drawer> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z /></svg> </label> <div class=md-header-nav__title data-md-component=header-title> <div class=md-header-nav__ellipsis> <span class="md-header-nav__topic md-ellipsis"> Tasmota </span> <span class="md-header-nav__topic md-ellipsis"> Control a Sonoff using a remote button </span> </div> </div> <label class="md-header-nav__button md-icon" for=__search> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"/></svg> </label> <div class=md-search data-md-component=search role=dialog> <label class=md-search__overlay for=__search></label> <div class=md-search__inner role=search> <form class=md-search__form name=search> <input type=text class=md-search__input name=query aria-label=Search placeholder=Search autocapitalize=off autocorrect=off autocomplete=off spellcheck=false data-md-component=search-query data-md-state=active> <label class="md-search__icon md-icon" for=__search> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"/></svg> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z /></svg> </label> <button type=reset class="md-search__icon md-icon" aria-label=Clear data-md-component=search-reset tabindex=-1> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z /></svg> </button> </form> <div class=md-search__output> <div class=md-search__scrollwrap data-md-scrollfix> <div class=md-search-result data-md-component=search-result> <div class=md-search-result__meta> Type to start searching </div> <ol class=md-search-result__list></ol> </div> </div> </div> </div> </div> <div class=md-header-nav__source> <a href=https://github.com/arendst/tasmota/ title="Go to repository" class=md-source> <div class="md-source__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg> </div> <div class=md-source__repository> arendst/tasmota </div> </a> </div> </nav> </header> <div class=md-container data-md-component=container> <nav class=md-tabs aria-label=Tabs data-md-component=tabs> <div class="md-tabs__inner md-grid"> <ul class=md-tabs__list> <li class=md-tabs__item> <a href=.. class="md-tabs__link md-tabs__link--active"> Home </a> </li> <li class=md-tabs__item> <a href=../Scripting-Language/ class=md-tabs__link> Features </a> </li> <li class=md-tabs__item> <a href=../Alexa/ class=md-tabs__link> Smart Home Integrations </a> </li> <li class=md-tabs__item> <a href=../Displays/ class=md-tabs__link> Peripherals </a> </li> <li class=md-tabs__item> <a href=../Configuration-Procedure-for-New-Devices/ class=md-tabs__link> Supported Devices </a> </li> <li class=md-tabs__item> <a href=../FAQ/ class=md-tabs__link> Help </a> </li> </ul> </div> </nav> <main class=md-main data-md-component=main> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component=navigation> <div class=md-sidebar__scrollwrap> <div class=md-sidebar__inner> <nav class="md-nav md-nav--primary" aria-label=Navigation data-md-level=0> <label class=md-nav__title for=__drawer> <a href=.. title=Tasmota class="md-nav__button md-logo" aria-label=Tasmota> <img src=../_media/logo.svg alt=logo> </a> Tasmota </label> <div class=md-nav__source> <a href=https://github.com/arendst/tasmota/ title="Go to repository" class=md-source> <div class="md-source__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg> </div> <div class=md-source__repository> arendst/tasmota </div> </a> </div> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=.. title=Home class=md-nav__link> Home </a> </li> <li class=md-nav__item> <a href=../About/ title=About class=md-nav__link> About </a> </li> <li class=md-nav__item> <a href=../Getting-Started/ title="Getting Started" class=md-nav__link> Getting Started </a> </li> <li class=md-nav__item> <a href=../Upgrading/ title=Upgrading class=md-nav__link> Upgrading </a> </li> <li class=md-nav__item> <a href=../MQTT/ title=MQTT class=md-nav__link> MQTT </a> </li> <li class=md-nav__item> <a href=../Commands/ title=Commands class=md-nav__link> Commands </a> </li> <li class=md-nav__item> <a href=../Templates/ title=Templates class=md-nav__link> Templates </a> </li> <li class=md-nav__item> <a href=../Components/ title=Components class=md-nav__link> Components </a> </li> <li class=md-nav__item> <a href=../Modules/ title=Modules class=md-nav__link> Modules </a> </li> <li class=md-nav__item> <a href=../Rules/ title=Rules class=md-nav__link> Rules </a> </li> <li class=md-nav__item> <a href=../Timers/ title=Timers class=md-nav__link> Timers </a> </li> <li class=md-nav__item> <a href=../Lights/ title=Lights class=md-nav__link> Lights </a> </li> <li class=md-nav__item> <a href=../Buttons-and-Switches/ title="Buttons and Switches" class=md-nav__link> Buttons and Switches </a> </li> <li class=md-nav__item> <a href=../Supported-Peripherals/ title=Peripherals class=md-nav__link> Peripherals </a> </li> <li class=md-nav__item> <a href=../TuyaMCU/ title=TuyaMCU class=md-nav__link> TuyaMCU </a> </li> <li class=md-nav__item> <a href=../Device-groups.md title=None class=md-nav__link> None </a> </li> <li class=md-nav__item> <a href=../Blinds-and-Shutters/ title="Blinds and Shutters" class=md-nav__link> Blinds and Shutters </a> </li> <li class=md-nav__item> <a href=../Shutter-and-Steppers/ title="Shutter and Steppers" class=md-nav__link> Shutter and Steppers </a> </li> <li class=md-nav__item> <a href=../Tasmota-IR/ title="IR Communication" class=md-nav__link> IR Communication </a> </li> <li class=md-nav__item> <a href=../WebUI/ title=WebUI class=md-nav__link> WebUI </a> </li> <li class=md-nav__item> <a href=../Compile-your-build/ title=Compiling class=md-nav__link> Compiling </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle=nav-22 type=checkbox id=nav-22> <label class=md-nav__link for=nav-22> Features <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z /></svg> </span> </label> <nav class=md-nav aria-label=Features data-md-level=1> <label class=md-nav__title for=nav-22> <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z /></svg> </span> Features </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../Scripting-Language/ title=Scripting class=md-nav__link> Scripting </a> </li> <li class=md-nav__item> <a href=../Bluetooth/ title=Bluetooth class=md-nav__link> Bluetooth </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle=nav-22-3 type=checkbox id=nav-22-3> <label class=md-nav__link for=nav-22-3> Zigbee <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z /></svg> </span> </label> <nav class=md-nav aria-label=Zigbee data-md-level=2> <label class=md-nav__title for=nav-22-3> <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z /></svg> </span> Zigbee </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../Zigbee/ title=Zigbee class=md-nav__link> Zigbee </a> </li> <li class=md-nav__item> <a href=../Zigbee-Internals/ title="Zigbee internals" class=md-nav__link> Zigbee internals </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=../TasmotaSlave/ title=TasmotaSlave class=md-nav__link> TasmotaSlave </a> </li> <li class=md-nav__item> <a href=../DeepSleep/ title=DeepSleep class=md-nav__link> DeepSleep </a> </li> <li class=md-nav__item> <a href=../PWM-dimmer-switch/ title="PWM Dimmer" class=md-nav__link> PWM Dimmer </a> </li> <li class=md-nav__item> <a href=../Buzzer/ title=Buzzer class=md-nav__link> Buzzer </a> </li> <li class=md-nav__item> <a href=../Dynamic-Sleep/ title="Dynamic Sleep" class=md-nav__link> Dynamic Sleep </a> </li> <li class=md-nav__item> <a href=../GPS-NTP-server/ title="GPS NTP server" class=md-nav__link> GPS NTP server </a> </li> <li class=md-nav__item> <a href=../I2CDevices/ title="I2C Devices" class=md-nav__link> I2C Devices </a> </li> <li class=md-nav__item> <a href=../Smart-Meter-Interface/ title="Smart Meter Interface" class=md-nav__link> Smart Meter Interface </a> </li> <li class=md-nav__item> <a href=../PIR-Motion-Sensors/ title="PIR Motion Sensors" class=md-nav__link> PIR Motion Sensors </a> </li> <li class=md-nav__item> <a href=../Power-Monitoring-Calibration/ title="Power Monitoring Calibration" class=md-nav__link> Power Monitoring Calibration </a> </li> <li class=md-nav__item> <a href=../Subscribe-%26-Unsubscribe/ title="Subscribe & Unsubscribe" class=md-nav__link> Subscribe & Unsubscribe </a> </li> <li class=md-nav__item> <a href=../TLS/ title="SSL/TLS on Tasmota" class=md-nav__link> SSL/TLS on Tasmota </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle=nav-23 type=checkbox id=nav-23> <label class=md-nav__link for=nav-23> Smart Home Integrations <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z /></svg> </span> </label> <nav class=md-nav aria-label="Smart Home Integrations" data-md-level=1> <label class=md-nav__title for=nav-23> <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z /></svg> </span> Smart Home Integrations </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../Alexa/ title=Alexa class=md-nav__link> Alexa </a> </li> <li class=md-nav__item> <a href=../AWS-IoT/ title="AWS IoT" class=md-nav__link> AWS IoT </a> </li> <li class=md-nav__item> <a href=../Domoticz/ title=Domoticz class=md-nav__link> Domoticz </a> </li> <li class=md-nav__item> <a href=../Home-Assistant/ title="Home Assistant" class=md-nav__link> Home Assistant </a> </li> <li class=md-nav__item> <a href=../Homebridge/ title=Homebridge class=md-nav__link> Homebridge </a> </li> <li class=md-nav__item> <a href=../HomeSeer/ title=HomeSeer class=md-nav__link> HomeSeer </a> </li> <li class=md-nav__item> <a href=../IP-Symcon/ title="IP Symcon" class=md-nav__link> IP Symcon </a> </li> <li class=md-nav__item> <a href=../KNX/ title=KNX class=md-nav__link> KNX </a> </li> <li class=md-nav__item> <a href=../NodeRed/ title=NodeRed class=md-nav__link> NodeRed </a> </li> <li class=md-nav__item> <a href=../nymea/ title=nymea class=md-nav__link> nymea </a> </li> <li class=md-nav__item> <a href=../OctoPrint.md title=None class=md-nav__link> None </a> </li> <li class=md-nav__item> <a href=../openHAB/ title=openHAB class=md-nav__link> openHAB </a> </li> <li class=md-nav__item> <a href=../otto/ title=Otto class=md-nav__link> Otto </a> </li> <li class=md-nav__item> <a href=https://github.com/arendst/Tasmota/issues/3769 title=IOBroker class=md-nav__link> IOBroker </a> </li> <li class=md-nav__item> <a href=https://github.com/tim-hellhake/tasmota-adapter title="Mozilla WebThings Adapter" class=md-nav__link> Mozilla WebThings Adapter </a> </li> <li class=md-nav__item> <a href=https://github.com/BrettSheleski/SmartThingsPublic/blob/master/devicetypes/brettsheleski/sonoff-tasmota.src/readme.md title=SmartThings class=md-nav__link> SmartThings </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle=nav-24 type=checkbox id=nav-24> <label class=md-nav__link for=nav-24> Peripherals <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z /></svg> </span> </label> <nav class=md-nav aria-label=Peripherals data-md-level=1> <label class=md-nav__title for=nav-24> <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z /></svg> </span> Peripherals </label> <ul class=md-nav__list data-md-scrollfix> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle=nav-24-1 type=checkbox id=nav-24-1> <label class=md-nav__link for=nav-24-1> Displays <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z /></svg> </span> </label> <nav class=md-nav aria-label=Displays data-md-level=2> <label class=md-nav__title for=nav-24-1> <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z /></svg> </span> Displays </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../Displays/ title=Displays class=md-nav__link> Displays </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=../A4988-Stepper-Motor-Controller/ title="A4988 stepper motor controller" class=md-nav__link> A4988 stepper motor controller </a> </li> <li class=md-nav__item> <a href=../AM2301/ title="AM2301 temperature and humidity sensor" class=md-nav__link> AM2301 temperature and humidity sensor </a> </li> <li class=md-nav__item> <a href=../APDS-9960/ title="APDS 9960" class=md-nav__link> APDS 9960 </a> </li> <li class=md-nav__item> <a href=../AZ-7798/ title="AZ 7798" class=md-nav__link> AZ 7798 </a> </li> <li class=md-nav__item> <a href=../BH1750/ title=BH1750 class=md-nav__link> BH1750 </a> </li> <li class=md-nav__item> <a href=../BME280/ title=None class=md-nav__link> None </a> </li> <li class=md-nav__item> <a href=../BME680/ title=BME680 class=md-nav__link> BME680 </a> </li> <li class=md-nav__item> <a href=../BME280/ title="BMP280 pressure sensor" class=md-nav__link> BMP280 pressure sensor </a> </li> <li class=md-nav__item> <a href=../CC2530/ title=CC2530 class=md-nav__link> CC2530 </a> </li> <li class=md-nav__item> <a href=../Moisture-Sensor-and-Chirp%21-Sensor/ title="Chirp! moisture sensor" class=md-nav__link> Chirp! moisture sensor </a> </li> <li class=md-nav__item> <a href=../DHT11/ title=DHT11 class=md-nav__link> DHT11 </a> </li> <li class=md-nav__item> <a href=../DS18x20/ title=DS18x20 class=md-nav__link> DS18x20 </a> </li> <li class=md-nav__item> <a href=../DS3231/ title=DS3231 class=md-nav__link> DS3231 </a> </li> <li class=md-nav__item> <a href=../HM-10/ title="HM 10" class=md-nav__link> HM 10 </a> </li> <li class=md-nav__item> <a href=../HM-17/ title="HM 17" class=md-nav__link> HM 17 </a> </li> <li class=md-nav__item> <a href=../HC-SR04/ title="HC SR04" class=md-nav__link> HC SR04 </a> </li> <li class=md-nav__item> <a href=../Honeywell-HIH/ title="Honeywell HIH" class=md-nav__link> Honeywell HIH </a> </li> <li class=md-nav__item> <a href=../IR-Remote/ title="IR Remote" class=md-nav__link> IR Remote </a> </li> <li class=md-nav__item> <a href=../LM75AD/ title=LM75AD class=md-nav__link> LM75AD </a> </li> <li class=md-nav__item> <a href=../MCP230xx/ title=MCP230xx class=md-nav__link> MCP230xx </a> </li> <li class=md-nav__item> <a href=../MGC3130/ title=MGC3130 class=md-nav__link> MGC3130 </a> </li> <li class=md-nav__item> <a href=../MH-Z19B/ title="MH Z19B" class=md-nav__link> MH Z19B </a> </li> <li class=md-nav__item> <a href=../MLX90614/ title=MLX90614 class=md-nav__link> MLX90614 </a> </li> <li class=md-nav__item> <a href=../MPR121/ title="MPR121 I2C Proximity Capacitive Touch Sensor Controller" class=md-nav__link> MPR121 I<sup>2</sup>C Proximity Capacitive Touch Sensor Controller </a> </li> <li class=md-nav__item> <a href=../MPU-6050/ title="MPU 6050" class=md-nav__link> MPU 6050 </a> </li> <li class=md-nav__item> <a href=../NRF24L01/ title=NRF24L01 class=md-nav__link> NRF24L01 </a> </li> <li class=md-nav__item> <a href=../P1-Smart-Meter/ title="Kaifa MA105C Energy Meter" class=md-nav__link> Kaifa MA105C Energy Meter </a> </li> <li class=md-nav__item> <a href=../PAJ7620/ title=PAJ7620 class=md-nav__link> PAJ7620 </a> </li> <li class=md-nav__item> <a href=../PCA9685/ title=PCA9685 class=md-nav__link> PCA9685 </a> </li> <li class=md-nav__item> <a href=../PN532/ title=PN532 class=md-nav__link> PN532 </a> </li> <li class=md-nav__item> <a href=../PZEM-0XX/ title="PZEM 0XX" class=md-nav__link> PZEM 0XX </a> </li> <li class=md-nav__item> <a href=../RCWL-0516/ title="RCWL 0516" class=md-nav__link> RCWL 0516 </a> </li> <li class=md-nav__item> <a href=../RDM6300/ title=RDM6300 class=md-nav__link> RDM6300 </a> </li> <li class=md-nav__item> <a href=../SDS011/ title=SDS011 class=md-nav__link> SDS011 </a> </li> <li class=md-nav__item> <a href=../SHT30/ title=SHT30 class=md-nav__link> SHT30 </a> </li> <li class=md-nav__item> <a href=../TX2x/ title=TX2x class=md-nav__link> TX2x </a> </li> <li class=md-nav__item> <a href=../TSL2561/ title=TSL2561 class=md-nav__link> TSL2561 </a> </li> <li class=md-nav__item> <a href=../VEML6070/ title=VEML6070 class=md-nav__link> VEML6070 </a> </li> <li class=md-nav__item> <a href=../VL53L0x/ title=VL53L0x class=md-nav__link> VL53L0x </a> </li> <li class=md-nav__item> <a href=../WS2812B-RGB-Shield/ title="WS2812B RGB Shield" class=md-nav__link> WS2812B RGB Shield </a> </li> <li class=md-nav__item> <a href=../WS2812B-and-WS2813/ title="WS2812B and WS2813" class=md-nav__link> WS2812B and WS2813 </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle=nav-25 type=checkbox id=nav-25> <label class=md-nav__link for=nav-25> Supported Devices <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z /></svg> </span> </label> <nav class=md-nav aria-label="Supported Devices" data-md-level=1> <label class=md-nav__title for=nav-25> <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z /></svg> </span> Supported Devices </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../Configuration-Procedure-for-New-Devices/ title="Configuring unknown devices" class=md-nav__link> Configuring unknown devices </a> </li> <li class=md-nav__item> <a href="https://templates.blakadder.com/ " target='_blank""' title="All Supported Devices" class=md-nav__link> All Supported Devices </a> </li> <li class=md-nav__item> <a href=../Supported-Modules/ title="Supported Modules" class=md-nav__link> Supported Modules </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle" data-md-toggle=nav-26 type=checkbox id=nav-26> <label class=md-nav__link for=nav-26> Help <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z /></svg> </span> </label> <nav class=md-nav aria-label=Help data-md-level=1> <label class=md-nav__title for=nav-26> <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z /></svg> </span> Help </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../FAQ/ title=FAQ class=md-nav__link> FAQ </a> </li> <li class=md-nav__item> <a href=../Troubleshooting/ title=Troubleshooting class=md-nav__link> Troubleshooting </a> </li> <li class=md-nav__item> <a href=../Device-Recovery/ title="Device Recovery" class=md-nav__link> Device Recovery </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=../Contributing/ title=Contributing class=md-nav__link> Contributing </a> </li> <li class=md-nav__item> <a href="//discord.gg/Ks2Kzd4 " target='_blank""' title="Discord Community" class=md-nav__link> Discord Community </a> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component=toc> <div class=md-sidebar__scrollwrap> <div class=md-sidebar__inner> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class=md-nav__title for=__toc> <span class="md-nav__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d=M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z /></svg> </span> Table of contents </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=#remote-button class=md-nav__link> REMOTE BUTTON </a> </li> <li class=md-nav__item> <a href=#schematic class=md-nav__link> Schematic </a> </li> <li class=md-nav__item> <a href=#update class=md-nav__link> Update </a> </li> <li class=md-nav__item> <a href=#another-update class=md-nav__link> Another Update </a> </li> </ul> </nav> </div> </div> </div> <div class=md-content> <article class="md-content__inner md-typeset"> <a href=https://github.com/tasmota/docs/blob/master/docs/Control-a-Sonoff-using-a-remote-button.md title="Edit this page" class="md-content__button md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"/></svg> </a> <h1>Control a Sonoff using a remote button</h1> <h3 id=remote-button>REMOTE BUTTON<a class=headerlink href=#remote-button title="Permanent link">~</a></h3> <p><strong>IMPORTANT: The ESP8266 needs GPIO0 and GPIO2 to be high (not connected to anything, or connected to 3.3V) during boot. GPIO0 and GPIO2 are the pins D3 and D4 on the Wemos D1 mini. D3 and D4 should only be used to connect push buttons (which are only low when pressed), not toggle switches.</strong></p> <p>I have a cabin that is remote from my house, and I'm using a Sonoff to turn on/off the heaters remotely, so the place can be warm when I get there. The Sonoff(heater control) is located near the fuse box, and it controls a relay which switches the 120V/30A to the heaters.</p> <p>It's awkward to get at the Sonoff(heater control) to physically press the toggle button, so when I'm using it, I use MQTT commands to control the heaters. But I have some family members that are not comfortable with MQTT usage and certainly don't want to open the fuse box.</p> <p>So I built a small ESP-01 and a DHT22 and a push button, and used this project code to drive it (>rev 1.0.30). I use the <code>cmnd/my_DHT/buttontopic</code> to set the mqtt command to control the heaters. Yes, you can program a sonoff so that the button sends out any arbitrary command. In this case, I'm using the button to control the other sonoff. This ESP+DHT device is in the common area of the cabin, so my family members can simply push the button to toggle the heater.</p> <p>In other words, I'm using <em>one</em> trivial (DHT+button) wifi device to control the <em>other</em> (sonoff+heater relay). This technique uses Theo's flexible design, since <em>buttontopic</em> can be made different from <em>topic</em>.</p> <h3 id=schematic>Schematic<a class=headerlink href=#schematic title="Permanent link">~</a></h3> <p><img src=http://alt.pbeirne.com/images/esp_dht2.png alt="schematic of trivial DHT + ESP01" style=background-color:white;> NOTE: with this schematic, the DHT sensor is on GPIO2. You'll have to change the<code>#define DHT_PIN</code> in this project's source code from 14 to 2. Also, make sure you use the <code>black</code> ESP01 with 1MB of flash; most 2016 purchases should be ok. Of course you can use an ESP12 if you wish.</p> <p>The optional block shown attaches an LED to the DHT data line, so you can watch when the data is being fetched from the DHT device.</p> <p>Power regulator, 5V to 3.3V: search eBay for <code>5v/3.3v power 1117</code><br> ESP: search eBay for <code>esp-01</code> and pick a black one<br> DHT22: search eBay for <code>dht22</code> ; any AM2302, DHT11 or DHT12 will do in its place; or you can omit the DHT and just use the button<br> Cost (2016-09-05) USB-5V-adapter: CAD$1 + DC5V->3.3V: CAD$1 + ESP01: CAD$2.62 + DHT12: CAD$1.50 = CAD$6.12 = EUR 4.25</p> <p>This little device has two <em>inputs</em> (DHT & button), and no <em>output</em>. You can use either the Sonoff or the ElectroDragon version of this project, but because this has no output, the following commands don't make any sense: <code>power, light, ledstate</code>. You may also want to change the <code>#define APP_NAME</code> and <code>#define PROJECT</code> to reflect that this isn't a real Sonoff.</p> <p>Pat B</p> <h2 id=update>Update<a class=headerlink href=#update title="Permanent link">~</a></h2> <h4>2017-11-12</h4> <p>This design still works with version 5.5.2 of the firmware. There's no need anymore to create a special build; the new design allows you to customize the code at runtime.</p> <p>For the above schematic, go into the Config Module menu and set - Module: 18 WeMos D1 mini - GPIO0: 09 Switch1 - GPIO2: 03 DHT22</p> <p>and set switchtopic1 to the topic for the device you want to control, and switchmode1 to 3 (toggle). That's all you need to do :)</p> <p>I also discovered that the button <em>must</em> be a momentary pushbutton; don't use a switch, because both GPIO0 and GPIO2 must be floating at boot time.</p> <h2 id=another-update>Another Update<a class=headerlink href=#another-update title="Permanent link">~</a></h2> <h4>2017-09-22</h4> <p>I have installed the above device at my cabin in the woods, and I'm using a cellular modem to connect to the internet for data. If I set the Tasmota-Sonoff software with a teleperiod=3600 (once per hour), the MQTT traffic is about 6kB/hour, which is about 4.2MB/month. That includes the TCP keep-alives and the telemetry messages. So two devices (the main sonoff power switch and the esp-01 button device) takes 8.4MB/month, just below my economy 10MB/month sim card. </p> <p>Just FYI, I also have tried using a Raspberry PI at the cabin, and instructing it to SSH to my public-facing server, and creating a reverse tunnel back so that I can access my cabin from my public-facing server. The keep-alives on that connection is about 7.6MB/month. [The cellular phone company is probably using NAT, so I have to connect from cabin->server and not the other way around]</p> </article> </div> </div> </main> <footer class=md-footer> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-footer-copyright> made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a> </div> <div class=md-footer-social> <a href=https://discord.gg/Ks2Kzd4 target=_blank rel=noopener title=discord.gg class=md-footer-social__link> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 448 512"><path d="M297.216 243.2c0 15.616-11.52 28.416-26.112 28.416-14.336 0-26.112-12.8-26.112-28.416s11.52-28.416 26.112-28.416c14.592 0 26.112 12.8 26.112 28.416zm-119.552-28.416c-14.592 0-26.112 12.8-26.112 28.416s11.776 28.416 26.112 28.416c14.592 0 26.112-12.8 26.112-28.416.256-15.616-11.52-28.416-26.112-28.416zM448 52.736V512c-64.494-56.994-43.868-38.128-118.784-107.776l13.568 47.36H52.48C23.552 451.584 0 428.032 0 398.848V52.736C0 23.552 23.552 0 52.48 0h343.04C424.448 0 448 23.552 448 52.736zm-72.96 242.688c0-82.432-36.864-149.248-36.864-149.248-36.864-27.648-71.936-26.88-71.936-26.88l-3.584 4.096c43.52 13.312 63.744 32.512 63.744 32.512-60.811-33.329-132.244-33.335-191.232-7.424-9.472 4.352-15.104 7.424-15.104 7.424s21.248-20.224 67.328-33.536l-2.56-3.072s-35.072-.768-71.936 26.88c0 0-36.864 66.816-36.864 149.248 0 0 21.504 37.12 78.08 38.912 0 0 9.472-11.52 17.152-21.248-32.512-9.728-44.8-30.208-44.8-30.208 3.766 2.636 9.976 6.053 10.496 6.4 43.21 24.198 104.588 32.126 159.744 8.96 8.96-3.328 18.944-8.192 29.44-15.104 0 0-12.8 20.992-46.336 30.464 7.68 9.728 16.896 20.736 16.896 20.736 56.576-1.792 78.336-38.912 78.336-38.912z"/></svg> </a> <a href=https://t.me/tasmota target=_blank rel=noopener title=t.me class=md-footer-social__link> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 496 512"><path d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm121.8 169.9l-40.7 191.8c-3 13.6-11.1 16.9-22.4 10.5l-62-45.7-29.9 28.8c-3.3 3.3-6.1 6.1-12.5 6.1l4.4-63.1 114.9-103.8c5-4.4-1.1-6.9-7.7-2.5l-142 89.4-61.2-19.1c-13.3-4.2-13.6-13.3 2.8-19.7l239.1-92.2c11.1-4 20.8 2.7 17.2 19.5z"/></svg> </a> <a href=https://github.com/tasmota target=_blank rel=noopener title=github.com class=md-footer-social__link> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 480 512"><path d="M186.1 328.7c0 20.9-10.9 55.1-36.7 55.1s-36.7-34.2-36.7-55.1 10.9-55.1 36.7-55.1 36.7 34.2 36.7 55.1zM480 278.2c0 31.9-3.2 65.7-17.5 95-37.9 76.6-142.1 74.8-216.7 74.8-75.8 0-186.2 2.7-225.6-74.8-14.6-29-20.2-63.1-20.2-95 0-41.9 13.9-81.5 41.5-113.6-5.2-15.8-7.7-32.4-7.7-48.8 0-21.5 4.9-32.3 14.6-51.8 45.3 0 74.3 9 108.8 36 29-6.9 58.8-10 88.7-10 27 0 54.2 2.9 80.4 9.2 34-26.7 63-35.2 107.8-35.2 9.8 19.5 14.6 30.3 14.6 51.8 0 16.4-2.6 32.7-7.7 48.2 27.5 32.4 39 72.3 39 114.2zm-64.3 50.5c0-43.9-26.7-82.6-73.5-82.6-18.9 0-37 3.4-56 6-14.9 2.3-29.8 3.2-45.1 3.2-15.2 0-30.1-.9-45.1-3.2-18.7-2.6-37-6-56-6-46.8 0-73.5 38.7-73.5 82.6 0 87.8 80.4 101.3 150.4 101.3h48.2c70.3 0 150.6-13.4 150.6-101.3zm-82.6-55.1c-25.8 0-36.7 34.2-36.7 55.1s10.9 55.1 36.7 55.1 36.7-34.2 36.7-55.1-10.9-55.1-36.7-55.1z"/></svg> </a> </div> </div> </div> </footer> </div> <script src=../assets/javascripts/vendor.23350dc5.min.js></script> <script src=../assets/javascripts/bundle.36a8f969.min.js></script><script id=__lang type=application/json>{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents"}</script> <script>
app = initialize({
base: "..",
features: ["tabs"],
search: Object.assign({
worker: "../assets/javascripts/worker/search.3bc815f0.min.js"
}, typeof search !== "undefined" && search)
})
</script> </body> </html>