diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..cb6d7e7 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,9 @@ +{ + "permissions": { + "allow": [ + "WebFetch(domain:github.com)", + "WebFetch(domain:polyglot.untra.io)" + ], + "deny": [] + } +} \ No newline at end of file diff --git a/.continue/config.json b/.continue/config.json new file mode 100644 index 0000000..e69de29 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.gitignore b/.gitignore index 8d67761..cb44c08 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ _site .idea .DS_Store Gemfile.lock +CLAUDE.md \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..17819c3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "continue.telemetryEnabled": false +} \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..9326c84 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,166 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +This is the documentation site for SinricPro, an IoT Cloud Platform. The site is built using Jekyll (Ruby-based static site generator) and hosted on GitHub Pages. It provides comprehensive documentation for developers using the SinricPro platform including tutorials, API guides, device templates, and integrations. + +## Development Commands + +### Local Development +```bash +# Install dependencies +bundle install + +# Run development server (auto-reloads on changes) +bundle exec jekyll serve + +# Alternative: Use Docker for development +docker-compose up +``` + +### Build Commands +```bash +# Build production site +bundle exec jekyll build + +# Build with environment variable +JEKYLL_ENV=production bundle exec jekyll build +``` + +### Windows Development +Use the provided batch file for convenience: +```bash +start.bat +``` + +## Site Architecture + +### Content Organization +- **Root pages**: Main navigation pages in `/pages/` directory +- **Device documentation**: `/pages/devices/` - Documentation for specific IoT devices +- **Device templates**: `/pages/device-templates/capabilities/` - Capability-based templates +- **Tutorials**: `/pages/tutorials/` - Step-by-step guides organized by category +- **Actions**: `/pages/actions/` - API action documentation +- **Integrations**: Platform integration guides (IFTTT, Homebridge, Node-RED) + +### Key Site Structure +``` +├── _config.yml # Jekyll configuration +├── _data/ # Data files (sidebar links, etc.) +├── _includes/ # Reusable HTML components +├── _layouts/ # Page templates +├── _sass/ # Styling +├── pages/ # Main content pages +│ ├── devices/ # Device-specific documentation +│ ├── device-templates/ # Template capabilities +│ ├── tutorials/ # Tutorial content +│ └── actions/ # API actions +├── public/ # Static assets (CSS, JS, images) +└── _site/ # Generated site (ignored in git) +``` + +### Jekyll Configuration +- **Environment**: Set to `production` for builds +- **Plugins**: Uses `jekyll-seo-tag` and `jekyll-sitemap` +- **Markdown**: Kramdown processor with Rouge syntax highlighting +- **Navigation**: Auto-generated from page `weight` frontmatter (lower = higher priority) + +### Content Conventions +- All pages use frontmatter with `title` and `weight` properties +- Images stored in `/public/img/` with organized subdirectories +- Videos stored in `/public/video/` +- Technical diagrams in `_drawings/` (Fritzing files, sequence diagrams) + +### Navigation System +The sidebar navigation is automatically generated from pages with: +- `layout: page` in frontmatter +- `title` property defined +- Sorted by `weight` (ascending order) + +## Content Types + +### Device Documentation +Each device type has standardized documentation covering: +- Device setup and wiring +- Code examples +- Voice assistant integration +- Troubleshooting + +### Capability Templates +Modular capability system with individual pages for: +- Brightness, Color, Power controls +- Sensors (motion, contact, temperature) +- Media controls, Locks, Thermostats +- Custom device types + +### Tutorial Structure +Tutorials are categorized by: +- Hardware type (switches, sensors, etc.) +- Platform (Arduino, Raspberry Pi, ESP32) +- Integration type (voice assistants, home automation) + +## Development Notes + +### Jekyll Dependencies +- Ruby-based Jekyll 4.3.0+ (CloudFlare Pages deployment) +- Modern Jekyll plugins and gem versions +- Webrick server for local development +- YAML linting available via `yaml-lint` gem +- Jekyll Polyglot 1.8+ for multi-language support + +### Asset Management +- CSS: Compiled from Sass in `_sass/` +- JavaScript: Custom scripts in `/public/js/` +- Images: Organized by feature/tutorial in `/public/img/` + +### SEO and Analytics +- Google Analytics tracking configured +- Jekyll SEO tag plugin for meta tags +- Sitemap generation enabled +- Social media integration (Twitter, GitHub) + +## Multi-Language Support + +This site supports multiple languages using Jekyll Polyglot: + +### Supported Languages +- **English (en)**: Default language, URLs: `/` +- **Portuguese (pt)**: Brazilian Portuguese, URLs: `/pt/` + +### Language Configuration +- **Plugin**: Jekyll Polyglot (`jekyll-polyglot` gem) +- **Config**: Languages defined in `_config.yml` +- **Content**: Language-specific content with `.pt.md` extension +- **Navigation**: Language-aware sidebar with automatic filtering + +### Content Structure for Multi-Language +``` +├── index.md # English homepage +├── index.pt.md # Portuguese homepage +├── pages/ +│ ├── quickstarts.md # English version +│ └── quickstarts.pt.md # Portuguese version +└── _data/ + └── locales.yml # Translation strings for UI elements +``` + +### Adding New Translations +1. **Add language frontmatter**: Include `lang: en` or `lang: pt` in page frontmatter +2. **Create Portuguese version**: Copy `.md` file and rename to `.pt.md` +3. **Translate content**: Translate all text content including frontmatter titles +4. **Update internal links**: Adjust links to include `/pt/` prefix for Portuguese pages +5. **Test navigation**: Verify language switcher and sidebar navigation work correctly + +### Translation Guidelines +- **UI Elements**: Use `_data/locales.yml` for interface translations +- **URLs**: Portuguese URLs automatically get `/pt/` prefix +- **SEO**: Hreflang tags automatically generated for both languages +- **Navigation**: Sidebar filters content by current language +- **Fallback**: English content serves as fallback for untranslated pages + +### Language Switcher +- Located in sidebar navigation +- Switches between equivalent pages in both languages +- Preserves URL structure with language prefix \ No newline at end of file diff --git a/Gemfile b/Gemfile index 4160c3d..0c075a8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,10 +1,15 @@ source 'https://rubygems.org' -# Use the version of github-pages used by the actual GitHub Pages -# As suggested in http://jekyllrb.com/docs/github-pages/#deploying-jekyll-to-github-pages -require 'json' -require 'open-uri' -versions = JSON.parse(open('https://pages.github.com/versions.json').read) -gem 'github-pages', versions['github-pages'] +# Jekyll 4.x configuration for CloudFlare Pages deployment +gem "jekyll", "~> 4.3.0" +gem "webrick", "~> 1.8" +gem "kramdown", ">= 2.3.0" +gem "kramdown-parser-gfm" +gem 'rouge', '~> 4.0' +gem 'jekyll-seo-tag', '~> 2.8' +gem 'jekyll-sitemap', '~> 1.4' +gem 'jekyll-polyglot', '~> 1.8' + +# Development dependencies gem "yaml-lint", "~> 0.0.9" gem "terminal-table", "~> 1.4" \ No newline at end of file diff --git a/_config.yml b/_config.yml index 65e2851..b2efbfd 100644 --- a/_config.yml +++ b/_config.yml @@ -8,7 +8,7 @@ description: > twitter_username: sinricpro github_username: sinricpro -url: https://help.sinric.pro +url: https://help.sinric.pro defaults: - @@ -16,12 +16,33 @@ defaults: layout: page weight: 100 # Used to sort navbar items. Lower weight goes higher on the list. +markdown: kramdown highlighter: rouge +kramdown: + input: GFM + syntax_highlighter: rouge google_analytics: G-D9D07HPM4B environment: production +#exclude: ["pages/pass.md"] + # How to build production # Change the environment: production / development -# bundle exec jekyll build \ No newline at end of file +# bundle exec jekyll build + +plugins: + - jekyll-seo-tag + - jekyll-sitemap + - jekyll-polyglot + +# Multi-language configuration +languages: ["en", "pt"] +default_lang: "en" +exclude_from_localization: ["public", "_site", "robots.txt", "sitemap.xml", "Gemfile", "Gemfile.lock", "_config.yml", "CLAUDE.md"] +parallel_localization: false + +# Content organization approach: keep clean directory structure +# English files: standard locations +# Portuguese files: .pt.md extensions for clarity \ No newline at end of file diff --git a/_data/locales.yml b/_data/locales.yml new file mode 100644 index 0000000..e68797b --- /dev/null +++ b/_data/locales.yml @@ -0,0 +1,49 @@ +en: + site: + title: "SinricPro" + tagline: "IOT Cloud Platform Documentation" + description: "Sinric Pro is a IOT Cloud Platform Documentation." + nav: + home: "Home" + documentation: "Documentation" + tutorials: "Tutorials" + devices: "Devices" + api: "API" + integrations: "Integrations" + ui: + read_more: "Read more" + previous: "Previous" + next: "Next" + search: "Search" + language: "Language" + toc: "Table of Contents" + last_updated: "Last updated" + footer: + copyright: "© 2024 SinricPro. All rights reserved." + edit_page: "Edit this page" + report_issue: "Report an issue" + +pt: + site: + title: "SinricPro" + tagline: "Documentação da Plataforma IoT em Nuvem" + description: "Sinric Pro é uma Documentação da Plataforma IoT em Nuvem." + nav: + home: "Início" + documentation: "Documentação" + tutorials: "Tutoriais" + devices: "Dispositivos" + api: "API" + integrations: "Integrações" + ui: + read_more: "Leia mais" + previous: "Anterior" + next: "Próximo" + search: "Buscar" + language: "Idioma" + toc: "Índice" + last_updated: "Última atualização" + footer: + copyright: "© 2024 SinricPro. Todos os direitos reservados." + edit_page: "Editar esta página" + report_issue: "Reportar um problema" \ No newline at end of file diff --git a/_drawings/Motion-Detected.docx b/_drawings/Motion-Detected.docx new file mode 100644 index 0000000..917ee3e Binary files /dev/null and b/_drawings/Motion-Detected.docx differ diff --git a/_drawings/fritzing/5050-led-strip.fzz b/_drawings/fritzing/5050-led-strip.fzz new file mode 100644 index 0000000..badcae9 Binary files /dev/null and b/_drawings/fritzing/5050-led-strip.fzz differ diff --git a/_drawings/fritzing/BME280-tutorial.fzz b/_drawings/fritzing/BME280-tutorial.fzz new file mode 100644 index 0000000..f457860 Binary files /dev/null and b/_drawings/fritzing/BME280-tutorial.fzz differ diff --git a/_drawings/fritzing/BMP180-tutorial.fzz b/_drawings/fritzing/BMP180-tutorial.fzz new file mode 100644 index 0000000..530601b Binary files /dev/null and b/_drawings/fritzing/BMP180-tutorial.fzz differ diff --git a/_drawings/fritzing/Capacitive-Soil-Moisture-Sensor.fzz b/_drawings/fritzing/Capacitive-Soil-Moisture-Sensor.fzz new file mode 100644 index 0000000..39efd92 Binary files /dev/null and b/_drawings/fritzing/Capacitive-Soil-Moisture-Sensor.fzz differ diff --git a/_drawings/fritzing/DS18B20.fzz b/_drawings/fritzing/DS18B20.fzz new file mode 100644 index 0000000..4fb4a2a Binary files /dev/null and b/_drawings/fritzing/DS18B20.fzz differ diff --git a/_drawings/fritzing/LM335-tutorial.fzz b/_drawings/fritzing/LM335-tutorial.fzz new file mode 100644 index 0000000..85a7565 Binary files /dev/null and b/_drawings/fritzing/LM335-tutorial.fzz differ diff --git a/_drawings/fritzing/LM35-tutorial.fzz b/_drawings/fritzing/LM35-tutorial.fzz new file mode 100644 index 0000000..513cbf3 Binary files /dev/null and b/_drawings/fritzing/LM35-tutorial.fzz differ diff --git a/_drawings/fritzing/MQ135.fzz b/_drawings/fritzing/MQ135.fzz new file mode 100644 index 0000000..a0bfe9c Binary files /dev/null and b/_drawings/fritzing/MQ135.fzz differ diff --git a/_drawings/fritzing/Ultrasonic-Sensor.fzz b/_drawings/fritzing/Ultrasonic-Sensor.fzz new file mode 100644 index 0000000..6c7ef76 Binary files /dev/null and b/_drawings/fritzing/Ultrasonic-Sensor.fzz differ diff --git a/_drawings/fritzing/contact-sensor.fzz b/_drawings/fritzing/contact-sensor.fzz new file mode 100644 index 0000000..56a55fc Binary files /dev/null and b/_drawings/fritzing/contact-sensor.fzz differ diff --git a/_drawings/fritzing/motion-sensor.fzz b/_drawings/fritzing/motion-sensor.fzz new file mode 100644 index 0000000..bdbe21e Binary files /dev/null and b/_drawings/fritzing/motion-sensor.fzz differ diff --git a/_drawings/fritzing/push-button.fzz b/_drawings/fritzing/push-button.fzz new file mode 100644 index 0000000..9605951 Binary files /dev/null and b/_drawings/fritzing/push-button.fzz differ diff --git a/_drawings/fritzing/switch-tutorial.fzz b/_drawings/fritzing/switch-tutorial.fzz new file mode 100644 index 0000000..0fbd943 Binary files /dev/null and b/_drawings/fritzing/switch-tutorial.fzz differ diff --git a/_drawings/fritzing/water_sensor.fzz b/_drawings/fritzing/water_sensor.fzz new file mode 100644 index 0000000..f62e031 Binary files /dev/null and b/_drawings/fritzing/water_sensor.fzz differ diff --git a/_drawings/sequencediagram/raspberrypi-alexa-googlehome-camera.txt b/_drawings/sequencediagram/raspberrypi-alexa-googlehome-camera.txt new file mode 100644 index 0000000..4a87eec --- /dev/null +++ b/_drawings/sequencediagram/raspberrypi-alexa-googlehome-camera.txt @@ -0,0 +1,21 @@ +title How does Alexa, Google Home WebRTC work with Sinric Pro + +Alexa or Google Home->Sinric Pro:Show me the **Font Camera** +note over Alexa or Google Home,Sinric Pro:Alexa generates a WebRTC SDP **request** and send it to Sinric Pro + +Sinric Pro->RaspPi:Sinric Pro forward to the request to your Pi +note over Sinric Pro,RaspPi:SDP **request** is in base64 format + +RaspPi->MediaMTX:Forward to the SDP **request** to MediaMTX + +MediaMTX->MediaMTX:Creates SDP **answer** + +MediaMTX->RaspPi:Send the SDP **answer** + +RaspPi->Sinric Pro:Send the SDP **answer** to Sinric Pro +note over Sinric Pro,RaspPi:SDP **answer** is in Base64 format + +Sinric Pro->Alexa or Google Home:Sends Alexa SDP **answer** + +Alexa or Google Home<->RaspPi: Starts steaming Pi Camera + diff --git a/_includes/head.html b/_includes/head.html index 8da40c1..3418f2c 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -15,16 +15,40 @@ {{ page.title }} · {{ site.title }} {% endif %} - - - + - - - - - + + + + + + + + + + {% seo %} + + + {% assign current_lang = site.active_lang | default: site.default_lang %} + + + + {% if page.lang %} + {% for language in site.languages %} + {% if language == 'en' %} + {% assign lang_url = page.url | remove: '/pt' %} + {% if lang_url == '' %}{% assign lang_url = '/' %}{% endif %} + + {% elsif language == 'pt' %} + {% assign lang_url = page.url %} + {% unless lang_url contains '/pt' %} + {% assign lang_url = '/pt' | append: lang_url %} + {% endunless %} + + {% endif %} + {% endfor %} + {% endif %} diff --git a/_includes/language-switcher.html b/_includes/language-switcher.html new file mode 100644 index 0000000..528f098 --- /dev/null +++ b/_includes/language-switcher.html @@ -0,0 +1,213 @@ +
+ {% assign current_language = site.default_lang %} + {% if site.active_lang %} + {% assign current_language = site.active_lang %} + {% endif %} + +
+ + +
+ {% for language in site.languages %} + {% if language != current_language %} + {% if language == 'en' %} + {% assign en_url = page.url | remove_first: '/pt' %} + {% if en_url == '' %}{% assign en_url = '/' %}{% endif %} + + 🇺🇸 English + + {% elsif language == 'pt' %} + {% assign pt_url = page.url %} + {% unless pt_url contains '/pt' %} + {% if pt_url == '/' %} + {% assign pt_url = '/pt/' %} + {% else %} + {% assign pt_url = '/pt' | append: pt_url %} + {% endif %} + {% endunless %} + + 🇧🇷 Português + + {% endif %} + {% endif %} + {% endfor %} +
+
+
+ + + + \ No newline at end of file diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 078a04d..09bbd2a 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -1,26 +1,97 @@ + + diff --git a/index.md b/index.md index 06e2ac9..315b69b 100644 --- a/index.md +++ b/index.md @@ -1,39 +1,44 @@ --- title: Home weight: 0 +lang: en +permalink: / --- Welcome to **Sinric Pro** documentation. +**Quick Start** + - Tutorials [here]({{ site.github.url }}/pages/quickstarts.html) + **API** + - API guide [here](https://help.sinric.pro/pages/tutorials/api-guide) - Complete API documentation is available [here](https://apidocs.sinric.pro/) **SDKs** - - [x] [C++ SDK for Arduino, ESP8266 and ESP32](https://github.com/sinricpro/esp8266-esp32-sdk) - - [x] [C++ SDK for Arduino SAMD21, Adafruit SAMD21, SAMD51, nRF52, STM32, Teensy, SAM DUE](https://github.com/khoih-prog/SinricPro_Generic) *(Community Maintained)* - - [x] [Python SDK](https://github.com/sinricpro/python-sdk) - - [x] [NodeJS SDK](https://github.com/sinricpro/nodejs-sdk) - -**Messaging** - - [Introduction, Requests, responses and events]({{ site.github.url }}/pages/messaging.html) - - [Sample messages](https://github.com/sinricpro/sample_messages) - -**Voice Control** - - [Amazon Alexa]({{ site.github.url }}/pages/alexa.html) - - [Google Home]({{ site.github.url }}/pages/googlehome.html) - - [Google Home (via SmartThings)]({{ site.github.url }}/pages/smartthings-googlehome.html) + - [x] [ESP8266, ESP32, Raspberry Pi Pico W SDK ](https://github.com/sinricpro/esp8266-esp32-sdk) *(Official)* + - [x] [Arduino UNO R4 WiFi, Nano 33 IoT, MKR WIFI 1010, Seeedstudio Wio Terminal](https://github.com/sinricpro/arduino-variants-sdk) *(Official)* + - [x] [Micropython SDK](https://github.com/sinricpro/micropython-sinricpro-sdk) *(Official)* + - [x] [Python SDK](https://github.com/sinricpro/python-sdk) *(Official)* + - [x] [NodeJS SDK](https://github.com/sinricpro/nodejs-sdk) *(Official)* + - [x] [Node-RED](https://github.com/sinricpro/node-red-contrib-sinric-pro) *(Official)* + - [x] [C#](https://github.com/xamakadesigns/sinric-pro-csharp) *(Community Maintained)* + - [x] [Arduino SAMD21, Adafruit SAMD21, SAMD51, nRF52, STM32, Teensy, SAM DUE SDK](https://github.com/khoih-prog/SinricPro_Generic) *(Community Maintained)* + +**Integrations** - [IFTTT]({{ site.github.url }}/pages/ifttt.html) - -**Devices** - - [All supported devices and example codes]({{ site.github.url }}/pages/supported_devices.html) - - + - [Homebridge (Homekit)]({{ site.github.url }}/pages/homebridge.html) + - [Apple Shortcuts]({{ site.github.url }}/pages/apple-shortcuts.html) + - [Node-Red]({{ site.github.url }}/pages/node-red.html) ## Where to go next? * To try out Sinric, check out our [Quickstart guide]({{ site.github.url }}/pages/quickstart.html) - * See if your device is supported [Supported Devices]({{ site.github.url }}/pages/supported_devices.html) - * The example source code is on GitHub as [sinricpro/sinric](https://github.com/sinricpro/sinric/) + * Example code is available on GitHub + - [ESP8266, ESP32, Raspberry Pi Pico W SDK](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples) + - [Micropython SDK](https://github.com/sinricpro/micropython-sinricpro-sdk/tree/main/examples) + - [Python SDK](https://github.com/sinricpro/python-sdk/tree/master/examples) + - [NodeJS SDK](https://github.com/sinricpro/nodejs-sdk/tree/master/examples) + * Issues are also tracked on [GitHub](https://github.com/sinricpro/) - > This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file + > This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) diff --git a/index.pt.md b/index.pt.md new file mode 100644 index 0000000..2dc0dde --- /dev/null +++ b/index.pt.md @@ -0,0 +1,39 @@ +--- +title: Início +weight: 0 +lang: pt +permalink: / +--- + +Bem-vindo à documentação do **Sinric Pro**. + +**Início Rápido** + - Tutoriais [aqui]({{ site.github.url }}/pt/pages/quickstarts.html) + +**API** + - Guia da API [aqui](https://help.sinric.pro/pt/pages/tutorials/api-guide) + - Documentação completa da API está disponível [aqui](https://apidocs.sinric.pro/) + +**SDKs** + - [x] [ESP8266, ESP32, Raspberry Pi Pico W SDK ](https://github.com/sinricpro/esp8266-esp32-sdk) *(Oficial)* + - [x] [Arduino UNO R4 WiFi, Nano 33 IoT, MKR WIFI 1010, Seeedstudio Wio Terminal](https://github.com/sinricpro/arduino-variants-sdk) *(Oficial)* + - [x] [Micropython SDK](https://github.com/sinricpro/micropython-sinricpro-sdk) *(Oficial)* + - [x] [Python SDK](https://github.com/sinricpro/python-sdk) *(Oficial)* + - [x] [NodeJS SDK](https://github.com/sinricpro/nodejs-sdk) *(Oficial)* + - [x] [Node-RED](https://github.com/sinricpro/node-red-contrib-sinric-pro) *(Oficial)* + - [x] [C#](https://github.com/xamakadesigns/sinric-pro-csharp) *(Mantido pela Comunidade)* + - [x] [Arduino SAMD21, Adafruit SAMD21, SAMD51, nRF52, STM32, Teensy, SAM DUE SDK](https://github.com/khoih-prog/SinricPro_Generic) *(Mantido pela Comunidade)* + +**Integrações** + - [IFTTT]({{ site.github.url }}/pt/pages/ifttt.html) + - [Homebridge (Homekit)]({{ site.github.url }}/pt/pages/homebridge.html) + - [Apple Shortcuts]({{ site.github.url }}/pt/pages/apple-shortcuts.html) + - [Node-Red]({{ site.github.url }}/pt/pages/node-red.html) + +## Para onde ir a seguir? + + * Para experimentar o Sinric, confira nosso [Guia de início rápido]({{ site.github.url }}/pt/pages/quickstart.html) + * O código-fonte de exemplo está no GitHub como [sinricpro](https://github.com/sinricpro) + * Issues também são rastreados no [GitHub](https://github.com/sinricpro/) + + > Este documento é código aberto. Viu um erro de grafia? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/_pages/alexa.md b/pages/_pages/alexa.md new file mode 100644 index 0000000..d8701e3 --- /dev/null +++ b/pages/_pages/alexa.md @@ -0,0 +1,13 @@ +--- +title: Amazon Alexa +weight: 4 +published: false +--- + +**How Amazon Alexa works with Sinric Pro** + +You can find the Alexa Smart Home skill [**here**](https://www.amazon.com/dp/B07ZT5VDT8). We recommend you to do this before creating any devices in the system to see the magic. + + + +Once you complete the skill linking process. Run the discovery command to discover all the devices connected to your account. diff --git a/pages/google-home-smartthings.md b/pages/_pages/google-home-smartthings.md similarity index 98% rename from pages/google-home-smartthings.md rename to pages/_pages/google-home-smartthings.md index eda6b79..25c31b8 100644 --- a/pages/google-home-smartthings.md +++ b/pages/_pages/google-home-smartthings.md @@ -2,6 +2,7 @@ title: Google Home (SmartThings) weight: 4 youtubeId: UHuVoE6kPB8 +published: false --- **How to integrate Sinric Pro + Google Home** diff --git a/pages/google-home.md b/pages/_pages/google-home.md similarity index 81% rename from pages/google-home.md rename to pages/_pages/google-home.md index 4ba6566..3411d8e 100644 --- a/pages/google-home.md +++ b/pages/_pages/google-home.md @@ -1,11 +1,13 @@ --- title: Google Home -weight: 4 youtubeId: UHuVoE6kPB8 +published: false --- **How to integrate Sinric Pro + Google Home** +You can find the Google Action [**here**](https://assistant.google.com/services/a/uid/000000c715375dd7?hl=en). + * Open **Google Home** and click on **Add**. * Select **Setup Device** * Select **Works with Google Home** diff --git a/pages/_pages/pass-timeline/timeline.md b/pages/_pages/pass-timeline/timeline.md new file mode 100644 index 0000000..d80693a --- /dev/null +++ b/pages/_pages/pass-timeline/timeline.md @@ -0,0 +1,41 @@ +--- +title: PaaS Process and Timeline +layout: post +--- + +### Step 1 : PaaS contract & Payment + +If you are interested in our PaaS solution, we will share our terms and conditions so that we are all aligned on our joint goals. Once you sign the contract and make the initial payment (30%) we will assign one of our engineers to help you with onboarding process. + +Engineer will reach out to you for additional information to make sure we have all the information we need to move to the next stage. + +### Step 2 : New server + +We will deploy our services on a dedicated server for your busniess and commerece the server provisioning. + +### Step 3 : App & Alexa skill reskinning + +We will re-skin the app and Amazon Alexa skill according to your above perferences. + +### Step 4 : Firmware + +We will provide the device provisioning sketch according to your product requirements. + +> We can review your firmware code to make sure SDK is implemented correctly and spot any mistakes (we will not modify your code or write code for you). + +### Step 5 : App Testing + +We will build the Android app first and share the .apk file to install on your Android phone followed by iOS on TestFlight. + +### Step 5 : Publishing + +Once you grant us access to [Amazon Developer Program](https://developer.amazon.com/alexa/console/ask), [Android Developer Program](https://support.google.com/googleplay/android-developer/answer/6112435?hl=en), [Apple Developer Program](https://developer.apple.com/support/app-account/) we will upload the binary files for you and publish to review. + +> For iOS, +1. You would need to enroll in as an organization, not as an individual. +2. You must record a short video showing a real iOS phone interacts with your product. + +This review can take up 2-7 days. + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/smartthings.md b/pages/_pages/smartthings.md similarity index 97% rename from pages/smartthings.md rename to pages/_pages/smartthings.md index fbae04d..827e745 100644 --- a/pages/smartthings.md +++ b/pages/_pages/smartthings.md @@ -2,6 +2,7 @@ title: Samsung SmartThings weight: 4 youtubeId: UHuVoE6kPB8 +published: false --- **How to integrate Sinric Pro + Samsung SmartThings** diff --git a/pages/actions/adjust_bands.md b/pages/actions/adjust_bands.md index a61037b..18e91d4 100644 --- a/pages/actions/adjust_bands.md +++ b/pages/actions/adjust_bands.md @@ -12,10 +12,6 @@ This action is used to adjust bands in your smart speaker. #### Alexa [Alexa Interface](https://developer.amazon.com/docs/device-apis/alexa-equalizercontroller.html#adjustbands) -##### Alexa utterances -Alexa, increase bass on speaker -Alexa, increase bass by 1 on speaker - #### Sinric Pro samples [Request](https://github.com/sinricpro/sample_messages/blob/master/19_AdjustBands/01_Request.json) [Response](https://github.com/sinricpro/sample_messages/blob/master/19_AdjustBands/02_Response.json) diff --git a/pages/actions/adjust_brightness.md b/pages/actions/adjust_brightness.md index 8ee45cf..e31eaa3 100644 --- a/pages/actions/adjust_brightness.md +++ b/pages/actions/adjust_brightness.md @@ -12,10 +12,6 @@ This action is used to adjust brightness in your smart light bulb. #### Alexa [Alexa Interface](https://developer.amazon.com/docs/device-apis/alexa-brightnesscontroller.html#adjustbrightness-directive) -##### Alexa utterances -Alexa, dim lamp ten percent. - - #### Sinric Pro samples [Request](https://github.com/sinricpro/sample_messages/blob/master/03_Brightness/02_adjustBrightness/01_Request.json) [Response](https://github.com/sinricpro/sample_messages/blob/master/03_Brightness/02_adjustBrightness/02_Response.json) diff --git a/pages/actions/adjust_power_level.md b/pages/actions/adjust_power_level.md index 723582c..8ed8a97 100644 --- a/pages/actions/adjust_power_level.md +++ b/pages/actions/adjust_power_level.md @@ -13,10 +13,6 @@ This action is used to adjust power level in your smart light bulb or smart swit #### Alexa [Alexa Interface](https://developer.amazon.com/docs/device-apis/alexa-powerlevelcontroller.html#adjustpowerlevel-directive) -##### Alexa utterances -Alexa, increase the power level by 12 on the lamp. - - #### Sinric Pro samples [Request](https://github.com/sinricpro/sample_messages/blob/master/02_PowerLevel/02_adjustPowerLevel/01_Request.json) [Response](https://github.com/sinricpro/sample_messages/blob/master/02_PowerLevel/02_adjustPowerLevel/02_Response.json) diff --git a/pages/actions/adjust_range_value.md b/pages/actions/adjust_range_value.md index 588762e..51f078e 100644 --- a/pages/actions/adjust_range_value.md +++ b/pages/actions/adjust_range_value.md @@ -12,9 +12,6 @@ This action is used to adjust your window AC unit. #### Alexa [Alexa Interface](https://developer.amazon.com/docs/device-apis/alexa-powerlevelcontroller.html#adjustpowerlevel-directive) -##### Alexa utterances -Alexa, increase the power level by 12 on the lamp. - #### Sinric Pro samples [Request]() diff --git a/pages/actions/adjust_volume.md b/pages/actions/adjust_volume.md index 4a32b53..df5e3df 100644 --- a/pages/actions/adjust_volume.md +++ b/pages/actions/adjust_volume.md @@ -8,12 +8,7 @@ categories: #### Payload Version : 2 - -#### Alexa Interfaces -##### Alexa utterances - - #### Sinric Pro samples [Request]() [Response]() diff --git a/pages/alexa.md b/pages/alexa.md deleted file mode 100644 index 9982757..0000000 --- a/pages/alexa.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Amazon Alexa -weight: 4 ---- - -**How Amazon Alexa works with Sinric Pro** - -You can find the Alexa Smart Home skill here. We recommend you to do this before creating any devices in the system to see the magic. - -Once you complete the skill linking process. Run the discovery command to discover all the devices connected to your account. - - -### Request -1. The Amazon Alexa sends a message to the Sinric Pro IOT Platform. eg: Turn on [device name] -2. The Sinric Pro IoT platform creates a [request](https://github.com/sinricpro/sample_messages/blob/master/01_PowerState/01_setPowerState/01_Request.json) type message with appropriate action (in this case setPowerState) and send it to your IoT hardware module. -3. Your IoT hardware module [responds](https://github.com/sinricpro/sample_messages/blob/master/01_PowerState/01_setPowerState/02_Response.json) back to the Sinric Pro IOT Platform with success or failed status. - - **If you fail to respond with in 8 seconds / or device is offline, then the request will timeout and Alexa will say "Device is unresponsive".** - -4. The Sinric Pro IoT platform updates the device status according to your response and updates Alexa service. - - -![Sinric Pro alexa]({{ site.github.url }}/public/img/sinricpro-alexa-data-flow.png) - - -### Event - -1. The user change the device state physically. Eg: push a button to turn on the switch. -2. Your IOT module creates an [event](https://github.com/sinricpro/sample_messages/blob/master/01_PowerState/01_setPowerState/03_Event.json) message and send it to Sinric Pro IOT Platform. (In this case your IOT module sends setPowerState event) -3. The Sinric Pro IOT platform update the device status and update Alexa service - -Sinric Pro IOT platform will report any changes you do via events, app or API to Alexa as well. - -![Sinric Pro alexa event]({{ site.github.url }}/public/img/sinricpro-alexa-event.png) - - -> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/api-guide.md b/pages/api-guide.md new file mode 100644 index 0000000..4e6ff61 --- /dev/null +++ b/pages/api-guide.md @@ -0,0 +1,193 @@ +--- +title: API Guide +weight: 5 +lang: en +--- + +SinricPro uses REST for its API. This means it uses JSON for data exchange and follows common HTTP practices for communication. + +### Authentication : + +To interact with the SinricPro API, you'll need an API key. You can create and manage your API keys within the SinricPro Dashboard under the Credentials section. To create a new API Key click [here](https://portal.sinric.pro/credential/new/apikey) + + +![Sinric Pro - Create a new API key]({{ site.github.url }}/public/img/sinricpro-create-new-api-key.png) + + +#### Get all devices + +*Request* + +```javascript +curl -H "X-SINRIC-API-KEY: {YOUR-API-KEY-HERE}" https://api.sinric.pro/api/v1/devices +``` + + +*Response* + +```json +{ + "success":true, + "devices":[{ + "name":"TV", + .... + }] +} +``` + + +#### Get a device + +*Request* + +```javascript +curl -H "X-SINRIC-API-KEY: {YOUR-API-KEY-HERE}" https://api.sinric.pro/api/v1/devices/{device_id} +``` + + +*Response* + +```json +{ + "success":true, + "device":{ + "name":"TV", + .... + } +} +``` + + +#### Turn on a device + +*Request* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'X-SINRIC-API-KEY: {YOUR-API-KEY-HERE}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "action": "setPowerState", "value": "{\"state\":\"On\"}" }' +``` + +Note: `value` is a string. Use `JSON.stringify()` + +*Response* + +```json +{ + "success": true, + "message": "OK. Your message has been queued for processing." +} +``` + + +#### Listening to device state changes + +SinricPro prioritizes speed and avoids blocking. All command requests are queued and handled asynchronously, meaning the response might not be immediate. To receive confirmation or continuously monitor device status, subscribe to updates through our SSE (Server-Sent Events) endpoint. + +```javascript +curl -N --http2 -H "Accept:text/event-stream" -H "X-SINRIC-API-KEY: {YOUR-API-KEY-HERE}" https://sse.sinric.pro/sse/stream +``` + + +*Response* + +``` + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed + 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0 +{"event":"deviceConnected","device":{"name":"lightbulb","id":"660a7edf061ee8c78078c5ab"}} +.... +{"event":"deviceDisconnected","device":{"name":"switch2","id":"660a6c3d061ee8c78078bf3e"}} +... +{"event":"deviceMessageArrived","device": {"name":"switch2","id":"660a6c3d061ee8c78078bf3e","powerState":"On"}} +``` + + +#### Open Garage door + +*Request* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'X-SINRIC-API-KEY: {YOUR-API-KEY-HERE}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "action": "setMode", "value": "{\"mode\":\"Open\"}" }' +``` + +Note: `value` is a string. Use `JSON.stringify()` + +#### Open Blinds + +*Request* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'X-SINRIC-API-KEY: {YOUR-API-KEY-HERE}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "action": "setRangeValue", "value": "{\"rangeValue\": 100}" }' +``` + +Note: `value` is a string. Use `JSON.stringify()` + +#### Trigger doorbell + +*Request* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'X-SINRIC-API-KEY: {YOUR-API-KEY-HERE}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "action": "DoorbellPress", "value": "{\"state\": \"pressed\"}" }' +``` + +Note: `value` is a string. Use `JSON.stringify()` + + +#### Custom Device Type with Range or Mode + +Note: capabilities like **Range** or **Mode** requires additional `instanceId` parameter + +*Range Request* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'X-SINRIC-API-KEY: {YOUR-API-KEY-HERE}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "instanceId" : "rangeInstance1", "action": "setRangeValue", "value": "{\"rangeValue\":41}" }' +``` + +*Mode Request* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'X-SINRIC-API-KEY: {YOUR-API-KEY-HERE}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "instanceId" : "modeInstance1", "action": "setMode", "value": "{\"mode\":\"cool\"}" }' +``` + +Note: `value` is a string. Use `JSON.stringify()` + +#### Find devices in your account + +*Request* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devicess/find' \ +--header 'X-SINRIC-API-KEY: {YOUR-API-KEY-HERE}' \ +--header 'Content-Type: application/json' \ +--data '{ "name" : "TV" }' +``` + +*Response* + +```json +{ "success":true,"devices": [ {"name": "TV"} ] } +``` + +Complete API endpoints are available [here](https://apidocs.sinric.pro/) + +Looking for more examples ? + + - [IFTTT]({{ site.github.url }}/pages/ifttt.html) + - [Apple Shortcuts]({{ site.github.url }}/pages/apple-shortcuts.html) \ No newline at end of file diff --git a/pages/api-guide.pt.md b/pages/api-guide.pt.md new file mode 100644 index 0000000..4a02651 --- /dev/null +++ b/pages/api-guide.pt.md @@ -0,0 +1,205 @@ +--- +title: Guia da API +weight: 5 +lang: pt +--- + +SinricPro usa REST para sua API. Isso significa que usa JSON para troca de dados e segue práticas HTTP comuns para comunicação. + +### Autenticação: + +Para interagir com a API do SinricPro, você precisará de uma chave de API. Você pode criar e gerenciar suas chaves de API dentro do Painel SinricPro na seção Credenciais. Para criar uma nova Chave de API clique [aqui](https://portal.sinric.pro/credential/new/apikey) + +![Sinric Pro - Create a new API key]({{ site.github.url }}/public/img/sinricpro-create-new-api-key.png) + +*Solicitação* + +```javascript +curl -X POST 'https://api.sinric.pro/api/v1/auth' --header 'x-sinric-api-key: a614xxxx-xxxx-xxxx-xxxx-xxxxxxxx' +``` + +*Resposta* + +```json + { + "success": true, + "message": "OK.", + "accessToken": "eyJhbG.xxxxxxxxx.xxxxxxxxxxxxxxx...", + "refreshToken": "9i4GV2Llpsl87FoT1HvQcxaybP3xxxxxxxxxxxxxxxx..", + "expiresIn": 604800 +} +``` + +`access Token` é seu token de acesso. O token de acesso concede autorização para futuras chamadas de API. Lembre-se, ele expirará após `604800` segundos. + +### Casos de uso comuns da API: + +#### Obter todos os dispositivos + +*Solicitação* + +```javascript +curl -X GET 'https://api.sinric.pro/api/v1/devices' --header 'Authorization: Bearer {accessToken}' +``` + +*Resposta* + +```json +{ + "success":true, + "devices":[ + { + "name":"TV" + } + ] +} +``` + +#### Obter um dispositivo + +*Solicitação* + +```javascript +curl -X GET 'https://api.sinric.pro/api/v1/devices/{device_id}' --header 'Authorization: Bearer {accessToken}' +``` + +*Resposta* + +```json +{ + "success":true, + "device":{ + "name":"TV" + } +} +``` + +#### Ligar um dispositivo + +*Solicitação* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'Authorization: Bearer {accessToken}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "action": "setPowerState", "value": "{\"state\":\"On\"}" }' +``` + +Nota: `value` é uma string. Use `JSON.stringify()` + +*Resposta* + +```json +{ + "success": true, + "message": "OK. Your message has been queued for processing." +} +``` + +#### Tipo de dispositivo personalizado com alcance ou modo + +*Range Solicitação* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'Authorization: Bearer {accessToken}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "instanceId" : "rangeInstance1", "action": "setRangeValue", "value": "{\"rangeValue\":41}" }' +``` + +*Mode Solicitação* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'Authorization: Bearer {accessToken}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "instanceId" : "modeInstance1", "action": "setMode", "value": "{\"mode\":\"cool\"}" }' +``` + +Nota: `value` é uma string. Use `JSON.stringify()` + +Se você preferir **uma única chamada de API** para controlar seus dispositivos, explore exemplos em [IFTTT]({{ site.github.url }}/pt/pages/ifttt.html) ou [Apple Shortcuts]({{ site.github.url }}/pt/pages/apple-shortcuts.html). Estes podem fornecer uma abordagem mais amigável para controle básico. + +#### Ouvindo mudanças de estado do dispositivo + +SinricPro prioriza velocidade e evita bloqueios. Todas as solicitações de comando são enfileiradas e tratadas de forma assíncrona, significando que a resposta pode não ser imediata. Para receber confirmação ou monitorar continuamente o status do dispositivo, inscreva-se em atualizações através do nosso endpoint SSE (Server-Sent Events). + +```javascript +curl -N --http2 -H "Accept:text/event-stream" https://portal.sinric.pro/sse/stream?accessToken={accessToken} +``` + +*Resposta* + +``` + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed + 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0 +{"event":"deviceConnected","device":{"name":"lightbulb","id":"660a7edf061ee8c78078c5ab"}} +.... +{"event":"deviceDisconnected","device":{"name":"switch2","id":"660a6c3d061ee8c78078bf3e"}} +... +{"event":"deviceMessageArrived","device": {"name":"switch2","id":"660a6c3d061ee8c78078bf3e","powerState":"On"}} +``` + +#### Abrir porta da garagem + +*Solicitação* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'Authorization: Bearer {accessToken}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "action": "setMode", "value": "{\"mode\":\"Open\"}" }' +``` + +Nota: `value` é uma string. Use `JSON.stringify()` + +#### Abrir persianas + +*Solicitação* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'Authorization: Bearer {accessToken}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "action": "setRangeValue", "value": "{\"rangeValue\": 100}" }' +``` + +Nota: `value` é uma string. Use `JSON.stringify()` + +#### Acionar campainha + +*Solicitação* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devices/{device_id}/action' \ +--header 'Authorization: Bearer {accessToken}' \ +--header 'Content-Type: application/json' \ +--data '{ "type": "request", "action": "DoorbellPress", "value": "{\"state\": \"pressed\"}" }' +``` + +Nota: `value` é uma string. Use `JSON.stringify()` + +#### Encontrar dispositivos em sua conta + +*Solicitação* + +```javascript +curl --location 'https://api.sinric.pro/api/v1/devicess/find' \ +--header 'Authorization: Bearer {accessToken}' \ +--header 'Content-Type: application/json' \ +--data '{ "name" : "TV", "description" : "....." }' +``` + +*Resposta* + +```json +{ "success":true,"devices": [ {"name": "TV"} ] } +``` + +Endpoints completos da API estão disponíveis [aqui](https://apidocs.sinric.pro/) + +Procurando por mais exemplos? + + - [IFTTT]({{ site.github.url }}/pt/pages/ifttt.html) + - [Apple Shortcuts]({{ site.github.url }}/pt/pages/apple-shortcuts.html) \ No newline at end of file diff --git a/pages/apple-shortcuts.md b/pages/apple-shortcuts.md new file mode 100644 index 0000000..0c268aa --- /dev/null +++ b/pages/apple-shortcuts.md @@ -0,0 +1,103 @@ +--- +title: Apple Shortcuts +weight: 4 +lang: en +--- + +### Introduction + +In this tutorial we are going to create a Apple Shortcut to turn on and off a relay connected to a ESP8266, ESP32 or Raspberry Pi using the Sinric Pro API. + +### Prerequisites : + +Please complete [Tutorial - Turn on and off a Relay](https://help.sinric.pro/pages/tutorials/switch/part-1) in order to learn how to connect your ESP or Pi to Sinric Pro. + +#### Step 1: Create a new API Key in Sinric Pro + +Login to [Sinric Portal](https://portal.sinric.pro), select **Credentials** and click on **New API Key** click **save** and **Copy** the newly created API Key + +gif + +You can use the `curl` to send a test request to this API endpoint. + +```curl +curl --location --request POST 'https://apple.sinric.pro/v1/shortcuts/actions' \ +--header 'Content-Type: application/json' \ +--data-raw '{ "api_key": "YOUR_API_KEY_FROM_ABOVE", "device_id": "YOUR_DEVICE_ID", "action": "setPowerState", "value": { "state" : "On"} }' +``` + + +#### Step 2: Create Apple Shortcut + +1. Create a new shortcut and add the Get Contents of URL action. +2. In the URL field, enter the URL: `https://apple.sinric.pro/v1/shortcuts/actions` +3. Tap on the Method field and select `POST`. +4. Tap on the Body field and add the body of your POST request. + +| Key |Input Type| Text | +| --------- | ------- | ------- | +| api_key | Text | Your API key from above. | +| device_id | Text | Your device id from the [Sinric Pro Portal](https://portal.sinric.pro). | +| action | Text | Action to perform. set to `setPowerState`. Check below for more examples. | +| value | Dictionary | Enter `state` as key and `On` or `Off` value. | + +Tap on play button below to test the request! + +![Sinric Pro Apple shortcut]({{ site.github.url }}/public/img/sinricpro-apple-shortcut.png) + +Now you can control your ESP8266, ESP32 or Raspberry Pi via Apple Shortcut from home screen. + +#### More examples + +Power On or Off: + +```json +{ "api_key": "YOUR_API_KEY_FROM_ABOVE", "device_id": "YOUR_DEVICE_ID", "action": "setPowerState", "value": { "state" : "On"} } +``` + +Garage door open/close: + +```json +{ "api_key": "YOUR_API_KEY_FROM_ABOVE", "device_id": "YOUR_DEVICE_ID", "action": "setMode", "value": { "mode" : "Open"} } +``` + +Blinds open/close: + +```json +{ "api_key": "YOUR_API_KEY_FROM_ABOVE", "device_id": "YOUR_DEVICE_ID", "action": "setRangeValue", "value": { "rangeValue" : 100} } +``` + +Change power level: +```json + { "api_key": "YOUR_API_KEY_FROM_ABOVE", "device_id": "YOUR_DEVICE_ID", "action": "setPowerLevel", "value": { "powerLevel": 50 } } +``` + +Change brightness: +```json + { "api_key": "YOUR_API_KEY_FROM_ABOVE", "device_id": "YOUR_DEVICE_ID", "action": "setBrightness", "value": { "brightness": 50 } } +``` + +Trigger doorbell: +```json + { "api_key": "YOUR_API_KEY_FROM_ABOVE", "device_id": "YOUR_DEVICE_ID", "action": "DoorbellPress", "value": { "state": "pressed" } } +``` + +Set target temperature: +```json + { "api_key": "YOUR_API_KEY_FROM_ABOVE", "device_id": "YOUR_DEVICE_ID", "action": "targetTemperature", "value": { "temperature": 18 } } +``` + +Change color: +```json + { "api_key": "YOUR_API_KEY_FROM_ABOVE", "device_id": "YOUR_DEVICE_ID", "action": "setColor", "value": { "color": { "b": 0, "g": 0, "r": 0 } } } +``` + +Change color temperature: +```json + { "api_key": "YOUR_API_KEY_FROM_ABOVE", "device_id": "YOUR_DEVICE_ID", "action": "setColorTemperature", "value": {"colorTemperature":2700} } +``` + + + + +More examples : [https://github.com/sinricpro/sample_messages](https://github.com/sinricpro/sample_messages) \ No newline at end of file diff --git a/pages/apple-shortcuts.pt.md b/pages/apple-shortcuts.pt.md new file mode 100644 index 0000000..69c05f8 --- /dev/null +++ b/pages/apple-shortcuts.pt.md @@ -0,0 +1,103 @@ +--- +title: Atalhos da Apple +weight: 4 +lang: pt +--- + +### Introdução + +Neste tutorial vamos criar um Atalho da Apple para ligar e desligar um relé conectado a um ESP8266, ESP32 ou Raspberry Pi usando a API Sinric Pro. + +### Pré-requisitos: + +Complete o [Tutorial - Ligar e desligar um Relé]({{ site.github.url }}/pt/pages/tutorials/switch/part-1.pt.html) para aprender como conectar seu ESP ou Pi ao Sinric Pro. + +#### Passo 1: Criar uma nova Chave API no Sinric Pro + +Faça login no [Portal Sinric](https://portal.sinric.pro), selecione **Credentials** e clique em **New API Key**, clique em **save** e **Copy** a Chave API recém-criada + +gif + +Você pode usar o `curl` para enviar uma requisição de teste para este endpoint da API. + +```curl +curl --location --request POST 'https://apple.sinric.pro/v1/shortcuts/actions' \ +--header 'Content-Type: application/json' \ +--data-raw '{ "api_key": "SUA_CHAVE_API_DE_CIMA", "device_id": "SEU_ID_DO_DISPOSITIVO", "action": "setPowerState", "value": { "state" : "On"} }' +``` + + +#### Passo 2: Criar Atalho da Apple + +1. Crie um novo atalho e adicione a ação Get Contents of URL. +2. No campo URL, digite a URL: `https://apple.sinric.pro/v1/shortcuts/actions` +3. Toque no campo Method e selecione `POST`. +4. Toque no campo Body e adicione o corpo da sua requisição POST. + +| Chave |Tipo de Entrada| Texto | +| --------- | ------- | ------- | +| api_key | Text | Sua chave API de cima. | +| device_id | Text | Seu ID do dispositivo do [Portal Sinric Pro](https://portal.sinric.pro). | +| action | Text | Ação a executar. defina como `setPowerState`. Veja abaixo para mais exemplos. | +| value | Dictionary | Digite `state` como chave e valor `On` ou `Off`. | + +Toque no botão play abaixo para testar a requisição! + +![Sinric Pro Apple shortcut]({{ site.github.url }}/public/img/sinricpro-apple-shortcut.png) + +Agora você pode controlar seu ESP8266, ESP32 ou Raspberry Pi via Atalho da Apple da tela inicial. + +#### Mais exemplos + +Ligar ou Desligar: + +```json +{ "api_key": "SUA_CHAVE_API_DE_CIMA", "device_id": "SEU_ID_DO_DISPOSITIVO", "action": "setPowerState", "value": { "state" : "On"} } +``` + +Portão da garagem abrir/fechar: + +```json +{ "api_key": "SUA_CHAVE_API_DE_CIMA", "device_id": "SEU_ID_DO_DISPOSITIVO", "action": "setMode", "value": { "mode" : "Open"} } +``` + +Persianas abrir/fechar: + +```json +{ "api_key": "SUA_CHAVE_API_DE_CIMA", "device_id": "SEU_ID_DO_DISPOSITIVO", "action": "setRangeValue", "value": { "rangeValue" : 100} } +``` + +Alterar nível de potência: +```json + { "api_key": "SUA_CHAVE_API_DE_CIMA", "device_id": "SEU_ID_DO_DISPOSITIVO", "action": "setPowerLevel", "value": { "powerLevel": 50 } } +``` + +Alterar brilho: +```json + { "api_key": "SUA_CHAVE_API_DE_CIMA", "device_id": "SEU_ID_DO_DISPOSITIVO", "action": "setBrightness", "value": { "brightness": 50 } } +``` + +Acionar campainha: +```json + { "api_key": "SUA_CHAVE_API_DE_CIMA", "device_id": "SEU_ID_DO_DISPOSITIVO", "action": "DoorbellPress", "value": { "state": "pressed" } } +``` + +Definir temperatura alvo: +```json + { "api_key": "SUA_CHAVE_API_DE_CIMA", "device_id": "SEU_ID_DO_DISPOSITIVO", "action": "targetTemperature", "value": { "temperature": 18 } } +``` + +Alterar cor: +```json + { "api_key": "SUA_CHAVE_API_DE_CIMA", "device_id": "SEU_ID_DO_DISPOSITIVO", "action": "setColor", "value": { "color": { "b": 0, "g": 0, "r": 0 } } } +``` + +Alterar temperatura da cor: +```json + { "api_key": "SUA_CHAVE_API_DE_CIMA", "device_id": "SEU_ID_DO_DISPOSITIVO", "action": "setColorTemperature", "value": {"colorTemperature":2700} } +``` + + + + +Mais exemplos: [https://github.com/sinricpro/sample_messages](https://github.com/sinricpro/sample_messages) \ No newline at end of file diff --git a/pages/automations.md b/pages/automations.md new file mode 100644 index 0000000..8858f1d --- /dev/null +++ b/pages/automations.md @@ -0,0 +1,118 @@ +--- +title: Automations +weight: 4 +lang: en +--- + +### Introduction to SinricPro Automations + +SinricPro empowers users to create intelligent, automated routines for their smart homes by connecting devices and defining logical workflows. With its intuitive drag-and-drop automation builder, you can design custom scenarios that respond to events—whether triggered by device states, time, or environmental conditions—without writing a single line of code. + +From simple tasks like turning on lights at sunset to complex sequences involving multiple devices and time-based delays, SinricPro automations make your smart home smarter and more responsive. Whether you're setting up routines for daily life or creating personalized experiences, SinricPro's automation tool offers flexibility, ease of use, and powerful functionality—all within a clean, user-friendly interface. + +## Step 1: Basic Info + +![Sinric Pro automation creation intro]({{ site.github.url }}/public/img/sinricpro-portal-automation-creation-info.png) + +The first step in creating an automation is to provide basic information about it. + +### Fields + +- **Automation Name** + Enter a descriptive name for your automation. + *Example:* `TV Time` + +- **Automation Description** + Provide a brief description of what the automation does. This helps you remember its purpose later. + *Example:* `When TV is on, dim lights` + +### Navigation +After filling out the basic information, click the **Next** button to proceed to the Flow configuration. + +--- + +## Step 2: Flow Configuration + +![Sinric Pro automation creation flow]({{ site.github.url }}/public/img/sinricpro-portal-automation-creation-flow.png) + +In this step, you define the logic of your automation by setting up starters, conditions (optional), and actions. + +### Device Starters, Conditions, and Actions + +This panel lists available devices that can be used as triggers or components in your automation. You can drag and drop these devices into the appropriate sections (Starter, Conditions, or Actions). + +#### **Starter** + +This is the event that initiates the automation. It's the "when" or "if" part that gets the process going. Examples `TV turned on` + +#### **Conditions (Optional)** + +These are additional checks that happen after the starter has been met. If the specified conditions are not met, the automation's actions will not execute, even if the starter has been triggered. + +#### **Actions** + +Actions to be taken. eg: Turn on the lights, adjust the thermostat. + + +#### Additional Triggers Based Events: + +- **At a specific time** + *Example:* `5:30pm on a Sunday` + Triggers the automation at a predefined time. + + ![Sinric Pro automation creation flow]({{ site.github.url }}/public/img/sinricpro-portal-automation-creation-select-a-time.png) + + +- **At sunrise or sunset** + *Example:* `1hr before sunrise` + Triggers based on astronomical events. + + ![Sinric Pro automation creation flow]({{ site.github.url }}/public/img/sinricpro-portal-automation-creation-sunset-or-sunrise.png) + +- **Between two times** + *Example:* `between 08:00 to 18:00` + Runs the automation only during a specified time window. (Used as a condition) + + ![Sinric Pro automation creation flow]({{ site.github.url }}/public/img/sinricpro-portal-automation-creation-between-two-times.png) + +- **Time delay** + + Adds a delay between steps in the automation flow. (Used as action) + + ![Sinric Pro automation creation flow]({{ site.github.url }}/public/img/sinricpro-portal-automation-creation-add-time-delay.png) + +- **Push Notification** + Sends a push notification when triggered. + + ![Sinric Pro automation creation flow]({{ site.github.url }}/public/img/sinricpro-portal-automation-creation-push-notification.png) + +> 💡 Tip: Use these options to add time-based or contextual logic to your automation. + +Once you've configured all parts of the automation: + +- Click the **Save** button in the bottom-right corner to store your automation. + +--- + +## Example Automation Flow + +Let’s walk through an example: + +1. **Basic Info** + - Automation Name: `Evening Lights` + - Automation Description: `Turn on living room lights at sunset` + +2. **Flow** + - **Starter:** Add "At sunset" from the right panel. + - **Conditions:** None (optional). + - **Actions:** Drag "living room light" into the Actions section and set it to turn on. + +This creates a simple automation that turns on the living room lights every evening at sunset. + +--- + +## Best Practices + +- Use clear and concise names and descriptions. +- Test automations after saving to ensure they work as expected. +- Combine device events with time-based triggers for smarter home behavior. \ No newline at end of file diff --git a/pages/custom-templates.md b/pages/custom-templates.md index 9891a3c..af30cc5 100644 --- a/pages/custom-templates.md +++ b/pages/custom-templates.md @@ -1,23 +1,55 @@ --- title: Device Templates -weight: 1 -youtubeId: H-iftzWVTXE -youtubeId2: HEMifE1Xm7E +weight: 2 +lang: en +youtubeId: QJVbSPSztwY --- ### Introduction -Built-in device types are nice but sometimes they are just not what we want. In this walk though we will create a new custom device type -called **Washing Machine**, learn how to define differet wash modes like: Hot, Warm and Cold and generate the code it and control using Amazon Alexa. +Device Templates in SinricPro allows you to make your own device type by draging and droping capabilities that describes the features of your IoT device. They serve as blueprints for creating custom device types in the SinricPro. You can create your own device type by bundling together the following capabilities. + +| Capabilities | | | +|----------|----------|----------| +| [Brightness]({{ site.github.url }}/pages/device-templates/capabilities/brightness.html) | [Channel]({{ site.github.url }}/pages/device-templates/capabilities/channel.html) | [Color]({{ site.github.url }}/pages/device-templates/capabilities/color.html) | +| [Color Temperature]({{ site.github.url }}/pages/device-templates/capabilities/color-temperature.html) | [Contact Sensor]({{ site.github.url }}/pages/device-templates/capabilities/contact-sensor.html) | [Doorbell]({{ site.github.url }}/pages/device-templates/capabilities/doorbell.html) | +| [Equalizer]({{ site.github.url }}/pages/device-templates/capabilities/equalizer.html) | [Input Control]({{ site.github.url }}/pages/device-templates/capabilities/input-control.html) | [Lock]({{ site.github.url }}/pages/device-templates/capabilities/lock.html) | +| [Media Control]({{ site.github.url }}/pages/device-templates/capabilities/media-control.html) | [Mode]({{ site.github.url }}/pages/device-templates/capabilities/mode.html) | [Motion Sensor]({{ site.github.url }}/pages/device-templates/capabilities/motion-sensor.html) | +| [Open Close]({{ site.github.url }}/pages/device-templates/capabilities/open-close.html) | [Percentage]({{ site.github.url }}/pages/device-templates/capabilities/percentage.html) | [Power]({{ site.github.url }}/pages/device-templates/capabilities/power.html) | +| [Power Level]({{ site.github.url }}/pages/device-templates/capabilities/power-level.html) | [Push Notification]({{ site.github.url }}/pages/device-templates/capabilities/push-notification.html) | [Range]({{ site.github.url }}/pages/device-templates/capabilities/range.html) | +| [Setting]({{ site.github.url }}/pages/device-templates/capabilities/setting.html) | [Smart Button]({{ site.github.url }}/pages/device-templates/capabilities/smart-button.html) | [Start Stop]({{ site.github.url }}/pages/device-templates/capabilities/start-stop.html) | +| [Temperature Sensor]({{ site.github.url }}/pages/device-templates/capabilities/temperature-sensor.html) | [Thermostat]({{ site.github.url }}/pages/device-templates/capabilities/thermostat.html) | [Toggle]({{ site.github.url }}/pages/device-templates/capabilities/toggle.html) | +| [Volume]({{ site.github.url }}/pages/device-templates/capabilities/volume.html) | | | + +### Limitations +The number of capabilities you can add is based on your total licenses. Each license allows you to add one capability to your custom device type. + +When you sign up, your initial subscription includes 3 devices, allowing you to add 3 capabilities. +If you purchase an additional 1-device subscription, your total increases to 4 devices, entitling you to 4 capabilities. +Adding another 1-device subscription brings your total to 5 devices, allowing you to add 5 capabilities. + +To expand your available capabilities, simply purchase additional device licenses. + +### How to make a custom device type? + +Let's create a custom device type called **Washing Machine**, learn how to define differet wash modes like: *Hot, Warm and Cold* and generate the code it and control using Amazon Alexa and Goole Home. + +##### More Tutorials: [Soil Moisture]({{ site.github.url }}/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.html), [Water Level Indicator]({{ site.github.url }}/pages/tutorials/custom-device-types/ultrasonic-sensor/HC-SR04.html), [Water Sensor]({{ site.github.url }}/pages/tutorials/custom-device-types/water-sensor/flood-leak-rain-sensor.html), [Air Quality Sensor: MQ135]({{ site.github.url }}/pages/tutorials/air-quality-sensors/mq135.html), [Gas Sensor]({{ site.github.url }}/pages/tutorials/custom-device-types/alcohol-sensor/MQ-3.html) ### Step 1: Create Washing Machine device template * [Login](http://portal.sinric.pro) to your Sinric Pro account. + * Go to **Device Templates** menu on left. + * Click **Add Device Template** button. * Template Name: **Washing Machine** + * Description: **washing machine template** - * Device Type: **Other**. If the device type you are looking for is in the list, you can select it + + * Device Type: **Other** + + *Note*: Select the device type that best matches your hardware and your target voice assistant ecosystem. While Alexa is compatible with all device types, Google Home has limited compatibility. If you don't see your intended device type listed, please reach out to our support team. ![Sinric Pro device template]({{ site.github.url }}/public/img/sinric-pro-create-device-template-basic-info.png) @@ -57,10 +89,15 @@ Now we are going to create a device out of the device template we created ealier * Go to **Devices** menu and click on **Add**. * Device Name: **Washing Machine** + * Description: **My washing machine at basement** + * Device Type: Select **Washing Machine** under "Your Device Templates". This is the template we created ealier. + * Device Access Key: Leave the default selection + * Room: Leave the default selection + * Click Next > Next > Next and **Save**. ![Sinric Pro create a device from template]({{ site.github.url }}/public/img/sinric-pro-create-device-from-template.png) @@ -78,5 +115,25 @@ latest version of the Sinric Pro SDK (v2.9.0). Otherwise you may see compile err ![Sinric Pro create a device and generate code from template]({{ site.github.url }}/public/img/create-device-template-and-generate-code.gif) +When you descover the devices in Alexa, Google, Washing Machine device will show + +### Step 4 : Voice Announcements! + +✅ How it works: + +1️⃣ Add a Switch in SinricPro (your secret trigger!) + +2️⃣ Create an Alexa Routine that speaks your message when a "Washing is done!" when Switch turned on + +3️⃣ Send a power state event to turn ON that switch from your code + +``` +void triggerVoiceAnnouncement() { + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + mySwitch.sendPowerStateEvent(true); +} +``` + +{% include youtubePlayer.html id=page.youtubeId %} > This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/custom-templates.pt.md b/pages/custom-templates.pt.md new file mode 100644 index 0000000..af5052b --- /dev/null +++ b/pages/custom-templates.pt.md @@ -0,0 +1,121 @@ +--- +title: Templates de Dispositivo +weight: 2 +lang: pt +youtubeId: QJVbSPSztwY +--- + +### Introdução + +Templates de Dispositivo no SinricPro permite que você crie seu próprio tipo de dispositivo arrastando e soltando capacidades que descrevem as características do seu dispositivo IoT. Eles servem como modelos para criar tipos de dispositivos personalizados no SinricPro. Você pode criar seu próprio tipo de dispositivo agrupando as seguintes capacidades. + +| Capacidades | | | +|----------|----------|----------| +| [Brightness]({{ site.github.url }}/pt/pages/device-templates/capabilities/brightness.html) | [Channel]({{ site.github.url }}/pt/pages/device-templates/capabilities/channel.html) | [Color]({{ site.github.url }}/pt/pages/device-templates/capabilities/color.html) | +| [Color Temperature]({{ site.github.url }}/pt/pages/device-templates/capabilities/color-temperature.html) | [Contact Sensor]({{ site.github.url }}/pt/pages/device-templates/capabilities/contact-sensor.html) | [Doorbell]({{ site.github.url }}/pt/pages/device-templates/capabilities/doorbell.html) | +| [Equalizer]({{ site.github.url }}/pt/pages/device-templates/capabilities/equalizer.html) | [Input Control]({{ site.github.url }}/pt/pages/device-templates/capabilities/input-control.html) | [Lock]({{ site.github.url }}/pt/pages/device-templates/capabilities/lock.html) | +| [Media Control]({{ site.github.url }}/pt/pages/device-templates/capabilities/media-control.html) | [Mode]({{ site.github.url }}/pt/pages/device-templates/capabilities/mode.html) | [Motion Sensor]({{ site.github.url }}/pt/pages/device-templates/capabilities/motion-sensor.html) | +| [Open Close]({{ site.github.url }}/pt/pages/device-templates/capabilities/open-close.html) | [Percentage]({{ site.github.url }}/pt/pages/device-templates/capabilities/percentage.html) | [Power]({{ site.github.url }}/pt/pages/device-templates/capabilities/power.html) | +| [Power Level]({{ site.github.url }}/pt/pages/device-templates/capabilities/power-level.html) | [Push Notification]({{ site.github.url }}/pt/pages/device-templates/capabilities/push-notification.html) | [Range]({{ site.github.url }}/pt/pages/device-templates/capabilities/range.html) | +| [Setting]({{ site.github.url }}/pt/pages/device-templates/capabilities/setting.html) | [Smart Button]({{ site.github.url }}/pt/pages/device-templates/capabilities/smart-button.html) | [Start Stop]({{ site.github.url }}/pt/pages/device-templates/capabilities/start-stop.html) | +| [Temperature Sensor]({{ site.github.url }}/pt/pages/device-templates/capabilities/temperature-sensor.html) | [Thermostat]({{ site.github.url }}/pt/pages/device-templates/capabilities/thermostat.html) | [Toggle]({{ site.github.url }}/pt/pages/device-templates/capabilities/toggle.html) | +| [Volume]({{ site.github.url }}/pt/pages/device-templates/capabilities/volume.html) | | | + +### Limitações +O número de capacidades que você pode adicionar é baseado no total de suas licenças. Cada licença permite adicionar uma capacidade ao seu tipo de dispositivo personalizado. + +Quando você se inscreve, sua assinatura inicial inclui 3 dispositivos, permitindo adicionar 3 capacidades. +Se você comprar uma assinatura adicional de 1 dispositivo, seu total aumenta para 4 dispositivos, dando direito a 4 capacidades. +Adicionar outra assinatura de 1 dispositivo traz seu total para 5 dispositivos, permitindo adicionar 5 capacidades. + +Para expandir suas capacidades disponíveis, simplesmente compre licenças adicionais de dispositivo. + +### Como fazer um tipo de dispositivo personalizado? + +Vamos criar um tipo de dispositivo personalizado chamado **Máquina de Lavar**, aprender como definir diferentes modos de lavagem como: *Quente, Morna e Fria* e gerar o código e controlar usando Amazon Alexa e Google Home. + +##### Mais Tutoriais: [Umidade do Solo]({{ site.github.url }}/pt/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.pt.html), [Indicador de Nível de Água]({{ site.github.url }}/pt/pages/tutorials/custom-device-types/ultrasonic-sensor/HC-SR04.pt.html), [Sensor de Água]({{ site.github.url }}/pt/pages/tutorials/custom-device-types/water-sensor/flood-leak-rain-sensor.pt.html), [Sensor de Qualidade do Ar: MQ135]({{ site.github.url }}/pt/pages/tutorials/air-quality-sensors/mq135.pt.html), [Sensor de Gás]({{ site.github.url }}/pt/pages/tutorials/custom-device-types/alcohol-sensor/MQ-3.pt.html) + +### Passo 1: Criar template de dispositivo da Máquina de Lavar + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro. + +* Vá ao menu **Device Templates** à esquerda. + +* Clique no botão **Add Device Template**. + * Nome do Template: **Washing Machine** + + * Descrição: **template da máquina de lavar** + + * Tipo de Dispositivo: **Other** + + *Nota*: Selecione o tipo de dispositivo que melhor corresponde ao seu hardware e seu ecossistema de assistente de voz alvo. Embora Alexa seja compatível com todos os tipos de dispositivos, Google Home tem compatibilidade limitada. Se você não ver o tipo de dispositivo pretendido listado, entre em contato com nossa equipe de suporte. + +![Sinric Pro device template]({{ site.github.url }}/public/img/sinric-pro-create-device-template-basic-info.png) + +* Vá para a aba **Capabilities**. +* Agora devemos arrastar e soltar as capacidades suportadas pela nossa máquina de lavar. +* Arraste e solte **Power** porque queremos ligar/desligar nossa Máquina de Lavar. +* Arraste e solte **Mode** porque queremos definir a temperatura de lavagem para: **Quente**, **Morna** e **Fria**. + +![Sinric Pro device capabilities]({{ site.github.url }}/public/img/sinric-pro-create-device-template-capabilities.png) + +* Clique no botão **Configure** e defina os três modos + +![Sinric Pro device capabilities]({{ site.github.url }}/public/img/sinric-pro-create-device-template-modes.png) + +* **InstanceId**: Você pode deixar como está. Usamos InstanceId para identificar exclusivamente um modo quando você adiciona múltiplos modos + +* **Locale**: Escolha **English (US)** + +* **Nome do modo**: Digite **Wash Temperature** + +* **Modos**: Digite os seguintes modos + * Hot + * Warm + * Cold + +* Clique em **Save** para salvar os modos + +* Clique em **Save** para salvar o template + +![Sinric Pro device capabilities]({{ site.github.url }}/public/img/create-device-template.gif) + + +### Passo 2: Criando Dispositivo da Máquina de Lavar + +Agora vamos criar um dispositivo a partir do template de dispositivo que criamos anteriormente. + +* Vá ao menu **Devices** e clique em **Add**. + + * Nome do Dispositivo: **Washing Machine** + + * Descrição: **Minha máquina de lavar no porão** + + * Tipo de Dispositivo: Selecione **Washing Machine** em "Your Device Templates". Este é o template que criamos anteriormente. + + * Chave de Acesso do Dispositivo: Deixe a seleção padrão + + * Sala: Deixe a seleção padrão + + * Clique em Next > Next > Next e **Save**. + +![Sinric Pro create a device from template]({{ site.github.url }}/public/img/sinric-pro-create-device-from-template.png) + +### Passo 3: Gerando Código para Dispositivo da Máquina de Lavar + +![Sinric Pro code generator]({{ site.github.url }}/public/img/sinric-pro-generate-code.png) + +* Clique em **Code Generator** para gerar o código de dispositivo personalizado. + +![Sinric Pro code generator]({{ site.github.url }}/public/img/sinric-pro-generated-code.png) + +* Sinric Pro gerará o código de dispositivo personalizado para ESP8266/ESP32. Você pode baixar o projeto como arquivo zip, descompactar e executar. Certifique-se de estar usando a versão mais recente do Sinric Pro SDK (v2.9.0). Caso contrário, você pode ver erros de compilação no seu IDE + +![Sinric Pro create a device and generate code from template]({{ site.github.url }}/public/img/create-device-template-and-generate-code.gif) + +Quando você descobrir os dispositivos na Alexa, Google, o dispositivo Máquina de Lavar será exibido + +{% include youtubePlayer.html id=page.youtubeId %} + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/brightness.md b/pages/device-templates/capabilities/brightness.md new file mode 100644 index 0000000..b6899f0 --- /dev/null +++ b/pages/device-templates/capabilities/brightness.md @@ -0,0 +1,323 @@ +--- +title: Brightness Capability +layout: post +--- + + +The Brightness capability in SinricPro device templates allows you to control the brightness of devices, such as light bulbs. + +#### Supports + - [x] Alexa + - [x] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [BrightnessController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-brightnesscontroller.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, zet de badkamerlamp feller tot vijfenzeventig procent.

+

Alexa, dim de verlichting tot vijfentwintig procent.

+

Alexa, zet de slaapkamerlamp op vijftig procent.

+
+ +
+

Alexa, brighten the bathroom light to seventy five percent.

+

Alexa, dim the lights to twenty five percent.

+

Alexa, set the bedroom light to fifty percent.

+
+ +
+

Alexa, diminue la lumière de la salle de bains

+

Alexa, règle la luminosité de la lumière à cinquante

+

Alexa, mets la lumière de la chambre en lumineux

+

Alexa, ajuste les lumières de la cuisine à cinquante pourcents

+
+ +
+

Alexa, dimme das Licht auf fünfundzwanzig Prozent.

+

Alexa, erhelle das Licht auf fünfundsiebzig Prozent.

+

Alexa, stelle das Licht auf fünfzig Prozent.

+

Alexa, lege die Küchenbeleuchtung auf fünfundsiebzig Prozent fest.

+
+ +
+

Alexa, बाथरूम की रोशनी को पचहत्तर प्रतिशत तक रोशन करो।

+

Alexa, रोशनी को पच्चीस प्रतिशत तक कम कर दो।

+

Alexa, बेडरूम की रोशनी को पचास प्रतिशत पर सेट करो।

+
+ +
+

Alexa, metti la luce a venticinque percento.

+

Alexa, rendi la mia luce più luminosa per favore.

+

Alexa, imposta il gruppo le luci della cucina alla luminosità massima.

+

Alexa, aumenta la luminosità delle lampade al cinquanta percento per favore.

+
+ +
+

アレクサ、浴室の照明を暗くして。

+

アレクサ、浴室の照明を50パーセントにして。

+
+ +
+

Alexa, aumente o brilho da luz do banheiro para setenta e cinco por cento.

+

Alexa, diminua o brilho das luzes para vinte e cinco por cento.

+

Alexa, diminua as luzes para vinte e cinco por cento.

+

Alexa, coloque a luz do banheiro em cinquenta por cento.

+
+ +
+

Alexa, pon el brillo de las luces de la cocina a cincuenta.

+

Alexa, por favor, baje la luz del dormitorio al veinticinco por ciento.

+

Alexa, ajusta el brillo de las luces de la cocina al setenta y cinco.

+
+ +### Google Home + +This capability is mapped to Google Home [Brightness](https://developers.home.google.com/cloud-to-cloud/traits/brightness) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Bitte mach das Licht ein bisschen dunkler

+

Bitte stell das Flurlicht auf ein Drittel

+

Die Küche ein wenig heller stellen

+

Erhöhe die Helligkeit

+

Erhöhe die Helligkeit um 20%

+

Helligkeit der Leselampe auf 5 %

+

Helligkeit im Wohnzimmer auf 10% stellen

+

Mach das Licht bitte 20 % dunkler

+

Mach das Licht bitte 20 % heller

+

Mach das Licht sehr hell

+

Mach das Schlafzimmer ein bisschen dunkler

+

Mach das Wohnzimmer dunkler

+

Stell das Licht auf 50 % ein.

+

Stelle das Licht bitte auf maximale Helligkeit

+

Stelle die Beleuchtung heller

+

Verringere die Helligkeit der Beleuchtung

+

Verringere die Helligkeit in der Küche um 20%

+

Wie hell ist das Badlicht ?

+
+ +
+

brighten light at 10%

+

brighten lights by 20%

+

brighten the kitchen slightly

+

brighten the kitchen to 50

+

brighten the lights up

+

dim down the lights

+

dim lights a little more

+

dim lights by 20%

+

how bright are my lights

+

increase brightness in living room by 100%

+

make it darker in the living room

+

make the bedroom brighter

+

make the lights a little bit brighter

+

make the living room a little bit dimmer

+

reduce brightness in the living room by 50%

+

set the light to maximum

+

turn brightness on light to maximum

+
+ +
+

pon las luces a la mitad

+
+ +
+

Mets la lumière sur 20 % .

+

Règle la luminosité du salon au maximum .

+

allume la lampe à 20 % de luminosité

+

allume la lumière du salon au maximum

+

assombris la cuisine de 20 %

+

augmente l'éclairage de 20 %

+

augmente l'éclairage de la cuisine

+

augmente la luminosité de 10 % dans le salon

+

augmente la luminosité de la chambre

+

augmente un peu l'éclairage

+

augmente un peu la luminosité de la chambre

+

baisse les lumières

+

baisse les lumières de 20 %

+

baisse un peu la lumière du salon

+

luminosité de la chambre à 20 %

+

moins de luminosité dans le salon

+

quelle est l'intensité de la lumière

+
+ +
+

20% अँधेरा हॉल में

+

65% किचन में अँधेरा कर दो

+

अभी लाइट कितनी तेज़ है

+

किचन की रोशनी थोड़ी कम करिए

+

किचन की रोशनी बढ़ाना

+

किचन में 20% उजाला बढ़ा दो

+

बाथरूम में उजाला घटा दो

+

बाथरूम में थोड़ा अँधेरा कर दोगे

+

बेडरूम को प्रकाशमान करो

+

बेडरूम में खूब रोशनी करिए

+

मुझे स्टडी लैंप की ब्राइटनेस इसकी आधी चाहिए

+

रोशनी मिनिमम पर सेट कर दो

+

रोशनी घटाओ 20% किचन की

+

रोशनी बढ़ाना हल्की सी

+

लाइट 20% कम कर दो

+

लाइट 20% पर कर दो

+

लाइट को 5% ब्राइट करो

+

लाइट डिम करो

+
+ +
+

Alza del 30% le luci per favore

+

abbassa le luci del 30%

+

fai più buio in cucina

+

illumina 50% cucina

+

illumina il salotto un po'

+

illumina la cucina a 50

+

imposta la luminosità delle luci al 20%

+

imposta le luci sul minimo

+

metti la luce più forte

+

metti le luci al 40%

+

metti le luci alla luminosità minima

+

oscura leggermente il salotto

+

puoi abbassare un po' la luce

+

qual è la luminosità in bagno ?

+

rischiara il salotto

+

scurisci il bagno del 20%

+

voglio abbassare le luci

+
+ +
+

キッチン の明るさを 50% に上げて

+

キッチン の明るさを もう少し 落として下さい

+

キッチン を もう少し 明るくして

+

キッチン を明るくして

+

デスクの照明 を 最大限 にして

+

ライト の明るさを 少し 上げて

+

台所 を 20% 明るくしてほしい

+

子供部屋 を暗くして下さい

+

寝室の照明 の明るさをあげて

+

寝室 を 10% 暗くしてください

+

照明 の明るさは今どれくらい

+

照明 の明るさを下げて

+

照明 の明るさを 5% 下げて

+

照明 を 20% 明るくしてください

+

照明 を 50% まで明るくして

+

照明 を 少し 暗くして下さい

+
+ +
+

거실 조금만 더 어둡게 해 줘

+

공부방 밝기 40% 로 설정 해 줘

+

등 밝기가 몇이야

+

욕실 더 밝게 해

+

조명 5% 더 올려 줘

+

조명 낮춰 줘

+

조명 더 밝게 켜 줘

+

조명 밝기 30% 로 바꿔 줘

+

조명 조금만 더 밝게

+

조명 최대 로 설정

+

조명 을 10% 로 해줘

+

조명 을 최대 밝기로 설정해볼래

+

주방 을 좀 어둡게 해줘

+

침실 등 밝기를 약간 더 낮춰줘

+

침실 밝기를 20% 줄여 줘

+

침실 밝기를 조금만 더 높여봐

+

침실 을 20프로 더 밝게 해줘

+

현관 조명 10% 낮춰줘

+
+ +
+

dim de lampen

+

dim de lampen een beetje

+

hoe helder is de verlichting ?

+

laat de lampen branden op 30%

+

laat de lampen zo fel mogelijk branden

+

maak de keuken wat helderder

+

maak de slaapkamer lichter

+

maak de woonkamer 10% lichter

+

maak het licht feller

+

maak het licht wat feller

+

stel de lamp in op het minimum

+

verlicht de woonkamer met 10%

+
+ +
+

Aumentar a luz do quarto em 10% .

+

abaixe um pouco a luz

+

ajustar luz do quarto em 20%

+

alterar luminosidade do quarto para o máximo

+

aumentar um pouco a luz do quarto

+

clarear a cozinha nos 20%

+

clarear a sala em 10%

+

colocar a luz de leitura no máximo

+

colocar a luz em 10%

+

deixar a sala mais clara

+

deixe as luzes mais brilhantes

+

diminua a claridade da sala

+

diminuir a luz em 10%

+

escurecer um pouco a cozinha

+

ilumina um pouco a sala de estar

+

mostrar o nível de brilho da luz da cozinha

+

quero a sala 25% mais escura

+

reduzir a luz do quarto

+
+ +
+

dimma 20% i köket

+

dimma ljuset med 20%

+

dimma ned ljuset i hallen

+

dimma ner sovrummet till 10 %

+

gör det ljusare i hallen

+

gör det mycket mörkare i köket

+

gör det mörkare i badrummet

+

gör köket mycket ljusare

+

hur ljust lyser lampan i köket ?

+

höj ljuset på lampan

+

höj ljuset på lamporna lite

+

höj ljuset på lamporna med 20 %

+

justera ljuset på lampan till 10 %

+

justera ljusstyrkan på lampan halvvägs

+

sänk ljuset på lamporna lite

+

sätt ljuset på minsta värdet

+
+ +### Tutorials + +- ##### [YYAC-3S for ESP32]({{ site.github.url }}/pages/tutorials/dimmable-switch/YYAC-3S.html) + +- ##### [RobotDyn's AC Light dimmer module]({{ site.github.url }}/pages/tutorials/dimmable-switch/robotdyn-ac-light-dimmer.html) + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) + + + \ No newline at end of file diff --git a/pages/device-templates/capabilities/channel.md b/pages/device-templates/capabilities/channel.md new file mode 100644 index 0000000..3eac9f2 --- /dev/null +++ b/pages/device-templates/capabilities/channel.md @@ -0,0 +1,132 @@ +--- +title: Channel Capability +layout: post +--- + + +The Channel capability in SinricPro device templates allows you to change or increment the channel for an entertainment or video device. + +#### Supports + - [x] Alexa + - [x] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [ChannelController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-channelcontroller.html) + +#### Utterances + + +
+ + + + + + + + + + +
+ +
+

Not Supported

+
+ +
+

أليكسا، حطّي قناة الإخباريّة

+

أليكسا، حطّي الإخباريّة

+

أليكسا، غيّري لقناة الإخبارية

+

أليكسا، حطّي القناة الثانية

+

أليكسا، غيّري للقناة الثانية

+

أليكسا، حطّي القناة اللي قبلها

+

أليكسا، حطّي القناة اللي بعدها

+
+ +
+

Alexa, go to discovery.

+

Alexa, go to channel A B C.

+

Alexa, go to channel thirteen.

+

Alexa, watch N B C.

+

Alexa, watch channel thirteen.

+

Alexa, channel up on the TV.

+

Alexa, channel down on the TV.

+
+ +
+

Alexa, va sur france deux.

+

Alexa, va sur france cinq.

+

Alexa, va sur la treize.

+

Alexa, mets direct huit.

+

Alexa, mets la chaîne virgin radio T V.

+
+ +
+

Alexa, schalt auf R T L.

+

Alexa, geh zum fernsehsender R T L.

+

Alexa, geh zu kanal drei.

+

Alexa, spiel R T L zwei ab.

+

Alexa, kanal drei anschauen.

+

Alexa, vorheriger Sender auf Wohnzimmer TV.

+

Alexa, einen Sender nach unten auf Wohnzimmer TV.

+
+ +
+

Alexa, star plus पे जाओ

+

Alexa, channel sony पर जाओ

+

Alexa, channel दस पे जाओ

+

Alexa, fox देखो

+
+ +
+

Alexa, vai su italia uno.

+

Alexa, vai su animal planet.

+

Alexa, vai al canale venti.

+

Alexa, fammi vedere canale italia.

+

Alexa, metti il canale dieci.

+
+ +
+

Not Supported

+
+ +
+

Alexa, vá para globonews.

+

Alexa, vá para o canal globonews.

+

Alexa, vá para o canal dois.

+

Alexa, assistir globonews.

+

Alexa, assistir canal um.

+
+ +
+

Alexa, cambia a E T B.

+

Alexa, cambia canal a T P D.

+

Alexa, cambia a canal dos.

+

Alexa, ver la sexta.

+

Alexa, pon canal dos.

+
+ +### Google Home + +This capability is mapped to Google Home [Channel](https://developers.home.google.com/cloud-to-cloud/traits/channel) trait + + +#### Utterances + + +
+ +
+ + +
+

Switch to the next channel

+

Switch to the previous channel

+
+ + + > This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/color-temperature.md b/pages/device-templates/capabilities/color-temperature.md new file mode 100644 index 0000000..75c6bee --- /dev/null +++ b/pages/device-templates/capabilities/color-temperature.md @@ -0,0 +1,227 @@ +--- +title: Color Temperature Capability +layout: post +--- + + +The Color Temperature capability in SinricPro device templates allows you to control the color temperature of smart lighting devices. This feature lets users adjust their lights from warm (yellowish) to cool (bluish) white tones, measured in Kelvin units (typically ranging from 2200K to 7000K), enabling customization of lighting ambiance for different activities and preferences. + +#### Supports + - [x] Alexa + - [x] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [ColorTemperatureController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-colortemperaturecontroller.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, maak de verlichting in de woonkamer warmer.

+

Alexa, maak de verlichting in de eetkamer koeler.

+

Alexa, maak de verlichting in de eetkamer zachter.

+

Alexa, maak de verlichting in de woonkamer witter.

+

Alexa, zet de verlichting in de woonkamer op warm-wit.

+

Alexa, zet de keuken op daglicht.

+
+ +
+

Alexa, make the living room lights warmer

+

Alexa, set the dining room lights cooler

+

Alexa, set the dining room softer

+

Alexa, make the living room light whiter

+

Alexa, make the living room light warm white

+

Alexa, set the kitchen to daylight

+
+ +
+

Alexa, rends la lumière plus chaude

+

Alexa, règle les lumières moins chaudes

+

Alexa, rends la salle à manger plus douce

+

Alexa, rends le salon plus blanc

+

Alexa, mets la lumière du salon en blanc chaud

+

Alexa, règle la cuisine à lumière du jour

+
+ +
+

Alexa, mache mein wohnzimmerlampen wärmer

+

Alexa, mache mein esszimmerlampen kühler

+

Alexa, stelle das Esszimmer weicher

+

Alexa, mache das Wohnzimmerlicht weißer

+

Alexa, schalte Schlafzimmerlicht auf warmes Weiß

+

Alexa, stelle die Küche auf Tageslicht

+
+ +
+

Alexa, लिविंग रूम की रोशनी को गर्म करो।

+

Alexa, डाइनिंग रूम की लाइट को ठंडा करो।

+

Alexa, भोजन कक्ष को नरम करो।

+

Alexa, लिविंग रूम को हल्का सफेद बनाओ।

+

Alexa, लिविंग रूम को हल्का गर्म सफेद बनाएं।

+

Alexa, किचन को दिन की रोशनी में सेट करो।

+
+ +
+

Alexa, rendi più calde le luci del soggiorno.

+

Alexa, raffredda le luci della sala da pranzo.

+

Alexa, metti la sala da pranzo più morbida.

+

Alexa, rendi la luce del soggiorno più bianca.

+

Alexa, fai in modo che la luce del soggiorno sia di un bianco caldo.

+

Alexa, cambia la cucina in bianco diurno.

+
+ +
+

アレクサ、リビングを暖かい色にして。

+

アレクサ、ダイニングルームを寒色系にして。

+

アレクサ、ダイニングルームをソフトな色にして。

+

アレクサ、リビングの電気をもっと白っぽくして。

+

アレクサ、リビングを暖かい白色にして。

+

アレクサ、キッチンを昼白色にして

+
+ +
+

Alexa, coloque as luzes da sala mais quentes.

+

Alexa, ponha as luzes da sala mais quentes.

+

Alexa, coloque a sala de jantar mais fria.

+

Alexa, ponha a sala de jantar mais fria.

+

Alexa, coloque a sala de jantar mais suave.

+

Alexa, ponha a sala de jantar mais suave.

+

Alexa, coloque a luz da sala mais branca.

+

Alexa, ponha a luz da sala mais branca.

+

Alexa, coloque a luz da sala em branco quente.

+

Alexa, ponha a luz da sala em branco quente.

+

Alexa, coloque a cozinha em branco diurno.

+

Alexa, muda a cozinha para branco diurno.

+
+ +
+

Alexa, haz que las luces de la sala sean más cálidas.

+

Alexa, pon las luces del comedor más frías.

+

Alexa, pon la luz del comedor más suave.

+

Alexa, pon la luz del comedor más tenue.

+

Alexa, pon la luz de la sala más blanca.

+

Alexa, haz que la luz de la sala de estar sea blanca cálida.

+

Alexa, pon la cocina a luz del día.

+

Alexa, pon la luz de la cocina a modo día.

+
+ +#### Shade of White and Color Temperature used by Alexa + +| Shade of White | Color Temperature in Absolute Kelvin | +|----------------|--------------------------------------| +| warm, warm white | 2200 | +| incandescent, soft white | 2700 | +| white | 4000 | +| daylight, daylight white | 5500 | +| cool, cool white | 7000 | + +### Google Home + +This capability is mapped to Google Home [ColorSetting](https://developers.home.google.com/cloud-to-cloud/traits/colorsetting) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Stell die Farbe der Lampe auf blau

+

Stelle die Farbtemperatur auf 3000 Kelvin ein.

+
+ +
+

can you adjust my lights color to 4000 kelvins

+

set the lights to blue

+
+ +
+

pon azul la luz de la cocina

+

pon la luz a 2000 k de temperatura de color

+
+ +
+

Allume la lampe de la chambre à 3500 kelvins .

+

mets les lampes en rose dans la chambre

+
+ +
+

तुम लाइट को ब्लू कर दो

+

लैम्प 2000 केल्विन पर लगाओ।

+
+ +
+

Imposta la lampada a 2000 K .

+

metti la luce gialla

+
+ +
+

照明 の色を 青 にして

+

照明 の色温度を 5000K にセットして

+
+ +
+

조명 색깔 흰색 으로 바꿔 줘

+

주방 전등 색 온도를 5000 켈빈 으로 설정해

+
+ +
+

Zet de keukenlamp op 2000 Kelvin .

+

maak het licht rood

+
+ +
+

Colocar a lâmpada em 2000 K .

+

Define a lâmpada para 2000 K .

+

colocar a luz da sala em azul

+

põe a luz da sala a vermelho

+
+ +
+

Ställ in lampan på 2000 Kelvin

+

tänd blått ljus i köket

+
+ + +#### Temperature and Color Name used by GoogleHome + +| Temperature (Kelvin) | Color Name | +|----------------------|------------| +| 2000 | Candle Light | +| 2500 | Ultra Warm White | +| 3000 | Soft White, Morning White, Reading White | +| 4000 | Cool White | +| 5000 | Day Light, White | +| 6000 | Floral White | +| 7000 | Cloudy Day Light, White Smoke | +| 8000 | Blue Overcast | +| 9000 | Blue Sky | + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/color.md b/pages/device-templates/capabilities/color.md new file mode 100644 index 0000000..8b60292 --- /dev/null +++ b/pages/device-templates/capabilities/color.md @@ -0,0 +1,162 @@ +--- +title: Color Capability +layout: post +--- + +The Color capability in SinricPro device templates provides dynamic control over the hue and saturation of compatible smart devices. This feature enables users to transform their environment by adjusting RGB values of color-changing light bulbs, LED strips, and other chromatic lighting fixtures to create personalized atmospheres for any occasion. + +#### Supports + - [x] Alexa + - [x] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [ColorController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-colorcontroller.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, zet het licht op de veranda op blauw.

+

Alexa, verander de keuken naar de kleur blauw.

+
+ +
+

Alexa, set the front porch light to blue.

+

Alexa, change the kitchen to the color blue.

+
+ +
+

Alexa, règle la lumière du vestibule en bleu.

+

Alexa, mets la cuisine en bleu.

+
+ +
+

Alexa, schalte das Wohnzimmerlicht hellblau.

+
+ +
+

Alexa, फ्रंट पोर्च लाइट को ब्लू पर सेट करें।

+

Alexa, किचन को नीले रंग में बदलें।

+
+ +
+

Alexa, imposta la luce del portico anteriore su blu.

+

Alexa, cambia la cucina con il colore blu.

+
+ +
+

アレクサ、寝室のライトを青にして

+

アレクサ、キッチンをオレンジ色に変えて

+
+ +
+

Alexa, coloque a luz da entrada em azul.

+

Alexa, mude luz da entrada para azul.

+

Alexa, coloque a luz da cozinha em vermelho.

+

Alexa, mude luz da cozinha para vermelho.

+
+ +
+

Alexa, pon la luz del porche delantero en azul.

+

Alexa, cambia la cocina al color azul.

+
+ +### Google Home + +This capability is mapped to Google Home [ColorSetting](https://developers.home.google.com/cloud-to-cloud/traits/colorsetting) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Stell die Farbe der Lampe auf blau

+

Stelle die Farbtemperatur auf 3000 Kelvin ein.

+
+ +
+

can you adjust my lights color to 4000 kelvins

+

set the lights to blue

+
+ +
+

pon azul la luz de la cocina

+

pon la luz a 2000 k de temperatura de color

+
+ +
+

Allume la lampe de la chambre à 3500 kelvins.

+

mets les lampes en rose dans la chambre

+
+ +
+

तुम लाइट को ब्लू कर दो

+

लैम्प 2000 केल्विन पर लगाओ।

+
+ +
+

Imposta la lampada a 2000 K .

+

metti la luce gialla

+
+ +
+

照明 の色を 青 にして

+

照明 の色温度を 5000K にセットして

+
+ +
+

조명 색깔 흰색 으로 바꿔 줘

+

주방 전등 색 온도를 5000 켈빈 으로 설정해

+
+ +
+

Zet de keukenlamp op 2000 Kelvin .

+

maak het licht rood

+
+ +
+

Colocar a lâmpada em 2000 K .

+

Define a lâmpada para 2000 K .

+

colocar a luz da sala em azul

+

põe a luz da sala a vermelho

+
+ +
+

Ställ in lampan på 2000 Kelvin

+

tänd blått ljus i köket

+
+ +### Tutorials + +- ##### [LED Light Strip RGB 5050]({{ site.github.url }}/pages/tutorials/light/LED-Stripe-5050.html) + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/contact-sensor.md b/pages/device-templates/capabilities/contact-sensor.md new file mode 100644 index 0000000..d3705f9 --- /dev/null +++ b/pages/device-templates/capabilities/contact-sensor.md @@ -0,0 +1,140 @@ +--- +title: Contact Sensor Capability +layout: post +--- + +The Contact Sensor capability in SinricPro device templates enables detection of physical contact between two surfaces. This functionality allows devices to monitor and report the state of doors, windows, or other openings - indicating whether they are currently open or closed. + +#### Supports + - [x] Alexa + - [x] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [ContactSensor](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-contactsensor.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Not Available

+
+ +
+

Alexa, is the bedroom window open?

+
+ +
+

Alexa, est-ce que la fenêtre de la chambre est ouverte?

+
+ +
+

Alexa, ist das Schlafzimmerfenster offen?

+
+ +
+

एलेक्सा, क्या बेडरूम की खिड़की खुली है?

+
+ +
+

Alexa, la finestra della camera da letto è aperta?

+
+ +
+

アレクサ、寝室の窓は開いていますか?

+
+ +
+

Alexa, a janela do quarto está aberta?

+
+ +
+

Alexa, ¿está abierta la ventana del dormitorio?

+
+ + +### Google Home + +This capability is mapped to Google Home [OpenClose](https://developers.home.google.com/cloud-to-cloud/traits/openclose) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Sind die Jalousien in der Küche offen?

+
+ +
+

Are the blinds in the kitchen open?

+
+ +
+

¿Están abiertas las persianas de la cocina?

+
+ +
+

Est-ce que les stores de la cuisine sont ouverts?

+
+ +
+

क्या रसोई के पर्दे खुले हैं?

+
+ +
+

Le tapparelle in cucina sono aperte?

+
+ +
+

キッチンのブラインドは開いていますか?

+
+ +
+

부엌의 블라인드가 열려 있나요?

+
+ +
+

Zijn de jaloezieën in de keuken open?

+
+ +
+

As persianas da cozinha estão abertas?

+
+ +
+

Är persiennerna i köket öppna?

+
+ +### Tutorial +- #### [Contact Sensor]({{ site.github.url }}/pages/tutorials/contact-sensors/contact.html) + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/doorbell.md b/pages/device-templates/capabilities/doorbell.md new file mode 100644 index 0000000..8f718b8 --- /dev/null +++ b/pages/device-templates/capabilities/doorbell.md @@ -0,0 +1,31 @@ +--- +title: Doorbell Capability +layout: post +--- + +The Doorbell capability in SinricPro device templates enables to raise doorbell events. + +#### Supports + - [x] Alexa + - [ ] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +When a doorbell event occurs, Alexa plays the doorbell announcement on the selected Echo devices. This capabiliy is mapped to Alexa interface [DoorbellEventSource](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-doorbelleventsource.html) + +#### Utterances + +Not Available + + +### Google Home + +Not Available + +### Tutorial +- #### [Doorbell]({{ site.github.url }}/pages/tutorials/doorbell/doorbell.html) + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/equalizer.md b/pages/device-templates/capabilities/equalizer.md new file mode 100644 index 0000000..3364af7 --- /dev/null +++ b/pages/device-templates/capabilities/equalizer.md @@ -0,0 +1,119 @@ +--- +title: Equalizer Capability +layout: post +--- + +The Equalizer capability in SinricPro device templates allows set and adjust the equalizer bands and sound modes of a smart entertainment device. + +#### Supports + - [x] Alexa + - [ ] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [EqualizerController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-equalizercontroller.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, zet de bas van de speakers op min twee.

+

Alexa, verhoog de bas van de stereo.

+

Alexa, verhoog de bas van de stereo met drie.

+

Alexa, reset de bas van de tv.

+

Alexa, reset de equalizer van de speakers.

+

Alexa, zet de TV op filmmodus.

+
+ +
+

Alexa, set bass to minus two on the speakers.

+

Alexa, increase bass on the stereo.

+

Alexa, increase bass by three on the stereo.

+

Alexa, reset bass on the TV.

+

Alexa, reset equalizer on the speakers.

+

Alexa, set mode to movie on the TV.

+
+ +
+

Alexa, règle les basses sur deux sur les haut-parleurs.

+

Alexa, augmente les basses sur la stéréo.

+

Alexa, augmente les basses par trois sur la stéréo.

+

Alexa, réinitialise les basses sur la télé.

+

Alexa, réinitialise l'égaliseur sur les haut-parleurs.

+

Alexa, mets le téléviseur en mode film.

+
+ +
+

Alexa, stelle (den) Bass auf minus zwei auf (dem) Lautsprecher.

+

Alexa, erhöhe den Bass (auf) der Stereoanlage.

+

Alexa, erhöhe den Bass (auf) der Stereoanlage um drei.

+

Alexa, Bass auf dem Fernseher zurücksetzen.

+

Alexa, Equalizer auf den Lautsprechern zurücksetzen.

+

Alexa, setze den Modus auf Film auf dem Fernseher.

+
+ +
+

Alexa, स्पीकर पर बास को माइनस दो पर सेट करें।

+

Alexa, स्टीरियो पर बास बढ़ाओ।

+

Alexa, स्टीरियो पर बास को तीन से बढ़ाएं।

+

Alexa, टीवी पर बास रीसेट करें

+

Alexa, स्पीकर पर इक्वलाइज़र रीसेट करें।

+

Alexa, टीवी पर मूवी के लिए मोड सेट करें।

+
+ +
+

Alexa, imposta i bassi su meno due sugli altoparlanti.

+

Alexa, aumenta i bassi sullo stereo.

+

Alexa, aumenta di tre i bassi sullo stereo.

+

Alexa, reimposta i bassi sulla TV.

+

Alexa, resetta l'equalizzatore sugli altoparlanti.

+

Alexa, imposta la modalità su film sulla TV.

+
+ +
+

アレクサ、スピーカーの低音域をマイナス2にして

+

アレクサ、ステレオの低音域を上げて

+

アレクサ、ステレオの低音域を3上げて

+

アレクサ、テレビの低音域をリセットして

+

アレクサ、イコライザーをリセットして

+

アレクサ、テレビをシネマモードにして

+
+ +
+

Alexa, diminua os graves em dois nos alto-falantes.

+

Alexa, aumenta os graves no estéreo.

+

Alexa, aumente os graves em três no estéreo.

+

Alexa, resetar os graves na t.v.

+

Alexa, reinicie o equalizador nos alto-falantes.

+

Alexa, coloque a t.v. no modo filme.

+
+ +
+

Alexa, pon los graves a menos dos en los altavoces.

+

Alexa, aumenta los graves en el estéreo.

+

Alexa, aumenta los graves del estéreo en tres.

+

Alexa, restablece los graves en la TV.

+

Alexa, restablece el ecualizador en los altavoces.

+

Alexa, configura el modo de película en el televisor.

+
+ +### Google Home + +Not Supported + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/input-control.md b/pages/device-templates/capabilities/input-control.md new file mode 100644 index 0000000..8c7bf6f --- /dev/null +++ b/pages/device-templates/capabilities/input-control.md @@ -0,0 +1,156 @@ +--- +title: Input Control Capability +layout: post +--- + +The Input Control capability in SinricPro device templates allows you to control the input of an entertainment device.. + +#### Supports + - [x] Alexa + - [ ] Google Home + - [x] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [InputController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-inputcontroller.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, verander de input van de woonkamertv naar dvd.

+

Alexa, switch naar HDMI twee op de woonkamertv.

+

Alexa, switch naar AnyCompany TV op de keukentv.

+
+ +
+

Alexa, change the input to DVD on the Living Room TV.

+

Alexa, switch to HDMI two on the Living Room TV.

+

Alexa, switch to AnyCompany TV on the Kitchen TV.

+
+ +
+

Alexa, change le port d'entrée sur DVD dans le salon.

+

Alexa, change la télé du salon à HDMI 2.

+

Alexa, change à France 2 sur la télé.

+
+ +
+

Alexa, ändere den Eingang am Fernseher im Wohnzimmer auf DVD.

+

Alexa, schalte auf dem Fernseher im Wohnzimmer auf HDMI zwei um.

+

Alexa, wechsle auf dem Küchenfernseher zu Arte.

+
+ +
+

Alexa, लिविंग रूम टीवी पर इनपुट को DVD में बदलें।

+

Alexa, लिविंग रूम टीवी पर HDMI दो पर स्विच करें

+

Alexa, किचन टीवी पर AnyCompany TV पर स्विच करें।

+
+ +
+

Alexa, cambia l'ingresso in DVD sulla TV del soggiorno.

+

Alexa, passa a HDMI due sulla TV del soggiorno.

+

Alexa, passa a Rai 1 sulla TV.

+
+ +
+

アレクサ、リビングのテレビの入力をDVDに変えて

+

アレクサ、リビングのテレビの入力をHDMI2に切り替えて

+

アレクサ、キッチンのテレビをNHKに切り替えて

+
+ +
+

Alexa, mude a entrada para DVD na TV da sala de estar.

+

Alexa, mude a entrada para HDMI dois na TV da sala de estar.

+

Alexa, mude para Band na TV da cozinha.

+
+ +
+

Alexa, cambia la entrada a DVD en el televisor de la sala.

+

Alexa, cambia a HDMI dos en el televisor de la sala.

+

Alexa, cambia a Discovery en la tele de la cocina.

+
+ +### Google Home + +This capability is mapped to Google Home [InputSelector](https://developers.home.google.com/cloud-to-cloud/traits/inputselector) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Ändere den Eingangskanal auf AUX .

+
+ +
+

change input mode to HDMI 1

+
+ +
+

cambia a hdmi 1

+
+ +
+

Activation du mode HDMI1 .

+

Mets la télé sur HDMI 1 .

+
+ +
+

टीवी की इनपुट HDMI 1 में स्विच करो

+
+ +
+

metti ingresso aux sulla tv

+
+ +
+

テレビ HDMI1 にして

+
+ +
+

TV HDMI 1 로 바꿔 줘

+
+ +
+

zet de TV op bluetooth

+
+ +
+

Muda a entrada da TV para HDMI2 .

+

mudar a entrada para AUX

+
+ +
+

Sätt på hdmi 1

+
+ + + > This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/lock.md b/pages/device-templates/capabilities/lock.md new file mode 100644 index 0000000..e7a9505 --- /dev/null +++ b/pages/device-templates/capabilities/lock.md @@ -0,0 +1,176 @@ +--- +title: Lock Capability +layout: post +--- + +The Brightness capability in SinricPro device templates allows you to lock and unlock lockable devices. + +#### Supports + - [x] Alexa + - [x] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [LockController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-lockcontroller.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, doe de voordeur op slot.

+

Alexa, haal de achterdeur van het slot.

+

Alexa, is mijn deur op slot?

+

Alexa, is mijn deur van het slot?

+
+ +
+

Alexa, lock my front door.

+

Alexa, unlock the back door.

+

Alexa, is my door locked?

+

Alexa, is my door unlocked?

+
+ +
+

Alexa, verrouille la porte d'entrée.

+

Alexa, déverrouille la porte arrière.

+

Alexa, est-ce que la porte est verrouillée?

+

Alexa, est-ce que la porte est déverrouillée?

+
+ +
+

Alexa, schließe meine Haustür ab.

+

Alexa, entsperre die Hintertür.

+

Alexa, ist meine Tür verschlossen?

+

Alexa, ist meine Tür aufgeschlossen?

+
+ +
+

Alexa, मेरे सामने के दरवाजे को बंद कर दो।

+

Alexa, पिछले दरवाजे को खोलो।

+

Alexa, क्या मेरा दरवाजा बंद है?

+

Alexa, क्या मेरा दरवाजा खुला है?

+
+ +
+

Alexa, chiudi a chiave la mia porta d'ingresso.

+

Alexa, sblocca la porta sul retro.

+

Alexa, la mia porta è chiusa a chiave?

+

Alexa, la mia porta è aperta?

+
+ +
+アレクサ、玄関をロックして

+アレクサ、裏口を開けて

+アレクサ、玄関の鍵は閉まっている?

+アレクサ、玄関の鍵は開いている?

+
+ +
+

Alexa, tranque minha porta da frente.

+

Alexa, destranque a porta traseira.

+

Alexa, a minha porta está trancada?

+

Alexa, a minha porta está destrancada?

+
+ +
+

Alexa, bloquea la puerta de mi casa.

+

Alexa, desbloquea la puerta trasera.

+

Alexa, ¿mi puerta está bloqueada?

+

Alexa, ¿mi puerta está desbloqueada?

+
+ +### Google Home + +This capability is mapped to Google Home [LockUnlock](https://developers.home.google.com/cloud-to-cloud/traits/lockunlock) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Bitte Eingangstür abschließen

+

Bitte schließ die Eingangstür auf

+
+ +
+

lock my doors

+

unlock study room

+
+ +
+

cierra la puerta con llave

+

quitar el cerrojo de la puerta de entrad a

+
+ +
+

déverrouille la porte d'entrée

+

verrouille la porte d'entrée

+
+ +
+

फ़्रंट डोर अनलॉक करो

+

सामने के दरवाजे को लॉक करो

+
+ +
+

apri la porta d'ingresso

+

puoi chiudere la porta d'ingresso a chiave

+
+ +
+

玄関のドア を施錠して

+

玄関 開錠して

+
+ +
+

도어락 잠가 줘

+

현관 도어락 열어 줄래

+
+ +
+

Ontgrendel de voordeur

+

doe de voordeur op slot

+
+ +
+

Tranca a porta do quarto .

+

destranca a porta da cozinha

+

destrancar a porta da frente

+

trancar a porta da frente

+
+ +
+

lås upp ytterdörren

+

lås ytterdörren

+
+ + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/media-control.md b/pages/device-templates/capabilities/media-control.md new file mode 100644 index 0000000..64d5f46 --- /dev/null +++ b/pages/device-templates/capabilities/media-control.md @@ -0,0 +1,159 @@ +--- +title: Media Control Capability +layout: post +--- + +The Brightness capability in SinricPro device templates allows you to control devices that can play, stop, and navigate playback for audio or video content. + +#### Supports + - [x] Alexa + - [ ] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [PlaybackController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-playbackcontroller.html) + +#### Utterances + + +
+ + + + + + + + + + +
+ +
+

Alexa, spoel vooruit op device.

+

Alexa, volgende.

+

Alexa, pauzeer device.

+

Alexa, hervat device.

+

Alexa, speel device.

+

Alexa, vorige op device.

+

Alexa, spoel terug op device.

+

Alexa, start opnieuw.

+

Alexa, stop device.

+
+ +
+

أليكسا، قدّمي على الجهاز

+

أليكسا، اللي بعده

+

أليكسا، وقفي

+

أليكسا، إستمرّي

+

أليكسا، شغّلي الجهاز

+

أليكسا، اللي قبله على الجهاز

+

أليكسا، رجّعي على الجهاز

+

اليكسا، رجعي 40 ثانية

+

أليكسا، ابدأي من البداية

+
+ +
+

Alexa, fast forward on device.

+

Alexa, next.

+

Alexa, pause device.

+

Alexa, resume device.

+

Alexa, play device.

+

Alexa, previous on device.

+

Alexa, rewind on device.

+

Alexa, start over.

+

Alexa, stop device.

+
+ +
+

Alexa, avance surnom de l'appareil.

+

Alexa, suivant€ sur nom de l'appareil.

+

Alexa, mets sur pause.

+

Alexa, joue sur nom de l'appareil.

+

Alexa, précédent€.

+

Alexa, rembobine.

+

Alexa, recommence.

+

Alexa, stop.

+
+ +
+

Alexa, spul vor auf dem Gerät vor.

+

Alexa, nächstes Lied/Video/Foto auf dem Gerät.

+

Alexa, pause.

+

Alexa, abspielen.

+

Alexa, vorheriges.

+

Alexa, fortsetzen.

+

Alexa, spul zurück.

+

Alexa, neu starten

+

Alexa, stopp Gerät.

+
+ +
+

Alexa, आगे बढ़ाओ

+

Alexa, अगला

+

Alexa, pause करो

+

Alexa, चलाओ

+

Alexa, पिछला

+

Alexa, जारी रखो

+

Alexa, rewind करना

+

Alexa, फिर से चलाओ

+

Alexa, stop करो

+
+ +
+

Alexa, vai avanti.

+

Alexa, metti in pausa.

+

Alexa, riproduci.

+

Alexa, torna indietro.

+

Alexa, riprendi.

+

Alexa, manda indietro.

+

Alexa, ricomincia.

+

Alexa, stop.

+
+ +
+

アレクサ、<デバイス名>を早送りにして

+

アレクサ、<デバイス名>で次の曲/ビデオ/写真にして

+

アレクサ、次

+

アレクサ、<デバイス名>を止めて

+

アレクサ、<デバイス名>を再開して

+

アレクサ、<デバイス名>で再生して

+

アレクサ、<デバイス名>を前にして

+

アレクサ、<デバイス名>を巻き戻して

+

アレクサ、<デバイス名>で最初から再生して

+

アレクサ、<デバイス名>を止めて

+
+ +
+

Alexa, avançar.

+

Alexa, próximo.

+

Alexa, pausar.

+

Alexa, reproduzir.

+

Alexa, anterior.

+

Alexa, continuar.

+

Alexa, voltar.

+

Alexa, começar de novo.

+

Alexa, parar.

+

Alexa, ativa o modo de repetição contínua.

+
+ +
+

Alexa, adelanta.

+

Alexa, siguiente.

+

Alexa, pausa.

+

Alexa, pon.

+

Alexa, anterior.

+

Alexa, continúa.

+

Alexa, rebobina.

+

Alexa, empieza de nuevo.

+

Alexa, para.

+
+ +### Google Home + +Not Supported + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/mode.md b/pages/device-templates/capabilities/mode.md new file mode 100644 index 0000000..f742e1c --- /dev/null +++ b/pages/device-templates/capabilities/mode.md @@ -0,0 +1,186 @@ +--- +title: Mode Capability +layout: post +--- + +The Mode capability in SinricPro device templates allows you to control the mode settings of your device where a device can operate in different predefined modes instead of just ON/OFF states. + +For example, you can use Mode capability for: + +- Fan speed settings (low, medium, high) +- Air conditioner modes (cool, heat, fan-only, auto) +- Washing machine modes (delicate, normal, heavy-duty) +- Smart light modes (reading, night, party) + +Each mode has multiple possible settings, but only one can be selected at a time; eg: a dryer cannot be in "delicate," "normal," and "heavy duty" mode simultaneously + +#### Supports + - [x] Alexa + - [x] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +![Sinric Pro device capabilities]({{ site.github.url }}/public/img/device-templates-modes.png) + +* **InstanceId**: You can leave it as it is. We use InstanceId to uniquely identify a mode when you add multiple modes + +* **Locale**: Choose your language + +* **Mode name**: Name of the mode. eg: Speed + +* **Non Controllable**: The device can only be queried and cannot be controlled through commands. + +* **Modes**: List of values for mode. eg: low, medium, high + +### Alexa + +This capabiliy is mapped to Alexa interface [ModeController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-modecontroller.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, what's the wash setting on the washer?

+

Alexa, set the wash cycle to cottons.

+

Alexa, set the wash setting on the washer to normal.

+

Alexa, increase the water temperature on the washer.

+

Alexa, what's the current washer cycle?

+
+ +
+

Alexa, welche Wascheinstellung ist auf der Waschmaschine?

+

Alexa, stelle den Waschgang auf Baumwolle.

+

Alexa, stelle die Wascheinstellung auf der Waschmaschine auf normal.

+

Alexa, erhöhe die Wassertemperatur auf der Waschmaschine.

+
+ +
+

Not Supported.

+
+ +
+

Alexa, quel est le mode de lavage sur le lave-linge?

+

Alexa, règle le lave-linge en mode coton.

+

Alexa, règle les paramètres de lavage du lave-linge sur normal.

+

Alexa, augmente la température de l'eau du lave-linge.

+
+ +
+

Alexa, वॉशर पर वॉश सेटिंग क्या है?

+

Alexa, वॉश साइकिल को कॉटन पर सेट करें।

+

Alexa, वॉशर पर वॉश सेटिंग को सामान्य पर सेट करें।

+

Alexa, वॉशर पर पानी का तापमान बढ़ाएं।

+
+ +
+

Alexa, qual è l'impostazione di lavaggio della lavatrice?

+

Alexa, imposta il ciclo di lavaggio su cotone.

+

Alexa, imposta l'impostazione di lavaggio sulla lavatrice su normale.

+

Alexa, aumenta la temperatura dell'acqua della lavatrice.

+
+ +
+

アレクサ、扇風機は何に設定されている?

+

アレクサ、洗濯機をデリケートモードにして

+

アレクサ、洗濯モードをドライに設定して

+

アレクサ、洗濯機の水位を上げて

+
+ +
+

Alexa, qual é o modo de lavagem na lavadora?

+

Alexa, qual é o ajuste de lavagem na lavadora?

+

Alexa, mude o ciclo de lavagem para algodão.

+

Alexa, ajuste o ciclo de lavagem para algodão.

+

Alexa, mude o modo de lavagem na lavadora para normal.

+

Alexa, coloque o modo de lavagem na lavadora para normal.

+

Alexa, aumente a temperatura da água na lavadora.

+
+ +
+

Alexa, ¿cuál es la configuración de la lavadora?

+

Alexa, configura el modo algodón en la lavadora.

+

Alexa, pon la configuración de la lavadora en normal.

+

Alexa, aumenta la temperatura en la lavadora.

+
+ +### Google Home + +This capability is mapped to Google Home [modes](https://developers.home.google.com/cloud-to-cloud/traits/modes) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Stelle den Staubsauger auf Ruhemodus

+
+ +
+

set the vacuum to energy saver mode

+
+ +
+

pon la lavadora en modo frío

+
+ +
+

mets l'aspirateur en silencieux

+
+ +
+

वैक्यूम पर कार्पेट मोड लगाएं

+
+ +
+

imposta l'aspirapolvere su silenzioso

+
+ +
+

掃除機 を 静音 モードに設定して

+
+ +
+

세탁기 세탁량 많음 으로 설정해

+
+ +
+

Not Supported

+
+ +
+

acionar a função autolimpeza do aspirador +

ligar o modo de aquecimento

+
+ +
+

Not Supported

+
+ + + > This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/motion-sensor.md b/pages/device-templates/capabilities/motion-sensor.md new file mode 100644 index 0000000..ade2d42 --- /dev/null +++ b/pages/device-templates/capabilities/motion-sensor.md @@ -0,0 +1,30 @@ +--- +title: Motion Sensor Capability +layout: post +--- + +The Motion sensor capability in SinricPro device templates enables detection of physical movement within a specific area. + +#### Supports + - [x] Alexa + - [ ] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [MotionSensor](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-motionsensor.html) + +#### Utterances + +Not Supported + +### Google Home + +Not Supported + +### Tutorials +- #### [PIR Motion Sensor: HC-SR501, HC-SR505, Mini AM312, HC-SR312]({{ site.github.url }}/pages/tutorials/motion-sensors/HC-SR501-HC-SR505-AM312-HC-SR312.html) + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/open-close.md b/pages/device-templates/capabilities/open-close.md new file mode 100644 index 0000000..544f9ff --- /dev/null +++ b/pages/device-templates/capabilities/open-close.md @@ -0,0 +1,160 @@ +--- +title: Open-Close Capability +layout: post +--- + +The Open-Close capability in SinricPro device templates supports devices that can open and close, including those with partial positioning or multi-directional movement functionality. For example, some blinds may open either to the left or to the right. + +![Sinric Pro Device Template Start Stop]({{ site.github.url }}/public/img/device-templates-open-close.png) + + +#### Supports + +- [ ] Alexa +- [x] Google Home +- [ ] SmartThings +- [x] SinricPro Portal +- [x] SinricPro App + +### Alexa + +Not Supported + +### Google Home + +This capability is mapped to Google Home [OpenClose](https://developers.home.google.com/cloud-to-cloud/traits/openclose) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Bitte öffne die Jalousien auf 30%

+

Fensterläden um 25 % schliessen

+

Ist die Jalousie zu?

+

Mach den Rollladen zu

+

Mach die Rollos auf

+

schließe die Rollläden ein bisschen mehr

+

Öffne die Jalousien um 25%

+
+ +
+

Are the blinds in the kitchen open

+

Close the blinds 25% in my room

+

Close the door more

+

Just close the front door

+

open the blinds in my room

+

open the blinds to 25%

+

open the door by 25%

+
+ +
+

abre la ventana del salón

+

cerrar persianas del dormitorio un 20%

+

cierra la cortina del salón

+

cierra mucho más la ventana

+

está abierta la puerta

+

quiero que subas la persiana al 25%

+

sube un 20% las persianas

+
+ +
+

baisse les stores de 10%

+

est-ce que la porte d'entrée est ouverte

+

ferme les stores

+

ferme un peu les stores

+

ouvre les stores

+

ouvre les stores de la chambre de 25%

+

ouvre les stores à 25%

+
+ +
+

कृपया 25% पर्दे को खुला रखो

+

क्या मैंने सामने वाला दरवाजा खुला छोड दिया?

+

पर्दे को 25% बंद करोगे

+

पर्दे खोलो

+

ब्लाइंड 25% खुले पर सेट कर दीजिए

+

ब्लाइंड को थोड़ा और बंद कर दिजिए

+

ब्लाइंड बंद करें

+
+ +
+

abbassa un po' di più le tapparelle

+

apri la serranda

+

apri la tapparella al 30%

+

apri le serrande del 30%

+

chiudi le serrande

+

chiudi le tende del 25%

+

è aperta la porta d'ingresso

+
+ +
+

25% に ブラインド を開けて

+

25% ブラインド を閉めてください

+

25% ブラインド 開けて

+

ブラインド 閉めて

+

ブラインド 開けて

+

少し ブラインド を閉じて

+

玄関のドア は開いてますか

+
+ +
+

문 살짝만 닫아 줘

+

블라인드 25% 열어 줘

+

블라인드 25% 까지 열어 줘

+

블라인드 30프로 닫아

+

블라인드 닫아 줘

+

블라인드 열어 줘

+

안방 문 열렸어

+
+ +
+

doe de gordijnen 25% open

+

doe de jaloezieën voor 25% dicht

+

doe het raam ietsje meer dicht

+

is de voordeur open

+

open de gordijnen

+

sluit het gordijn

+

zet de luxaflex voor 50% open

+
+ +
+

Abrir janela 50%

+

As cortinas estão abertas?

+

Fecha a persiana toda

+

Fechar a janela 10%

+

a cortina do quarto está aberta?

+

abra a persiana até 30%

+

abre as cortinas

+

abre as cortinas a 50%

+

abrir as cortinas

+

abrir as cortinas na sala em 30%

+

fecha a persiana por favor

+

fecha um bocado a janela

+

fechar as cortinas em 25%

+

fechar um pouco mais as cortinas

+
+ +
+

Dra upp persiennerna

+

Dra upp persiennerna till 25%

+

stäng persiennen i mitt rum 25%

+

stäng persiennerna

+

är ytterdörren öppen?

+

öppna persiennerna med 25%

+
+ +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/percentage.md b/pages/device-templates/capabilities/percentage.md new file mode 100644 index 0000000..d88c25c --- /dev/null +++ b/pages/device-templates/capabilities/percentage.md @@ -0,0 +1,96 @@ +--- +title: Percentage Capability +layout: post +--- + +The Power Level capability in SinricPro device templates provides the ability to manage and adjust specific device properties that can be represented as a percentage, allowing for precise control over features such as brightness, fan speed, or power output. + +#### Supports + - [x] Alexa + - [ ] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [PercentageController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-percentagecontroller.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, zet de device name op dertig procent.

+

Alexa, verhoog device name met tien procent.

+

Alexa, verlaag device name met twintig procent.

+
+ +
+

Alexa, set the device name to thirty percent.

+

Alexa, increase device name by ten percent.

+

Alexa, decrease device name by twenty percent.

+
+ +
+

Alexa, règle le salon à trente pour cent.

+

Alexa, augmente le salon de dix pour cent.

+

Alexa, réduis le salon de vingt pour cent.

+
+ +
+

Alexa, stelle Gerätename auf dreißig Prozent.

+

Alexa, erhöhe Gerätename um zehn Prozent.

+

Alexa, reduziere Gerätename um zwanzig Prozent.

+
+ +
+

Alexa, {डिवाइस का नाम} को तीस प्रतिशत पर सेट करें।

+

Alexa, {डिवाइस का नाम} को दस प्रतिशत बढ़ा दें।

+

Alexa, {डिवाइस का नाम} को बीस प्रतिशत घटाएं।

+
+ +
+

Alexa, imposta il salotto al trenta percento.

+

Alexa, aumenta il salotto del dieci percento.

+

Alexa, diminuisci il salotto del venti percento.

+
+ +
+

アレクサ、device name を30パーセントに設定して。

+

アレクサ、device name を10パーセント上げて。

+

アレクサ、device name を20パーセント下げて。

+
+ +
+

Alexa, coloque a luz da cozinha em trinta por cento.

+

Alexa, ajusta a luz do quarto para trinta por cento.

+

Alexa, Alexa, aumente a luz da sala em dez por cento.

+

Alexa, Alexa, aumente o brilho da luz da sala em dez por cento.

+

Alexa, Alexa, diminua a luz da sala em dez por cento.

+

Alexa, diminua o brilho da luz da sala em dez por cento.

+
+ +
+

Alexa, configura el dispositivo al treinta por ciento.

+

Alexa, sube la luz en un diez por ciento.

+

Alexa, disminuye la luz en un veinte por ciento.

+
+ + +### Google Home + +Not supported. You may be able to use OpenClose as an alternative. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/power-level.md b/pages/device-templates/capabilities/power-level.md new file mode 100644 index 0000000..bbb564c --- /dev/null +++ b/pages/device-templates/capabilities/power-level.md @@ -0,0 +1,92 @@ +--- +title: Power Level Capability +layout: post +--- + +The Power Level capability in SinricPro device templates allows you to control the power level of your smart home device. + +#### Supports + - [x] Alexa + - [ ] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [PowerLevelController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-powerlevelcontroller.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, zet de snelheid van de ventilator op 40 procent.

+

Alexa, verhoog het sterkteniveau van de lichtschakelaar met 12.

+

Alexa, verhoog het vermogensniveau van de lichtschakelaar met 12.

+
+ +
+

Alexa, set the power to 40 percent on the fan.

+

Alexa, increase the power level by 12 on the light switch.

+
+ +
+

Alexa, règle la puissance à quarante pour cent sur le ventilateur.

+

Alexa, augmente le niveau de puissance de douze sur l'interrupteur d'éclairage.

+
+ +
+

Alexa, setze die Leistung auf 40 Prozent auf dem Lüfter.

+

Alexa, erhöhe die Leistung auf Lichtschalter um 12.

+
+ +
+

Alexa, imposta la potenza della ventola al 40 percento.

+

Alexa, aumenta di 12 il livello di potenza dell'interruttore della luce.

+
+ +
+

アレクサ、ファンの風量を40パーセントにして。

+

アレクサ、電気のスイッチでレベルを12にあげて。

+
+ + +
+

Alexa, pon la potencia del ventilador al 40 por ciento.

+

Alexa, aumenta el interruptor de la luz a 12.

+
+ +
+

Not supported

+
+ + +
+

Not supported

+
+ + + +### Google Home + +Not supported + +### Tutorials + +- ##### [YYAC-3S for ESP32]({{ site.github.url }}/pages/tutorials/dimmable-switch/YYAC-3S.html) + +- ##### [RobotDyn's AC Light dimmer module]({{ site.github.url }}/pages/tutorials/dimmable-switch/robotdyn-ac-light-dimmer.html) + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/power.md b/pages/device-templates/capabilities/power.md new file mode 100644 index 0000000..40a7dd6 --- /dev/null +++ b/pages/device-templates/capabilities/power.md @@ -0,0 +1,201 @@ +--- +title: Power Capability +layout: post +--- + + +The Power capability in SinricPro device templates allows you to control and monitor the power state of smart devices. With this capability, users can turn devices on or off through voice commands using popular voice assistants. + +#### Supports + - [x] Alexa + - [x] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [PowerController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-powercontroller.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, turn on the vacuum.

+

Alexa, turn off the lights.

+
+ +
+

Alexa, Staubsauger einschalten.

+

Alexa, schalte das Licht aus.

+
+ +
+

Alexa, zet de stofzuiger aan.

+

Alexa, zet de lampen uit.

+
+ +
+

Alexa, allume l'aspirateur.

+

Alexa, éteins les lumières.

+
+ +
+

Alexa, वैक्यूम चालू करें।

+

Alexa, लाइट बंद कर दो।

+
+ +
+

Alexa, accendi l'aspirapolvere.

+

Alexa, spegni le luci.

+
+ +
+

アレクサ、<device name>をつけて

+

アレクサ、<device name>を消して

+
+ +
+

Alexa, ligue o aspirador.

+

Alexa, apague as luzes.

+

Alexa, desligue as luzes.

+
+ +
+

Alexa, enciende la aspiradora.

+

Alexa, apaga las luces.

+
+ +### Google Home + +This capability is mapped to Google Home [OnOff](https://developers.home.google.com/cloud-to-cloud/traits/onoff) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Bitte Licht aus

+

Bitte das Wohnzimmer einschalten

+

Bitte die Küche ausstellen

+

Ist der Staubsauger an

+

Ist in der Küche noch was an

+

Lampen an

+
+ +
+

Turn off the AC

+

Turn on my lights

+

Are the lights off

+

What is on in the kitchen?

+
+ +
+

enciende el robot de limpieza

+

enciéndeme el salón

+
+ +
+

Tu peux éteindre le salon ?

+

allume la chambre

+

allume les lumières

+

est-ce que la lumière de la cuisine est éteinte

+

qu'est-ce qui est allumé dans la cuisine

+

éteins les lumières

+
+ +
+

किचन को ऑन करो

+

किचन में कुछ ऑन है?

+

बत्तियाँ जला दें

+

बालकनी ऑफ कर दो

+

लाइट आन है क्या

+

लाइट ऑफ करो

+
+ +
+

Accendimi la luce in cucina

+

Ho spento la luce in bagno ?

+

accendere in cucina

+

ho lasciato il bagno acceso?

+

spegni la luce della camera

+

spengi camera bimbi

+
+ +
+

エアコン はついてる

+

キッチン で何がオンになっていますか

+

ベッドルーム をつけて

+

リビング をオフにして

+

照明 をオンにして

+

照明 を消して

+
+ +
+

거실 꺼 줘

+

거실 에어컨 전원 켜

+

거실 켜 줘

+

불 켜져 있어

+

에어컨 전원 꺼 줘

+

주방 에 뭐 켜져 있어

+
+ +
+

babykamer aandoen

+

doe het licht aan

+

doe het licht uit

+

staat de droger aan

+

staat er iets aan in de keuken

+
+ +
+

Acender a luz.

+

Apagar a luz.

+

a sala está apagada?

+

acender a sala

+

eu apaguei luz do quarto?

+

quero desligar o quarto

+
+ +
+

stäng av lampan

+

sätt på ljuset

+

vad är på i badrummet

+

Är badrumslampan på?

+
+ + + +### Tutorials +- ##### [Part 1 - How to turn on and off a Relay]({{ site.github.url }}/pages/tutorials/switch/part-1.html) + +- ##### [Part 2 - Add a push button to toggle the Relay]({{ site.github.url }}/pages/tutorials/switch/part-2.html) + +- ##### [Part 3 - Multiple relays with multiple tactile (push) buttons]({{ site.github.url }}/pages/tutorials/switch/part-3.html) + + > This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/push-notification.md b/pages/device-templates/capabilities/push-notification.md new file mode 100644 index 0000000..2936a44 --- /dev/null +++ b/pages/device-templates/capabilities/push-notification.md @@ -0,0 +1,41 @@ +--- +title: Push Notification Capability +layout: post +--- + +The Push Notification capability in SinricPro device templates gives you the capability to send a push notification message from your device. + +Please make sure + +{% highlight c %} +SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; +String notification = "Hello SinricPro"; +bool success = mySwitch.sendPushNotification(notification); +{% endhighlight %} + + +In order to work this correctly, you must enable **Alerts** from **Notifications** in device settings. + +![Sinric Pro Device Template Setting capabilities]({{ site.github.url }}/public/img/device-templates-device-push-notification-alerts-enabled.png) + +[Documentation](https://sinricpro.github.io/esp8266-esp32-sdk-documentation/class_s_i_n_r_i_c_p_r_o__3__5__0_1_1_push_notification.html) + + +#### Supports + +- [ ] Alexa +- [ ] Google Home +- [ ] SmartThings +- [x] SinricPro Portal +- [x] SinricPro App + +### Alexa + +Not Supported + +### Google Home + +Not Supported + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/range.md b/pages/device-templates/capabilities/range.md new file mode 100644 index 0000000..8588a8e --- /dev/null +++ b/pages/device-templates/capabilities/range.md @@ -0,0 +1,134 @@ +--- +title: Range Capability +layout: post +--- + +The Range capability in SinricPro device templates allows you to control a setting of your device that can be represented by numbers within a minimum and maximum range. eg: speed setting on a fan. + +#### Supports + - [x] Alexa + - [ ] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +#### When to Use RangeController? + +- When a device has a defined numerical range instead of fixed modes. +- If the control isn't best suited to percentages (e.g., temperature, fan speeds with specific levels). + + +![Sinric Pro device capabilities]({{ site.github.url }}/public/img/device-templates-range.png) + +* **InstanceId**: You can leave it as it is. We use InstanceId to uniquely identify a mode when you add multiple modes + +* **Minimum Value**: The minimum value for the range. + +* **Maximum Value**: The maximum value for the range. + +* **Precision**: The amount by which the values change when moving through the range. This also serves as the default when a user asks to change the value but doesn't specify by how much. + +* **Unit Of Measure**: The unit of measure for the range. + +* **Locale**: Choose your language + +* **Range Name**: Name of the mode. eg: Speed + +* **Non Controllable**: The device can only be queried and cannot be controlled through commands. + +* **Presets:** : Named options that users can specify instead of numbers, such as "medium" = 50 or "maximum" = 100 ect. + + +### Alexa + +This capabiliy is mapped to Alexa interface [RangeController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-rangecontroller.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, set the bedroom fan speed to 7.

+

Alexa, set the fan speed on the bedroom fan to maximum.

+

Alexa, turn up the bedroom fan speed.

+

Alexa, decrease the fan speed on the bedroom fan by 3.

+

Alexa, what's the bedroom fan speed?

+
+ +
+

Alexa, stelle die Lüftergeschwindigkeit im Schlafzimmer auf 7.

+

Alexa, stelle die Lüftergeschwindigkeit auf dem Schlafzimmerventilator auf maximum.

+

Alexa, erhöhe die Geschwindigkeit des Schlafzimmerlüfters.

+

Alexa, verringere die Lüftergeschwindigkeit auf Schlafzimmerlüfter um drei.

+

Alexa, was ist die Lüftergeschwindigkeit im Schlafzimmer?

+
+ +
+

Alexa, zet de ventilator in de slaapkamer op snelheid 7.

+

Alexa, zet de ventilator in de slaapkamer op maximale snelheid.

+

Alexa, verhoog de snelheid van de ventilator in de slaapkamer.

+

Alexa, verlaag de snelheid van de ventilator in de slaapkamer met 3.

+

Alexa, wat is de snelheid van de ventilator in de slaapkamer?

+
+ +
+

+
+ +
+

Alexa, बेडरूम के पंखे की गति 7 पर सेट करें

+

Alexa, बेडरूम के पंखे पर पंखे की गति को अधिकतम पर सेट करें

+

Alexa, bedroom के पंखे की गति बढ़ाओ।

+

Alexa,बेडरूम के पंखे पर पंखे की गति 3 कम करें

+

Alexa,बेडरूम के पंखे की गति क्या है?

+
+ +
+

Alexa, imposta la velocità della ventola della camera da letto su 7.

+

Alexa, imposta al massimo la velocità della ventola della camera da letto.

+

Alexa, aumenta la velocità della ventola della camera da letto.

+

Alexa, riduci di 3 la velocità della ventola della camera da letto.

+

Alexa, qual è la velocità della ventola della camera da letto?

+
+ +
+

アレクサ、扇風機の風量を7にして

+

アレクサ、扇風機の風量を最大にして

+

アレクサ、扇風機の風量を上げて

+

アレクサ、扇風機の風量を3弱めて

+

アレクサ、扇風機の風量は?

+
+ +
+

Alexa, mude a velocidade do ventilador do quarto para 7.

+

Alexa, coloque a velocidade do ventilador do quarto ao máximo.

+

Alexa, aumente a velocidade do ventilador do quarto.

+

Alexa, diminua a velocidade do ventilador do quarto em 3.

+

Alexa, qual é a velocidade do ventilador do quarto?

+
+ +
+

Alexa, pon la velocidad del ventilador del dormitorio en 7.

+

Alexa, pon la velocidad del ventilador del dormitorio al máximo.

+

Alexa, sube la velocidad del ventilador del dormitorio.

+

Alexa, reduce la velocidad del ventilador del dormitorio en 3.

+

Alexa, reduce la velocidad del ventilador del dormitorio a 3.

+

Alexa, ¿cuál es la velocidad del ventilador del dormitorio?

+
+ +### Google Home + +Not supported. You may be able to use OpenClose as an alternative. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/setting.md b/pages/device-templates/capabilities/setting.md new file mode 100644 index 0000000..82e561d --- /dev/null +++ b/pages/device-templates/capabilities/setting.md @@ -0,0 +1,26 @@ +--- +title: Setting Capability +layout: post +--- + +The Setting capability in SinricPro device templates allows you to modify custom device configurations. You can define your own setting with a unique ID, descriptive name, and multiple possible values, then send these customized configurations to your device. + +![Sinric Pro Device Template Setting capabilities]({{ site.github.url }}/public/img/device-templates-settings.png) + +#### Supports + +- [ ] Alexa +- [ ] Google Home +- [ ] SmartThings +- [x] SinricPro Portal +- [ ] SinricPro App + +### Alexa + +Not Supported + +### Google Home + +Not Supported + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/smart-button.md b/pages/device-templates/capabilities/smart-button.md new file mode 100644 index 0000000..0a273f2 --- /dev/null +++ b/pages/device-templates/capabilities/smart-button.md @@ -0,0 +1,25 @@ +--- +title: Smart Button Capability +layout: post +--- + +The Device Templates in SinricPro feature a simple push button in the SinricPro mobile app that triggers actions on your device when pressed. + + +#### Supports + +- [ ] Alexa +- [ ] Google Home +- [ ] SmartThings +- [x] SinricPro Portal +- [x] SinricPro App + +### Alexa + +Not Supported + +### Google Home + +Not Supported + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/start-stop.md b/pages/device-templates/capabilities/start-stop.md new file mode 100644 index 0000000..734847a --- /dev/null +++ b/pages/device-templates/capabilities/start-stop.md @@ -0,0 +1,146 @@ +--- +title: Start-Stop Capability +layout: post +--- + +The Start-Stop capability in SinricPro device templates allows devices to start and stop operations. While similar to power on/off functionality, this capability addresses more complex operational states. For example, some washing machines can be powered on before actually starting their wash cycle. + +Beyond simple starting and stopping, this capability can include pausing functionality, where a device temporarily halts operation while maintaining its current state. When resumed, the device continues from where it paused, unlike starting/restarting which begins operation from the beginning regardless of previous state. + +![Sinric Pro Device Template Start Stop]({{ site.github.url }}/public/img/device-templates-start-stop-pause.png) + + +#### Supports + +- [ ] Alexa +- [x] Google Home +- [ ] SmartThings +- [x] SinricPro Portal +- [x] SinricPro App + +### Alexa + +Not Supported + +### Google Home + +This capability is mapped to Google Home [StartStop](https://developers.home.google.com/cloud-to-cloud/traits/startstop) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Bitte starte den Staubsauger im Wohnzimmer .

+

Geschirrspüler wieder anstellen

+

Staubsauger abschalten

+

Staubsauger pausieren

+

bitte starte die Waschmaschine

+

ist die Waschmaschine fertig

+
+ +
+

I need my roomba to start running in the den

+

is the vacuum running

+

pause the dryer now

+

start the dryer now

+

stop the dishwasher

+

unpause the dishwasher

+
+ +
+

dime si ha acabado el lavavajillas

+

parar la lavadora

+

pon el lavavajillas en pausa

+

quiero usar el friegaplatos

+

vuelve a encender la aspiradora

+
+ +
+

Allumer l'aspirateur dans le salon .

+

Continuer l'aspirateur .

+

arrête l'aspirateur

+

est-ce que l'aspirateur est en marche

+

lance la machine à laver

+

mets l'aspirateur en pause

+
+ +
+

कमरे में वैक्यूम चलाओगी

+

क्या वैक्यूम चल रहा है?

+

डिशवॉशर को कुछ देर रोको

+

वैक्यूम को अनपॉज़ करो

+

वैक्यूम को चालू कर दो

+

वैक्यूम को बंद कर दो

+
+ +
+

Mi accendi l'aspirapolvere in cucina ?

+

fa' partire aspirapolvere

+

fai ripartire l'aspirapolvere

+

la lavatrice è in funzione

+

metti in pausa l'aspirapolvere

+

stoppa l'aspirapolvere

+
+ +
+

お掃除ロボット を リビング で動かして

+

台所の食洗機 を一時停止してください

+

掃除機 は作動してる

+

掃除機 を停止して

+

掃除機 を再開してください

+

洗濯機 をスタートさせて

+
+ +
+

거실 에서 청소기 돌려

+

건조기 돌아가고 있나

+

세탁기 좀 돌려 줘

+

식기 세척기 다시 시작해

+

청소기 일시 정지

+

청소기 작동 멈춰 줘

+
+ +
+

De schoonmaakrobot inschakelen in de keuken .

+

Is de stofzuiger klaar

+

hervat de stofzuiger

+

pauzeer de stofzuiger

+

start mijn stofzuiger

+

stop de stofzuiger

+
+ +
+

Inicia o aspersor no jardim

+

Iniciar o aspirador de pó na sala .

+

iniciar a máquina de lavar

+

o aspirador está parado?

+

parar a pausa na máquina de lavar roupa

+

parar o aspirador de pó

+

pausar o aspirador de pó

+
+ +
+

Kör igång sprinklern på gräsmattan .

+

har dammsugaren i vardagsrummet startat?

+

kör igång dammsugaren igen

+

pausa dammsugaren

+

starta tvättmaskinen

+

stoppa dammsugaren

+
+ + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/temperature-sensor.md b/pages/device-templates/capabilities/temperature-sensor.md new file mode 100644 index 0000000..9169094 --- /dev/null +++ b/pages/device-templates/capabilities/temperature-sensor.md @@ -0,0 +1,106 @@ +--- +title: Temperature Sensor Capability +layout: post +--- + + +The Temperature Sensor capability in SinricPro device templates allows devices to detect and report the current temperature, such as in temperature sensors and thermostats. + +#### Supports + - [x] Alexa + - [ ] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [TemperatureSensor](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-temperaturesensor.html) and +[HumiditySensor](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-humiditysensor.html) + +#### Utterances + + +
+ + + + + + + + + + +
+ +
+

Not Supported

+
+ +
+

أليكسا، ما هي درجة الحرارة في [اسم المستشعر أو الموقع]

+

أليكسا، ما هي درجة الحرارة في غرفة المعيشة؟

+
+ + +
+

Alexa, what's the temperature of the [sensor name or location]

+

Alexa, what's the temperature the living room?

+

Alexa, what's the humidity in the [room name]?

+

Alexa, what's the humidity at the [sensor name]?

+

Alexa, what's the humidity in the [group name]?

+
+ +
+

Alexa, quelle est la température du [nom du capteur ou emplacement]

+

Alexa, quelle est la température du salon?

+
+ +
+

Alexa, wie ist die Temperatur von [Sensorname oder Standort]

+

Alexa, wie ist die Temperatur im Wohnzimmer?

+
+ +
+

एलेक्सा, [सेंसर का नाम या स्थान] का तापमान क्या है

+

एलेक्सा, लिविंग रूम का तापमान क्या है?

+
+ +
+

Alexa, qual è la temperatura del [nome del sensore o posizione]

+

Alexa, qual è la temperatura del soggiorno?

+
+ +
+

アレクサ、[センサー名または場所]の温度はいくらですか

+

アレクサ、リビングルームの温度はいくらですか?

+
+ +
+

Alexa, qual é a temperatura do [nome do sensor ou localização]

+

Alexa, qual é a temperatura da sala de estar?

+
+ +
+

Alexa, ¿cuál es la temperatura del [nombre del sensor o ubicación]

+

Alexa, ¿cuál es la temperatura de la sala de estar?

+
+ +### Google Home + +Not Supported + +### Tutorials + +- ##### [DHT11 and DHT22, AM2302, RHT03]({{ site.github.url }}/pages/tutorials/temperature-sensors/DHTx_AMx_RHTx.html) + +- ##### [DS18B20 and DS1822, DS1820, MAX31820, MAX31850]({{ site.github.url }}/pages/tutorials/temperature-sensors/DS18B20.html) + +- ##### [LM35 (LM35DZ), LM335 and LM34]({{ site.github.url }}/pages/tutorials/temperature-sensors/LMx.html) + +- ##### [BME280]({{ site.github.url }}/pages/tutorials/temperature-sensors/BME280.html) + +- ##### [BMP180]({{ site.github.url }}/pages/tutorials/temperature-sensors/BMP180.html) + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/thermostat.md b/pages/device-templates/capabilities/thermostat.md new file mode 100644 index 0000000..c80d741 --- /dev/null +++ b/pages/device-templates/capabilities/thermostat.md @@ -0,0 +1,467 @@ +--- +title: Thermostat Capability +layout: post +--- + +The Thermostat capability in SinricPro device templates enables devices to monitor temperature and maintain it at a designated setpoint. + +#### Supports + +- [x] Alexa +- [x] Google Home +- [ ] SmartThings +- [x] SinricPro Portal +- [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [ThermostatController (3.0)](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-thermostatcontroller-v3.html) + +#### Utterances + + +
+ + + + + + + + + + +
+ +
+

-

+
+ +
+

-

+
+ +
+

Alexa, set thermostat to twenty.

+

Alexa, set the AC to seventy-five.

+

Alexa, make it warmer in here.

+

Alexa, make it cooler in here.

+

Alexa, set thermostat to automatic.

+

Alexa, turn off the heat.

+

Alexa, resume thermostat schedule.

+

Alexa, what mode is my thermostat set to?

+
+ +
+

-

+
+ +
+

-

+
+ +
+

-

+
+ +
+

-

+
+ +
+

-

+
+ +
+

-

+
+ +
+

-

+
+ +### Google Home + +This capability is mapped to Google Home [TemperatureSetting](https://developers.home.google.com/cloud-to-cloud/traits/temperaturesetting) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Auf welche Temperatur ist das Thermostat im Wohnzimmer eingestellt

+

Auf welchem Modus steht das Thermostat ?

+

Heizmodus anmachen

+

Ist der Kühlmodus an?

+

Mach den Heizmodus aus

+

Schalt den Heizmodus vom Thermostat aus

+

Temperatur auf 20 bis 25 Grad einstellen.

+

Thermostat auf 20 bis 25 Grad stellen.

+

Thermostat im Schlafzimmer kälter stellen

+

Welche Temperatur zeigt das Thermostat an

+

Wohnzimmer auf Kühlen umstellen

+

bitte dreh das Thermostat ein bisschen herunter

+

bitte dreh das Thermostat etwas höher

+

bitte mach es im Wohnzimmer kühler

+

bitte mach es in der Küche etwas kälter

+

bitte stell das Thermostat 5 Grad wärmer ein

+

bitte stell das Thermostat auf 21 Grad für Kühlen ein

+

bitte stell das Thermostat auf 30 Grad

+

bitte stell die Temperatur im Schlafzimmer auf 20 Grad

+

dreh das Thermostat wärmer bitte

+

dreh die Temperatur im Schlafzimmer etwas nach oben

+

dreh die Temperatur um 5 Grad runter

+

erhöhe bitte die Temperatur im Bad

+

erhöhe die Temperatur um 2 Grad

+

mach es im Wohnzimmer 2 Grad wärmer

+

senke die Temperatur im Wohnzimmer um 5 Grad

+

stell bitte das Thermostat auf Kühlen

+

stell das Thermostat 5 Grad kälter ein

+

stell die Kühlung auf 20 Grad ein

+
+ +
+

Turn off heat mode.

+

change the thermostat heat cool between 70 and 80

+

change to eco mode

+

cool down in the living room

+

cool down the house a little

+

current thermostat temperature setting

+

increase the temperature on the thermostat

+

is the heating on

+

maintain the thermostat heat at 78

+

make it 2 degrees warmer

+

make it cooler by 2 degrees

+

make thermostat warmer a little bit

+

put on cooling mode

+

put the thermostat on cool

+

raise the temperature downstairs by 2 degrees

+

raise the temperature on thermostat by 5 degrees

+

set 70 degrees on the thermostat

+

set heat cool mode to between 62 and 79 degrees

+

set my temperature 80 degrees

+

set the heat to 72

+

set the temperature to cool at 70

+

set the thermostat at 70 in cool mode

+

tell me the thermostat temperature reading

+

turn down 5 degrees on thermostat

+

turn down the living room temp 2 degrees

+

turn off thermostat heat mode

+

turn thermostat a little lower

+

turn thermostat lower

+

warm up the living room

+

warm up the living room a little

+

what mode is the thermostat

+
+ +
+

25 grados de frío en la cocina

+

Ajustar el termostato entre 21 y 26 grados

+

Ajustar la temperatura entre 21 y 27 grados

+

a cuántos grados tengo puesto el aire en el salón

+

activar el modo calefacción

+

apagar el aire acondicionado del termostato

+

aumenta 10 grados la temperatura del horno

+

aumenta la temperatura de la cocina

+

baja algo la calefacción

+

baja la temperatura 5 grados

+

baja la temperatura del termostato

+

configurar el modo calefacción

+

dime si el salón está en modo frío

+

disminuye la temperatura de la cocina un poco

+

hace demasiado calor aquí

+

me ajustas a 25 grados el modo calor

+

me gustaría ajustar el termostato del salón a 25 grados con la calefacción

+

pon a 20 grados la temperatura

+

pon en modo calefacción el termostato de la cocina

+

pon la temperatura de la cocina a 20 grados

+

puedes subir un poco la temperatura en el salón

+

quiero bajar el nest 5 grados

+

quiero el modo aire acondicionado a 25 grados

+

quitar el modo frío del baño

+

qué modo tengo puesto en el aire

+

qué temperatura hace en el salón

+

sube 5 grados en la cocina

+

sube la calefacción

+

súbeme el termostato del salón un poquito

+

súbeme más la temperatura 10 grados

+
+ +
+

Allumer le mode chaud .

+

Est-ce que le mode froid est allumé ?

+

Mets en mode chaud .

+

Mets la température entre 21 et 23 degrés .

+

Mets la température à 17 degrés .

+

Mets le mode froid du thermostat à 19 degrés .

+

Mettre le mode froid à 19 degrés .

+

Mettre le thermostat entre 70 et 80 degrés .

+

Régler le mode chaud du thermostat à 22 degrés .

+

Régler le mode chaud à 22 degrés .

+

augmente la température de 2 degrés

+

augmente un peu la température dans la chambre

+

baisse la température de la chambre

+

baisse le thermostat

+

baisse un peu la température dans la cuisine

+

baisse un peu le thermostat

+

baisser le thermostat de 5 degrés

+

coupe le mode chaud

+

descends la température de 3 degrés

+

désactiver le mode frais du thermostat

+

le thermostat est réglé sur combien

+

mets le thermostat en mode frais

+

mets le thermostat à 10 degrés

+

mettre 2 degrés de moins dans la cuisine

+

monte la température de la chambre

+

monte la température de la salle de bain de 3 degrés

+

monte le thermostat

+

monte le thermostat de 2 degrés

+

monte un peu le thermostat

+

quel est le mode du thermostat ?

+

quelle est la température du thermostat

+

Éteins le mode chaud du thermostat .

+
+ +
+

thermostat का हीट 20 तक कर दो

+

कूलिंग को 70 डिग्री पर सेट करो

+

कूलिंग चालू करो

+

कूलिंग मोड को बंद कर दो

+

टेम्परेचर को 17 डिग्री पर सेट कर दो

+

तापमान 2 डिग्री कम करो

+

थर्मोस्टेट 70 डिग्री पर सेट करो

+

थर्मोस्टेट का टेम्प्रेचर ५ डिग्री घटाओ

+

थर्मोस्टेट का टेम्प्रेचर ५ डिग्री बढ़ाओ

+

थर्मोस्टेट का तापमान क्या है

+

थर्मोस्टेट का तापमान ज्यादा करो

+

थर्मोस्टेट को कूलिंग मोड में सेट करो

+

थर्मोस्टैट का कूलिंग मोड बंद करोगी

+

थर्मोस्टैट का तापमान ज़्यादा कर दो

+

थर्मोस्टैट किस मोड पर सेट है

+

थर्मोस्टैट के हीटिंग और कूलिंग मोड को 70 और 80 डिग्री के बीच रखें.

+

थर्मोस्टैट को कम कर दो

+

थारमोस्टेट का तापमान थोड़ा कम करें

+

थारमोस्टेट का तापमान थोड़ा बढ़ाओ

+

देखना ज़रा कूलिंग चालू है क्या

+

बेडरूम का टेंप्रेचर 5 डिग्री ज्यादा कर देना

+

बेडरूम का टेंप्रेचर थोड़ा कम कर देना

+

बेडरूम का टेंप्रेचर ज़्यादा कर देना

+

बेडरूम का तापमान थोड़ा ज़्यादा करो

+

मुझे थर्मोस्टेट का तापमान बताना

+

मेरे लिए लिविंग रूम का तापमान कम करिये

+

सभी थर्मोस्टैट्स की कूलिंग को 70 डिग्री पर सेट कर दो

+

हीटिंग-कूलिंग मोड 30 और 40 डिग्री के बीच रखो।

+

हीटिंग-कूलिंग मोड पर सेट करो

+
+ +
+

Alza di due gradi la temperatura della camera da letto

+

Imposta il termostato tra 20 e 25 gradi .

+

Metti la temperatura tra 15 e 20 gradi .

+

a quanto è il termostato

+

a quanto è impostato il termostato

+

abbassa di 8 in cucina

+

abbassa la temperatura

+

abbassa la temperatura della caldaia

+

abbassa la temperatura della caldaia di 3 gradi

+

abbassa la temperatura di due gradi

+

abbassa leggermente la caldaia

+

alza il termostato

+

aumenta un po' la caldaia

+

disattiva la modalità eco

+

disattiva la modalità eco del riscaldamento della cucina

+

fai aumentare leggermente la temperatura

+

imposta il condizionatore su raffreddamento

+

metti il raffreddamento a 20 gradi

+

metti il termostato a 25

+

metti il termostato in modalità eco

+

metti la modalità condizionatore del termostato a 40 gradi

+

metti la modalità riscaldamento del termostato a 30 gradi

+

metti la temperatura un po' più bassa

+

puoi aumentare di 3 la caldaia

+

puoi mettere più caldo

+

setta 5 gradi più caldo

+

setta la temperatura su 20 gradi

+

su che modalità è impostato il riscaldamento in camera ?

+

voglio l'aria condizionata settata su eco

+

è accesa la modalità eco ?

+
+ +
+

2 度 暖かくして

+

2 度 涼しくして

+

エアコン の 冷房 の温度を 18 度 にして

+

エアコン 暖房 を 25 度 にして

+

キッチン を 少し 涼しくして

+

キッチン を涼しくして

+

サーモスタット の エコ モードを切って

+

サーモスタット の温度 28 度 にして

+

サーモスタット の温度を 10 度 下げて

+

サーモスタット の温度を 2 度 上げて

+

サーモスタット の温度を 20度から25度 にセット

+

サーモスタット の温度を ちょっと 上げて

+

サーモスタット の温度を下げて

+

サーモスタット の温度を高くして

+

サーモスタット の温度 少し 下げて

+

サーモスタット は何モードに設定されてる

+

サーモスタット は何度になっているの

+

サーモスタット を 冷房 に変えて

+

ヒートクール に変更して

+

ヒートクール モードを消して

+

リビング の温度 20 度 にしてください

+

リビング は エコ モードに設定されている

+

リビング を 少し 暖かくして

+

リビング を暖かくして

+

今 サーモスタット は何度に設定されてる

+

冷房 モードで 20度 に設定して

+

冷房 モードオン

+

台所 の温度 5 度 上げて

+

温度を 20度から25度 にして

+
+ +
+

20도에서 30 도 사이로 온도 유지해

+

거실 24 도로 맞춰 줘

+

거실 온도 2 도 낮춰 줘

+

거실 온도 내려 줘

+

거실 온도 조금만 내려

+

난방 20 도로 조정해 줘

+

난방 모드로 바꿔 줘

+

냉방 20 도로 조정해

+

냉방 켜 줘

+

안방 온도 더 올려 줘

+

온도 2 도 높게 설정

+

온도 2 도만 내려 줘

+

온도 조절기 10 도 내려 줘

+

온도 조절기 20 도로 설정해 줘

+

온도 조절기 난방 꺼 줘

+

온도 조절기 난방 모드로 변경해

+

온도 조절기 낮춰 줘

+

온도 조절기 모드 뭐야

+

온도 조절기 설정 온도 얼마야

+

온도 조절기 온도 10 도 올려

+

온도 조절기 온도 높여 줘

+

온도 조절기 온도 조금 낮춰 줘

+

온도 조절기 온도 조금만 올려

+

온도 조절기 현재 온도 말해 줘

+

온도 조절기 로 난방 온도 23 도로 맞춰 놔

+

온도 조절기 로 냉방 23 도로 설정해

+

온도 조절기 를 70도에서 80 도 사이로 맞춰

+

지금 안방 난방 중이야

+

침실 온도 2 도 높여 줘

+

침실 온도 살짝 높여

+
+ +
+

De keuken wat afkoelen

+

De thermostaat op 20 graden zetten

+

Houd de temperatuur tussen 20 en 25 graden .

+

Keuken afkoelen

+

Maak het 2 graden koeler

+

Maak het 2 graden warmer

+

Op welke instelling staat de thermostaat

+

Staat de koeling aan

+

Stel warmtemodus op de thermostaat in op 24 graden

+

Wat is de huidige instelling van de thermostaat

+

Zet afkoelen aan.

+

Zet de koeling op 24 graden .

+

Zet de thermostaat tussen 20 en 25 graden .

+

de keuken een beetje verwarmen

+

de thermostaat een beetje verhogen

+

de thermostaat een beetje verlagen

+

de thermostaat met 5 graden verlagen

+

de thermostaat verhogen

+

de thermostaat verlagen

+

verander naar afkoelen

+

verwarm de keuken

+

wat is de temperatuur op de thermostaat

+

zet de koeling op de thermostaat op 16 graden

+

zet de koelstand op de thermostaat uit

+

zet de temperatuur op 25 graden

+

zet de verwarmingsstand uit

+

zet warmtemodus op 20 graden

+
+ +
+

A que temperatura está definido o termostato ?

+

A que temperatura está o termostato ?

+

Ajustar a refrigeração do termostato para 23 graus

+

Ajustar a refrigeração para 23 graus

+

Ajuste o termostato para ficar entre 15 e 20 graus .

+

Aumentar a temperatura da cozinha .

+

Definir a temperatura como sendo entre 15 e 17 graus .

+

Definir a temperatura do termostato para 30 graus .

+

Qual é a temperatura do termostato ?

+

abaixar dois graus a temperatura

+

abaixar um pouco a temperatura do quarto

+

abaixe a temperatura do quarto

+

ajustar a temperatura do quarto para 20 graus

+

ajustar o aquecimento para 25 graus

+

ajustar o quente do termostato em 25 graus

+

ajustar o termostato para aquecer

+

aquecer a sala um pouco

+

aumenta a temperatura do termostato em 2 graus

+

aumentar a temperatura do termostato

+

aumentar bastante o termostato

+

aumentar três graus a temperatura

+

baixa a temperatura do termostato em 5 graus

+

colocar no frio

+

como o escritório está ajustado?

+

desativar o modo aquecimento do termostato

+

desativar o modo refrescar

+

diminuir cinco graus a temperatura do escritório

+

diminuir o termostato

+

qual a temperatura definida no termostato ?

+

qual é o status do termostato ?

+

quero diminuir um pouco o termostato

+
+ +
+

Dra upp temperaturen på termostaten

+

Dra upp temperaturen på termostaten lite grann

+

Hur varmt är det i vardagsrummet ?

+

Höj värmen i vardagsrummet

+

Ställ in temperaturen på 20 till 25 grader tack.

+

Ställ in termostaten mellan 20 och 25 grader .

+

Ställ in värmen på AC:n på 23 grader

+

Sänk sovrummets temperatur

+

Sänk sovrums temperaturen lite grann

+

Sänk värmen i hallen med 2 grader

+

Vad står termostaten på?

+

dra ner temperaturen med 2 grader

+

gör en temperatursänkning på termostaten med två grader

+

höj temperaturen 2 grader

+

höj värmen på termostaten till 24 grader

+

jag vill att du höjer värmen på elementen till 25 grader

+

kan du slå av uppvärmningen i vardagsrummet

+

kan du starta uppvärmning ?

+

kan du sätta på värmen ?

+

se till att höja tempen med två grader i sovrummet

+

ställ termostaten på 3 grader varmare i köket

+

ställ termostaten på uppvärmning

+

stäng av värmen på termostaten

+

sänk temperaturen

+

sänk termostaten lite

+

sätt temperaturen på 25 grader

+

sätt termostaten på 25 grader

+

vilket läge är termostaten inställd på?

+

vrid ner temperaturen i vardagsrummet med tre grader

+

är värmen igång

+

öka värmen i arbetsrummet ordentligt

+
+ + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/toggle.md b/pages/device-templates/capabilities/toggle.md new file mode 100644 index 0000000..d09212c --- /dev/null +++ b/pages/device-templates/capabilities/toggle.md @@ -0,0 +1,227 @@ +--- +title: Toggle Capability +layout: post +--- + +The Toggle capability in SinricPro device templates lets you control binary settings that have exactly two possible states. These settings often represent physical on/off buttons or active/inactive functionality. For settings with more than two possible states, or those that can exist in a neutral state where neither binary option applies, the Modes trait provides a more appropriate representation. + +#### Supports + +- [x] Alexa +- [x] Google Home +- [ ] SmartThings +- [x] SinricPro Portal +- [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [ToggleController](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-togglecontroller.html) + +#### Utterances + + +
+ + + + + + + + + + +
+ +
+

Alexa, zet de ijsmachine aan.

+

Alexa, eco modus uitschakelen.

+

Alexa, staat oscilleren aan voor de torenventilator?

+

Alexa, zet WiFi op het Gastnetwerk aan.

+

Alexa, zet het Gastnetwerk aan.

+

Alexa, zet WiFi op het Gastnetwerk uit.

+

Alexa, zet het Gastnetwerk uit.

+

Alexa, staat WiFi op het Gastnetwerk aan?

+

Alexa, staat het Gastnetwerk aan?

+
+ +
+

-

+
+ +
+

Alexa, turn on the ice maker.

+

Alexa, turn off eco mode.

+

Alexa, is oscillate on for the tower fan?

+

Alexa, turn on guest Wi-Fi.

+

Alexa, turn on guest network.

+

Alexa, turn off guest Wi-Fi.

+

Alexa, turn off guest network.

+

Alexa, is the guest Wi-Fi on?

+

Alexa, is the guest network on?

+
+ +
+

Alexa, allume la machine à glaçons.

+

Alexa, désactive le mode économique.

+

Alexa, est-ce que l'oscillation est activée pour le ventilateur?

+

Alexa, allume le Wi-Fi invité.

+

Alexa, allume le réseau invité.

+

Alexa, éteins le Wi-Fi invité.

+

Alexa, éteins le réseau invité.

+

Alexa, est-ce que le Wi-Fi invité est allumé?

+

Alexa, est-ce que le réseau invité est allumé?

+
+ +
+

Alexa, schalte die Eismaschine ein.

+

Alexa, schalte den Eco-Modus aus.

+

Alexa, ist Oszillieren auf dem Turmventilator an?

+

Alexa, schalte Gast-WLAN ein.

+

Alexa, schalte das Gastnetzwerk ein.

+

Alexa, schalte das Gast-WLAN aus.

+

Alexa, schalte das Gastnetzwerk aus.

+

Alexa, ist das Gast-WLAN an?

+

Alexa, ist das Gastnetzwerk an?

+
+ +
+

Alexa, आइस मेकर चालू करें।

+

Alexa, ईको मोड बंद करें।

+

Alexa, टावर फैन के लिए दोलन कर रही है?

+

Alexa, अतिथि Wifi चालू करें

+

Alexa, अतिथि Network चालू करें

+

Alexa, अतिथि Wifi बंद करें

+

Alexa, अतिथि नेटवर्क बंद करें

+

Alexa, क्या अतिथि Wifi चालू है?

+

Alexa, क्या अतिथि Network चालू है?

+
+ +
+

Alexa, accendi la macchina del ghiaccio.

+

Alexa, disattiva la modalità eco.

+

Alexa, è attiva l'oscillazione per il ventilatore?

+

Alexa, attiva WiFi Ospite.

+

Alexa, attiva Rete Ospite.

+

Alexa, disattiva WiFi Ospite.

+

Alexa, disattiva Rete Ospite.

+

Alexa, è attivo il WiFi Ospite?

+

Alexa, è attiva la Rete Ospite?

+
+ +
+

アレクサ、コーヒーメーカーをつけて

+

アレクサ、エコモードを消して

+

アレクサ、扇風機の首振りはついている?

+

アレクサ、ゲストWiFiをつけて

+

アレクサ、ゲストネットワークをオンにして

+

アレクサ、ゲストWiFiを消して

+

アレクサ、ゲストネットワークをオフにして

+

アレクサ、ゲストWiFiはオンになってる?

+

アレクサ、ゲストネットワークはついている?

+
+ +
+

Alexa, ligue a máquina de gelo.

+

Alexa, desligue o modo ecológico.

+

Alexa, a oscilação está ativada no ventilador de torre?

+

Alexa, ligue Wi-Fi para convidados.

+

Alexa, ligue Rede de convidados.

+

Alexa, desligue Wi-Fi para convidados.

+

Alexa, desligue Rede de convidados.

+

Alexa, o Wi-Fi para convidados está ligado?

+

Alexa, o Rede de convidados está ligado?

+
+ +
+

Alexa, enciende la máquina de hielo.

+

Alexa, desactiva el modo ecológico.

+

Alexa, ¿está activada la oscilación del ventilador?

+

Alexa, enciende el Wifi de invitados.

+

Alexa, enciende la Red de invitados.

+

Alexa, apaga el Wifi de invitados.

+

Alexa, apaga la Red de invitados.

+

Alexa, ¿está encendido el Wifi de invitados?

+

Alexa, ¿está encendida la Red de invitados?

+
+ +### Google Home + +This capability is mapped to Google Home [Toggles](https://developers.home.google.com/cloud-to-cloud/traits/toggles) trait + +#### Utterances + + +
+ + + + + + + + + + + +
+ +
+

Bitte schalte Power Cool am Kühlschrank aus

+

stelle den Kühlschrank auf Power Cool

+
+ +
+

activate power freeze for the freezer

+

cancel power cool for the kitchen fridge

+
+ +
+

pon el enfriamiento rápido en la nevera

+

quita el enfriamiento rápido

+
+ +
+

mets le mode power cool sur le réfrigérateur

+

Éteins le mode power freeze du réfrigérateur .

+
+ +
+

रेफ़्रिजरेटर का पावर कूल मोड बंद कर दो

+

रेफ़्रिजरेटर में पावर कूल मोड चालू करो

+
+ +
+

disattiva il power freeze del freezer

+

imposta la funzione power freeze del surgelatore

+
+ +
+

冷蔵庫 の 急速冷凍 つけて

+

冷蔵庫 の 急速冷凍 を切ってくれる

+
+ +
+

냉장고 급속 냉장 해제해

+

냉장고 모드 급속 냉장 으로 바꿔

+
+ +
+

Zet de power cool uit op de koelkast

+

zet de koelkast op superkoelen

+
+ +
+

Ativa a função power freeze no congelador .

+

Desativa o bloqueio infantil do forno .

+

desligar o power cool da geladeira

+

iniciar o modo power freeze do freezer

+
+ +
+

Stäng av power cool i kylskåpet

+

sätt på power freeze på frysen

+
+ + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/device-templates/capabilities/volume.md b/pages/device-templates/capabilities/volume.md new file mode 100644 index 0000000..bfd1c92 --- /dev/null +++ b/pages/device-templates/capabilities/volume.md @@ -0,0 +1,99 @@ +--- +title: Volume Capability +layout: post +--- + +The Volume capability in SinricPro device templates allows you to control the device's volume. + +#### Supports + - [x] Alexa + - [x] Google Home + - [ ] SmartThings + - [x] SinricPro Portal + - [x] SinricPro App + +### Alexa + +This capabiliy is mapped to Alexa interface [Speaker](https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-speaker.html) + +#### Utterances + + +
+ + + + + + + + + +
+ +
+

Alexa, zet het volume van de speakers op vijftig.

+

Alexa, zet het volume van de stereo lager met twintig.

+

Alexa, zet het volume van de woonkamertv lager.

+

Alexa, demp de speakers.

+

Alexa, dempen opheffen voor de speakers.

+
+ +
+

Alexa, set the volume of the speakers to fifty.

+

Alexa, turn the volume down on the stereo by twenty.

+

Alexa, turn the volume down on Living Room TV.

+

Alexa, mute speakers.

+

Alexa, unmute speakers.

+
+ +
+ Not Supported +
+ +
+

Alexa, stelle die Lautstärke der Lautsprecher auf fünfzig.

+

Alexa, verringere die Lautstärke um zwanzig auf Stereoanlage.

+

Alexa, verringere die Lautstärke auf Wohnzimmer-Fernseher.

+

Alexa, Lautsprecher stummschalten.

+

Alexa, Lautstärke an auf Lautsprecher.

+
+ +
+ Not Supported +
+ +
+

Alexa, imposta il volume degli altoparlanti a cinquanta.

+

Alexa, abbassa di venti il ​​volume dello stereo.

+

Alexa, abbassa il volume sulla TV del salotto.

+

Alexa, fare silenzio su altoparlanti.

+

Alexa, attiva l'audio degli altoparlanti.

+
+ +
+

アレクサ、スピーカーのボリュームを50にして

+

アレクサ、ステレオのボリュームを20下げて

+

アレクサ、リビングのテレビの音量を下げて

+

アレクサ、スピーカーをミュートして

+

アレクサ、スピーカーのミュートを解除して

+
+ +
+ Not Supported +
+ +
+

Alexa, pon el volumen de los parlantes a cincuenta.

+

Alexa, reduce el volumen del estéreo en veinte.

+

Alexa, baja el volumen del televisor de la sala de estar.

+

Alexa, silencia los altavoces.

+

Alexa, activa los altavoces.

+
+ +### Google Home + +This capability is mapped to Google Home [Volume](https://developers.home.google.com/cloud-to-cloud/traits/volume) trait + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/devices/contact_sensor.md b/pages/devices/contact_sensor.md index aa1fb6e..4e84936 100644 --- a/pages/devices/contact_sensor.md +++ b/pages/devices/contact_sensor.md @@ -2,6 +2,7 @@ title: Contact Sensor layout: post tag: smart-light-bulb +published: false categories: - "sensor" - "contactsensor" diff --git a/pages/devices/doorbell.md b/pages/devices/doorbell.md index e11b5d5..6680000 100644 --- a/pages/devices/doorbell.md +++ b/pages/devices/doorbell.md @@ -2,6 +2,7 @@ title: Doorbell layout: post tag: doorbell +published: false categories: - "devices" - "doorbell" diff --git a/pages/devices/fan.md b/pages/devices/fan.md index b304d12..d05d031 100644 --- a/pages/devices/fan.md +++ b/pages/devices/fan.md @@ -2,6 +2,7 @@ title: Fan layout: post tag: fan +published: false categories: - "devices" - "fan" diff --git a/pages/devices/motion_sensor.md b/pages/devices/motion_sensor.md index 3b145a4..460c797 100644 --- a/pages/devices/motion_sensor.md +++ b/pages/devices/motion_sensor.md @@ -2,6 +2,7 @@ title: Motion Sensor layout: post tag: doorbell +published: false categories: - "devices" - "motionsensor" diff --git a/pages/devices/smart_light_bulb.md b/pages/devices/smart_light_bulb.md index d0bf9d0..fc197e3 100644 --- a/pages/devices/smart_light_bulb.md +++ b/pages/devices/smart_light_bulb.md @@ -2,6 +2,7 @@ title: Smart Light Bulb layout: post tag: smart-light-bulb +published: false categories: - "devices" - "smart-light-bulb" diff --git a/pages/devices/smart_lock.md b/pages/devices/smart_lock.md index 2a20d3d..76df7f2 100644 --- a/pages/devices/smart_lock.md +++ b/pages/devices/smart_lock.md @@ -2,6 +2,7 @@ title: Smart Lock layout: post tag: smart-lock +published: false categories: - "devices" - "smart-lock" diff --git a/pages/devices/smart_speaker.md b/pages/devices/smart_speaker.md index 20cb7c8..7572f95 100644 --- a/pages/devices/smart_speaker.md +++ b/pages/devices/smart_speaker.md @@ -2,6 +2,7 @@ title: Smart Speaker layout: post tag: smart-light-bulb +published: false categories: - "devices" - "smart-speaker" diff --git a/pages/devices/smart_switch.md b/pages/devices/smart_switch.md index 892d04a..5aec9cd 100644 --- a/pages/devices/smart_switch.md +++ b/pages/devices/smart_switch.md @@ -1,7 +1,9 @@ --- title: Smart Switch layout: post +lang: en tag: smart-switch +published: false categories: - "devices" - "smart-switch" diff --git a/pages/devices/smart_switch_with_dimmer.md b/pages/devices/smart_switch_with_dimmer.md index 9821031..7587f99 100644 --- a/pages/devices/smart_switch_with_dimmer.md +++ b/pages/devices/smart_switch_with_dimmer.md @@ -1,7 +1,9 @@ --- title: Switch With Dimmer layout: post +lang: en tag: smart-switch-with-dimmer +published: false categories: - "devices" - "switch-with-dimmer" diff --git a/pages/devices/temperature_sensor.md b/pages/devices/temperature_sensor.md index 8cf5dc1..10253e3 100644 --- a/pages/devices/temperature_sensor.md +++ b/pages/devices/temperature_sensor.md @@ -2,6 +2,7 @@ title: Temperature/Humidity Sensor layout: post tag: temperature-humidity-sensor +published: false categories: - "sensor" - "temperature-humidity-sensor" @@ -50,7 +51,7 @@ Handle following actions **setPowerState, setContactState** in your IOT module #### Supported Alexa capabilities - [Alexa.PowerController](https://developer.amazon.com/docs/device-apis/alexa-powercontroller.html) -- [Alexa.ContactSensor](https://developer.amazon.com/docs/device-apis/alexa-contactSensor.html) +- [Alexa.ContactSensor](https://developer.amazon.com/docs/device-apis/alexa-contactsensor.html) #### Supported Google Home Traits - Coming soon diff --git a/pages/devices/thermostat.md b/pages/devices/thermostat.md index 13311c2..954a7d2 100644 --- a/pages/devices/thermostat.md +++ b/pages/devices/thermostat.md @@ -2,6 +2,7 @@ title: Thermostat layout: post tag: thermostat +published: false categories: - "devices" - "thermostat" diff --git a/pages/devices/tv.md b/pages/devices/tv.md index b59e95e..9980563 100644 --- a/pages/devices/tv.md +++ b/pages/devices/tv.md @@ -2,6 +2,7 @@ title: TV layout: post tag: tv +published: false categories: - "devices" - "tv" diff --git a/pages/devices/window_ac_unit.md b/pages/devices/window_ac_unit.md index 89e25c8..c8e91dd 100644 --- a/pages/devices/window_ac_unit.md +++ b/pages/devices/window_ac_unit.md @@ -2,6 +2,7 @@ title: Window AC Unit layout: post tag: windowacunit +published: false categories: - "devices" - "windowacunit" diff --git a/pages/energy_estimates.md b/pages/energy_estimates.md index f22efd9..baccc06 100644 --- a/pages/energy_estimates.md +++ b/pages/energy_estimates.md @@ -1,6 +1,7 @@ --- title: Energy Estimates weight: 3 +lang: en --- We are innovating new ways with Sinric to make smart homes more efficient and help everyone have a positive impact on the planet diff --git a/pages/energy_estimates.pt.md b/pages/energy_estimates.pt.md new file mode 100644 index 0000000..1badc18 --- /dev/null +++ b/pages/energy_estimates.pt.md @@ -0,0 +1,21 @@ +--- +title: Estimativas de Energia +weight: 3 +lang: pt +--- +Estamos inovando novas maneiras com o Sinric para tornar as casas inteligentes mais eficientes e ajudar todos a terem um impacto positivo no planeta + +O Sinric usará o estado ligado/desligado do seu dispositivo para determinar por quanto tempo um dispositivo esteve ligado e combinará isso com o consumo de energia do dispositivo que você especifica ao criar um dispositivo para fornecer uma estimativa do consumo de energia do seu dispositivo. + +**Passo 1:** Digite o consumo de energia do dispositivo. +![Sinric Pro inserir consumo de energia do dispositivo]({{ site.github.url }}/public/img/sinric-pro-energy-estimate-device.png) + +**Passo 2:** Ligue o dispositivo e desligue-o depois de um tempo. O Sinric Pro calculará quantas horas o dispositivo esteve ligado e calculará a taxa de watts por hora. +![Gráfico de estimativa de energia Sinric Pro]({{ site.github.url }}/public/img/sinric-pro-energy-estimate-chart.png) + + +Depois de um tempo, esses dados também estarão disponíveis no aplicativo Amazon Alexa. + +![Gráfico de estimativa de energia Sinric Pro]({{ site.github.url }}/public/img/sinric-pro-alexa-energy-estimate-device.png) + +**Nota** Você deve usar o sistema Sinric Pro para ligar e desligar o dispositivo para calcular o consumo de energia \ No newline at end of file diff --git a/pages/for-business.md b/pages/for-business.md new file mode 100644 index 0000000..bdef3ff --- /dev/null +++ b/pages/for-business.md @@ -0,0 +1,40 @@ +--- +title: Sinric Pro For Business +weight: 4 +lang: en +--- + +Turn your smart device ideas into reality with [Sinric Pro for Business](https://biz.sinric.pro). Our platform empowers businesses to rapidly develop IoT solutions without the hassle of complex infrastructure. + + +### Why Choose Sinric Pro? + +- **Instant Start**: Go from sign-up to development in under 5 minutes + +- **Seamless Integration**: Compatible with major voice assistants and smart home ecosystems + +- **Rapid Development**: Utilize our Business portal to bring your ideas to life quickly + +- **Scalable Solution**: Grow your business without worrying about backend limitations + +- **Built-In Device Provisioning**: Provision your devices directly through our app + + +### Lightning-Fast Setup: From Idea to Implementation + +1. **60-Second Sign-Up**: Create your [business account](https://biz.sinric.pro) in less than a minute with our streamlined registration process. No credit card required. **Our registration process is currently limited to invitations only**. If you’re interested in trying out the feature, contact us and we will send you an invitation URL and detailed documentation. + +2. **2-Minute Product Creation**: Use our intuitive dashboard to define your smart device profile in just a couple of minutes. No complex coding required! + +3. **3-Minute Integration**: Download the product provisioning code, setup GPIO pins and flash! + +4. **Instant Product Listing**: As soon as your product is created, it's ready to be discovered by users in our Sinric Pro App. + +5. **Same-Day Deployment**: With our cloud infrastructure, you can go from concept to live deployment within a single business day. + + +Don't let technical barriers hold your smart home ideas back. With Sinric Pro, you can focus on innovation while we handle the complex backend operations. Ready to revolutionize the smart device market? [Sign up for a business account now](https://biz.sinric.pro) and have your first device live within the hour! + +#### Take a look at the tutorial to get started in minutes! + +- #### [Wally - Tutorial]({{ site.github.url }}/pages/tutorials/for-business/wally/wally.html) \ No newline at end of file diff --git a/pages/google-home-ifttt.md b/pages/google-home-ifttt.md index 9305706..7fe5cb8 100644 --- a/pages/google-home-ifttt.md +++ b/pages/google-home-ifttt.md @@ -2,6 +2,7 @@ title: Google Home (IFTTT) weight: 4 youtubeId: UHuVoE6kPB8 +published: false --- ### Google Home Via IFTTT diff --git a/pages/homebridge.md b/pages/homebridge.md new file mode 100644 index 0000000..cc517e0 --- /dev/null +++ b/pages/homebridge.md @@ -0,0 +1,47 @@ +--- +title: Homebridge (Homekit) +weight: 4 +lang: en +youtubeId: 3YI87iWlgDM +--- + +With our Homebridge-SinricPro plugin, now you can expose your devices to Homekit. + +**1. Get an API Key** + +If you do not have a API Key, Login to [Portal](https://portal.sinric.pro) and click **Credentials** or [click here](https://portal.sinric.pro/credential/new/apikey) to generate a new API key. + +![Homebridge-SinricPro plugin new API key]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-new-api-key.png) + +Click Save + +![Homebridge-SinricPro plugin new API saved]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-new-api-key-generated.png) + +Copy API Key + +**1. Install Homebridge-SinricPro plugin** + +Click on the Plugins and type [**Sinricpro**](https://www.npmjs.com/package/homebridge-sinricpro). + +![Homebridge-SinricPro plugin installtion]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-search.png) + +Click **Install**. Once the installation completes, it popup this dialog. Enter above API Key + +![Homebridge-SinricPro plugin settings]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-settings.png) + +Click Save. + +![Homebridge-SinricPro plugin installtion]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-install.png) + +**Now you must restart Homebridge !!** + +![Homebridge-SinricPro plugin installtion]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-device-discovert.png) + +On start-up Homebridge will discover all your devices and now they are available in Apple HomeKit app. + +![Homebridge-SinricPro plugin settings]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-homekit-app.png) + + +Demo: + +{% include youtubePlayer.html id=page.youtubeId %} \ No newline at end of file diff --git a/pages/homebridge.pt.md b/pages/homebridge.pt.md new file mode 100644 index 0000000..f97e138 --- /dev/null +++ b/pages/homebridge.pt.md @@ -0,0 +1,47 @@ +--- +title: Homebridge (Homekit) +weight: 4 +lang: pt +youtubeId: 3YI87iWlgDM +--- + +Com nosso plugin Homebridge-SinricPro, agora você pode expor seus dispositivos para o Homekit. + +**1. Obter uma Chave API** + +Se você não tem uma Chave API, faça login no [Portal](https://portal.sinric.pro) e clique em **Credentials** ou [clique aqui](https://portal.sinric.pro/credential/new/apikey) para gerar uma nova chave API. + +![Plugin Homebridge-SinricPro nova chave API]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-new-api-key.png) + +Clique em Save + +![Plugin Homebridge-SinricPro nova API salva]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-new-api-key-generated.png) + +Copie a Chave API + +**1. Instalar plugin Homebridge-SinricPro** + +Clique em Plugins e digite [**Sinricpro**](https://www.npmjs.com/package/homebridge-sinricpro). + +![Instalação do plugin Homebridge-SinricPro]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-search.png) + +Clique em **Install**. Uma vez que a instalação seja concluída, este diálogo aparecerá. Digite a Chave API acima + +![Configurações do plugin Homebridge-SinricPro]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-settings.png) + +Clique em Save. + +![Instalação do plugin Homebridge-SinricPro]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-install.png) + +**Agora você deve reiniciar o Homebridge !!** + +![Instalação do plugin Homebridge-SinricPro]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-device-discovert.png) + +Na inicialização, o Homebridge descobrirá todos os seus dispositivos e agora eles estarão disponíveis no aplicativo Apple HomeKit. + +![Configurações do plugin Homebridge-SinricPro]({{ site.github.url }}/public/img/sinricpro-homebridge-plugin-homekit-app.png) + + +Demo: + +{% include youtubePlayer.html id=page.youtubeId %} \ No newline at end of file diff --git a/pages/ifttt.md b/pages/ifttt.md index b6fe74c..bf0282d 100644 --- a/pages/ifttt.md +++ b/pages/ifttt.md @@ -1,6 +1,7 @@ --- title: IFTTT weight: 4 +lang: en youtubeId: UHuVoE6kPB8 --- @@ -15,7 +16,7 @@ Login to your IFTTT account. Get the API Key under the **Documentation** link in Copy your IFTTT API Key and paste it in Menu -> Integrations -> IFTTT Webhooks ![Sinric Pro Google Home IFTTT]({{ site.github.url }}/public/img/sinric_pro_ifttt_save_key.png) -Now, Sinric Pro is able to send **events** from IoT development board (such as ESP8266, ESP32, RaspPi) to IFTTT. +Now, Sinric Pro is able to send **events** coming from your IoT development board (such as ESP8266, ESP32, RaspPi) to IFTTT. Requests made to IFTTT from Sinric Pro will have the below format https://maker.ifttt.com/trigger/**{event}**/with/key/**{key}** @@ -49,7 +50,7 @@ Sending an action to Sinric Pro is easy. ![Sinric Pro Google Home IFTTT]({{ site.github.url }}/public/img/sinricpro-iftt-request.png) URL: -**https://ifttt.sinric.pro/v1/actions** +**https://ifttt.sinric.pro/ifttt/v1/actions** Method: **POST** @@ -70,7 +71,5 @@ Body: } {% endhighlight %} -#### Wanna know how to integrate with [Google Home ?]({{ site.github.url }}/pages/googlehome.html) - > This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/messaging.md b/pages/messaging.md index 17936f9..9ec794b 100644 --- a/pages/messaging.md +++ b/pages/messaging.md @@ -1,8 +1,10 @@ --- title: Messaging -weight: 2 +weight: 4 +lang: en +published: false --- - + **Overview** @@ -49,6 +51,7 @@ An act of doing something in will generate a **request** type message in the sys [Complete Message](https://github.com/sinricpro/sample_messages/blob/master/01_PowerState/01_setPowerState/01_Request.json) + ## Response When you receive such a request in your IOT module, you must respond to it by sending a **response** type message. The correct response to above request should be @@ -115,4 +118,28 @@ Let's imagine you want to turn on the device by pushing a button or change the b } {% endhighlight %} + + +1. The user change the device state physically. Eg: push a button to turn on the switch. +2. Your IOT module creates an [event](https://github.com/sinricpro/sample_messages/blob/master/01_PowerState/01_setPowerState/03_Event.json) message and send it to Sinric Pro IOT Platform. (In this case your IOT module sends setPowerState event) +3. The Sinric Pro IOT platform update the device status and update Alexa service + +Sinric Pro IOT platform will report any changes you do via events, app or API to Alexa as well. + +### Example + +1. The Amazon Alexa sends a message to the Sinric Pro IOT Platform. eg: Turn on [device name] +2. The Sinric Pro IoT platform creates a [request](https://github.com/sinricpro/sample_messages/blob/master/01_PowerState/01_setPowerState/01_Request.json) type message with appropriate action (in this case setPowerState) and send it to your IoT hardware module. +3. Your IoT hardware module [responds](https://github.com/sinricpro/sample_messages/blob/master/01_PowerState/01_setPowerState/02_Response.json) back to the Sinric Pro IOT Platform with success or failed status. + + **If you fail to respond with in 8 seconds / or device is offline, then the request will timeout and Alexa will say "Device is unresponsive".** + +4. The Sinric Pro IoT platform updates the device status according to your response and updates Alexa service. + + +![Sinric Pro alexa]({{ site.github.url }}/public/img/sinricpro-alexa-data-flow.png) + + + +![Sinric Pro alexa event]({{ site.github.url }}/public/img/sinricpro-alexa-event.png) > This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/modules.md b/pages/modules.md new file mode 100644 index 0000000..ec04463 --- /dev/null +++ b/pages/modules.md @@ -0,0 +1,26 @@ +--- +title: Modules +weight: 4 +lang: en +--- + +### Introduction + +A module in the context of SinricPro is a self-contained physical unit, such as an ESP32 development board. These modules are designed to handle various tasks, primarily focusing on connectivity and communication, like establishing and maintaining WiFi connections. **A single module can host one or more virtual SinricPro devices**. + +![what is a module]({{ site.github.url }}/public/img/sinricpro-what-is-a-module.png) + +This means that a single physical board can manage and control multiple smart home devices that appear individually within the SinricPro ecosystem and connected platforms like Amazon Alexa or Google Home. For example, an ESP32 module could be used to control several relays, each representing a distinct "switch" device in SinricPro. + +You cannot create a module like virtual device. Once you connect a development board, they will appear in the Portal. + +SinricPro provides following module features + + 1. [Set Primary or Secondary WiFi](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Settings) + + 2. [Check Health WiFi](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Health) + + 3. [Set Fixed IP](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Settings) + + 4. [OTA](https://help.sinric.pro/pages/ota) + diff --git a/pages/node-red.md b/pages/node-red.md new file mode 100644 index 0000000..7d28f12 --- /dev/null +++ b/pages/node-red.md @@ -0,0 +1,61 @@ +--- +title: Node-RED +weight: 4 +lang: en +youtubeId: YYjxLY7zioo +--- + +With our Node-RED plugin, now you can receive commands from Amazon Alexa, Google Home or SmartThings in Node-RED. + +**Installtion** + +Click on the hamburger menu in the top-right corner and select Manage palette, select Install, type [**@sinricpro/node-red-contrib-sinric-pro**](https://flows.nodered.org/node/@sinricpro/node-red-contrib-sinric-pro) and click the install button. + +Please make sure Git command line tools are installed. If you are on a Debian-based distribution, such as Ubuntu, try apt: + +``` +sudo apt install git-all +``` + +Otherwise please refer Git documentation + +https://git-scm.com/book/en/v2/Getting-Started-Installing-Git + + +![Sinric Pro Node-RED installtion]({{ site.github.url }}/public/img/sinricpro_node_red_install.png) + +After the installation is complete a new set of nodes shoud appear under **sinricpro** category + +![Sinric Pro Node-RED nodes]({{ site.github.url }}/public/img/sinricpro_node_red_nodes.png) + +**How to use** + +* Go to Sinric Pro [**here**](https://sinric.pro) + +* Create an account or login using your email address. + +* Create a new device and click Save. + +Copy the Device Id, App Key and App Secret from the last page. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Create a new flow or use existing one and add a device node. + +* Edit the device node. Enter the app credential and enter the device details. + +![Sinric Pro Node-RED nodes]({{ site.github.url }}/public/img/sinric_pro_nodered_app_credential.png) + +Once the device node is configured, voice commands related to above device in SinricPro will be forward to this Node-RED node. + +* You can add another node (function) to process this output. + +![Sinric Pro Node-RED function node]({{ site.github.url }}/public/img/sinric_pro_nodered_function_node.png) + +* Add a **response** node to send the response back to Sinric Pro server. + +![Sinric Pro Node-RED response node]({{ site.github.url }}/public/img/sinric_pro_node_red_response.png) + +{% include youtubePlayer.html id=page.youtubeId %} + +Checkout the [**example**](https://github.com/sinricpro/node-red-contrib-sinric-pro/tree/main/examples) repo for more examples. \ No newline at end of file diff --git a/pages/node-red.pt.md b/pages/node-red.pt.md new file mode 100644 index 0000000..6d74260 --- /dev/null +++ b/pages/node-red.pt.md @@ -0,0 +1,61 @@ +--- +title: Node-RED +weight: 4 +lang: pt +youtubeId: YYjxLY7zioo +--- + +Com nosso plugin Node-RED, agora você pode receber comandos do Amazon Alexa, Google Home ou SmartThings no Node-RED. + +**Instalação** + +Clique no menu hambúrguer no canto superior direito e selecione Manage palette, selecione Install, digite [**@sinricpro/node-red-contrib-sinric-pro**](https://flows.nodered.org/node/@sinricpro/node-red-contrib-sinric-pro) e clique no botão install. + +Certifique-se de que as ferramentas de linha de comando do Git estão instaladas. Se você estiver em uma distribuição baseada em Debian, como Ubuntu, tente apt: + +``` +sudo apt install git-all +``` + +Caso contrário, consulte a documentação do Git + +https://git-scm.com/book/en/v2/Getting-Started-Installing-Git + + +![Instalação do Sinric Pro Node-RED]({{ site.github.url }}/public/img/sinricpro_node_red_install.png) + +Após a instalação estar completa, um novo conjunto de nós deve aparecer na categoria **sinricpro** + +![Nós do Sinric Pro Node-RED]({{ site.github.url }}/public/img/sinricpro_node_red_nodes.png) + +**Como usar** + +* Vá para o Sinric Pro [**aqui**](https://sinric.pro) + +* Crie uma conta ou faça login usando seu endereço de email. + +* Crie um novo dispositivo e clique em Save. + +Copie o Device Id, App Key e App Secret da última página. + +![Sinric Pro copiar id do dispositivo]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Crie um novo fluxo ou use um existente e adicione um nó de dispositivo. + +* Edite o nó do dispositivo. Digite as credenciais do app e insira os detalhes do dispositivo. + +![Nós do Sinric Pro Node-RED]({{ site.github.url }}/public/img/sinric_pro_nodered_app_credential.png) + +Uma vez que o nó do dispositivo esteja configurado, comandos de voz relacionados ao dispositivo acima no SinricPro serão encaminhados para este nó Node-RED. + +* Você pode adicionar outro nó (função) para processar esta saída. + +![Nó de função do Sinric Pro Node-RED]({{ site.github.url }}/public/img/sinric_pro_nodered_function_node.png) + +* Adicione um nó de **resposta** para enviar a resposta de volta ao servidor Sinric Pro. + +![Nó de resposta do Sinric Pro Node-RED]({{ site.github.url }}/public/img/sinric_pro_node_red_response.png) + +{% include youtubePlayer.html id=page.youtubeId %} + +Confira o repositório de [**exemplos**](https://github.com/sinricpro/node-red-contrib-sinric-pro/tree/main/examples) para mais exemplos. \ No newline at end of file diff --git a/pages/ota-updates/local-wifi-ota-update.md b/pages/ota-updates/local-wifi-ota-update.md new file mode 100644 index 0000000..6c2c46d --- /dev/null +++ b/pages/ota-updates/local-wifi-ota-update.md @@ -0,0 +1,137 @@ +--- +title: Local WiFI OTA Update via ArduinoOTA +layout: post +--- + +Over-the-air (OTA) updates offer a convenient and efficient way to update your modules using WiFi connection without physically connecting it to your computer. In order to upload firmware, you have to update your Sinric Pro integration with ArduinoOTA support code. + +Below example demonstrates how to use Switch sketch with ArduinoOTA support. + +```c++ +// Uncomment the following line to enable serial debug output +//#define ENABLE_DEBUG + +#ifdef ENABLE_DEBUG + #define DEBUG_ESP_PORT Serial + #define NODEBUG_WEBSOCKETS + #define NDEBUG +#endif + +#include +#include +#if defined(ESP8266) + #include +#elif defined(ESP32) || defined(ARDUINO_ARCH_RP2040) + #include +#endif + +#include "SinricPro.h" +#include "SinricProSwitch.h" + +#define WIFI_SSID "YOUR-WIFI-SSID" +#define WIFI_PASS "YOUR-WIFI-PASSWORD" +#define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" +#define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" +#define SWITCH_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" +#define BAUD_RATE 115200 // Change baudrate to your need + + +bool onPowerState(const String &deviceId, bool &state) { + Serial.printf("Device %s turned %s (via SinricPro) \r\n", deviceId.c_str(), state?"on":"off"); + return true; // request handled properly +} + +// setup function for WiFi connection +void setupWiFi() { + Serial.printf("\r\n[Wifi]: Connecting"); + + #if defined(ESP8266) + WiFi.setSleepMode(WIFI_NONE_SLEEP); + WiFi.setAutoReconnect(true); + #elif defined(ESP32) + WiFi.setSleep(false); + WiFi.setAutoReconnect(true); + #endif + + WiFi.begin(WIFI_SSID, WIFI_PASS); + + while (WiFi.status() != WL_CONNECTED) { + Serial.printf("."); + delay(250); + } + Serial.printf("connected!\r\n[WiFi]: IP-Address is %s\r\n", WiFi.localIP().toString().c_str()); +} + +void setupOTA() { + // Hostname defaults to esp3232-[MAC] + ArduinoOTA.setHostname("SinricProOTATestDevice"); + + // No authentication by default + // ArduinoOTA.setPassword("admin"); + + ArduinoOTA.onStart([]() { + String type; + if (ArduinoOTA.getCommand() == U_FLASH) + type = "sketch"; + else // U_SPIFFS + type = "filesystem"; + + // NOTE: if updating SPIFFS this would be the place to unmount SPIFFS using SPIFFS.end() + Serial.println("Start updating " + type); + }) + .onEnd([]() { + Serial.println("\nEnd"); + }) + .onProgress([](unsigned int progress, unsigned int total) { + Serial.printf("Progress: %u%%\r", (progress / (total / 100))); + }) + .onError([](ota_error_t error) { + Serial.printf("Error[%u]: ", error); + if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed"); + else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed"); + else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed"); + else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed"); + else if (error == OTA_END_ERROR) Serial.println("End Failed"); + }); + + ArduinoOTA.begin(); + Serial.printf("\r\n[setupOTA]: Ready"); +} + +// setup function for SinricPro +void setupSinricPro() { + // add device to SinricPro + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + + // set callback function to device + mySwitch.onPowerState(onPowerState); + + // setup SinricPro + SinricPro.onConnected([](){ Serial.printf("Connected to SinricPro\r\n"); }); + SinricPro.onDisconnected([](){ Serial.printf("Disconnected from SinricPro\r\n"); }); + SinricPro.begin(APP_KEY, APP_SECRET); +} + +// main setup function +void setup() { + Serial.begin(BAUD_RATE); Serial.printf("\r\n\r\n"); + setupWiFi(); + setupSinricPro(); + setupOTA(); +} + +void loop() { + ArduinoOTA.handle(); + SinricPro.handle(); +} +``` + +Once you flash above code, OTA server will start listening to OTA updates from Arduino IDE. + +![Sinric Pro OTA Hosts]({{ site.github.url }}/public/img/sinricpro-ota-host.png) + +Next time, you can select the OTA host (SinricProOTATestDevice) instead of COM port. + +![Sinric Pro OTA Hosts Selection]({{ site.github.url }}/public/img/sinricpro-ota-devices.png) + +### Your Arduno IDE and the ESP must be on the same network! \ No newline at end of file diff --git a/pages/ota.md b/pages/ota.md new file mode 100644 index 0000000..b6214b6 --- /dev/null +++ b/pages/ota.md @@ -0,0 +1,313 @@ +--- +title: OTA Updates +weight: 4 +lang: en +youtubeId: FxtsQuC9mn8 +--- + + +This tutorial walks you through setting up **Over-The-Air (OTA) firmware updates** for your ESP32 or ESP8266 device using **SinricPro**. OTA allows you to remotely update your device’s firmware without physically connecting it to a computer — perfect for deployed IoT devices! + +--- + +## What is SinricPro OTA? + +SinricPro OTA (Over-The-Air) is a feature that allows your ESP device to **download and install new firmware** from the server when triggered via the SinricPro dashboard. + +- Version checking (SemVer support) +- Forced updates +- Progress and error reporting + +--- + +## Prerequisites + +Before you begin, ensure you have: + +- An ESP32, ESP8266 or RP2040 board +- Arduino IDE (or PlatformIO) installed +- Latest [SinricPro Library](https://github.com/sinricpro/esp8266-esp32-sdk) installed via Library Manager +- WiFi network credentials +- SinricPro account with: + - `APP_KEY` and `APP_SECRET` from [portal.sinric.pro](https://portal.sinric.pro) -> Credentials + - Device ID (`SWITCH_ID`, etc.) for your device from [portal.sinric.pro](https://portal.sinric.pro) -> Devices + +💡 *Complete code: [here](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/OTAUpdate)* + +--- + +## Step-by-Step Setup + +### 1. Install Required Libraries + +In Arduino IDE: + +- Go to **Sketch → Include Library → Manage Libraries** +- Search and install: `SinricPro` +--- + +### 2. Configure Your Sketch + +Copy and paste the example code below into your Arduino IDE. + +> **IMPORTANT**: `FIRMWARE_VERSION` is the Firmware version. You can see in the Module section of Portal. **It must be define above must be above SinricPro.h** + +```cpp +// Uncomment the following line to enable serial debug output +// #define SINRICPRO_NOSSL // Uncomment if you have memory limitation issues. +// #define ENABLE_DEBUG // Enable SDK logging. + +// Your firmware version. Must be above SinricPro.h. Do not rename this. +#define FIRMWARE_VERSION "1.1.1" + +#ifdef ENABLE_DEBUG + #define DEBUG_ESP_PORT Serial + #define NODEBUG_WEBSOCKETS + #define NDEBUG +#endif + +#include + +#if defined(ESP8266) + #include + #include "ESP8266OTAHelper.h" // Ref: https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/OTAUpdate +#elif defined(ESP32) + #include + #include "ESP32OTAHelper.h" // Ref: https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/OTAUpdate +#elif defined(ARDUINO_ARCH_RP2040) + #include + #include "ESP8266OTAHelper.h" // Ref: https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/OTAUpdate +#endif + +#include "SemVer.h" +#include "SinricPro.h" +#include "SinricProSwitch.h" + + +#define WIFI_SSID "YOUR-WIFI-SSID" +#define WIFI_PASS "YOUR-WIFI-PASSWORD" +#define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" +#define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" +#define SWITCH_ID "SWITCH_ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" + +#define BAUD_RATE 115200 // Change baudrate to your need + +bool handleOTAUpdate(const String& url, int major, int minor, int patch, bool forceUpdate) { + Version currentVersion = Version(FIRMWARE_VERSION); + Version newVersion = Version(String(major) + "." + String(minor) + "." + String(patch)); + bool updateAvailable = newVersion > currentVersion; + + Serial.print("URL: "); + Serial.println(url.c_str()); + Serial.print("Current version: "); + Serial.println(currentVersion.toString()); + Serial.print("New version: "); + Serial.println(newVersion.toString()); + if (forceUpdate) Serial.println("Enforcing OTA update!"); + + // Handle OTA update based on forceUpdate flag and update availability + if (forceUpdate || updateAvailable) { + if (updateAvailable) { + Serial.println("Update available!"); + } + + String result = startOtaUpdate(url); + if (!result.isEmpty()) { + SinricPro.setResponseMessage(std::move(result)); + return false; + } + return true; + } else { + String result = "Current version is up to date."; + SinricPro.setResponseMessage(std::move(result)); + Serial.println(result); + return false; + } +} + +// setup function for WiFi connection +void setupWiFi() { + Serial.printf("\r\n[Wifi]: Connecting"); + +#if defined(ESP8266) + WiFi.setSleepMode(WIFI_NONE_SLEEP); + WiFi.setAutoReconnect(true); +#elif defined(ESP32) + WiFi.setSleep(false); + WiFi.setAutoReconnect(true); +#endif + + WiFi.begin(WIFI_SSID, WIFI_PASS); + + while (WiFi.status() != WL_CONNECTED) { + Serial.printf("."); + delay(250); + } + + Serial.printf("connected!\r\n[WiFi]: IP-Address is %s\r\n", WiFi.localIP().toString().c_str()); +} + +// setup function for SinricPro +void setupSinricPro() { + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + + // setup SinricPro + SinricPro.onConnected([]() { + Serial.printf("Connected to SinricPro\r\n"); + }); + SinricPro.onDisconnected([]() { + Serial.printf("Disconnected from SinricPro\r\n"); + }); + SinricPro.onOTAUpdate(handleOTAUpdate); + SinricPro.begin(APP_KEY, APP_SECRET); +} + +// main setup function +void setup() { + Serial.begin(BAUD_RATE); + Serial.printf("\r\n\r\n"); + setupWiFi(); + setupSinricPro(); +} + +void loop() { + SinricPro.handle(); +} +``` + +--- + + +### Firmware Version + +```cpp +#define FIRMWARE_VERSION "1.1.1" +``` + +- This **must** be defined before including `SinricPro.h`. +- Follow [Semantic Versioning](https://semver.org/) (e.g., `MAJOR.MINOR.PATCH`). +- This will be reflected in Portal -> Module section once the device connect to server. + +--- + + +## Preparing Firmware for OTA + +### Step 1: Compile and Export Binary + +In Arduino IDE: + +- Go to **Sketch → Export Compiled Binary** +- This generates a `.bin` file in your sketch folder. + +> Example: `your_sketch.ino.esp32.bin` + +--- + + +## Triggering OTA Updates + +1. [Login](http://portal.sinric.pro) to your Sinric Pro account. + +2. Go to **OTA Updates** menu on left. + +3. Click **Add OTA Update** button. + +4. Enter the the new firmware version. Select the OTA .bin file (`your_sketch.ino.esp32.bin`) and the modules you want to apply the OTA update. + +5. Click **Save** + + + +Once you click the **Save** button, the server will broadcast an OTA update request to the selected modules. If your module is currently offline, it will receive the update the next time it connects to the server. + + + + +{% include youtubePlayer.html id=page.youtubeId %} + + +--- + +## Debugging OTA Issues + +Enable debug output by uncommenting: + +```cpp +#define ENABLE_DEBUG +``` + +Watch Serial Monitor (`115200 baud`) for: + +- WiFi connection status +- SinricPro connection +- OTA URL and version comparison +- Download progress and errors + +Common issues: + +| Symptom | Solution | +|--------|----------| +| `Update failed: connection refused` | Check URL is publicly accessible | +| `Update failed: not enough space` | Reduce sketch size or use `SINRICPRO_NOSSL` | +| `Version not updating` | Ensure `FIRMWARE_VERSION` is updated in sketch before compiling new binary | +| `Device not responding after OTA` | Check for crashes — add delays or watchdog reset | + +--- + +## Best Practices + +- Always test OTA on a development device before deploying to production. +- Use Semantic Versioning consistently (`1.0.0`, `1.0.1`, `2.0.0`, etc.). +- Keep firmware size under 1MB for ESP8266 (if using 1MB flash). +- Use HTTPS URLs for secure downloads (SSL enabled by default). +- Add a 5-10 second delay after `SinricPro.handle()` in `loop()` if device is unstable. +- Implement a rollback mechanism or “safe mode” if OTA fails repeatedly. + +--- + +## FAQ + +### Q: Can I use OTA with other SinricPro device types (like DimSwitch, Thermostat, etc.)? + +✅ **Yes!** The OTA mechanism is device-type agnostic. Just register `SinricPro.onOTAUpdate(...)` regardless of your device class. + +--- + +### Q: What happens if OTA fails? + +The device will: +- Keep running the old firmware. +- Report failure via `SinricPro.setResponseMessage(...)`. +- Remain connected to SinricPro (unless crash occurs). + +--- + +### Q: Does OTA work with SSL/HTTPS? + +✅ Yes, by default. If you have memory issues on ESP8266, uncomment: + +```cpp +#define SINRICPRO_NOSSL +``` + +> ⚠️ This disables SSL — only use with trusted networks or HTTP URLs. + +--- + +### Q: How long does OTA take? + +Depends on: +- Firmware size (typical: 500KB–1MB) +- WiFi speed +- Server speed + +Average: **30 seconds to 3 minutes**. + +--- + +You can find the complete example code here: +[https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/OTAUpdate](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/OTAUpdate) + + +If you are looking for local WiFI OTA Update [here]({{ site.github.url }}/pages/ota-updates/local-wifi-ota-update.html) \ No newline at end of file diff --git a/pages/ota.pt.md b/pages/ota.pt.md new file mode 100644 index 0000000..56ad514 --- /dev/null +++ b/pages/ota.pt.md @@ -0,0 +1,41 @@ +--- +title: Atualizações OTA +weight: 4 +lang: pt +youtubeId: FxtsQuC9mn8 +--- + +### Introdução + +Atualizações OTA (Over-the-Air) permitem que você carregue novo firmware em seu módulo remotamente, eliminando a necessidade de conectá-lo ao seu PC. Esta capacidade é particularmente valiosa quando o acesso físico ao módulo ESP é restrito ou inconveniente. + + + + +### Como fazer uma Atualização OTA + +1. [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro. + +2. Vá para o menu **OTA Updates** à esquerda. + +3. Clique no botão **Add OTA Update**. + +4. Digite a nova versão do firmware. Selecione o arquivo .bin OTA (Arduino IDE -> Sketch -> Export Compiled Binary) e os módulos nos quais você deseja aplicar a atualização OTA. + +5. Clique em **Save** + + + +Uma vez que você clique no botão **Save**, o servidor irá transmitir uma solicitação de atualização OTA para os módulos selecionados. Se seu módulo estiver atualmente offline, ele receberá a atualização na próxima vez que se conectar ao servidor. + + + +*Nota: Você precisa estar no SinricPro SDK v3.2.x ou mais recente para usar OTA* + +Você pode encontrar o código de exemplo completo aqui: +[https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/OTAUpdate](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/OTAUpdate) + + +{% include youtubePlayer.html id=page.youtubeId %} + +Se você está procurando por Atualização OTA WiFi local [aqui]({{ site.github.url }}/pt/pages/ota-updates/local-wifi-ota-update.pt.html) \ No newline at end of file diff --git a/pages/pass.md b/pages/pass.md new file mode 100644 index 0000000..5685dc5 --- /dev/null +++ b/pages/pass.md @@ -0,0 +1,79 @@ +--- +title: PaaS +weight: 1 +published: false +--- + +**We provide the following services with our PaaS (White Label) solution** + + +### Mobile Apps + +The Sinric Pro App for iOS and Android, rebranded to your own corporate custom branding and published on the AppStore and Google Play Store. + +### Amazon Alexa Integration + +We will setup an Amazon Alexa Skill for your own brand and publish it on Amazon Alexa Skill Store. + +### Device Provisioning + +The App supports device provisioning via BLE (for ESP32), ESPTouch/SmartAP (for ESP8266) and by a Captive Portal (WebUI). + +BLE Demo: https://youtu.be/b8tU4GRuHyc + +SmartAP Demo: https://youtu.be/2EmZgiWjfaA + +You do not need to hardcode the app/security keys or device Ids — as this will be sent to your hardware module securely during the provisioning process. + + +### User Management, OTA + +Using our Admin portal you can set up products, manage users, devices and perform OTA updates. + +### Security + +SSL encrypted communication between the cloud server, apps and ESP devices (for supported hardware) plus all the messages are signed and verified using Hash-Based Message Authentication Code (HMAC) + + +We also fully manage the server and maintain it — and your instance will receive free updates, bug fixes and features from the Sinric Pro master platform from time to time. + +### Why shoud I use PaaS ? + +* Accelerated time to the market. Your own branded apps and Alexa skill with in two weeks. + +* No need to deal with hiring iOS, Android, backend developers, dev-ops or purchase dedicated harware for them. + +* No need to maintain the code or keep libraries upto date. We will do it for you. + +* Daily backups, scalability, security patches are managed by our experts. + + +### Why not: + +* We will change only the App name, App icon and background color. No layout changes are permitted. + +* SmartThings, Google Home, and IFTTT are not included. (Can be added) + +* The server and app source code is not available to you. + + +### Other things + +Once you have signed the contract, we will provide you with sample code as well as detailed documentation on how device provisioning and OTA works. You can build your firmware based on that. + + +> ### PaaS solution costs 2,558$ /year for 10,000 devices. + + +*10,000 virtual devices created on server not ESP modules. + +if you want to know more information please take a look at our [PaaS - Process and Timeline]({{ site.github.url }}/pages/pass-timeline/timeline.html) + +### Ready to get started? + +For enquiries please contact us via the link below. + +[https://forms.gle/sinricpro](https://forms.gle/h6jJj8KYDQNeruct5) + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) + diff --git a/pages/pricing.md b/pages/pricing.md new file mode 100644 index 0000000..470ae4e --- /dev/null +++ b/pages/pricing.md @@ -0,0 +1,46 @@ +--- +title: Pricing +weight: 5 +lang: en +description: SinricPro Pricing Plans for DIY users +--- + + +SinricPro offers a variety of pricing plans to suit your needs, from hobbyist to commercial applications. + +## Free Plan + +Our free plan is perfect for getting started with SinricPro. + +* **Price:** Free +* **Devices:** 3 +* **Support:** Chat, Email, Community Forum + +## Paid Plan + +### Device-Based Plan + +Pay based on number of devices + +* **Price:** $3 for a year / per device +* **Devices:** Your choice +* **Support:** Chat, Email, Community Forum + +You can get to get a 10% discount when you buy 5 or more with code **GIVEME10OFF** + +You can get to get a 15% discount when you buy 10 or more with code **GIVEME15OFF** + +You can get to get a 20% discount when you buy 5 or more with code **GIVEME20OFF** + +You can get to get a 30% discount when you buy 5 or more with code **GIVEME30OFF** + +### Unlimited Plan + +Create Unlimited Devices – No Limits, Full Flexibility. Fixed price of $39.99 per year + +* **Price:** $39.99 for a year +* **Devices:** Unlimited +* **Support:** Chat, Email, Community Forum + + +For more information, please visit our website or contact us at [support@sinric.com](mailto:support@sinric.com). diff --git a/pages/quickstart.md b/pages/quickstart.md deleted file mode 100644 index 04d23f1..0000000 --- a/pages/quickstart.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Quickstart -weight: 1 -youtubeId: H-iftzWVTXE -youtubeId2: HEMifE1Xm7E ---- - - -### Quickstart Tutorials - -#### [How control a relay using Amazon Alexa]({{ site.github.url }}/pages/tutorials/switch.html) -#### [How create your very own Amazon Alexa doorbell]({{ site.github.url }}/pages/tutorials/doorbell.html) - -> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/quickstarts.md b/pages/quickstarts.md new file mode 100644 index 0000000..8560fa7 --- /dev/null +++ b/pages/quickstarts.md @@ -0,0 +1,120 @@ +--- +title: Quickstart Tutorials +weight: 1 +lang: en +youtubeId: H-iftzWVTXE +youtubeId2: HEMifE1Xm7E +--- + +#### General Tutorials + +- ##### [Explore the SinricPro device creation wizard.]({{ site.github.url }}/pages/tutorials/general/device-creation-wizard.html) + +- ##### [Sending Voice Announcements via Google Home]({{ site.github.url }}/pages/tutorials/general/how-to-send-announcements-to-google-home.html) + +- ##### [Making Voice Announcements via Amazon Alexa]({{ site.github.url }}/pages/tutorials/general/how-to-send-announcements-to-alexa.html) + +- ##### [Espalexa or fauxmoESP "Device Not Found"? Why Emulation Fails and How to Fix It]({{ site.github.url }}/pages/tutorials/general/device-not-found-fauxmoESP-espalexa.html) + +- ##### [Settings Tutorial]({{ site.github.url }}/pages/tutorials/general/sinricpro-settings-tutorial.html) + + +
+ +#### Switch Tutorials (Arduino) + +- ##### [Part 1 - How to turn on and off a Relay]({{ site.github.url }}/pages/tutorials/switch/part-1.html) + +- ##### [Part 2 - Add a push button to toggle the Relay]({{ site.github.url }}/pages/tutorials/switch/part-2.html) + +- ##### [Part 3 - Multiple relays with multiple tactile (push) buttons]({{ site.github.url }}/pages/tutorials/switch/part-3.html) + +
+ +#### Switch Tutorials (MicroPython) + +- ##### [How to Control a Relay (Turn On/Off) Using MicroPython on an ESP32 with Pymakr]({{ site.github.url }}/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython.html) + +- ##### [How to Control a Relay (Turn On/Off) Using MicroPython on an Raspberry Pi Pico W with Thonny]({{ site.github.url }}/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython-raspberry-pi-picow-with-thonny.html) + +
+ +#### Dimmable Switch Tutorials + +- ##### [YYAC-3S for ESP32]({{ site.github.url }}/pages/tutorials/dimmable-switch/YYAC-3S.html) + +- ##### [RobotDyn's AC Light dimmer module]({{ site.github.url }}/pages/tutorials/dimmable-switch/robotdyn-ac-light-dimmer.html) + +
+ +#### Light Tutorials + +- ##### [LED Light Strip RGB 5050]({{ site.github.url }}/pages/tutorials/light/LED-Stripe-5050.html) + +
+ +#### TV Tutorials + +- ##### [How to control your TV using IR Transceiver]({{ site.github.url }}/pages/tutorials/tv/ir-transceiver-esp8285.html) + +
+ +#### Temperature Sensor Tutorials + +- ##### [DHT11 and DHT22, AM2302, RHT03]({{ site.github.url }}/pages/tutorials/temperature-sensors/DHTx_AMx_RHTx.html) + +- ##### [DS18B20 and DS1822, DS1820, MAX31820, MAX31850]({{ site.github.url }}/pages/tutorials/temperature-sensors/DS18B20.html) + +- ##### [LM35 (LM35DZ), LM335 and LM34]({{ site.github.url }}/pages/tutorials/temperature-sensors/LMx.html) + +- ##### [BME280]({{ site.github.url }}/pages/tutorials/temperature-sensors/BME280.html) + +- ##### [BMP180]({{ site.github.url }}/pages/tutorials/temperature-sensors/BMP180.html) + +
+ +#### Contact Sensor Tutorials +- #### [Contact (also known as a door, entry, or window) Sensor (MC-38) for Alexa, Google Home]({{ site.github.url }}/pages/tutorials/contact-sensors/contact.html) + +
+ +#### Motion Sensor Tutorials +- #### [PIR Motion Sensor: HC-SR501, HC-SR505, Mini AM312, HC-SR312 for Alexa, Google Home]({{ site.github.url }}/pages/tutorials/motion-sensors/HC-SR501-HC-SR505-AM312-HC-SR312.html) + +
+ +#### Camera Tutorials +- #### [RaspberryPI Camera (WebRTC) for Alexa, Google Home]({{ site.github.url }}/pages/tutorials/camera/raspberrypi-webrtc-alexa-googlehome-camera.html) + +
+ +#### Doorbell Tutorials +- #### [Doorbell: Smart Doorbell using ESP32, ESP8266 or Raspberry Pi Pico W for Alexa, Google Home]({{ site.github.url }}/pages/tutorials/doorbell/doorbell.html) + +
+ +#### Custom Device Types +- #### [Soil Moisture: Measure soil moisture using a Capacitive Soil Moisture Sensor (HW-390) for Alexa]({{ site.github.url }}/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.html) +- #### [Water Level Indicator (Water Tank): Moisture water level using a Ultrasonic Sensor (HC-SR04) for Alexa]({{ site.github.url }}/pages/tutorials/custom-device-types/ultrasonic-sensor/HC-SR04.html) +- #### [Water Sensor (also known as Water leak, flood, or rain detector) for Alexa]({{ site.github.url }}/pages/tutorials/custom-device-types/water-sensor/flood-leak-rain-sensor.html) +- #### [Air Quality Sensor: Detect smoke and other harmful gas (MQ135) for Alexa]({{ site.github.url }}/pages/tutorials/air-quality-sensors/mq135.html) +- #### [Gas Sensor: Detect alcohol, ethanol, smoke in the air (MQ-3) for Alexa]({{ site.github.url }}/pages/tutorials/custom-device-types/alcohol-sensor/MQ-3.html) +- #### [Smart Button: A push button on your phone to do anything]({{ site.github.url }}/pages/tutorials/custom-device-types/smart-button/push-button.html) +
+ +#### Battery Powered Sensors Tutorials +- #### [Capacitive Soil Moisture Sensor]({{ site.github.url }}/pages/tutorials/custom-device-types/battery-powered-capacitive-soil-moisture-sensor/battery-powered-capacitive-soil-moisture-sensor.html) + +
+ +#### Integration Tutorial +- #### [ESP32 RF Transmitter]({{ site.github.url }}/pages/tutorials/general/rf-transmitter-with-sinricpro.html) + +
+ + +#### Sinric Pro for Business Tutorials +- #### [Wally - Tutorial]({{ site.github.url }}/pages/tutorials/for-business/wally/wally.html) + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) diff --git a/pages/quickstarts.pt.md b/pages/quickstarts.pt.md new file mode 100644 index 0000000..444f946 --- /dev/null +++ b/pages/quickstarts.pt.md @@ -0,0 +1,98 @@ +--- +title: Tutoriais de Início Rápido +weight: 1 +lang: pt +youtubeId: H-iftzWVTXE +youtubeId2: HEMifE1Xm7E +--- + + +#### Tutoriais de Interruptor (Arduino) + +- ##### [Parte 1 - Como ligar e desligar um Relé]({{ site.github.url }}/pt/pages/tutorials/switch/part-1.pt.html) + +- ##### [Parte 2 - Adicionar um botão para alternar o Relé]({{ site.github.url }}/pt/pages/tutorials/switch/part-2.pt.html) + +- ##### [Parte 3 - Múltiplos relés com múltiplos botões táteis (push)]({{ site.github.url }}/pt/pages/tutorials/switch/part-3.pt.html) + +
+ +#### Tutoriais de Interruptor (MicroPython) + +- ##### [Como ligar e desligar um Relé usando ESP32]({{ site.github.url }}/pt/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython.pt.html) + +
+ +#### Tutoriais de Interruptor Dimmer + +- ##### [YYAC-3S para ESP32]({{ site.github.url }}/pt/pages/tutorials/dimmable-switch/YYAC-3S.pt.html) + +- ##### [Módulo dimmer de luz AC da RobotDyn]({{ site.github.url }}/pt/pages/tutorials/dimmable-switch/robotdyn-ac-light-dimmer.pt.html) + +
+ +#### Tutoriais de Luz + +- ##### [Fita LED RGB 5050]({{ site.github.url }}/pt/pages/tutorials/light/LED-Stripe-5050.pt.html) + +
+ +#### Tutoriais de TV + +- ##### [Como controlar sua TV usando Transceptor IR]({{ site.github.url }}/pt/pages/tutorials/tv/ir-transceiver-esp8285.pt.html) + +
+ +#### Tutoriais de Sensor de Temperatura + +- ##### [DHT11 e DHT22, AM2302, RHT03]({{ site.github.url }}/pt/pages/tutorials/temperature-sensors/DHTx_AMx_RHTx.pt.html) + +- ##### [DS18B20 e DS1822, DS1820, MAX31820, MAX31850]({{ site.github.url }}/pt/pages/tutorials/temperature-sensors/DS18B20.pt.html) + +- ##### [LM35 (LM35DZ), LM335 e LM34]({{ site.github.url }}/pt/pages/tutorials/temperature-sensors/LMx.pt.html) + +- ##### [BME280]({{ site.github.url }}/pt/pages/tutorials/temperature-sensors/BME280.pt.html) + +- ##### [BMP180]({{ site.github.url }}/pt/pages/tutorials/temperature-sensors/BMP180.pt.html) + +
+ +#### Tutoriais de Sensor de Contato +- #### [Sensor de Contato (também conhecido como sensor de porta, entrada ou janela) (MC-38) para Alexa, Google Home]({{ site.github.url }}/pt/pages/tutorials/contact-sensors/contact.pt.html) + +
+ +#### Tutoriais de Sensor de Movimento +- #### [Sensor de Movimento PIR: HC-SR501, HC-SR505, Mini AM312, HC-SR312 para Alexa, Google Home]({{ site.github.url }}/pt/pages/tutorials/motion-sensors/HC-SR501-HC-SR505-AM312-HC-SR312.pt.html) + +
+ +#### Tutoriais de Câmera +- #### [Câmera RaspberryPI (WebRTC) para Alexa, Google Home]({{ site.github.url }}/pt/pages/tutorials/camera/raspberrypi-webrtc-alexa-googlehome-camera.pt.html) + +
+ +#### Tutoriais de Campainha +- #### [Campainha: Campainha Inteligente usando ESP32, ESP8266 ou Raspberry Pi Pico W para Alexa, Google Home]({{ site.github.url }}/pt/pages/tutorials/doorbell/doorbell.pt.html) + +
+ +#### Tipos de Dispositivos Personalizados +- #### [Umidade do Solo: Medir umidade do solo usando Sensor de Umidade Capacitivo (HW-390) para Alexa]({{ site.github.url }}/pt/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.pt.html) +- #### [Indicador de Nível de Água (Tanque de Água): Nível de água usando Sensor Ultrassônico (HC-SR04) para Alexa]({{ site.github.url }}/pt/pages/tutorials/custom-device-types/ultrasonic-sensor/HC-SR04.pt.html) +- #### [Sensor de Água (também conhecido como detector de vazamento, inundação ou chuva) para Alexa]({{ site.github.url }}/pt/pages/tutorials/custom-device-types/water-sensor/flood-leak-rain-sensor.pt.html) +- #### [Sensor de Qualidade do Ar: Detectar fumaça e outros gases nocivos (MQ135) para Alexa]({{ site.github.url }}/pt/pages/tutorials/air-quality-sensors/mq135.pt.html) +- #### [Sensor de Gás: Detectar álcool, etanol, fumaça no ar (MQ-3) para Alexa]({{ site.github.url }}/pt/pages/tutorials/custom-device-types/alcohol-sensor/MQ-3.pt.html) +- #### [Botão Inteligente: Um botão no seu telefone para fazer qualquer coisa]({{ site.github.url }}/pt/pages/tutorials/custom-device-types/smart-button/push-button.pt.html) +
+ +#### Tutoriais de Sensores Alimentados por Bateria +- #### [Sensor de Umidade do Solo Capacitivo]({{ site.github.url }}/pt/pages/tutorials/custom-device-types/battery-powered-capacitive-soil-moisture-sensor/battery-powered-capacitive-soil-moisture-sensor.pt.html) + +
+ +#### Tutoriais do Sinric Pro para Empresas +- #### [Wally - Tutorial]({{ site.github.url }}/pt/pages/tutorials/for-business/wally/wally.pt.html) + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/supported_devices.md b/pages/supported_devices.md index 62d1b75..b329a38 100644 --- a/pages/supported_devices.md +++ b/pages/supported_devices.md @@ -20,7 +20,7 @@ Following device types are supported at the moment - [x] [Smart Lock](devices/smart_lock.html) -**Senors** +**Sensors** - [x] [Temperature/Humidity Sensor](devices/temperature_sensor.html) - [x] [Motion Sensor](devices/motion_sensor.html) - [x] [Contact Sensor](devices/contact_sensor.html) diff --git a/pages/troubleshooting.md b/pages/troubleshooting.md new file mode 100644 index 0000000..e2d37eb --- /dev/null +++ b/pages/troubleshooting.md @@ -0,0 +1,128 @@ +--- +title: Troubleshooting +weight: 4 +lang: en +--- + +### Troubleshooting tips + +### Connection is unstable (Device cycles between "online" and "offline" on SinricPro dashboard) + +In ESP32 / ESP8266, adding a delay() (or long blocking code) directly affects Wi-Fi performance and stability, because of how the Wi-Fi stack works. So short delays (few ms) are usually safe. But long delays (> ~100ms) can cause Wi-Fi timeouts, missed packets, or disconnects. + +If you have any long delay(x); in the loop() function, you may need to rewrite them to use them in a non-blocking manner. + +Example (bad code): + + +```c++ +const int ledPin = 2; + +void setup() { + pinMode(ledPin, OUTPUT); +} + +void loop() { + delay(5000) //!!!!!!!!!!! DO NOT DO THIS!!!!!!!!! + digitalWrite(ledPin, !digitalRead(ledPin)); +} +``` + +Example (good code): + +```c++ +const int ledPin = 2; + +// Variables to manage timing +unsigned long previousMillis = 0; // Stores last time LED was updated +const long interval = 1000; // Interval for blinking (milliseconds) + +void setup() { + // Initialize the LED pin as an output + pinMode(ledPin, OUTPUT); +} + +void loop() { + // Get the current time + unsigned long currentMillis = millis(); + + // Check if the interval has passed + if (currentMillis - previousMillis >= interval) { + // Save the current time + previousMillis = currentMillis; + + // Toggle the LED state + digitalWrite(ledPin, !digitalRead(ledPin)); + } +} +``` + +### Known Issue: WiFi Instability on ESP32/ESP8266 When Using ADC Pins + +If you're developing with **ESP32** or **ESP8266** and noticing erratic WiFi behavior — such as frequent disconnects, poor signal strength, or failed connections — you might be running into a well-documented hardware quirk: **WiFi instability when analog-to-digital converter (ADC) pins are in use**. + +#### What’s Happening? + +Both the ESP32 and ESP8266 use shared internal resources for WiFi radio and ADC operations. When the ADC is actively sampling (especially at high frequency or with continuous reads), it can interfere with the RF circuitry responsible for WiFi communication. This results in: + +- Dropped WiFi connections +- Increased latency or packet loss +- Difficulty maintaining association with access points +- In extreme cases, complete WiFi failure until reboot + +This issue is particularly noticeable when: + +- Reading analog sensors (e.g., potentiometers, LDRs, analog joysticks) in tight loops +- Using `analogRead()` frequently without delays +- Sampling at high resolution or rate on ESP32’s ADC + +#### Workarounds & Best Practices + +1. **Add Delays Between ADC Reads** + Avoid continuous polling. Introduce small delays (e.g., `delay(10)` or `vTaskDelay()`) between analog reads to give the WiFi stack breathing room. + + ```cpp + int sensorValue = analogRead(A0); + delay(10); // Let WiFi recover + +## Cannot connect to SinricPro + +* Try starting a hotspot from your mobile phone and then connect your ESP to SinricPro via the hotspot. If you can connect to SinricPro via the hotspot, then the problem is with your WiFi network. + +* Try switching to a different WiFi network if possible. + +* Always start by trying our example sketches, changing only the credentials. They have been thoroughly tested and are known to work correctly. + +#### Logging + +##### SinricPro SDK Logging + +* Enable logging and check for errors, and disconnections. To enable logs Sinric Pro SDK logs, add ``#define ENABLE_DEBUG`` to top of the sketch. + +##### ESP8266/ESP32 Core Logging + + * To enable ESP8266 logs, in Arduinio IDE: + + 1. `Tools -> Debug Serial Port -> Serial` + + 2. `Tools -> Debug Level -> SSL + HTTP_CLIENT` + + * To enable ESP32 logs, in Arduinio IDE: + + 1. `Tools -> Core Debug Level -> Verbose` + +#### Memory Limitation + +* Sometimes, due to memory limitations, the ESP chip may fail while trying to establish the SSL connection to the SinricPro server. In this case, you can try disabling the SSL feature by adding `#define SINRICPRO_NOSSL` to the **top of the sketch (before #include "SinricPro.h")**: + + ```c++ + #define SINRICPRO_NOSSL + #include "SinricPro.h" + ... + ``` + + + +* If none of above works for you, check for existing [issues](https://github.com/sinricpro/esp8266-esp32-sdk/issues) in GitHub repo or open a [new one](https://github.com/sinricpro/esp8266-esp32-sdk/issues/new) + +* Join the SinricPro on Discord : https://discord.gg/CqjBrkM6 diff --git a/pages/troubleshooting.pt.md b/pages/troubleshooting.pt.md new file mode 100644 index 0000000..5b00368 --- /dev/null +++ b/pages/troubleshooting.pt.md @@ -0,0 +1,38 @@ +--- +title: Solução de Problemas +weight: 4 +lang: pt +youtubeId: H-iftzWVTXE +youtubeId2: HEMifE1Xm7E +--- + +### Dicas de solução de problemas + +* Sempre comece tentando nossos sketches de exemplo, alterando apenas as credenciais. Eles foram totalmente testados e funcionam corretamente. + +* Há um problema conhecido no ESP32 e ESP8266 onde o WiFi fica instável quando ADC é usado. + +* Habilite o logging e verifique erros e desconexões. Para habilitar logs do Sinric Pro SDK, adicione ``#define ENABLE_DEBUG`` no topo do sketch. + + * Para habilitar logs do ESP8266, no Arduino IDE: + + 1. `Tools -> Debug Serial Port -> Serial` + + 2. `Tools -> Debug Level -> SSL + HTTP_CLIENT` + + * Para habilitar logs do ESP32, no Arduino IDE: + + 1. `Tools -> Core Debug Level -> Verbose` + + +* Tente criar um hotspot do seu telefone móvel e conecte seu ESP ao SinricPro via hotspot. Se conseguir conectar ao SinricPro via hotspot, então o problema está com sua rede WiFi. + +* Tente mudar para uma rede WiFi diferente, se possível. + +* Às vezes, devido a limitações de memória, o chip ESP pode falhar ao tentar estabelecer a conexão SSL com o servidor SinricPro. Neste caso, você pode tentar desabilitar o recurso SSL adicionando a seguinte linha no **topo do sketch**: + + ```#define SINRICPRO_NOSSL``` + +* Se você tiver algum delay(x); longo na função loop(), você pode precisar removê-los. + +* Se nenhuma das opções acima funcionar para você, verifique [issues existentes](https://github.com/sinricpro/esp8266-esp32-sdk/issues) no repositório GitHub ou abra uma [nova](https://github.com/sinricpro/esp8266-esp32-sdk/issues/new) \ No newline at end of file diff --git a/pages/tutorials/air-quality-sensors/mq135.md b/pages/tutorials/air-quality-sensors/mq135.md new file mode 100644 index 0000000..6948f21 --- /dev/null +++ b/pages/tutorials/air-quality-sensors/mq135.md @@ -0,0 +1,183 @@ +--- +title: Build an Air Quality Sensor with a MQ135 Sensor to detect smoke and other harmful gas for Alexa +layout: post +--- + +In this section, we will walk you through creating an air quality sensor using **ESP32** or **ESP8266**. You will then be able to view the air quality via **Amazon Alexa** and **receive a push notification via the Sinric Pro** app when the air quality drops below a certain threshold level. + +### Prerequisites : + +1. ESP32, ESP8266 x 1. +2. MQ135 x 1. +3. Jumper Wires. + +![Sinric Pro MQ135 air quality]({{ site.github.url }}/public/img/sinricpro-air-quality-intro.png) + +### Quick introduction to MQ135 + +The MQ135 is a semiconductor gas sensor that is commonly used in air quality control equipment. It is sensitive to a wide range of gases, including ammonia, sulfide, benzene, and smoke. The sensor has two outputs: a digital output that goes high when the gas concentration exceeds a certain threshold, and an analog output that provides a voltage proportional to the gas concentration. + +The MQ135 sensor requires a power supply of 5V and consumes about 150mA of current. The digital output can be connected to a ESP32, ESP8266 or Pico W to measure the gas concentration. + +**How to calibrate the sensor ?** +Put your sensor outside where there is enough fresh air (ideally at 20°C & 33% humidity according to the datasheet) and leave it powered on for 12-24 hours to burn it in and stabilize. + +Specification sheet: [SNS-MQ135](https://www.olimex.com/Products/Components/Sensors/Gas/SNS-MQ135/resources/SNS-MQ135.pdf) + +### Wiring + +![Sinric Pro esp8266 PIR wiring]({{ site.github.url }}/public/img/sinricpro_mq135-wiring-diagram.png) + + +| MCU | A0 Pin | VCC Pin | +| --------- | ------- | ------- | +| ESP32 | 34 (Analog ADC1_CH6) | 5V | +| ESP8266 | A0 | 5V/VIN | +| Pico W | GP26 (ADC0) | 5V | + + + +**Note:** on ESP32, ADC2 (GPIO04, GPIO02, GPIO15) is unstable when Wi-Fi is being used. + +Let's verify that motion sensor is wired correctly and working. + + + +Arduino IDE Serial Monitor will show the motion detections like this: + +![Sinric Pro mq135 test reading]({{ site.github.url }}/public/img/sinricpro_mq135-test-reading.png) + +### Detecting poor Air Quality + + + + +### Step 1 : Connect to Sinric Pro + +#### Step 1.1 : Creating a custom device type for Air Quality Sensor. + +Sinric Pro does not have a built-in device type for Air Quality Sensor with PPM so we are going to create a custom device type for Water Sensor using Device Template feature to achieve. + +1. PPM Value + +2. Air Quality Is Severe, Very Poor, Poor, Moderate or Good. + +**Note**: You can use the device template import feature mentioned below to skip creating the full template. + +* [Login](https://portal.sinric.pro/devicetemplates/new) to your Sinric Pro account and goto **Device Templates** + +* Click **Add Device Template**. Enter name and description as **Air Quality Sensor** and select **Air Quality Sensor** as device type + +![Sinric Pro air quality ensor device template]({{ site.github.url }}/public/img/sinricpro-air-quality-sensor-device-template-basic-info.png) + +* Click **Capabilities**. + +Here we must select the features of our Air Quality Sensor. We want to know whether *Air Quality* is *Severe, Very Poor, Poor, Moderate or Good*. So let's drag a **Range**, a **Mode** and **Push Notification** capability. + +![Sinric Pro custom device type for capacitive soil moisture sensor]({{ site.github.url }}/public/img/capacitive-air-quality-set-template-drop-range-mode.png) + +- What's Range capability? + + Range capability can be use to represents a number. eg: current speed of a blender. + +- What's Mode capability? + + Mode capability can be use to represents a value out of list of predefined values. eg: current wash cycle mode of a washing machine. + +- What's Push Notification capability? + + Notification capability provides the ability to send a push notification message from the code. + +Click on **Configure** button and setup the two capabilities like below. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-air-quality-device-template-range-and-mode.png) + +Click on **Save** to save. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-air-quality-sensor-template-range-and-mode-configured.png) + +Click on **Save** to save the template. + +Now you can see the template we just created. + + +## Import an existing template? + +If you are feeling lazy setup all the Modes and Range values, you can use the import feature. + +![Sinric Pro capacitive soil moisture sensor import template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Paste this Template: + + + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). + +* Enter the device name **Air Quality Sensor**, description **Air Quality Sensor** and select the device type as **Air Quality Sensor** from **Your Device Templates**. + + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-air-quality-sensor-new-device-select-template.png) + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-air-quality-sensor-device-new-device-info.png) + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +* Click on **Code Generator** to Generate the code. Click on **Download** to download the code. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-code-download.png) + + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### Step 2.2 Install TroykaMQ + +TroykaMQ is not available in Arduino Library Manager. So you must download it from [https://github.com/amperka/TroykaMQ](https://github.com/amperka/TroykaMQ) and copy it over to `C:\Users\\Documents\Arduino\libraries` + +#### 2.2 Complete Code + + + +Now you should be able to see the air quality status and water level via Alexa, Sinric Pro App + +Alexa, What's the air quality (mode name) in air quality sensor(device name) + +Alexa, What's the ppm (range name) in air quality sensor(device name) + + +![Sinric Pro Alexa capacitive soil moisture sensor]({{ site.github.url }}/public/img/sinricpro-air-quality-sensor-alexa.jpg) + +![Sinric Pro Alexa capacitive soil moisture sensor portal]({{ site.github.url }}/public/img/sinricpro-air-quality-device-portal.png) + +### Step 3 : Voice Announcements! + +✅ How it works: + +1️⃣ Add a Switch in SinricPro (your secret trigger!) + +2️⃣ Create an Alexa Routine that speaks your message when a "Air quality is bad!" when Switch turned on + +3️⃣ Send a power state event to turn ON that switch from your code + +``` +void triggerVoiceAnnouncement() { + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + mySwitch.sendPowerStateEvent(true); +} +``` + +### Troubleshooting +1. Google Home or SmartThings are not Supported. + +2. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/air-quality-sensors/mq135.pt.md b/pages/tutorials/air-quality-sensors/mq135.pt.md new file mode 100644 index 0000000..ae6b322 --- /dev/null +++ b/pages/tutorials/air-quality-sensors/mq135.pt.md @@ -0,0 +1,168 @@ +--- +title: Construa um Sensor de Qualidade do Ar com Sensor MQ135 para detectar fumaça e outros gases nocivos para Alexa +layout: post +lang: pt +--- + +Nesta seção, vamos orientá-lo na criação de um sensor de qualidade do ar usando **ESP32** ou **ESP8266**. Você então poderá visualizar a qualidade do ar via **Amazon Alexa** e **receber uma notificação push via aplicativo Sinric Pro** quando a qualidade do ar ficar abaixo de um certo nível limite. + +### Pré-requisitos: + +1. ESP32, ESP8266 x 1. +2. MQ135 x 1. +3. Cabos Jumper. + +![Sinric Pro MQ135 air quality]({{ site.github.url }}/public/img/sinricpro-air-quality-intro.png) + +### Introdução rápida ao MQ135 + +O MQ135 é um sensor de gás semicondutor que é comumente usado em equipamentos de controle de qualidade do ar. É sensível a uma ampla gama de gases, incluindo amônia, sulfeto, benzeno e fumaça. O sensor tem duas saídas: uma saída digital que fica alta quando a concentração de gás excede um certo limite, e uma saída analógica que fornece uma tensão proporcional à concentração de gás. + +O sensor MQ135 requer uma fonte de alimentação de 5V e consome cerca de 150mA de corrente. A saída digital pode ser conectada a um ESP32, ESP8266 ou Pico W para medir a concentração de gás. + +**Como calibrar o sensor?** +Coloque seu sensor do lado de fora onde há ar fresco suficiente (idealmente a 20°C e 33% de umidade de acordo com a folha de dados) e deixe-o ligado por 12-24 horas para queimá-lo e estabilizar. + +Folha de especificação: [SNS-MQ135](https://www.olimex.com/Products/Components/Sensors/Gas/SNS-MQ135/resources/SNS-MQ135.pdf) + +### Fiação + +![Sinric Pro esp8266 PIR wiring]({{ site.github.url }}/public/img/sinricpro_mq135-wiring-diagram.png) + + +| MCU | Pino A0 | Pino VCC | +| --------- | ------- | ------- | +| ESP32 | 34 (Analog ADC1_CH6) | 5V | +| ESP8266 | A0 | 5V/VIN | +| Pico W | GP26 (ADC0) | 5V | + + + +**Nota:** no ESP32, ADC2 (GPIO04, GPIO02, GPIO15) é instável quando Wi-Fi está sendo usado. + +Vamos verificar se o sensor de movimento está conectado corretamente e funcionando. + + + +O Monitor Serial do Arduino IDE mostrará as detecções de movimento assim: + +![Sinric Pro mq135 test reading]({{ site.github.url }}/public/img/sinricpro_mq135-test-reading.png) + +### Detectando Qualidade do Ar Ruim + + + + +### Passo 1: Conectar ao Sinric Pro + +#### Passo 1.1: Criando um tipo de dispositivo personalizado para Sensor de Qualidade do Ar. + +Sinric Pro não tem um tipo de dispositivo integrado para Sensor de Qualidade do Ar com PPM, então vamos criar um tipo de dispositivo personalizado para Sensor de Água usando o recurso Device Template para conseguir. + +1. Valor PPM + +2. Qualidade do Ar é Severa, Muito Ruim, Ruim, Moderada ou Boa. + +**Nota**: Você pode usar o recurso de importação de template de dispositivo mencionado abaixo para pular a criação do template completo. + +* [Faça login](https://portal.sinric.pro/devicetemplates/new) na sua conta Sinric Pro e vá para **Device Templates** + +* Clique em **Add Device Template**. Digite nome e descrição como **Air Quality Sensor** e selecione **Air Quality Sensor** como tipo de dispositivo + +![Sinric Pro air quality ensor device template]({{ site.github.url }}/public/img/sinricpro-air-quality-sensor-device-template-basic-info.png) + +* Clique em **Capabilities**. + +Aqui devemos selecionar as características do nosso Sensor de Qualidade do Ar. Queremos saber se a *Qualidade do Ar* é *Severa, Muito Ruim, Ruim, Moderada ou Boa*. Então vamos arrastar uma capacidade **Range**, **Mode** e **Push Notification**. + +![Sinric Pro custom device type for capacitive soil moisture sensor]({{ site.github.url }}/public/img/capacitive-air-quality-set-template-drop-range-mode.png) + +- O que é capacidade Range? + + A capacidade Range pode ser usada para representar um número. ex: velocidade atual de um liquidificador. + +- O que é capacidade Mode? + + A capacidade Mode pode ser usada para representar um valor de uma lista de valores predefinidos. ex: modo de ciclo de lavagem atual de uma máquina de lavar. + +- O que é capacidade Push Notification? + + A capacidade Notification fornece a habilidade de enviar uma mensagem de notificação push do código. + +Clique no botão **Configure** e configure as duas capacidades como abaixo. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-air-quality-device-template-range-and-mode.png) + +Clique em **Save** para salvar. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-air-quality-sensor-template-range-and-mode-configured.png) + +Clique em **Save** para salvar o template. + +Agora você pode ver o template que acabamos de criar. + + +## Importar um template existente? + +Se você está com preguiça de configurar todos os Modos e valores Range, você pode usar o recurso de importação. + +![Sinric Pro capacitive soil moisture sensor import template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Cole este Template: + + + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). + +* Digite o nome do dispositivo **Sensor de Qualidade do Ar**, descrição **Sensor de Qualidade do Ar** e selecione o tipo de dispositivo como **Air Quality Sensor** de **Your Device Templates**. + + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-air-quality-sensor-new-device-select-template.png) + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-air-quality-sensor-device-new-device-info.png) + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +* Clique em **Code Generator** para Gerar o código. Clique em **Download** para baixar o código. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-code-download.png) + + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### Passo 2.2 Instalar TroykaMQ + +TroykaMQ não está disponível no Arduino Library Manager. Então você deve baixá-lo de [https://github.com/amperka/TroykaMQ](https://github.com/amperka/TroykaMQ) e copiá-lo para `C:\Users\\Documents\Arduino\libraries` + +#### 2.2 Código Completo + + + +Agora você deve conseguir ver o status de inundação e nível de água via Alexa, App Sinric Pro + +Alexa, Qual é a qualidade do ar (nome do modo) no sensor de qualidade do ar(nome do dispositivo) + +Alexa, Qual é o ppm (nome do range) no sensor de qualidade do ar(nome do dispositivo) + + +![Sinric Pro Alexa capacitive soil moisture sensor]({{ site.github.url }}/public/img/sinricpro-air-quality-sensor-alexa.jpg) + +![Sinric Pro Alexa capacitive soil moisture sensor portal]({{ site.github.url }}/public/img/sinricpro-air-quality-device-portal.png) + + +### Solução de Problemas +1. Google Home ou SmartThings não são suportados. + +2. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/camera/raspberrypi-webrtc-alexa-googlehome-camera.md b/pages/tutorials/camera/raspberrypi-webrtc-alexa-googlehome-camera.md new file mode 100644 index 0000000..59bf2e6 --- /dev/null +++ b/pages/tutorials/camera/raspberrypi-webrtc-alexa-googlehome-camera.md @@ -0,0 +1,197 @@ +--- +title: RaspberryPI WebRTC Camera for Alexa, Google Home +layout: post +--- + + +In this section, we will show you how to create a Sinric Pro Camera and view the camera feed on + +* Alexa Echo Show +* Alexa App +* Google Nest Smart Display, and Chromecast with Google TV devices. +* Sinric Pro App and Portal. + +### Prerequisites : + +1. Raspberry Pi x 1 (bullseye or newer). +2. Camera controller x 1. + +![Sinric Pro webrtc camera intro]({{ site.github.url }}/public/img/sinricpro_pi_webrtc_camera_intro.png) + + +### What is WebRTC? + +WebRTC (Web Real-Time Communication) is a technology that enables real-time audio and video communication over the internet without the need for plugins or downloads. It is supported by all major browsers, apps and Smart Home devices like Amazon Eco Show, Chrome Cast, Google Nest making it a powerful tool for building real-time communication applications. WebRTC works by using peer-to-peer communication to transmit audio and video data. This means that the **video/audio is transmitted directly between the two devices involved in the communication, without going through Sinric Pro server**. This reduces latency and improves performance, especially for applications that are used over long distances. + + +### How does Alexa, Google Home WebRTC work with Sinric Pro ? + + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro_pi_webrtc_camera_with_alexa_googlehome_sequnce_diagram.png) + + + +### Step 1: Setup Raspberry Pi with the Camera Module + +For instructions on setting up Raspberry Pi with the camera module, please see the excellent article from the Raspberry Pi Foundation [here](https://projects.raspberrypi.org/en/projects/getting-started-with-picamera) + + +### Step 2: Setup MediaMTX (formerly rtsp-simple-server) to stream Pi Camera. + +[MediaMTX](https://github.com/bluenviron/mediamtx) is a real-time media server that lets you stream video and audio over the network. It supports many streaming protocols, including RTSP, HLS, SRT, WebRTC, and RTMP. Because it supports the Raspberry Pi Camera natively, we can easily stream the Pi camera video over WebRTC using MediaMTX. + +Let's setup MediaMTX. + +For arm64 Raspberry Pi: + +```shell +pi@pi3:~/Desktop/tutorial $ wget https://github.com/bluenviron/mediamtx/releases/download/v0.23.3/mediamtx_v0.23.3_linux_amd64.tar.gz +pi@pi3:~/Desktop/tutorial $ tar -xzvf mediamtx_v0.23.3_linux_amd64.tar.gz +pi@pi3:~/Desktop/tutorial $ rm mediamtx_v0.23.3_linux_amd64.tar.gz +``` + +For arm64v8 Raspberry Pi: + +```shell +pi@pi3:~/Desktop/tutorial $ wget https://github.com/bluenviron/mediamtx/releases/download/v0.23.3/mediamtx_v0.23.3_linux_arm64v8.tar.gz +pi@pi3:~/Desktop/tutorial $ tar -xzvf mediamtx_v0.23.3_linux_arm64v8.tar.gz +pi@pi3:~/Desktop/tutorial $ rm mediamtx_v0.23.3_linux_arm64v8.tar.gz +``` + +Once you extract you will see 3 files. ``mediamtx`` ``mediamtx.yml`` ``license`` + +```shell +pi@pi3:~/Desktop/tutorial $ ls -l +total 36544 +-rw-r--r-- 1 pi pi 1062 May 24 16:07 LICENSE +-rwxr-xr-x 1 pi pi 24859649 May 24 16:15 mediamtx +-rw-r--r-- 1 pi pi 19171 Sep 22 12:34 mediamtx.yml +``` + + +Edit ``mediamtx.yml`` to enable RaspberryPi Camera: + +```yml +paths: + cam: + source: rpiCamera +``` + +Save ``mediamtx.yml`` and close. + +![Sinric Alexa Camera mediamtx config]({{ site.github.url }}/public/img/sinricpro_pi_camera_mediamtx_config.png) + +Start ``MediaMTX`` with: ``./mediamtx mediamtx.yml`` + +```shell +pi@pi3:~/Desktop/tutorial $ ./mediamtx mediamtx.yml + +2023/09/22 12:34:58 INF MediaMTX / rtsp-simple-server v0.23.3 +2023/09/22 12:34:58 INF [path cam] [rpicamera source] started +2023/09/22 12:34:58 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP) +2023/09/22 12:34:58 INF [RTMP] listener opened on :1935 +2023/09/22 12:34:58 INF [HLS] listener opened on :8888 +2023/09/22 12:34:58 INF [WebRTC] listener opened on :8889 (HTTP) +[0:26:13.822982709] [1457] INFO Camera camera_manager.cpp:299 libcamera v0.0.4+22-923f5d70 +[0:26:13.887593667] [1458] INFO RPI raspberrypi.cpp:1476 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media2 and ISP device /dev/media0 +[0:26:13.889176990] [1457] INFO Camera camera.cpp:1028 configuring streams: (0) 1920x1080-YUV420 +[0:26:13.889745371] [1458] INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 1920x1080-SGBRG10_1X10 - Selected unicam format: 1920x1080-pGAA +2023/09/22 12:34:59 INF [path cam] [rpicamera source] ready: 1 track (H264) + +``` + +The resulting RaspberryPI camera stream will be available in path http://hostname:8889/cam/. Please check whether you can access the camera. eg: +``http://pi3:8889/cam/`` + + + +### Step 3: Sinric Pro Integration. + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Front Camera**, description **My First Camera** and select the device type as **Camera**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro_pi_camera_create_camera_device.png) + +* Click **Other** tab + +![Sinric Pro webrtc camera]({{ site.github.url }}/public/img/sinricpro_pi_camera_create_camera_other_webrtc.png) + +Select **RaspPi or Other** and select **WebRTC** as protocol + +* Click Others and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinricpro_pi_camera_create_camera_ready_to_connect.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 4: Coding + +You can use the ``Python`` or ``NodeJS`` SDK to handle the SDP offer/answer requests between Alexa/Google Home and MediaMTX. + +Install our PythonSDK: + ``pip install sinricpro --user`` + + + +Install our NodeJS: + ``npm install sinricpro`` + + + + +### Step 5: Demo + +1. Ask Alexa or Google Home to discover new devices. +2. Alexa: Alexa, show me the **Font Camera** +3. Google Home: Show me the **Font Camera** on Working Room TV (name of your Chromecast with Google TV) + +Alexa Show Echo: + + + +Portal: + + +Google Home Chromecast with Google TV: + +![Sinric Pro WebRTC Camera Google Home Chromecast with Google TV ]({{ site.github.url }}/public/img/sinricpro_pi_webrtc_google_home_camera.jpg) + + +Alexa App: + +![Sinric Pro WebRTC camera with Alexa app ]({{ site.github.url }}/public/img/sinricpro_pi_webrtc_alexa_app_camera.jpg) + + +Sinric Pro App: + + + + +### Troubleshooting +1. Google Home App Public beta camera preview does not work correctly. + +2. Google Home WebRTC is currently supported on the Google Nest Smart Display and Chromecast with Google TV devices. + +3. You can use Google WebRTC Tool to validate the payload. [https://smarthome-webrtc-validator.withgoogle.com/](https://smarthome-webrtc-validator.withgoogle.com/) + +4. Camera does not work ? + +Make sure it's wired correctly. + +![Sinric Pro Pi camera how to connect]({{ site.github.url }}/public/img/sinricpro_pi_webrtc_camera_how_to_connect.png) + + + +Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for possible solutions to your issue. + + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/camera/raspberrypi-webrtc-alexa-googlehome-camera.pt.md b/pages/tutorials/camera/raspberrypi-webrtc-alexa-googlehome-camera.pt.md new file mode 100644 index 0000000..49c6a27 --- /dev/null +++ b/pages/tutorials/camera/raspberrypi-webrtc-alexa-googlehome-camera.pt.md @@ -0,0 +1,198 @@ +--- +title: Câmera WebRTC RaspberryPI para Alexa, Google Home +layout: post +lang: pt +--- + + +Nesta seção, vamos mostrar como criar uma Câmera Sinric Pro e visualizar o feed da câmera em + +* Alexa Echo Show +* App Alexa +* Google Nest Smart Display e dispositivos Chromecast com Google TV. +* App e Portal Sinric Pro. + +### Pré-requisitos: + +1. Raspberry Pi x 1 (bullseye ou mais recente). +2. Controlador de câmera x 1. + +![Sinric Pro webrtc camera intro]({{ site.github.url }}/public/img/sinricpro_pi_webrtc_camera_intro.png) + + +### O que é WebRTC? + +WebRTC (Web Real-Time Communication) é uma tecnologia que permite comunicação de áudio e vídeo em tempo real pela internet sem a necessidade de plugins ou downloads. É suportado por todos os principais navegadores, aplicativos e dispositivos Smart Home como Amazon Echo Show, Chrome Cast, Google Nest, tornando-se uma ferramenta poderosa para construir aplicações de comunicação em tempo real. WebRTC funciona usando comunicação peer-to-peer para transmitir dados de áudio e vídeo. Isso significa que o **vídeo/áudio é transmitido diretamente entre os dois dispositivos envolvidos na comunicação, sem passar pelo servidor Sinric Pro**. Isso reduz a latência e melhora o desempenho, especialmente para aplicações que são usadas em longas distâncias. + + +### Como o WebRTC da Alexa e Google Home funciona com Sinric Pro? + + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro_pi_webrtc_camera_with_alexa_googlehome_sequnce_diagram.png) + + + +### Passo 1: Configurar Raspberry Pi com o Módulo de Câmera + +Para instruções sobre como configurar o Raspberry Pi com o módulo de câmera, consulte o excelente artigo da Raspberry Pi Foundation [aqui](https://projects.raspberrypi.org/en/projects/getting-started-with-picamera) + + +### Passo 2: Configurar MediaMTX (anteriormente rtsp-simple-server) para transmitir Pi Camera. + +[MediaMTX](https://github.com/bluenviron/mediamtx) é um servidor de mídia em tempo real que permite transmitir vídeo e áudio pela rede. Ele suporta muitos protocolos de streaming, incluindo RTSP, HLS, SRT, WebRTC e RTMP. Porque ele suporta a Câmera Raspberry Pi nativamente, podemos facilmente transmitir o vídeo da câmera Pi via WebRTC usando MediaMTX. + +Vamos configurar o MediaMTX. + +Para Raspberry Pi arm64: + +```shell +pi@pi3:~/Desktop/tutorial $ wget https://github.com/bluenviron/mediamtx/releases/download/v0.23.3/mediamtx_v0.23.3_linux_amd64.tar.gz +pi@pi3:~/Desktop/tutorial $ tar -xzvf mediamtx_v0.23.3_linux_amd64.tar.gz +pi@pi3:~/Desktop/tutorial $ rm mediamtx_v0.23.3_linux_amd64.tar.gz +``` + +Para Raspberry Pi arm64v8: + +```shell +pi@pi3:~/Desktop/tutorial $ wget https://github.com/bluenviron/mediamtx/releases/download/v0.23.3/mediamtx_v0.23.3_linux_arm64v8.tar.gz +pi@pi3:~/Desktop/tutorial $ tar -xzvf mediamtx_v0.23.3_linux_arm64v8.tar.gz +pi@pi3:~/Desktop/tutorial $ rm mediamtx_v0.23.3_linux_arm64v8.tar.gz +``` + +Uma vez extraído, você verá 3 arquivos. ``mediamtx`` ``mediamtx.yml`` ``license`` + +```shell +pi@pi3:~/Desktop/tutorial $ ls -l +total 36544 +-rw-r--r-- 1 pi pi 1062 May 24 16:07 LICENSE +-rwxr-xr-x 1 pi pi 24859649 May 24 16:15 mediamtx +-rw-r--r-- 1 pi pi 19171 Sep 22 12:34 mediamtx.yml +``` + + +Edite ``mediamtx.yml`` para habilitar a Câmera RaspberryPi: + +```yml +paths: + cam: + source: rpiCamera +``` + +Salve ``mediamtx.yml`` e feche. + +![Sinric Alexa Camera mediamtx config]({{ site.github.url }}/public/img/sinricpro_pi_camera_mediamtx_config.png) + +Inicie ``MediaMTX`` com: ``./mediamtx mediamtx.yml`` + +```shell +pi@pi3:~/Desktop/tutorial $ ./mediamtx mediamtx.yml + +2023/09/22 12:34:58 INF MediaMTX / rtsp-simple-server v0.23.3 +2023/09/22 12:34:58 INF [path cam] [rpicamera source] started +2023/09/22 12:34:58 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP) +2023/09/22 12:34:58 INF [RTMP] listener opened on :1935 +2023/09/22 12:34:58 INF [HLS] listener opened on :8888 +2023/09/22 12:34:58 INF [WebRTC] listener opened on :8889 (HTTP) +[0:26:13.822982709] [1457] INFO Camera camera_manager.cpp:299 libcamera v0.0.4+22-923f5d70 +[0:26:13.887593667] [1458] INFO RPI raspberrypi.cpp:1476 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media2 and ISP device /dev/media0 +[0:26:13.889176990] [1457] INFO Camera camera.cpp:1028 configuring streams: (0) 1920x1080-YUV420 +[0:26:13.889745371] [1458] INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 1920x1080-SGBRG10_1X10 - Selected unicam format: 1920x1080-pGAA +2023/09/22 12:34:59 INF [path cam] [rpicamera source] ready: 1 track (H264) + +``` + +O stream da câmera RaspberryPI resultante estará disponível no caminho http://hostname:8889/cam/. Verifique se você pode acessar a câmera. ex: +``http://pi3:8889/cam/`` + + + +### Passo 3: Integração Sinric Pro. + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Câmera Frontal**, descrição **Minha Primeira Câmera** e selecione o tipo de dispositivo como **Camera**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro_pi_camera_create_camera_device.png) + +* Clique na aba **Other** + +![Sinric Pro webrtc camera]({{ site.github.url }}/public/img/sinricpro_pi_camera_create_camera_other_webrtc.png) + +Selecione **RaspPi or Other** e selecione **WebRTC** como protocolo + +* Clique em Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinricpro_pi_camera_create_camera_ready_to_connect.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 4: Programação + +Você pode usar o SDK ``Python`` ou ``NodeJS`` para lidar com as solicitações de oferta/resposta SDP entre Alexa/Google Home e MediaMTX. + +Instale nosso PythonSDK: + ``pip install sinricpro --user`` + + + +Instale nosso NodeJS: + ``npm install sinricpro`` + + + + +### Passo 5: Demo + +1. Peça à Alexa ou Google Home para descobrir novos dispositivos. +2. Alexa: Alexa, mostre-me a **Câmera Frontal** +3. Google Home: Mostre-me a **Câmera Frontal** na TV da Sala de Trabalho (nome do seu Chromecast com Google TV) + +Alexa Show Echo: + + + +Portal: + + +Google Home Chromecast com Google TV: + +![Sinric Pro WebRTC Camera Google Home Chromecast with Google TV ]({{ site.github.url }}/public/img/sinricpro_pi_webrtc_google_home_camera.jpg) + + +App Alexa: + +![Sinric Pro WebRTC camera with Alexa app ]({{ site.github.url }}/public/img/sinricpro_pi_webrtc_alexa_app_camera.jpg) + + +App Sinric Pro: + + + + +### Solução de Problemas +1. A visualização da câmera do beta público do App Google Home não funciona corretamente. + +2. WebRTC do Google Home é atualmente suportado no Google Nest Smart Display e dispositivos Chromecast com Google TV. + +3. Você pode usar a Ferramenta WebRTC do Google para validar o payload. [https://smarthome-webrtc-validator.withgoogle.com/](https://smarthome-webrtc-validator.withgoogle.com/) + +4. Câmera não funciona? + +Certifique-se de que está conectada corretamente. + +![Sinric Pro Pi camera how to connect]({{ site.github.url }}/public/img/sinricpro_pi_webrtc_camera_how_to_connect.png) + + + +Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para possíveis soluções para seu problema. + + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/contact-sensors/contact.md b/pages/tutorials/contact-sensors/contact.md new file mode 100644 index 0000000..294b401 --- /dev/null +++ b/pages/tutorials/contact-sensors/contact.md @@ -0,0 +1,104 @@ +--- +title: Contact Sensor (MC-38) Tutorial for ESP8266, ESP32, Raspberry Pi Pico W +layout: post +--- + +In this section, we will show you how to create a contact sensor (also known as a door sensor, entry sensor, or window sensor) using an **ESP32**, **ESP8266** or **Raspberry Pi Pico W**, and then view the open/close state in Alexa, Google Home, SmartThings, or the Sinric Pro app. + +![Sinric Pro contact sensor tutorial]({{ site.github.url }}/public/img/sinric_pro_contact_sensor_bg.jpg) + + +### Prerequisites : + +1. ESP32, ESP8266 or Raspberry Pi Pico W x 1. +2. Contact Sensor (MC-38) x 1. +3. Jumper Wires. + +### Quick introduction to Contact Sensor + +A contact sensor is a device that detects whether a door, window, or other object is open or closed. A contact sensor comprises two components – a sensor and a magnet – used to determine the status of objects such as doors or windows, whether they are open or closed. + +![Sinric Pro Contact Sensor Reed Switch Open Close]({{ site.github.url }}/public/img/sinricpro_pi_contact_sensor_open_close.png) + +The sensor is affixed to the frame of the sliding window, while the magnet is attached to the window itself. When the sliding window is shut, the magnet comes into proximity with the sensor, establishing a connection between the two components. Conversely, when the sliding window is opened, the magnet moves away from the sensor, breaking the connection between them. + +### Wiring Contact Sensor + +![Sinric Pro contact sensor wiring]({{ site.github.url }}/public/img/sinricpro_pi_contact_sensor_wiring.png) + +Note: We are using INPUT_PULLUP instead of connecting a 10kΩ resistor between the reed switch and GND. + + +| MCU | GPIO Pin | +| --------- | ------- | +| ESP32 | 19 | +| ESP8266 | 4 (D2) | +| Pico W | GP5 | + +Let's verify that contact sensor is wired correctly and working. + + + + + + +### Step 1 : Create a new Contact Sensor in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Front Door**, description **My Front Door** and select the device type as **Contact Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_contact_sensor_new_device.png) + +* Click **Next** the in the Notifications tab + +![Sinric Pro temperature sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_contact_sensor_notifications.png) + +You can enable toggles for Open, Close here to receive a push notification via the Sinric Pro app when the contact sensor state change between **Open** or **Close**. + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +You can **generate the code** using **Zero Code** feature or write it by your self. If you do not have programming experice, we recommend to use Zero Code feature in the Portal to generate the code, download and flash. + +#### 2.2 Complete Code + + + +Now you should be able to see the contact state via Alexa, Google Home, SmartThings and Sinric Pro App + +![Sinric Pro Alexa Contact Sensor]({{ site.github.url }}/public/img/sinric_pro_contact_sensor_google_home_alexa_smartthings.jpg) + +### Step 3 : Voice Announcements! + +✅ How it works: + +1️⃣ Add a Switch in SinricPro (your secret trigger!) + +2️⃣ Create an Alexa Routine that speaks your message when a "Someone is at the door!" when Switch turned on + +3️⃣ Send a power state event to turn ON that switch from your code + +``` +void triggerVoiceAnnouncement() { + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + mySwitch.sendPowerStateEvent(true); +} +``` + +### Troubleshooting +1. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/contact-sensors/contact.pt.md b/pages/tutorials/contact-sensors/contact.pt.md new file mode 100644 index 0000000..52ea447 --- /dev/null +++ b/pages/tutorials/contact-sensors/contact.pt.md @@ -0,0 +1,107 @@ +--- +title: Tutorial de Sensor de Contato (MC-38) para ESP8266, ESP32, Raspberry Pi Pico W +layout: post +lang: pt +--- + +Nesta seção, mostraremos como criar um sensor de contato (também conhecido como sensor de porta, sensor de entrada ou sensor de janela) usando **ESP32**, **ESP8266** ou **Raspberry Pi Pico W**, e depois ver o estado aberto/fechado na Alexa, Google Home, SmartThings ou no aplicativo Sinric Pro. + +![Sinric Pro contact sensor tutorial]({{ site.github.url }}/public/img/sinric_pro_contact_sensor_bg.jpg) + +### Pré-requisitos: + +1. ESP32, ESP8266 ou Raspberry Pi Pico W x 1. +2. Sensor de Contato (MC-38) x 1. +3. Cabos jumper. + +### Introdução rápida ao Sensor de Contato + +Um sensor de contato é um dispositivo que detecta se uma porta, janela ou outro objeto está aberto ou fechado. Um sensor de contato compreende dois componentes – um sensor e um ímã – usados para determinar o status de objetos como portas ou janelas, se estão abertos ou fechados. + +![Sinric Pro Contact Sensor Reed Switch Open Close]({{ site.github.url }}/public/img/sinricpro_pi_contact_sensor_open_close.png) + +O sensor é fixado na moldura da janela deslizante, enquanto o ímã é anexado à própria janela. Quando a janela deslizante está fechada, o ímã fica próximo ao sensor, estabelecendo uma conexão entre os dois componentes. Por outro lado, quando a janela deslizante é aberta, o ímã se afasta do sensor, quebrando a conexão entre eles. + +### Conectando o Sensor de Contato + +![Sinric Pro contact sensor wiring]({{ site.github.url }}/public/img/sinricpro_pi_contact_sensor_wiring.png) + +Nota: Estamos usando INPUT_PULLUP em vez de conectar um resistor de 10kΩ entre o reed switch e GND. + +| MCU | Pino GPIO | +| --------- | ------------ | +| ESP32 | 19 | +| ESP8266 | 4 (D2) | +| Pico W | GP5 | + +Vamos verificar se o sensor de contato está conectado corretamente e funcionando. + + + + + +### Passo 1: Criar um novo Sensor de Contato no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Porta da Frente**, descrição **Minha Porta da Frente** e selecione o tipo de dispositivo como **Contact Sensor**. + +![Sinric Pro contact motion sensor new device]({{ site.github.url }}/public/img/sinric_pro_contact_motion_new_device.png) + +* Clique em **Próximo** na aba Notificações + +![Sinric Pro contact sensor notifications]({{ site.github.url }}/public/img/sinric_pro_contact_sensor_notifications.png) + +Para receber notificações push quando seu dispositivo abrir ou fechar, habilite a opção **"Abrir e Fechar"** no aplicativo Sinric Pro. + +* Clique em Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Programação + +#### 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Código Completo + + + +### Passo 3: Vincular a Skill Sinric Pro da Alexa com sua conta. + +* Abra seu aplicativo Amazon Alexa. +* Vá para Skills & Games. +* Pesquise por **Sinric Pro**. +* Clique em **ATIVAR PARA USAR**. +* Digite suas credenciais do Sinric Pro na página de vinculação. +* Peça à Alexa para descobrir novos dispositivos. +* Agora você pode perguntar à Alexa o status do **Sensor de Contato**: "Alexa, a porta da frente está aberta?" + +### Passo 4: Vincular a ação Sinric Pro do Google Home com sua conta. + +* Abra o **Google Home** e clique em **Adicionar**. +* Selecione **Configurar Dispositivo** +* Selecione **Funciona com Google Home** +* Pesquise por **Sinric Pro**. +* Vincule sua conta. +* Descubra novos dispositivos +* Agora você pode perguntar ao Google Home o status do **Sensor de Contato**: "Ok Google, a porta da frente está aberta?" + +### Passo 5: Vincular Sinric Pro SmartThings com sua conta. + +* Abra o aplicativo SmartThings e toque no ícone **+** +* Selecione Dispositivo +* Selecione Sinric Pro em **Por Marca** +* Vincule sua conta. +* Agora você pode ver o status do **Sensor de Contato** no painel + +### Solução de Problemas +Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.html) para possíveis soluções para seu problema. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/alcohol-sensor/MQ-3.md b/pages/tutorials/custom-device-types/alcohol-sensor/MQ-3.md new file mode 100644 index 0000000..516d178 --- /dev/null +++ b/pages/tutorials/custom-device-types/alcohol-sensor/MQ-3.md @@ -0,0 +1,171 @@ +--- +title: How to Build a Gas Sensor to detect alcohol, ethanol, smoke in the air using a MQ-3 using ESP32, ESP8266 or Raspberry Pi Pico W for Alexa +layout: post +--- + +In this section, we'll guide you through building an gas sensor using an **ESP32**, **Raspberry Pi Pico W** or **ESP8266**. You'll then be able to monitor the alcohol concentration in the air through **Amazon Alexa** and **receive push notifications** via the Sinric Pro app when the sensor detects a certain level. + +### Prerequisites : + +1. ESP32, ESP8266 x 1. +2. MQ-3 x 1. +3. Jumper Wires. + +![Sinric Pro MQ135 air quality]({{ site.github.url }}/public/img/sinricpro-gas-sensor-intro.jpg) + +### Quick introduction to MQ-3 + +The MQ-3 is a semiconductor gas sensor used in a variety of applications to detect alcohol concentrations in air. It is a low-cost, high-sensitivity sensor that is easy to use. The MQ-3 is based on the principle of tin dioxide (SnO2) semiconductor gas sensing. When alcohol molecules are present in the air, they are adsorbed onto the surface of the SnO2. This adsorption causes the conductivity of the SnO2 to change, which can be measured as an electrical signal. The MQ-3 is sensitive to a wide range of alcohol concentrations, from 0.05 ppm to 5000 ppm. It is also sensitive to other gases, such as ammonia, benzene, and toluene, but it is most sensitive to alcohol. + +The MQ3 sensor requires a power supply of 5V and consumes about 800mW of current. The digital output can be connected to a ESP32, ESP8266 or Pico W to measure the alcohol concentration. + +**How to calibrate the sensor ?** + +Leave it powered on for 24-48 hours to burn it in and stabilize. + +Specification sheet: [MQ-3](https://www.sparkfun.com/datasheets/Sensors/MQ-3.pdf) + +### Wiring + +![Sinric Pro esp8266 MQ-3 wiring]({{ site.github.url }}/public/img/sinricpro_mq3-wiring-diagram.png) + + +| MCU | A0 Pin | VCC Pin | +| --------- | ------- | ------- | +| ESP32 | 34 (Analog ADC1_CH6) | 5V | +| ESP8266 | A0 | 5V/VIN | +| Pico W | GP26 (ADC0) | 5V | + + + +**Note:** on ESP32, ADC2 (GPIO04, GPIO02, GPIO15) is unstable when Wi-Fi is being used. + +Let's verify that the sensor is wired correctly and working. + + + +Reading when not exposed to alcohol (around 760): + +![Sinric Pro MQ3 test reading]({{ site.github.url }}/public/img/sinricpro_mq3-test-reading.png) + +When exposed to Jack Daniel's Single Barrel Tennessee Whiskey (around 850): + +![Sinric Pro MQ3 test reading]({{ site.github.url }}/public/img/sinricpro_mq3-test-jack-daniels-reading.png) + + +### Step 1 : Connect to Sinric Pro + +#### Step 1.1 : Creating a custom device type for Gas Sensor. + +Sinric Pro does not have a built-in device type for Gas Sensor so we are going to create a custom device type for Gas Sensor using Device Template feature. + +1. Alcohol Detected/Not Detected. + +**Note**: You can use the device template import feature mentioned below to skip creating the full template. + +* [Login](https://portal.sinric.pro/devicetemplates/new) to your Sinric Pro account and goto **Device Templates** + +* Click **Add Device Template**. Enter name and description as **Gas Sensor** and select **Gas Sensor** as device type + +![Sinric Pro gas ensor device template]({{ site.github.url }}/public/img/sinricpro-gas-sensor-device-template-basic-info.png) + +* Click **Capabilities**. + +Here we must select the features of our Gas Sensor. We want to know whether *Alcohol* is *Detected, Not-Detected*. So let's drag a **Mode** and **Push Notification** capability. + +![Sinric Pro custom device type for gas sensor]({{ site.github.url }}/public/img/gas-sensor-set-template-drop-range-mode.png) + +- What's Mode capability? + + Mode capability can be use to represents a value out of list of predefined values. eg: current wash cycle mode of a washing machine. + +- What's Push Notification capability? + + Notification capability provides the ability to send a push notification message from the code. + +Click on **Configure** button and setup the two capabilities like below. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-gas-sensor-device-template-mode.png) + +Click on **Save** to save. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-gas-sensor-template-range-and-mode-configured.png) + +Click on **Save** to save the template. + +Now you can see the template we just created. + + +## Import an existing template? + +If you are feeling lazy setup all the Modes values, you can use the import feature. + +![Sinric Pro gas sensor import template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Paste this Template: + + + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). + +* Enter the device name **Gas Sensor**, description **Gas Sensor** and select the device type as **Gas Sensor** from **Your Device Templates**. + + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-gas-sensor-device-new-device-info.png) + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +* Click on **Code Generator** to Generate the code. Click on **Download** to download the code. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-code-download.png) + + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + + +#### 2.2 Complete Code + + + +Now you should be able to see the alcholol detected status and water level via Alexa, Sinric Pro App + +Alexa, What's the alcholol (mode name) in Gas Sensor (device name) + + +![Sinric Pro Alexa gas sensor]({{ site.github.url }}/public/img/sinricpro-gas-sensor-alexa.jpg) + +![Sinric Pro Portal gas sensor portal]({{ site.github.url }}/public/img/sinricpro-gas-sensor-device-portal.png) + + ### Step 3 : Voice Announcements! + +✅ How it works: + +1️⃣ Add a Switch in SinricPro (your secret trigger!) + +2️⃣ Create an Alexa Routine that speaks your message when a "Gas sensor detects gas!" when Switch turned on + +3️⃣ Send a power state event to turn ON that switch from your code + +``` +void triggerVoiceAnnouncement() { + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + mySwitch.sendPowerStateEvent(true); +} +``` + +### Troubleshooting +1. Google Home or SmartThings are not Supported. + +2. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/alcohol-sensor/MQ-3.pt.md b/pages/tutorials/custom-device-types/alcohol-sensor/MQ-3.pt.md new file mode 100644 index 0000000..30b1606 --- /dev/null +++ b/pages/tutorials/custom-device-types/alcohol-sensor/MQ-3.pt.md @@ -0,0 +1,156 @@ +--- +title: Como Construir um Sensor de Gás para detectar álcool, etanol, fumaça no ar usando MQ-3 com ESP32, ESP8266 ou Raspberry Pi Pico W para Alexa +layout: post +lang: pt +--- + +Nesta seção, vamos orientá-lo na construção de um sensor de gás usando **ESP32**, **Raspberry Pi Pico W** ou **ESP8266**. Você então poderá monitorar a concentração de álcool no ar através da **Amazon Alexa** e **receber notificações push** via aplicativo Sinric Pro quando o sensor detectar um certo nível. + +### Pré-requisitos: + +1. ESP32, ESP8266 x 1. +2. MQ-3 x 1. +3. Cabos Jumper. + +![Sinric Pro MQ135 air quality]({{ site.github.url }}/public/img/sinricpro-gas-sensor-intro.jpg) + +### Introdução rápida ao MQ-3 + +O MQ-3 é um sensor de gás semicondutor usado em uma variedade de aplicações para detectar concentrações de álcool no ar. É um sensor de baixo custo e alta sensibilidade que é fácil de usar. O MQ-3 é baseado no princípio de detecção de gás semicondutor de dióxido de estanho (SnO2). Quando moléculas de álcool estão presentes no ar, elas são adsorvidas na superfície do SnO2. Esta adsorção causa mudança na condutividade do SnO2, que pode ser medida como um sinal elétrico. O MQ-3 é sensível a uma ampla gama de concentrações de álcool, de 0,05 ppm a 5000 ppm. Também é sensível a outros gases, como amônia, benzeno e tolueno, mas é mais sensível ao álcool. + +O sensor MQ3 requer uma fonte de alimentação de 5V e consome cerca de 800mW de corrente. A saída digital pode ser conectada a um ESP32, ESP8266 ou Pico W para medir a concentração de álcool. + +**Como calibrar o sensor?** + +Deixe-o ligado por 24-48 horas para queimá-lo e estabilizar. + +Folha de especificação: [MQ-3](https://www.sparkfun.com/datasheets/Sensors/MQ-3.pdf) + +### Fiação + +![Sinric Pro esp8266 MQ-3 wiring]({{ site.github.url }}/public/img/sinricpro_mq3-wiring-diagram.png) + + +| MCU | Pino A0 | Pino VCC | +| --------- | ------- | ------- | +| ESP32 | 34 (Analog ADC1_CH6) | 5V | +| ESP8266 | A0 | 5V/VIN | +| Pico W | GP26 (ADC0) | 5V | + + + +**Nota:** no ESP32, ADC2 (GPIO04, GPIO02, GPIO15) é instável quando Wi-Fi está sendo usado. + +Vamos verificar se o sensor está conectado corretamente e funcionando. + + + +Leitura quando não exposto ao álcool (cerca de 760): + +![Sinric Pro MQ3 test reading]({{ site.github.url }}/public/img/sinricpro_mq3-test-reading.png) + +Quando exposto ao Jack Daniel's Single Barrel Tennessee Whiskey (cerca de 850): + +![Sinric Pro MQ3 test reading]({{ site.github.url }}/public/img/sinricpro_mq3-test-jack-daniels-reading.png) + + +### Passo 1: Conectar ao Sinric Pro + +#### Passo 1.1: Criando um tipo de dispositivo personalizado para Sensor de Gás. + +Sinric Pro não tem um tipo de dispositivo integrado para Sensor de Gás, então vamos criar um tipo de dispositivo personalizado para Sensor de Gás usando o recurso Device Template. + +1. Álcool Detectado/Não Detectado. + +**Nota**: Você pode usar o recurso de importação de template de dispositivo mencionado abaixo para pular a criação do template completo. + +* [Faça login](https://portal.sinric.pro/devicetemplates/new) na sua conta Sinric Pro e vá para **Device Templates** + +* Clique em **Add Device Template**. Digite nome e descrição como **Gas Sensor** e selecione **Gas Sensor** como tipo de dispositivo + +![Sinric Pro gas ensor device template]({{ site.github.url }}/public/img/sinricpro-gas-sensor-device-template-basic-info.png) + +* Clique em **Capabilities**. + +Aqui devemos selecionar as características do nosso Sensor de Gás. Queremos saber se *Álcool* é *Detectado, Não-Detectado*. Então vamos arrastar uma capacidade **Mode** e **Push Notification**. + +![Sinric Pro custom device type for gas sensor]({{ site.github.url }}/public/img/gas-sensor-set-template-drop-range-mode.png) + +- O que é capacidade Mode? + + A capacidade Mode pode ser usada para representar um valor de uma lista de valores predefinidos. ex: modo de ciclo de lavagem atual de uma máquina de lavar. + +- O que é capacidade Push Notification? + + A capacidade Notification fornece a habilidade de enviar uma mensagem de notificação push do código. + +Clique no botão **Configure** e configure as duas capacidades como abaixo. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-gas-sensor-device-template-mode.png) + +Clique em **Save** para salvar. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-gas-sensor-template-range-and-mode-configured.png) + +Clique em **Save** para salvar o template. + +Agora você pode ver o template que acabamos de criar. + + +## Importar um template existente? + +Se você está com preguiça de configurar todos os valores dos Modos, você pode usar o recurso de importação. + +![Sinric Pro gas sensor import template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Cole este Template: + + + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). + +* Digite o nome do dispositivo **Sensor de Gás**, descrição **Sensor de Gás** e selecione o tipo de dispositivo como **Gas Sensor** de **Your Device Templates**. + + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-gas-sensor-device-new-device-info.png) + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +* Clique em **Code Generator** para Gerar o código. Clique em **Download** para baixar o código. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-code-download.png) + + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + + +#### 2.2 Código Completo + + + +Agora você deve conseguir ver o status de álcool detectado e nível de água via Alexa, App Sinric Pro + +Alexa, Qual é o álcool (nome do modo) no Sensor de Gás (nome do dispositivo) + + +![Sinric Pro Alexa gas sensor]({{ site.github.url }}/public/img/sinricpro-gas-sensor-alexa.jpg) + +![Sinric Pro Portal gas sensor portal]({{ site.github.url }}/public/img/sinricpro-gas-sensor-device-portal.png) + + +### Solução de Problemas +1. Google Home ou SmartThings não são suportados. + +2. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/battery-powered-capacitive-soil-moisture-sensor/battery-powered-capacitive-soil-moisture-sensor.md b/pages/tutorials/custom-device-types/battery-powered-capacitive-soil-moisture-sensor/battery-powered-capacitive-soil-moisture-sensor.md new file mode 100644 index 0000000..44608fe --- /dev/null +++ b/pages/tutorials/custom-device-types/battery-powered-capacitive-soil-moisture-sensor/battery-powered-capacitive-soil-moisture-sensor.md @@ -0,0 +1,17 @@ +--- +title: Battery Powered Capacitive Soil Moisture Sensor for ESP8266, ESP32, Raspberry Pi Pico W +layout: post +--- + +In this part, we'll guide you on building a battery powered **Capacitive Soil Moisture Sensor** which will wake up every 15 mins and report the soil status to the server. + +Please complete the [Capacitive Soil Moisture Sensor](https://help.sinric.pro/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.html) to understand how to setup the soil moisture sensor with Sinric Pro. + + +#### Complete Code + + +### Troubleshooting +1. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/battery-powered-capacitive-soil-moisture-sensor/battery-powered-capacitive-soil-moisture-sensor.pt.md b/pages/tutorials/custom-device-types/battery-powered-capacitive-soil-moisture-sensor/battery-powered-capacitive-soil-moisture-sensor.pt.md new file mode 100644 index 0000000..df5aa40 --- /dev/null +++ b/pages/tutorials/custom-device-types/battery-powered-capacitive-soil-moisture-sensor/battery-powered-capacitive-soil-moisture-sensor.pt.md @@ -0,0 +1,18 @@ +--- +title: Sensor de Umidade do Solo Capacitivo Alimentado por Bateria para ESP8266, ESP32, Raspberry Pi Pico W +layout: post +lang: pt +--- + +Nesta parte, vamos orientá-lo na construção de um **Sensor de Umidade do Solo Capacitivo** alimentado por bateria que acordará a cada 15 minutos e reportará o status do solo para o servidor. + +Complete o [Sensor de Umidade do Solo Capacitivo]({{ site.github.url }}/pt/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.pt.html) para entender como configurar o sensor de umidade do solo com Sinric Pro. + + +#### Código Completo + + +### Solução de Problemas +1. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.md b/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.md new file mode 100644 index 0000000..2cb25d9 --- /dev/null +++ b/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.md @@ -0,0 +1,218 @@ +--- +title: How to build a Capacitive Soil Moisture Sensor (HW-390) for ESP8266, ESP32, Raspberry Pi Pico W for Alexa +layout: post +--- + +In this part, we'll guide you on building a **Capacitive Soil Moisture Sensor** that can be connected to either an **ESP32, ESP8266, or Raspberry Pi Pico W**. Once it's set up, you'll be able to check the soil moisture level using Amazon Alexa, ask Alexa for information about it, and also monitor it through the Sinric Pro app and send a **push notification when soil moisture is dry or wet**. + + +![Sinric Pro HW-390 capacitive soil moisture sensor ]({{ site.github.url }}/public/img/HW-390-capacitive-soil-moisture-sensor-intro.jpg) + +### Prerequisites : + +1. ESP32, ESP8266 or Raspberry Pi Pico W x 1. +2. Capacitive Soil Moisture Sensor (HW-390) x 1. +3. Plant with a pot x 1. +4. Jumper Wires. + +**Note:** on ESP32, ADC2 (GPIO04, GPIO02, GPIO15) is unstable when Wi-Fi is being used. + +### Quick introduction to Capacitive Soil Moisture Sensor + +Capacitive soil moisture sensors measure the electrical resistance between two probes. The resistance changes depending on the amount of water in the soil. The sensor is connected to a microcontroller (MCU), which measures the capacitance between the probes. The HW-390 circuit converts the capacitance measurement to a voltage signal (ADC), which is then sent to the MCU. The MCU can use this signal to display the soil moisture level or to control other devices. + +**Note:** Fertilizers and corrosion can reduce the accuracy of the sensor over time. + +### Wiring Capacitive Soil Moisture Sensor + +![Sinric Pro HW-390 esp8266 capacitive soil moisture sensor wiring]({{ site.github.url }}/public/img/HW-390-capacitive-soil-moisture-sensor-wiring.png) + + +| MCU | GPIO Pin | +| --------- | ------- | +| ESP32 | 34 (Analog ADC1_CH6) | +| ESP8266 | A0 | +| Pico W | GP26 (ADC0) | + +Let's verify that sensor is wired correctly and working. + +```c++ +#if defined(ESP8266) + const int adcPin = A0; +#elif defined(ESP32) + const int adcPin = 34; +#elif defined(ARDUINO_ARCH_RP2040) + const int adcPin = 26; +#endif + +void setup() { + Serial.begin(9600); + pinMode(adcPin, INPUT); +} + +void loop() { + Serial.println(analogRead(adcPin)); + delay(1000); +} +``` +![HW-390 capacitive soil moisture sensor arduino readings]({{ site.github.url }}/public/img/HW-390-capacitive-soil-moisture-sensor-test-readings.png) + +Let's convert the analog input to a precentage value. + +```c++ +#if defined(ESP8266) + const int adcPin = A0; +#elif defined(ESP32) + const int adcPin = 34; +#elif defined(ARDUINO_ARCH_RP2040) + const int adcPin = 26; +#endif + +const int DRY = 720; // TODO: This is value when soil is dry. Adjust according to your usecase +const int WET = 560; // TODO: This is value when soil is wet. Adjust according to your usecase + +void setup() { + Serial.begin(9600); + pinMode(adcPin, INPUT); +} + +void loop() { + int sensorVal = analogRead(adcPin); + int percentage = map(sensorVal, WET, DRY, 100, 0); + Serial.printf("Sensor value: %d percentage: %d%%\r\n", sensorVal, percentage); + + delay(1000); +} +``` + +![Sinric Pro moisture sensor esp8266 readings]({{ site.github.url }}/public/img/HW-390-capacitive-soil-moisture-sensor-test-readings-as-precentage.png) + + +### Step 1 : Connect to Sinric Pro + +#### Step 1.1 : Creating a custom device type for Capacitive Soil Moisture Sensor. + +Sinric Pro does not have a built-in device type for Capacitive Soil Moisture Sensor so we are going to create a custom device type for Capacitive Soil Moisture Sensor using Device Template feature to see. + +1. Soil is **Wet** or **Dry** + +2. Moisture level. + +**Note**: You can use the device template import feature mentioned below to skip creating the full template. + +* [Login](https://portal.sinric.pro/devicetemplates/new) to your Sinric Pro account and goto **Device Templates** + +* Click **Add Device Template**. Enter name and description as **Capacitive Soil Moisture Sensor** and select **Capacitive Soil Moisture Sensor** as device type + +![Sinric Pro capacitive soil moisture sensor device template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-set-template-name-desc-type.png) + +* Click **Capabilities**. + +Here we must select the features of our Soil Moisture Sensor. We want to know whether *Soil is Wet or Dry* and the *Moisture level*. So let's drag a **Range**, a **Mode** and **Push Notification** capability. + +![Sinric Pro custom device type for capacitive soil moisture sensor]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-set-template-drop-range-mode.png) + +- What's Range capability? + + Range capability can be use to represents a number. eg: current speed of a blender. + +- What's Mode capability? + + Mode capability can be use to represents a value out of list of predefined values. eg: current wash cycle mode of a washing machine. + +- What's Push Notification capability? + + Notification capability provides the ability to send a push notification message from the code. + +Click on **Configure** button and setup the two capabilities like below. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-set-template-mode-range-settings.png) + +Click on **Save** to save. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-set-template-saved-modes-range.png) + +Click on **Save** to save the template. + +![Sinric Pro moisture saved template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-saved-template.png) + +Now you can see the template we just created. + + +## Import an existing template? + +If you are feeling lazy setup all the Modes and Range values, you can use the import feature. + +![Sinric Pro capacitive soil moisture sensor import template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Paste this Template: + + + + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). + +* Enter the device name **Garden**, description **My Garden** and select the device type as **Capacitive Soil Moisture Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-save-device.png) + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +* Click on **Code Generator** to Generate the code. Click on **Download** to download the code. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-code-download.png) + + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Complete Code + + + + + +Now you should be able to see the soil moisture via Alexa, Sinric Pro App + + +Alexa, What's the moisture (mode name) in garden(device name) + +Alexa, What's the moisture level(range name) in garden(device name) + + +![Sinric Pro Alexa water sensor]({{ site.github.url }}/public/img/sinricpro-water-sensor-alexa.jpg) + +![Sinric Pro portal]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-portal.png) + +### Step 3 : Voice Announcements! + +✅ How it works: + +1️⃣ Add a Switch in SinricPro (your secret trigger!) + +2️⃣ Create an Alexa Routine that speaks your message when a "Time to water the garden!" when Switch turned on + +3️⃣ Send a power state event to turn ON that switch from your code + +``` +void triggerVoiceAnnouncement() { + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + mySwitch.sendPowerStateEvent(true); +} +``` + +### Troubleshooting +1. Google Home or SmartThings are not Supported. + +2. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.pt.md b/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.pt.md new file mode 100644 index 0000000..1fadc18 --- /dev/null +++ b/pages/tutorials/custom-device-types/capacitive-soil-moisture-sensor/HW-390.pt.md @@ -0,0 +1,203 @@ +--- +title: Como construir um Sensor de Umidade do Solo Capacitivo (HW-390) para ESP8266, ESP32, Raspberry Pi Pico W para Alexa +layout: post +lang: pt +--- + +Nesta parte, vamos orientá-lo na construção de um **Sensor de Umidade do Solo Capacitivo** que pode ser conectado a um **ESP32, ESP8266 ou Raspberry Pi Pico W**. Uma vez configurado, você poderá verificar o nível de umidade do solo usando Amazon Alexa, perguntar à Alexa sobre informações dele, e também monitorá-lo através do aplicativo Sinric Pro e enviar uma **notificação push quando a umidade do solo estiver seca ou úmida**. + + +![Sinric Pro HW-390 capacitive soil moisture sensor ]({{ site.github.url }}/public/img/HW-390-capacitive-soil-moisture-sensor-intro.jpg) + +### Pré-requisitos: + +1. ESP32, ESP8266 ou Raspberry Pi Pico W x 1. +2. Sensor de Umidade do Solo Capacitivo (HW-390) x 1. +3. Planta com vaso x 1. +4. Cabos Jumper. + +**Nota:** no ESP32, ADC2 (GPIO04, GPIO02, GPIO15) é instável quando Wi-Fi está sendo usado. + +### Introdução rápida ao Sensor de Umidade do Solo Capacitivo + +Sensores de umidade do solo capacitivos medem a resistência elétrica entre duas sondas. A resistência muda dependendo da quantidade de água no solo. O sensor é conectado a um microcontrolador (MCU), que mede a capacitância entre as sondas. O circuito HW-390 converte a medição de capacitância para um sinal de tensão (ADC), que é então enviado para o MCU. O MCU pode usar este sinal para exibir o nível de umidade do solo ou para controlar outros dispositivos. + +**Nota:** Fertilizantes e corrosão podem reduzir a precisão do sensor ao longo do tempo. + +### Fiação do Sensor de Umidade do Solo Capacitivo + +![Sinric Pro HW-390 esp8266 capacitive soil moisture sensor wiring]({{ site.github.url }}/public/img/HW-390-capacitive-soil-moisture-sensor-wiring.png) + + +| MCU | Pino GPIO | +| --------- | ------- | +| ESP32 | 34 (Analog ADC1_CH6) | +| ESP8266 | A0 | +| Pico W | GP26 (ADC0) | + +Vamos verificar se o sensor está conectado corretamente e funcionando. + +```c++ +#if defined(ESP8266) + const int adcPin = A0; +#elif defined(ESP32) + const int adcPin = 34; +#elif defined(ARDUINO_ARCH_RP2040) + const int adcPin = 26; +#endif + +void setup() { + Serial.begin(9600); + pinMode(adcPin, INPUT); +} + +void loop() { + Serial.println(analogRead(adcPin)); + delay(1000); +} +``` +![HW-390 capacitive soil moisture sensor arduino readings]({{ site.github.url }}/public/img/HW-390-capacitive-soil-moisture-sensor-test-readings.png) + +Vamos converter a entrada analógica para um valor de porcentagem. + +```c++ +#if defined(ESP8266) + const int adcPin = A0; +#elif defined(ESP32) + const int adcPin = 34; +#elif defined(ARDUINO_ARCH_RP2040) + const int adcPin = 26; +#endif + +const int DRY = 720; // TODO: Este é o valor quando o solo está seco. Ajuste de acordo com seu caso de uso +const int WET = 560; // TODO: Este é o valor quando o solo está úmido. Ajuste de acordo com seu caso de uso + +void setup() { + Serial.begin(9600); + pinMode(adcPin, INPUT); +} + +void loop() { + int sensorVal = analogRead(adcPin); + int percentage = map(sensorVal, WET, DRY, 100, 0); + Serial.printf("Valor do sensor: %d porcentagem: %d%%\r\n", sensorVal, percentage); + + delay(1000); +} +``` + +![Sinric Pro moisture sensor esp8266 readings]({{ site.github.url }}/public/img/HW-390-capacitive-soil-moisture-sensor-test-readings-as-precentage.png) + + +### Passo 1: Conectar ao Sinric Pro + +#### Passo 1.1: Criando um tipo de dispositivo personalizado para Sensor de Umidade do Solo Capacitivo. + +Sinric Pro não tem um tipo de dispositivo integrado para Sensor de Umidade do Solo Capacitivo, então vamos criar um tipo de dispositivo personalizado para Sensor de Umidade do Solo Capacitivo usando o recurso Device Template para ver. + +1. Solo está **Úmido** ou **Seco** + +2. Nível de umidade. + +**Nota**: Você pode usar o recurso de importação de template de dispositivo mencionado abaixo para pular a criação do template completo. + +* [Faça login](https://portal.sinric.pro/devicetemplates/new) na sua conta Sinric Pro e vá para **Device Templates** + +* Clique em **Add Device Template**. Digite nome e descrição como **Capacitive Soil Moisture Sensor** e selecione **Capacitive Soil Moisture Sensor** como tipo de dispositivo + +![Sinric Pro capacitive soil moisture sensor device template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-set-template-name-desc-type.png) + +* Clique em **Capabilities**. + +Aqui devemos selecionar as características do nosso Sensor de Umidade do Solo. Queremos saber se o *Solo está Úmido ou Seco* e o *Nível de umidade*. Então vamos arrastar uma capacidade **Range**, **Mode** e **Push Notification**. + +![Sinric Pro custom device type for capacitive soil moisture sensor]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-set-template-drop-range-mode.png) + +- O que é capacidade Range? + + A capacidade Range pode ser usada para representar um número. ex: velocidade atual de um liquidificador. + +- O que é capacidade Mode? + + A capacidade Mode pode ser usada para representar um valor de uma lista de valores predefinidos. ex: modo de ciclo de lavagem atual de uma máquina de lavar. + +- O que é capacidade Push Notification? + + A capacidade Notification fornece a habilidade de enviar uma mensagem de notificação push do código. + +Clique no botão **Configure** e configure as duas capacidades como abaixo. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-set-template-mode-range-settings.png) + +Clique em **Save** para salvar. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-set-template-saved-modes-range.png) + +Clique em **Save** para salvar o template. + +![Sinric Pro moisture saved template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-saved-template.png) + +Agora você pode ver o template que acabamos de criar. + + +## Importar um template existente? + +Se você está com preguiça de configurar todos os valores dos Modos e Range, você pode usar o recurso de importação. + +![Sinric Pro capacitive soil moisture sensor import template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Cole este Template: + + + + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). + +* Digite o nome do dispositivo **Jardim**, descrição **Meu Jardim** e selecione o tipo de dispositivo como **Capacitive Soil Moisture Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-save-device.png) + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +* Clique em **Code Generator** para Gerar o código. Clique em **Download** para baixar o código. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-code-download.png) + + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Código Completo + + + + + +Agora você deve conseguir ver a umidade do solo via Alexa, App Sinric Pro + + +Alexa, Qual é a umidade (nome do modo) no jardim(nome do dispositivo) + +Alexa, Qual é o nível de umidade(nome do range) no jardim(nome do dispositivo) + + +![Sinric Pro Alexa water sensor]({{ site.github.url }}/public/img/sinricpro-water-sensor-alexa.jpg) + +![Sinric Pro portal]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-portal.png) + + +### Solução de Problemas +1. Google Home ou SmartThings não são suportados. + +2. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/smart-button/push-button.md b/pages/tutorials/custom-device-types/smart-button/push-button.md new file mode 100644 index 0000000..ecf0569 --- /dev/null +++ b/pages/tutorials/custom-device-types/smart-button/push-button.md @@ -0,0 +1,102 @@ +--- +title: Handling Sinric Pro Smart Button +layout: post +--- + +Want to control your DIY projects with just a tap on your phone? Sinric Pro's Smart Button feature is the perfect solution. Create a push buttons in the app that can trigger any action on your microcontroller – from switching on LEDs to controlling motors or sensors. +This guide will walk you through setting up Smart Button functionality on your ESP32, ESP8266, or Raspberry Pi Pico W. You'll learn how to handle all types of button interactions: + +* Single press +* Double press +* Long press + +### Prerequisites : + +1. ESP32, ESP8266 or Raspberry Pi Pico W x 1. + +### Step 1 : Connect to Sinric Pro + +#### Step 1.1 : Create a custom device type for Smart Button. + +Sinric Pro does not have a built-in device type for Push Button so we are going to create a custom device type for it. + +**Note**: You can use the device template import feature mentioned below to skip creating the full template. + +* [Login](https://portal.sinric.pro/devicetemplates/new) to your Sinric Pro account and goto **Device Templates** + +* Click **Add Device Template**. Enter name and description as **SmartButton** and select **Smart Button** as device type + +![Sinric Pro smart button template]({{ site.github.url }}/public/img/smart-button-set-template-name-desc-type.png) + +* Click **Capabilities** and drag a **Smart Button** capability. + +![Sinric Pro custom device type for push button]({{ site.github.url }}/public/img/smart-button-set-template-drop-smart-button.png) + +Click on **Save** to save. + +![Sinric Pro moisture saved template]({{ site.github.url }}/public/img/smart-button-saved-template.png) + +Now you can see the template we just created. + + +## Import an existing template? + +If you are feeling lazy setup all the Modes and Range values, you can use the import feature. + +![Sinric Pro capacitive soil moisture sensor import template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Paste this Template: + +```c++ +{ + "name": "SmartButton", + "description": "SmartButton", + "deviceTypeId": "672a3b2c96ec80395518f2fe", + "capabilities": [ + { + "id": "672a3fbd96ec8039551901eb" + } + ] +} +``` + + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). + +* Enter the device name **SmartButton**, description **SmartButton** and select the device type as **SmartButton**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/smart-button-save-device.png) + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +* Click on **Code Generator** to Generate the code. Click on **Download** to download the code. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-code-download.png) + + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Complete Code + + + +![Sinric Pro smart button in portal]({{ site.github.url }}/public/img/smart-button-portal-dashboard.png) + +![Sinric Pro smart button in app]({{ site.github.url }}/public/img/smart-button-app.png) + +### Troubleshooting +1. Smart Buttons are only supported in SinricPro app. Alexa, Google Home or SmartThings are not Supported. + +2. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/smart-button/push-button.pt.md b/pages/tutorials/custom-device-types/smart-button/push-button.pt.md new file mode 100644 index 0000000..9acbd98 --- /dev/null +++ b/pages/tutorials/custom-device-types/smart-button/push-button.pt.md @@ -0,0 +1,103 @@ +--- +title: Manuseando Botão Inteligente Sinric Pro +layout: post +lang: pt +--- + +Quer controlar seus projetos DIY com apenas um toque no seu telefone? O recurso Smart Button do Sinric Pro é a solução perfeita. Crie botões push no aplicativo que podem acionar qualquer ação no seu microcontrolador – desde ligar LEDs até controlar motores ou sensores. +Este guia o orientará na configuração da funcionalidade Smart Button no seu ESP32, ESP8266 ou Raspberry Pi Pico W. Você aprenderá como lidar com todos os tipos de interações de botão: + +* Pressão simples +* Pressão dupla +* Pressão longa + +### Pré-requisitos: + +1. ESP32, ESP8266 ou Raspberry Pi Pico W x 1. + +### Passo 1: Conectar ao Sinric Pro + +#### Passo 1.1: Criar um tipo de dispositivo personalizado para Smart Button. + +Sinric Pro não tem um tipo de dispositivo integrado para Push Button, então vamos criar um tipo de dispositivo personalizado para ele. + +**Nota**: Você pode usar o recurso de importação de template de dispositivo mencionado abaixo para pular a criação do template completo. + +* [Faça login](https://portal.sinric.pro/devicetemplates/new) na sua conta Sinric Pro e vá para **Device Templates** + +* Clique em **Add Device Template**. Digite nome e descrição como **SmartButton** e selecione **Smart Button** como tipo de dispositivo + +![Sinric Pro smart button template]({{ site.github.url }}/public/img/smart-button-set-template-name-desc-type.png) + +* Clique em **Capabilities** e arraste uma capacidade **Smart Button**. + +![Sinric Pro custom device type for push button]({{ site.github.url }}/public/img/smart-button-set-template-drop-smart-button.png) + +Clique em **Save** para salvar. + +![Sinric Pro moisture saved template]({{ site.github.url }}/public/img/smart-button-saved-template.png) + +Agora você pode ver o template que acabamos de criar. + + +## Importar um template existente? + +Se você está com preguiça de configurar todos os valores dos Modos e Range, você pode usar o recurso de importação. + +![Sinric Pro capacitive soil moisture sensor import template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Cole este Template: + +```c++ +{ + "name": "SmartButton", + "description": "SmartButton", + "deviceTypeId": "672a3b2c96ec80395518f2fe", + "capabilities": [ + { + "id": "672a3fbd96ec8039551901eb" + } + ] +} +``` + + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). + +* Digite o nome do dispositivo **SmartButton**, descrição **SmartButton** e selecione o tipo de dispositivo como **SmartButton**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/smart-button-save-device.png) + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +* Clique em **Code Generator** para Gerar o código. Clique em **Download** para baixar o código. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-code-download.png) + + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Código Completo + + + +![Sinric Pro smart button in portal]({{ site.github.url }}/public/img/smart-button-portal-dashboard.png) + +![Sinric Pro smart button in app]({{ site.github.url }}/public/img/smart-button-app.png) + +### Solução de Problemas +1. Smart Buttons são suportados apenas no aplicativo SinricPro. Alexa, Google Home ou SmartThings não são suportados. + +2. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/ultrasonic-sensor/HC-SR04.md b/pages/tutorials/custom-device-types/ultrasonic-sensor/HC-SR04.md new file mode 100644 index 0000000..6f6e82a --- /dev/null +++ b/pages/tutorials/custom-device-types/ultrasonic-sensor/HC-SR04.md @@ -0,0 +1,185 @@ +--- +title: Water Level Indicator (Water Tank) using Ultrasonic Sensor (HC-SR04) for ESP8266, ESP32, Raspberry Pi Pico W for Alexa +layout: post +--- + +In this part, we'll guide you on building a **Water Level Indicator (also known as Water Tank Indicator)** using a **Ultrasonic Sensor** that can be connected to either an **ESP32, ESP8266, or Raspberry Pi Pico W**. Once it's set up, you'll be able to measure water levels using Amazon Alexa, ask Alexa for information about it, and also monitor it through the Sinric Pro app and *receive a push notification when water level is low*. + + +![Sinric Pro HC-SR04 Ultrasonic Sensor ]({{ site.github.url }}/public/img/sinricpro-water-tank-HC-SR04-intro.png) + +### Prerequisites : + +1. ESP32, ESP8266 or Raspberry Pi Pico W x 1. +2. Ultrasonic Sensor (HC-SR04) x 1. +3. Plant with a pot x 1. +4. Jumper Wires. + + + +### Quick introduction to Ultrasonic Sensor +The ultrasonic sensors are low-cost, easy-to-use sensor that can measure distance. It works by sending out a burst of ultrasonic sound and then **measuring the time it takes for the echo to return**. The distance to the object is then calculated based on the speed of sound. + +It is powered by a 5V DC power supply and has four pins: **VCC, GND, TRIG, and ECHO**. Once the sensor is connected, you can use it to measure distance by sending a pulse to the TRIG pin and then measuring the time it takes for the ECHO pin to go high. The distance to the object can then be calculated using the following formula: + +> distance = (time * speed of sound) / 2 + +where: + +- `distance` is in centimeters. +- `time` is in microseconds. +- `speed of sound` is 343 meters per second. + +According to the manufacturer notes, the HC-SR04 sensor **works best** between 2cm – 400 cm (1" - 13ft) within a 30 degree cone. + +![Sinric Pro HC-SR04 esp8266 ultrasonic sensor wiring]({{ site.github.url }}/public/img/HC-SR04-ultrasonic-sensor-practical-test.png) + +### Wiring Ultrasonic Sensor + +![Sinric Pro HC-SR04 esp8266 ultrasonic sensor wiring]({{ site.github.url }}/public/img/HC-SR04-ultrasonic-sensor-wiring.png) + + +| HC-SR04 Pin | ESP8266 | ESP32 | Pico W | +| --------- | ------- | ------- | ------- | +| VCC | 5V | 5V | 5V | +| GND | GND | GND | GND | +| TRIG | 12 (D6) | GPIO 5 | 15 | +| ECHO | 14 (D5) | GPIO 18 | 14 | + + + +Let's verify that sensor is wired correctly and working. + + + +![Sinric Pro HC-SR04 readings]({{ site.github.url }}/public/img/HC-SR04-ultrasonic-sensor-test-readings.png) + +Let's try measuring the water level as a precentage. + + + +![Sinric Pro HC-SR04 readings]({{ site.github.url }}/public/img/HC-SR04-ultrasonic-sensor-water-tank-measurements-as-precentage.png) + +### Step 1 : Connect to Sinric Pro + +#### Step 1.1 : Creating a custom device type for Water Level Indicator. + +Sinric Pro does not have a built-in device type for Water Level Indicator so we are going to create a custom device type to support showing Water Level Indicator using Device Template feature. + +**Note**: You can use the device template import feature mentioned below to skip creating the full template. + +* [Login](https://portal.sinric.pro/devicetemplates/new) to your Sinric Pro account and goto **Device Templates** + +* Click **Add Device Template**. Enter name and description as **Water Level Indicator** and select **Water Tank** as device type + +![sinricpro water tank new device template basic info]({{ site.github.url }}/public/img/sinricpro-water-tank-new-device-template-basic-info.png) + +* Click **Capabilities**. + +Here we must select the features of our Sensor. We want to know the *Water level* as a precentage. So let's drag a **Range** and **Push Notification** capability. + +![sinricpro water tank new device template capabilities]({{ site.github.url }}/public/img/sinricpro-water-tank-new-device-template-capabilities.png) + +- What's Range capability? + + Range capability can be use to represents a number. eg: current speed of a blender. + +- What's Push Notification capability? + + Notification capability provides the ability to send a push notification message from the code. + +Click on **Configure** button and setup the two capabilities like below. + +![sinricpro water tank device template range capability]({{ site.github.url }}/public/img/sinricpro-water-tank-new-device-template-range-capability.png) + +Click on **Save** to save. + +Click on **Save** to save the template. + +Now you can see the template we just created. + + +## Import an existing template? + +If you are feeling lazy, you can use the import feature. + +![Sinric Pro import template json]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Paste this Template: + + +* Go to **Devices** menu on your left and click **Add Device** button (On top left). + +* Enter the device name **Water Tank**, description **Water Tank** and select the device type as **Water Level Indicator**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-water-tank-new-device-from-template.png) + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +* Click on **Code Generator** to Generate the code. Click on **Download** to download the code. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinricpro-water-tank-new-device-code-download.png) + + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Complete Code + + + + +Now you should be able to see the tank water level via Alexa, Sinric Pro App + +Alexa, What's the water level(range name) in water tank(device name) + +![Sinric Pro Alexa HC-SR04 sensor]({{ site.github.url }}/public/img/sinricpro-water-tank-alexa.jpg) + +![Sinric Pro Alexa HC-SR04 portal]({{ site.github.url }}/public/img/sinricpro-water-tank-HC-SR04-portal.png) + +![Sinric Pro water tank app]({{ site.github.url }}/public/img/sinricpro-water-tank-hc-sr04.png) + + + +### Step 3 : Making the Full and Empty Tank heights configurable via UI + +#### 3.1 Update device template + +In order to set the tank full and empty height configurable via UI, we need to go back to the custom device template and add two more Range Controllers for **Full Tank Height** and **Empty Tank Height** like below. + +![Full Empty ]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-full-empty-tank-height.png) + +Full device template would look like this + +![Full Template ]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-full-template.png) + +Here's the template with full and empty heights. You can import this in the Device Template section. + + + + +#### 3.2 Complete Code + + + +![Tank control with Alexa and SinricPro App ]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-full-alexa-sinricpro.jpg) + +That's It. + +### Troubleshooting +1. Google Home or SmartThings are not Supported. + +2. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/ultrasonic-sensor/HC-SR04.pt.md b/pages/tutorials/custom-device-types/ultrasonic-sensor/HC-SR04.pt.md new file mode 100644 index 0000000..5567e49 --- /dev/null +++ b/pages/tutorials/custom-device-types/ultrasonic-sensor/HC-SR04.pt.md @@ -0,0 +1,186 @@ +--- +title: Indicador de Nível de Água (Tanque de Água) usando Sensor Ultrassônico (HC-SR04) para ESP8266, ESP32, Raspberry Pi Pico W para Alexa +layout: post +lang: pt +--- + +Nesta parte, vamos orientá-lo na construção de um **Indicador de Nível de Água (também conhecido como Indicador de Tanque de Água)** usando um **Sensor Ultrassônico** que pode ser conectado a um **ESP32, ESP8266 ou Raspberry Pi Pico W**. Uma vez configurado, você poderá medir níveis de água usando Amazon Alexa, perguntar à Alexa sobre informações dele, e também monitorá-lo através do aplicativo Sinric Pro e *receber uma notificação push quando o nível de água estiver baixo*. + + +![Sinric Pro HC-SR04 Ultrasonic Sensor ]({{ site.github.url }}/public/img/sinricpro-water-tank-HC-SR04-intro.png) + +### Pré-requisitos: + +1. ESP32, ESP8266 ou Raspberry Pi Pico W x 1. +2. Sensor Ultrassônico (HC-SR04) x 1. +3. Planta com vaso x 1. +4. Cabos Jumper. + + + +### Introdução rápida ao Sensor Ultrassônico +Os sensores ultrassônicos são sensores de baixo custo e fáceis de usar que podem medir distância. Funciona enviando uma rajada de som ultrassônico e então **medindo o tempo que leva para o eco retornar**. A distância para o objeto é então calculada baseada na velocidade do som. + +É alimentado por uma fonte de 5V DC e tem quatro pinos: **VCC, GND, TRIG e ECHO**. Uma vez que o sensor está conectado, você pode usá-lo para medir distância enviando um pulso para o pino TRIG e então medindo o tempo que leva para o pino ECHO ficar alto. A distância para o objeto pode então ser calculada usando a seguinte fórmula: + +> distância = (tempo * velocidade do som) / 2 + +onde: + +- `distância` está em centímetros. +- `tempo` está em microssegundos. +- `velocidade do som` é 343 metros por segundo. + +De acordo com as notas do fabricante, o sensor HC-SR04 **funciona melhor** entre 2cm – 400 cm (1" - 13ft) dentro de um cone de 30 graus. + +![Sinric Pro HC-SR04 esp8266 ultrasonic sensor wiring]({{ site.github.url }}/public/img/HC-SR04-ultrasonic-sensor-practical-test.png) + +### Fiação do Sensor Ultrassônico + +![Sinric Pro HC-SR04 esp8266 ultrasonic sensor wiring]({{ site.github.url }}/public/img/HC-SR04-ultrasonic-sensor-wiring.png) + + +| Pino HC-SR04 | ESP8266 | ESP32 | Pico W | +| --------- | ------- | ------- | ------- | +| VCC | 5V | 5V | 5V | +| GND | GND | GND | GND | +| TRIG | 12 (D6) | GPIO 5 | 15 | +| ECHO | 14 (D5) | GPIO 18 | 14 | + + + +Vamos verificar se o sensor está conectado corretamente e funcionando. + + + +![Sinric Pro HC-SR04 readings]({{ site.github.url }}/public/img/HC-SR04-ultrasonic-sensor-test-readings.png) + +Vamos tentar medir o nível de água como uma porcentagem. + + + +![Sinric Pro HC-SR04 readings]({{ site.github.url }}/public/img/HC-SR04-ultrasonic-sensor-water-tank-measurements-as-precentage.png) + +### Passo 1: Conectar ao Sinric Pro + +#### Passo 1.1: Criando um tipo de dispositivo personalizado para Indicador de Nível de Água. + +Sinric Pro não tem um tipo de dispositivo integrado para Indicador de Nível de Água, então vamos criar um tipo de dispositivo personalizado para suportar mostrar Indicador de Nível de Água usando o recurso Device Template. + +**Nota**: Você pode usar o recurso de importação de template de dispositivo mencionado abaixo para pular a criação do template completo. + +* [Faça login](https://portal.sinric.pro/devicetemplates/new) na sua conta Sinric Pro e vá para **Device Templates** + +* Clique em **Add Device Template**. Digite nome e descrição como **Water Level Indicator** e selecione **Water Tank** como tipo de dispositivo + +![sinricpro water tank new device template basic info]({{ site.github.url }}/public/img/sinricpro-water-tank-new-device-template-basic-info.png) + +* Clique em **Capabilities**. + +Aqui devemos selecionar as características do nosso Sensor. Queremos saber o *Nível de água* como uma porcentagem. Então vamos arrastar uma capacidade **Range** e **Push Notification**. + +![sinricpro water tank new device template capabilities]({{ site.github.url }}/public/img/sinricpro-water-tank-new-device-template-capabilities.png) + +- O que é capacidade Range? + + A capacidade Range pode ser usada para representar um número. ex: velocidade atual de um liquidificador. + +- O que é capacidade Push Notification? + + A capacidade Notification fornece a habilidade de enviar uma mensagem de notificação push do código. + +Clique no botão **Configure** e configure as duas capacidades como abaixo. + +![sinricpro water tank device template range capability]({{ site.github.url }}/public/img/sinricpro-water-tank-new-device-template-range-capability.png) + +Clique em **Save** para salvar. + +Clique em **Save** para salvar o template. + +Agora você pode ver o template que acabamos de criar. + + +## Importar um template existente? + +Se você está com preguiça, você pode usar o recurso de importação. + +![Sinric Pro import template json]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Cole este Template: + + +* Vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). + +* Digite o nome do dispositivo **Tanque de Água**, descrição **Tanque de Água** e selecione o tipo de dispositivo como **Water Level Indicator**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-water-tank-new-device-from-template.png) + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +* Clique em **Code Generator** para Gerar o código. Clique em **Download** para baixar o código. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinricpro-water-tank-new-device-code-download.png) + + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Código Completo + + + + +Agora você deve conseguir ver o nível de água do tanque via Alexa, App Sinric Pro + +Alexa, Qual é o nível de água(nome do range) no tanque de água(nome do dispositivo) + +![Sinric Pro Alexa HC-SR04 sensor]({{ site.github.url }}/public/img/sinricpro-water-tank-alexa.jpg) + +![Sinric Pro Alexa HC-SR04 portal]({{ site.github.url }}/public/img/sinricpro-water-tank-HC-SR04-portal.png) + +![Sinric Pro water tank app]({{ site.github.url }}/public/img/sinricpro-water-tank-hc-sr04.png) + + + +### Passo 3: Tornando as alturas de Tanque Cheio e Vazio configuráveis via UI + +#### 3.1 Atualizar template do dispositivo + +Para tornar a altura do tanque cheio e vazio configurável via UI, precisamos voltar ao template de dispositivo personalizado e adicionar mais dois Range Controllers para **Altura do Tanque Cheio** e **Altura do Tanque Vazio** como abaixo. + +![Full Empty ]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-full-empty-tank-height.png) + +O template completo do dispositivo ficaria assim + +![Full Template ]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-full-template.png) + +Aqui está o template com alturas cheio e vazio. Você pode importar isso na seção Device Template. + + + + +#### 3.2 Código Completo + + + +![Tank control with Alexa and SinricPro App ]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-full-alexa-sinricpro.jpg) + +É isso. + +### Solução de Problemas +1. Google Home ou SmartThings não são suportados. + +2. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/water-sensor/flood-leak-rain-sensor.md b/pages/tutorials/custom-device-types/water-sensor/flood-leak-rain-sensor.md new file mode 100644 index 0000000..b13fa8f --- /dev/null +++ b/pages/tutorials/custom-device-types/water-sensor/flood-leak-rain-sensor.md @@ -0,0 +1,188 @@ +--- +title: Water Sensor (also known as Water leak, flood, or rain detector) for ESP8266, ESP32, Raspberry Pi Pico W for Alexa +layout: post +--- + +In this tutorial, we'll build a water sensor that can be connected to an **ESP32**, **ESP8266**, or **Raspberry Pi Pico W** and use it to monitor for water leaks, floods, or rainfall. With **Amazon Alexa**, you can check the status of your water sensor, ask for information about it, and **receive push notifications when water is detected**. + +![Sinric Pro HW-390 capacitive soil moisture sensor ]({{ site.github.url }}/public/img/sinricpro-water-sensor-intro.png) + +### Prerequisites : + +1. ESP32, ESP8266 or Raspberry Pi Pico W x 1. +2. Water Sensor x 1. +3. Jumper Wires. + +### Quick introduction to Water Sensor + +A water detector, also known as a water sensor, is a device that detects the presence of water. Water detectors work in a variety of ways. Some common types of water detectors include: + +- **Conductivity detectors**: Conductivity detectors work by measuring the electrical conductivity of the water. When the sensor comes into contact with water, the electrical conductivity increases. + +- **Capacitance detectors**: Capacitance detectors work by measuring the capacitance of the water. When the sensor comes into contact with water, the capacitance increases. + +- **Optical detectors**: Optical detectors work by detecting the changes in the refractive index of water. When the sensor comes into contact with water, the refractive index changes. + +**Note:** Water sensors have a shorter lifespan because they are exposed to water. This can cause the sensor to corrode quickly when it's powered on while immersed in water. To avoid this, it is we are going to only turn on the sensor when taking readings. + +### Wiring Water Sensor + +Let’s hook up the water level sensor. + +![Sinric Pro water sensor sensor wiring]({{ site.github.url }}/public/img/sinricpro_water_sensor_wiring.png) + +| MCU | S Pin | VCC Pin | +| --------- | ------- | ------- | +| ESP32 | 34 (Analog ADC1_CH6) | 17 | +| ESP8266 | A0 | D2 | +| Pico W | GP26 (ADC0) | 6 | + + + +**Note:** on ESP32, ADC2 (GPIO04, GPIO02, GPIO15) is unstable when Wi-Fi is being used. + +### Reading from Water Sensor + +Let's verify that sensor is wired correctly and working. + + + + + +![sinric pro water sensor arduino readings]({{ site.github.url }}/public/img/sinricpro-water-sensor-test-readings.png) + +### Detecting flooding + + + +### Detecting water level + + + + +### Step 1 : Connect to Sinric Pro + +#### Step 1.1 : Creating a custom device type for Water Sensor. + +Sinric Pro does not have a built-in device type for Water/Flood Sensor so we are going to create a custom device type for Water Sensor using Device Template feature to see. + +1. Flooding in the basement or not . + +2. Water level. + +**Note**: You can use the device template import feature mentioned below to skip creating the full template. + +* [Login](https://portal.sinric.pro/devicetemplates/new) to your Sinric Pro account and goto **Device Templates** + +* Click **Add Device Template**. Enter name and description as **Flood Sensor** and select **Flood Sensor** as device type + +![Sinric Pro capacitive soil moisture sensor device template]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-basic-info.png) + +* Click **Capabilities**. + +Here we must select the features of our Soil Moisture Sensor. We want to know whether *Soil is Wet or Dry* and the *Moisture level*. So let's drag a **Range**, a **Mode** and **Push Notification** capability. + +![Sinric Pro custom device type for capacitive soil moisture sensor]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-set-template-drop-range-mode.png) + +- What's Range capability? + + Range capability can be use to represents a number. eg: current speed of a blender. + +- What's Mode capability? + + Mode capability can be use to represents a value out of list of predefined values. eg: current wash cycle mode of a washing machine. + +- What's Push Notification capability? + + Notification capability provides the ability to send a push notification message from the code. + +Click on **Configure** button and setup the two capabilities like below. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-range-and-mode.png) + +Click on **Save** to save. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-range-and-mode-configured.png) + +Click on **Save** to save the template. + +![Sinric Pro moisture saved template]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-saved.png) + +Now you can see the template we just created. + + +## Import an existing template? + +If you are feeling lazy setup all the Modes and Range values, you can use the import feature. + +![Sinric Pro capacitive soil moisture sensor import template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Paste this Template: + + + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). + +* Enter the device name **Flood Sensor**, description **My Flood Sensor** and select the device type as **Flood Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-new-device-info.png) + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +* Click on **Code Generator** to Generate the code. Click on **Download** to download the code. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-code-download.png) + + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Complete Code + + + +Now you should be able to see the flooding status and water level via Alexa, Sinric Pro App + +Alexa, What's the flooding (mode name) in flood sensor(device name) + +Alexa, What's the water level(range name) in flood sensor(device name) + + +![Sinric Pro Alexa capacitive soil moisture sensor]({{ site.github.url }}/public/img/sinricpro-water-sensor-alexa.jpg) + +![Sinric Pro Alexa capacitive soil moisture sensor portal]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-portal.png) + +### Step 3 : Voice Announcements! + +✅ How it works: + +1️⃣ Add a Switch in SinricPro (your secret trigger!) + +2️⃣ Create an Alexa Routine that speaks your message when a "Basement is flooding!" when Switch turned on + +3️⃣ Send a power state event to turn ON that switch from your code + +``` +void triggerVoiceAnnouncement() { + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + mySwitch.sendPowerStateEvent(true); +} +``` + +### Troubleshooting +1. Google Home or SmartThings are not Supported. + +2. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/custom-device-types/water-sensor/flood-leak-rain-sensor.pt.md b/pages/tutorials/custom-device-types/water-sensor/flood-leak-rain-sensor.pt.md new file mode 100644 index 0000000..51b1ca7 --- /dev/null +++ b/pages/tutorials/custom-device-types/water-sensor/flood-leak-rain-sensor.pt.md @@ -0,0 +1,173 @@ +--- +title: Sensor de Água (também conhecido como detector de vazamento, inundação ou chuva) para ESP8266, ESP32, Raspberry Pi Pico W para Alexa +layout: post +lang: pt +--- + +Neste tutorial, vamos construir um sensor de água que pode ser conectado a um **ESP32**, **ESP8266** ou **Raspberry Pi Pico W** e usá-lo para monitorar vazamentos de água, inundações ou chuva. Com **Amazon Alexa**, você pode verificar o status do seu sensor de água, perguntar informações sobre ele e **receber notificações push quando água for detectada**. + +![Sinric Pro HW-390 capacitive soil moisture sensor ]({{ site.github.url }}/public/img/sinricpro-water-sensor-intro.png) + +### Pré-requisitos: + +1. ESP32, ESP8266 ou Raspberry Pi Pico W x 1. +2. Sensor de Água x 1. +3. Cabos Jumper. + +### Introdução rápida ao Sensor de Água + +Um detector de água, também conhecido como sensor de água, é um dispositivo que detecta a presença de água. Detectores de água funcionam de várias maneiras. Alguns tipos comuns de detectores de água incluem: + +- **Detectores de condutividade**: Detectores de condutividade funcionam medindo a condutividade elétrica da água. Quando o sensor entra em contato com água, a condutividade elétrica aumenta. + +- **Detectores de capacitância**: Detectores de capacitância funcionam medindo a capacitância da água. Quando o sensor entra em contato com água, a capacitância aumenta. + +- **Detectores ópticos**: Detectores ópticos funcionam detectando mudanças no índice de refração da água. Quando o sensor entra em contato com água, o índice de refração muda. + +**Nota:** Sensores de água têm uma vida útil mais curta porque são expostos à água. Isso pode fazer com que o sensor corroa rapidamente quando está ligado enquanto imerso em água. Para evitar isso, vamos ligar o sensor apenas quando fazendo leituras. + +### Fiação do Sensor de Água + +Vamos conectar o sensor de nível de água. + +![Sinric Pro water sensor sensor wiring]({{ site.github.url }}/public/img/sinricpro_water_sensor_wiring.png) + +| MCU | Pino S | Pino VCC | +| --------- | ------- | ------- | +| ESP32 | 34 (Analog ADC1_CH6) | 17 | +| ESP8266 | A0 | D2 | +| Pico W | GP26 (ADC0) | 6 | + + + +**Nota:** no ESP32, ADC2 (GPIO04, GPIO02, GPIO15) é instável quando Wi-Fi está sendo usado. + +### Lendo do Sensor de Água + +Vamos verificar se o sensor está conectado corretamente e funcionando. + + + + + +![sinric pro water sensor arduino readings]({{ site.github.url }}/public/img/sinricpro-water-sensor-test-readings.png) + +### Detectando inundação + + + +### Detectando nível de água + + + + +### Passo 1: Conectar ao Sinric Pro + +#### Passo 1.1: Criando um tipo de dispositivo personalizado para Sensor de Água. + +Sinric Pro não tem um tipo de dispositivo integrado para Sensor de Água/Inundação, então vamos criar um tipo de dispositivo personalizado para Sensor de Água usando o recurso Device Template para ver. + +1. Inundação no porão ou não. + +2. Nível de água. + +**Nota**: Você pode usar o recurso de importação de template de dispositivo mencionado abaixo para pular a criação do template completo. + +* [Faça login](https://portal.sinric.pro/devicetemplates/new) na sua conta Sinric Pro e vá para **Device Templates** + +* Clique em **Add Device Template**. Digite nome e descrição como **Flood Sensor** e selecione **Flood Sensor** como tipo de dispositivo + +![Sinric Pro capacitive soil moisture sensor device template]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-basic-info.png) + +* Clique em **Capabilities**. + +Aqui devemos selecionar as características do nosso Sensor de Umidade do Solo. Queremos saber se o *Solo está Úmido ou Seco* e o *Nível de umidade*. Então vamos arrastar uma capacidade **Range**, **Mode** e **Push Notification**. + +![Sinric Pro custom device type for capacitive soil moisture sensor]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-set-template-drop-range-mode.png) + +- O que é capacidade Range? + + A capacidade Range pode ser usada para representar um número. ex: velocidade atual de um liquidificador. + +- O que é capacidade Mode? + + A capacidade Mode pode ser usada para representar um valor de uma lista de valores predefinidos. ex: modo de ciclo de lavagem atual de uma máquina de lavar. + +- O que é capacidade Push Notification? + + A capacidade Notification fornece a habilidade de enviar uma mensagem de notificação push do código. + +Clique no botão **Configure** e configure as duas capacidades como abaixo. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-range-and-mode.png) + +Clique em **Save** para salvar. + +![Sinric Pro moisture sensor template mode and range settings]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-range-and-mode-configured.png) + +Clique em **Save** para salvar o template. + +![Sinric Pro moisture saved template]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-template-saved.png) + +Agora você pode ver o template que acabamos de criar. + + +## Importar um template existente? + +Se você está com preguiça de configurar todos os valores dos Modos e Range, você pode usar o recurso de importação. + +![Sinric Pro capacitive soil moisture sensor import template]({{ site.github.url }}/public/img/capacitive-soil-moisture-sensor-import-template.png) + +Cole este Template: + + + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). + +* Digite o nome do dispositivo **Sensor de Inundação**, descrição **Meu Sensor de Inundação** e selecione o tipo de dispositivo como **Flood Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-new-device-info.png) + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +* Clique em **Code Generator** para Gerar o código. Clique em **Download** para baixar o código. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-custom-device-code-download.png) + + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Código Completo + + + +Agora você deve conseguir ver o status de inundação e nível de água via Alexa, App Sinric Pro + +Alexa, Qual é a inundação (nome do modo) no sensor de inundação(nome do dispositivo) + +Alexa, Qual é o nível de água(nome do range) no sensor de inundação(nome do dispositivo) + + +![Sinric Pro Alexa capacitive soil moisture sensor]({{ site.github.url }}/public/img/sinricpro-water-sensor-alexa.jpg) + +![Sinric Pro Alexa capacitive soil moisture sensor portal]({{ site.github.url }}/public/img/sinricpro-water-sensor-device-portal.png) + + +### Solução de Problemas +1. Google Home ou SmartThings não são suportados. + +2. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/dimmable-switch/YYAC-3S.md b/pages/tutorials/dimmable-switch/YYAC-3S.md new file mode 100644 index 0000000..55053a6 --- /dev/null +++ b/pages/tutorials/dimmable-switch/YYAC-3S.md @@ -0,0 +1,98 @@ +--- +title: Dimmable Switch Tutorial using YYAC-3S for ESP32 +layout: post +--- + +In this section we’ll walk through creating a **Dimmable Switch** using **ESP32** and then control the light brightness via **Amazon Alexa, GoogleHome or SmartThings**. + +### Prerequisites : + +1. ESP32. +2. YYAC-3S. +3. Dimmable Light Bulb. +3. Jumper Wires. + + +**Not all the light bulbs are dimmable.** Please check the manufacturer's label to see if the bulb is dimmable. + +### Quick introduction to YYAC-3S + +YYAC-3S module can used to control the supply of AC electricity using PWM from an Arduino, ESP8266, ESP32 or Pico W. It can be used to control the speed of AC motors and the brightness of dimmable light bulbs. The circuit consists of an SCR and an optocoupler on the input side. This prevents current from flowing back to the MCU and also separates it from ground, making it safe to use. The module supports a PWM input of 0-255 and can control AC voltage up to 220V with a maximum current of 3A. + + +### Wiring + + ![High Voltage Connectors]({{ site.github.url }}/public/img/sinric_pro_motion_dimmer_switch_wiring.png) + + + +Connect the YYAC-3S module to the microcontroller as follows: +- VCC pin to the microcontroller's 5V pin (3.3V does not seems to work). +- GND pin to the ESP32's GND pin. +- PWM pin to a digital pin 16 on the microcontroller. + +| MCU | YYAC-3S PWM Pin | +| --------- | ------- | +| ESP32 | 16 | + + +Let's verify that YYAC-3S module is wired correctly and working. + + + +Arduino IDE Serial Monitor will show light bulb dimming like this: + + + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Dimmer**, description **Dimmer** and select the device type as **Switch With Dimming**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_contact_dimmer_new_device.png) + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Complete Code + + + +Now you should be able to control the the brightness level via Alexa, Google Home and SmartThings apps + + + +![Sinric Pro dimmer with Alexa, SmartThings]({{ site.github.url }}/public/img/sinric_pro_switch_with_dimmer_alexa_google_home_smartthings.png) + + +### Troubleshooting + +- Does not dim ? Please check the manufacturer’s label to see if the light bulb is dimmable. + +![dimmable light bulb example]({{ site.github.url }}/public/img/sinric_pro_switch_with_dimmer_dimmable_example.png) + +- PWM not working ? + +![Sinric Pro dimmer YYAC-3S via Alexa, SmartThings]({{ site.github.url }}/public/img/sinric_pro_switch_with_dimmer_pwm_YYAC-3S.png) + +Above LED lights up when the module recevice the PWM signal from MCU. + +- Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/dimmable-switch/YYAC-3S.pt.md b/pages/tutorials/dimmable-switch/YYAC-3S.pt.md new file mode 100644 index 0000000..a162b63 --- /dev/null +++ b/pages/tutorials/dimmable-switch/YYAC-3S.pt.md @@ -0,0 +1,99 @@ +--- +title: Tutorial de Interruptor Dimmer usando YYAC-3S para ESP32 +layout: post +lang: pt +--- + +Nesta seção vamos criar um **Interruptor Dimmer** usando **ESP32** e depois controlar o brilho da luz via **Amazon Alexa, GoogleHome ou SmartThings**. + +### Pré-requisitos: + +1. ESP32. +2. YYAC-3S. +3. Lâmpada Dimmer. +3. Cabos Jumper. + + +**Nem todas as lâmpadas são dimerizáveis.** Verifique a etiqueta do fabricante para ver se a lâmpada é dimerizable. + +### Introdução rápida ao YYAC-3S + +O módulo YYAC-3S pode ser usado para controlar o fornecimento de eletricidade AC usando PWM de um Arduino, ESP8266, ESP32 ou Pico W. Pode ser usado para controlar a velocidade de motores AC e o brilho de lâmpadas dimerizáveis. O circuito consiste em um SCR e um optoacoplador no lado de entrada. Isso evita que a corrente flua de volta para o MCU e também o separa do terra, tornando-o seguro para usar. O módulo suporta uma entrada PWM de 0-255 e pode controlar tensão AC até 220V com uma corrente máxima de 3A. + + +### Fiação + + ![High Voltage Connectors]({{ site.github.url }}/public/img/sinric_pro_motion_dimmer_switch_wiring.png) + + + +Conecte o módulo YYAC-3S ao microcontrolador da seguinte forma: +- Pino VCC ao pino 5V do microcontrolador (3.3V não parece funcionar). +- Pino GND ao pino GND do ESP32. +- Pino PWM a um pino digital 16 no microcontrolador. + +| MCU | Pino PWM YYAC-3S | +| --------- | ------- | +| ESP32 | 16 | + + +Vamos verificar se o módulo YYAC-3S está conectado corretamente e funcionando. + + + +O Monitor Serial do Arduino IDE mostrará a lâmpada dimmer assim: + + + +### Passo 1: Criar um novo dispositivo no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Dimmer**, descrição **Dimmer** e selecione o tipo de dispositivo como **Switch With Dimming**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_contact_dimmer_new_device.png) + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Código Completo + + + +Agora você deve conseguir controlar o nível de brilho via aplicativos Alexa, Google Home e SmartThings + + + +![Sinric Pro dimmer with Alexa, SmartThings]({{ site.github.url }}/public/img/sinric_pro_switch_with_dimmer_alexa_google_home_smartthings.png) + + +### Solução de Problemas + +- Não dimeriza? Verifique a etiqueta do fabricante para ver se a lâmpada é dimerizable. + +![dimmable light bulb example]({{ site.github.url }}/public/img/sinric_pro_switch_with_dimmer_dimmable_example.png) + +- PWM não funciona? + +![Sinric Pro dimmer YYAC-3S via Alexa, SmartThings]({{ site.github.url }}/public/img/sinric_pro_switch_with_dimmer_pwm_YYAC-3S.png) + +O LED acima acende quando o módulo recebe o sinal PWM do MCU. + +- Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/dimmable-switch/robotdyn-ac-light-dimmer.md b/pages/tutorials/dimmable-switch/robotdyn-ac-light-dimmer.md new file mode 100644 index 0000000..45b2d71 --- /dev/null +++ b/pages/tutorials/dimmable-switch/robotdyn-ac-light-dimmer.md @@ -0,0 +1,122 @@ +--- +title: Dimmable Switch Tutorial using RobotDyn AC Light Dimmer Module +layout: post +--- + +In this section we’ll walk through creating a **Light dimmer with RobotDyn** and then control the light brightness via **Alexa, GoogleHome or SmartThings**. + +### Prerequisites : + +1. ESP32 or ESP8266 x 1. +2. RobotDyn AC Light Dimmer. +3. Dimmable Light Bulb. +3. Jumper Wires. + + +**Not all the light bulbs are dimmable.** Please check the manufacturer's label to see if the bulb is dimmable. + +### Quick introduction to RobotDyn AC Light Dimmer Module + +The RobotDyn AC Light Dimmer Module is a device that allows you to control the brightness of AC lights using a microcontroller. It is a small and easy-to-use module that can be used with microcontrollers, such as the ESP8266, ESP32. The module works by using a triac to control the flow of current to the light bulb. The triac is a semiconductor device that can be used to switch AC current on and off. The RobotDyn AC Light Dimmer Module uses a PWM signal to control the triac, which in turn controls the brightness of the light bulb. + +### Wiring RobotDyn AC Light Dimmer + +You can use the below pin mapping table to connect your ESP32/ESP8266 with RobotDyn AC Light Dimmer module. + + ``` + * +---------------+-------------------------+-------------------------+ + * | Board | INPUT Pin | OUTPUT Pin | + * | | Zero-Cross | PWM | + * +---------------+-------------------------+-------------------------+ + * | ESP8266 | D1(IO5), D2(IO4), | D0(IO16), D1(IO5), | + * | | D5(IO14), D6(IO12), | D2(IO4), D5(IO14), | + * | | D7(IO13), D8(IO15), | D6(IO12), D7(IO13), | + * | | | D8(IO15) | + * +---------------+-------------------------+-------------------------+ + * | ESP32 | 4(GPI36), 6(GPI34), | 8(GPO32), 9(GP033), | + * | | 5(GPI39), 7(GPI35), | 10(GPIO25), 11(GPIO26), | + * | | 8(GPO32), 9(GP033), | 12(GPIO27), 13(GPIO14), | + * | | 10(GPI025), 11(GPIO26), | 14(GPIO12), 16(GPIO13), | + * | | 12(GPIO27), 13(GPIO14), | 23(GPIO15), 24(GPIO2), | + * | | 14(GPIO12), 16(GPIO13), | 25(GPIO0), 26(GPIO4), | + * | | 21(GPIO7), 23(GPIO15), | 27(GPIO16), 28(GPIO17), | + * | | 24(GPIO2), 25(GPIO0), | 29(GPIO5), 30(GPIO18), | + * | | 26(GPIO4), 27(GPIO16), | 31(GPIO19), 33(GPIO21), | + * | | 28(GPIO17), 29(GPIO5), | 34(GPIO3), 35(GPIO1), | + * | | 30(GPIO18), 31(GPIO19), | 36(GPIO22), 37(GPIO23), | + * | | 33(GPIO21), 35(GPIO1), | | + * | | 36(GPIO22), 37(GPIO23), | | + * +---------------+-------------------------+-------------------------+ +``` + + ![High Voltage Connectors]({{ site.github.url }}/public/img/sinric_pro_RobotDyn_dimmer_switch_wiring.png) + + + +Connect the RobotDyn module to the microcontroller as follows: +- VCC pin to the microcontroller's 5V pin (3.3V does not seems to work). +- GND pin to the ESP32's GND pin. +- PWM pin to a digital pin 2 on the microcontroller. +- Z-C pin to a digital pin 4 on the microcontroller. + +| MCU | Zero Cross Pin | PWM/ADC Pin | +| --------- | ------- | ------- | +| ESP32 | 4 | 2 + + +Let's verify that RobotDyn AC Light Dimmer Module is wired correctly and working. + + + +Arduino IDE Serial Monitor will show the dimming like this: + + + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Dimmer**, description **Dimmer** and select the device type as **Switch With Dimming**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_contact_dimmer_new_device.png) + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Complete Code + + + + + +![Sinric Pro dimmer with Alexa, SmartThings]({{ site.github.url }}/public/img/sinric_pro_switch_with_dimmer_alexa_google_home_smartthings.png) + + +### Troubleshooting + +- Does not dim ? Please check the manufacturer’s label to see if the light bulb is dimmable. + +![dimmable light bulb example]({{ site.github.url }}/public/img/sinric_pro_switch_with_dimmer_dimmable_example.png) + +- PWM not working ? + +![Sinric Pro dimmer YYAC-3S via Alexa, SmartThings]({{ site.github.url }}/public/img/sinric_pro_RobotDyn_dimmer_pwm_indicator.jpg) + +Above LED lights up when the module recevice the PWM signal from MCU. + +- Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/dimmable-switch/robotdyn-ac-light-dimmer.pt.md b/pages/tutorials/dimmable-switch/robotdyn-ac-light-dimmer.pt.md new file mode 100644 index 0000000..96c92f4 --- /dev/null +++ b/pages/tutorials/dimmable-switch/robotdyn-ac-light-dimmer.pt.md @@ -0,0 +1,123 @@ +--- +title: Tutorial de Interruptor Dimmer usando Módulo Dimmer de Luz AC RobotDyn +layout: post +lang: pt +--- + +Nesta seção vamos criar um **Dimmer de luz com RobotDyn** e depois controlar o brilho da luz via **Alexa, GoogleHome ou SmartThings**. + +### Pré-requisitos: + +1. ESP32 ou ESP8266 x 1. +2. Dimmer de Luz AC RobotDyn. +3. Lâmpada Dimmer. +3. Cabos Jumper. + + +**Nem todas as lâmpadas são dimerizáveis.** Verifique a etiqueta do fabricante para ver se a lâmpada é dimerizable. + +### Introdução rápida ao Módulo Dimmer de Luz AC RobotDyn + +O Módulo Dimmer de Luz AC RobotDyn é um dispositivo que permite controlar o brilho de luzes AC usando um microcontrolador. É um módulo pequeno e fácil de usar que pode ser usado com microcontroladores, como o ESP8266, ESP32. O módulo funciona usando um triac para controlar o fluxo de corrente para a lâmpada. O triac é um dispositivo semicondutor que pode ser usado para ligar e desligar corrente AC. O Módulo Dimmer de Luz AC RobotDyn usa um sinal PWM para controlar o triac, que por sua vez controla o brilho da lâmpada. + +### Fiação do Dimmer de Luz AC RobotDyn + +Você pode usar a tabela de mapeamento de pinos abaixo para conectar seu ESP32/ESP8266 com o módulo Dimmer de Luz AC RobotDyn. + + ``` + * +---------------+-------------------------+-------------------------+ + * | Placa | Pino INPUT | Pino OUTPUT | + * | | Zero-Cross | PWM | + * +---------------+-------------------------+-------------------------+ + * | ESP8266 | D1(IO5), D2(IO4), | D0(IO16), D1(IO5), | + * | | D5(IO14), D6(IO12), | D2(IO4), D5(IO14), | + * | | D7(IO13), D8(IO15), | D6(IO12), D7(IO13), | + * | | | D8(IO15) | + * +---------------+-------------------------+-------------------------+ + * | ESP32 | 4(GPI36), 6(GPI34), | 8(GPO32), 9(GP033), | + * | | 5(GPI39), 7(GPI35), | 10(GPIO25), 11(GPIO26), | + * | | 8(GPO32), 9(GP033), | 12(GPIO27), 13(GPIO14), | + * | | 10(GPI025), 11(GPIO26), | 14(GPIO12), 16(GPIO13), | + * | | 12(GPIO27), 13(GPIO14), | 23(GPIO15), 24(GPIO2), | + * | | 14(GPIO12), 16(GPIO13), | 25(GPIO0), 26(GPIO4), | + * | | 21(GPIO7), 23(GPIO15), | 27(GPIO16), 28(GPIO17), | + * | | 24(GPIO2), 25(GPIO0), | 29(GPIO5), 30(GPIO18), | + * | | 26(GPIO4), 27(GPIO16), | 31(GPIO19), 33(GPIO21), | + * | | 28(GPIO17), 29(GPIO5), | 34(GPIO3), 35(GPIO1), | + * | | 30(GPIO18), 31(GPIO19), | 36(GPIO22), 37(GPIO23), | + * | | 33(GPIO21), 35(GPIO1), | | + * | | 36(GPIO22), 37(GPIO23), | | + * +---------------+-------------------------+-------------------------+ +``` + + ![High Voltage Connectors]({{ site.github.url }}/public/img/sinric_pro_RobotDyn_dimmer_switch_wiring.png) + + + +Conecte o módulo RobotDyn ao microcontrolador da seguinte forma: +- Pino VCC ao pino 5V do microcontrolador (3.3V não parece funcionar). +- Pino GND ao pino GND do ESP32. +- Pino PWM a um pino digital 2 no microcontrolador. +- Pino Z-C a um pino digital 4 no microcontrolador. + +| MCU | Pino Zero Cross | Pino PWM/ADC | +| --------- | ------- | ------- | +| ESP32 | 4 | 2 + + +Vamos verificar se o Módulo Dimmer de Luz AC RobotDyn está conectado corretamente e funcionando. + + + +O Monitor Serial do Arduino IDE mostrará o dimmer assim: + + + +### Passo 1: Criar um novo dispositivo no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Dimmer**, descrição **Dimmer** e selecione o tipo de dispositivo como **Switch With Dimming**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_contact_dimmer_new_device.png) + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Código Completo + + + + + +![Sinric Pro dimmer with Alexa, SmartThings]({{ site.github.url }}/public/img/sinric_pro_switch_with_dimmer_alexa_google_home_smartthings.png) + + +### Solução de Problemas + +- Não dimeriza? Verifique a etiqueta do fabricante para ver se a lâmpada é dimerizable. + +![dimmable light bulb example]({{ site.github.url }}/public/img/sinric_pro_switch_with_dimmer_dimmable_example.png) + +- PWM não funciona? + +![Sinric Pro dimmer YYAC-3S via Alexa, SmartThings]({{ site.github.url }}/public/img/sinric_pro_RobotDyn_dimmer_pwm_indicator.jpg) + +O LED acima acende quando o módulo recebe o sinal PWM do MCU. + +- Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/doorbell.md b/pages/tutorials/doorbell.md deleted file mode 100644 index fc53779..0000000 --- a/pages/tutorials/doorbell.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Smart Doorbell -layout: post -youtubeId: H-iftzWVTXE -youtubeId2: HEMifE1Xm7E ---- - - -In this section we’ll walk through creating a **Smart Doorbell** and controlling it using Amazon Alexa. - - -### Step 1 : Create a Sinric Pro account - -* Visit [http://portal.sinric.pro/register](http://portal.sinric.pro/register) and sign up for a new account - - -### Step 2 : Link your Amazon Alexa account - -* 2.1 Open your Amazon Alexa app. -* 2.2 Goto Skills & Games. -* 2.3 Search for **Sinric Pro**. -* 2.4 Click **ENABLE TO USE**. -* 2.5 Enter the credentails you created in step 1. - -### Step 3 : Create a new device: doorbell - -* 3.1 [Login](http://portal.sinric.pro) to your Sinric Pro account. -* 3.2 Go to **Devices** menu on your left. -* 3.3 Click **Add Device** button (On top left). -* 3.4 Enter the device name **doorbell**, description **smart doorbell** and select the type as **Doorbell**. -* 3.5 Select Device Access Key (default) and Room (Living Room). -* 3.6 Click **Save** to create the device - -![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric-pro-create-device.png) - -Once you click on the save button Amazon Alexa will automatically detect the device we just created (If you completed Step 2). You should see a push notification like below in your phone. - -![Sinric Pro alexa doorbell notification]({{ site.github.url }}/public/img/sinricpro_alexa_doorbell_push_notification.jpg) - -If you did not get the push notification, just ask Alexa to device devices - -### Step 4 : Schematics - -An external switch circuit: -```js - 3.3V - --+-- - | - +-+ - | | 1K ~ 10K - +-+ - | - +--> D2 (for ESP8266, ex: GPIO33 in case of ESP32) - | - | O - --+ - | O - | - --+-- - GND -``` - -![Sinric Pro alexa doorbell notification]({{ site.github.url }}/public/img/alexa-doorbell-sinric-pro-schematics.png) - - - -### Step 4 : Connect ESP8266 or ESP32 -* 4.1 Go to **Credentials** menu on your left. -* 4.2 Copy the **App Key** and **App Secret** - - - -![SinricPro credentials]({{ site.github.url }}/public/img/sinricpro-credentials.png) - -* 4.3 Download the demo code from here - * [ESP8266/ESP32 Example](https://github.com/sinricpro/SinricPro/tree/master/examples/Doorbell) - * [RaspberryPi/Python Example](https://github.com/sinricpro/SinricPro/tree/master/examples/Doorbell) -* 4.4 Update the App Key and App Secret. -* 4.5 Upload the code to your ESP module. -* 4.6 Turn On 'Doorbell Press' in Alexa App. -* 4.7 When you send the [DoorbellPress](https://github.com/sinricpro/sample_messages/blob/master/06_Doorbell/03_Event.json) Alexa will let you know. - -Demo ESP8266/ESP32: -{% include youtubePlayer.html id=page.youtubeId %} - - -Demo RaspberryPI + Python: -{% include youtubePlayer.html id=page.youtubeId2 %} - -> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/doorbell/doorbell.md b/pages/tutorials/doorbell/doorbell.md new file mode 100644 index 0000000..9ed53fe --- /dev/null +++ b/pages/tutorials/doorbell/doorbell.md @@ -0,0 +1,81 @@ +--- +title: Smart Doorbell using ESP32, ESP8266 or Raspberry Pi Pico W for Alexa, Google Home +layout: post +youtubeId: H-iftzWVTXE +youtubeId2: HEMifE1Xm7E +--- + +In this section we’ll walk through creating a **Doorbell** using a push (tactile) button connected to a **ESP32**, **ESP8266** or **Raspberry Pi Pico W** and then get a notification in Alexa, Google Home, or the Sinric Pro app. + +### Prerequisites : + +1. ESP32, ESP8266 or Raspberry Pi Pico W x 1. +2. Push button x 1. +3. 1K ~ 10K resistor x 1 +3. Jumper Wires. + +### Wiring Doorbell button + +We are going to use Pull-Down approach to wire our button. When the button is pressed, digitalRead reads HIGH (1) signal. + +![Sinric Pro contact sensor wiring]({{ site.github.url }}/public/img/sinricpro_pi_doorbell-wiring-diagram.png) + +| MCU | GPIO Pin | +| --------- | ------- | +| ESP32 | 34 | +| ESP8266 | 4 (D2) | +| Pico W | 7 | + +### Reading button state + +Let's verify that sensor is wired correctly and working. + + + +![Sinric Pro pull-down arduino serial monitor]({{ site.github.url }}/public/img/sinricpro-pushbutton-pull-down.png) + +### Step 1 : Connect to Sinric Pro + +#### Create a new device: doorbell + +* [Login](http://portal.sinric.pro) to your Sinric Pro account and go to **Devices** menu on your left. + +* Click **Add Device** button (On top left). + +* Enter the device name **doorbell**, description **smart doorbell** and select the type as **Doorbell**. + +* Click **Save** to create the device + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-doorbell-create-device.png) + +Once you click on the save button Amazon Alexa will automatically detect the device we just created (If you have linked our Alexa skill before). + +![Sinric Pro alexa doorbell notification]({{ site.github.url }}/public/img/sinricpro_alexa_doorbell_push_notification.jpg) + +If you did not get the push notification, just ask Alexa to device devices + +#### Step 1.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Complete Code + + + +**Note:** **Alexa doorbell notifications are turned off by default**. You must enable it by openning the app to recevice the DingDong notification in Alexa. + +![Sinric Pro Alexa enable doorbell notification settings]({{ site.github.url }}/public/img/sinricpro-alexa-doorbell-settings.jpg) + +{% include youtubePlayer.html id=page.youtubeId %} + +{% include youtubePlayer.html id=page.youtubeId2 %} + +### Troubleshooting + +- Push button is too sensitive? You can adjust `debounce_delay` or try the perprosed solution in [issues/346](https://github.com/sinricpro/esp8266-esp32-sdk/issues/346) + +- Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for possible solutions to your issue. + + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/doorbell/doorbell.pt.md b/pages/tutorials/doorbell/doorbell.pt.md new file mode 100644 index 0000000..956c436 --- /dev/null +++ b/pages/tutorials/doorbell/doorbell.pt.md @@ -0,0 +1,82 @@ +--- +title: Campainha Inteligente usando ESP32, ESP8266 ou Raspberry Pi Pico W para Alexa, Google Home +layout: post +lang: pt +youtubeId: H-iftzWVTXE +youtubeId2: HEMifE1Xm7E +--- + +Nesta seção vamos criar uma **Campainha** usando um botão push (tátil) conectado a um **ESP32**, **ESP8266** ou **Raspberry Pi Pico W** e depois receber uma notificação na Alexa, Google Home, ou no aplicativo Sinric Pro. + +### Pré-requisitos: + +1. ESP32, ESP8266 ou Raspberry Pi Pico W x 1. +2. Botão push x 1. +3. Resistor de 1K ~ 10K x 1 +3. Cabos Jumper. + +### Fiação do botão da Campainha + +Vamos usar a abordagem Pull-Down para conectar nosso botão. Quando o botão é pressionado, digitalRead lê sinal HIGH (1). + +![Sinric Pro contact sensor wiring]({{ site.github.url }}/public/img/sinricpro_pi_doorbell-wiring-diagram.png) + +| MCU | Pino GPIO | +| --------- | ------- | +| ESP32 | 34 | +| ESP8266 | 4 (D2) | +| Pico W | 7 | + +### Lendo o estado do botão + +Vamos verificar se o sensor está conectado corretamente e funcionando. + + + +![Sinric Pro pull-down arduino serial monitor]({{ site.github.url }}/public/img/sinricpro-pushbutton-pull-down.png) + +### Passo 1: Conectar ao Sinric Pro + +#### Criar um novo dispositivo: campainha + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro e vá ao menu **Dispositivos** à esquerda. + +* Clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). + +* Digite o nome do dispositivo **campainha**, descrição **campainha inteligente** e selecione o tipo como **Doorbell**. + +* Clique em **Salvar** para criar o dispositivo + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinricpro-doorbell-create-device.png) + +Uma vez que você clique no botão salvar, a Amazon Alexa detectará automaticamente o dispositivo que acabamos de criar (Se você vinculou nossa skill Alexa antes). + +![Sinric Pro alexa doorbell notification]({{ site.github.url }}/public/img/sinricpro_alexa_doorbell_push_notification.jpg) + +Se você não recebeu a notificação push, apenas peça à Alexa para descobrir dispositivos + +#### Passo 1.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Código Completo + + + +**Nota:** **As notificações de campainha da Alexa estão desabilitadas por padrão**. Você deve habilitá-las abrindo o aplicativo para receber a notificação DingDong na Alexa. + +![Sinric Pro Alexa enable doorbell notification settings]({{ site.github.url }}/public/img/sinricpro-alexa-doorbell-settings.jpg) + +{% include youtubePlayer.html id=page.youtubeId %} + +{% include youtubePlayer.html id=page.youtubeId2 %} + +### Solução de Problemas + +- Botão push muito sensível? Você pode ajustar `debounce_delay` ou tentar a solução proposta em [issues/346](https://github.com/sinricpro/esp8266-esp32-sdk/issues/346) + +- Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para possíveis soluções para seu problema. + + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/for-business/wally/arduino-ide-settings.png b/pages/tutorials/for-business/wally/arduino-ide-settings.png new file mode 100644 index 0000000..db415ad Binary files /dev/null and b/pages/tutorials/for-business/wally/arduino-ide-settings.png differ diff --git a/pages/tutorials/for-business/wally/image.png b/pages/tutorials/for-business/wally/image.png new file mode 100644 index 0000000..27d9b59 Binary files /dev/null and b/pages/tutorials/for-business/wally/image.png differ diff --git a/pages/tutorials/for-business/wally/wally.md b/pages/tutorials/for-business/wally/wally.md new file mode 100644 index 0000000..d7374af --- /dev/null +++ b/pages/tutorials/for-business/wally/wally.md @@ -0,0 +1,79 @@ +--- +title: Wally Tutorial +layout: post +--- + +In this section we’ll walk through creating a product we would like to sell in the future called **Wally**. It's a 2 Gang 1/2 Way Wireless Wi-Fi Mini Smart Switch Module. + +Please note that **only Espressif ESP32, ESP32C3, ESP32S3 are supported** + +![Sinric Pro sinricpro wally]({{ site.github.url }}/public/img/sinricpro-wally.png) + +#### Setup Product Profile + +1. Login to your [Business Account](https://biz-portal.sinric.pro/) + +2. Goto *Products* menu and click *Add Product*. + +![Sinric Pro sinricpro business acccount add product wally]({{ site.github.url }}/public/img/sinricpro-biz-acccount-add-product.png) + +And enter details about your product. + +![Sinric Pro sinricpro business acccount enter product details]({{ site.github.url }}/public/img/sinricpro-biz-acccount-enter-product-details.png) + +Then goto *Features* tab. + +![Sinric Pro sinricpro business acccount enter product features]({{ site.github.url }}/public/img/sinricpro-biz-acccount-enter-product-features.png) + +**Device Type** : Sinric Pro device type. Could be a Switch, Fan ect. Same as Sinric Pro portal. + +**Identifier** : We use identifier to refer to this device in the Arduino sketch. + +**Default Device Name** : You can set a default device name for the device. This is the default name shown during the device setup. + +**Default Device Description** : You can set a default device description for the device. This is the default name shown during the device setup. + +**Display Index** : Order which will be shown durnig the device setup. + + +![Sinric Pro sinricpro business acccount enter product details]({{ site.github.url }}/public/img/sinricpro-biz-acccount-setup-default-values-example.png) + +Click *Save* and click on **Download** to download the product provisioing code. + +![Sinric Pro sinricpro business acccount code download]({{ site.github.url }}/public/img/sinricpro-biz-acccount-setup-code-download.png) + +The downloaded example comes pre-loaded with essential features including easy setup, multi-WiFi support, OTA updates, and health checks, allowing you to focus on bringing your unique IoT ideas to life without needing to implement these fundamental functionalities from scratch. + +Search for **sinricprobusinesssdk** in the Arduino Library Manager to install the SinricPro Business SDK. + +![Sinric Pro Business SDK arduino IDE]({{ site.github.url }}/public/img/sinricpro-business-sdk.png) + + +This would also install *ArduinoJson (>=7.0.3), WebSockets (>=2.6.1), NimBLE-Arduino (>=1.4.2), SinricPro (>=3.2.1)* as well. Customize the GPIO mappings to fit your specific device configuration, compile and flash the firmware to your hardware. + +Next, please change the Arduino IDE Tools -> Partition Scheme -> Minimal SPIFF (1.9MB APP ...). + +![Sinric Pro sinricpro wally arduino IDE tools settings]({{ site.github.url }}/public/img/arduino-ide-settings.png) + +Now we are ready to flash the code. + +![Sinric Pro sinricpro business acccount code download]({{ site.github.url }}/public/img/sinricpro-biz-acccount-setup-code-arduino-ide.png) + +You can find the complete example code here: + +[https://github.com/sinricpro/esp32-business-sdk/tree/master/examples/Wally](https://github.com/sinricpro/esp32-business-sdk/tree/master/examples/Wally) + +#### Now you can setup product via Sinric Pro app + +1. Download the Sinric Pro app from Google Play or AppStore. + +2. Create an account and login. + +3. Click *Add* and complete the setup process. + +Here's the product provisioning demo: + + + diff --git a/pages/tutorials/for-business/wally/wally.pt.md b/pages/tutorials/for-business/wally/wally.pt.md new file mode 100644 index 0000000..f25b654 --- /dev/null +++ b/pages/tutorials/for-business/wally/wally.pt.md @@ -0,0 +1,79 @@ +--- +title: Tutorial do Wally +layout: post +lang: pt +--- + +Nesta seção vamos criar um produto que gostaríamos de vender no futuro chamado **Wally**. É um Módulo Interruptor Inteligente Wi-Fi Wireless Mini de 2 Gang 1/2 Way. + +Note que **apenas Espressif ESP32, ESP32C3, ESP32S3 são suportados** + +![Sinric Pro sinricpro wally]({{ site.github.url }}/public/img/sinricpro-wally.png) + +#### Configurar Perfil do Produto + +1. Faça login na sua [Conta Business](https://biz-portal.sinric.pro/) + +2. Vá ao menu *Products* e clique em *Add Product*. + +![Sinric Pro sinricpro business acccount add product wally]({{ site.github.url }}/public/img/sinricpro-biz-acccount-add-product.png) + +E digite detalhes sobre seu produto. + +![Sinric Pro sinricpro business acccount enter product details]({{ site.github.url }}/public/img/sinricpro-biz-acccount-enter-product-details.png) + +Então vá para a aba *Features*. + +![Sinric Pro sinricpro business acccount enter product features]({{ site.github.url }}/public/img/sinricpro-biz-acccount-enter-product-features.png) + +**Device Type**: Tipo de dispositivo Sinric Pro. Pode ser um Switch, Fan etc. Mesmo que o portal Sinric Pro. + +**Identifier**: Usamos identificador para se referir a este dispositivo no sketch Arduino. + +**Default Device Name**: Você pode definir um nome padrão de dispositivo para o dispositivo. Este é o nome padrão mostrado durante a configuração do dispositivo. + +**Default Device Description**: Você pode definir uma descrição padrão de dispositivo para o dispositivo. Este é o nome padrão mostrado durante a configuração do dispositivo. + +**Display Index**: Ordem que será mostrada durante a configuração do dispositivo. + + +![Sinric Pro sinricpro business acccount enter product details]({{ site.github.url }}/public/img/sinricpro-biz-acccount-setup-default-values-example.png) + +Clique em *Save* e clique em **Download** para baixar o código de provisionamento do produto. + +![Sinric Pro sinricpro business acccount code download]({{ site.github.url }}/public/img/sinricpro-biz-acccount-setup-code-download.png) + +O exemplo baixado vem pré-carregado com recursos essenciais incluindo configuração fácil, suporte multi-WiFi, atualizações OTA e verificações de saúde, permitindo que você se concentre em dar vida às suas ideias IoT únicas sem precisar implementar essas funcionalidades fundamentais do zero. + +Procure por **sinricprobusinesssdk** no Arduino Library Manager para instalar o SinricPro Business SDK. + +![Sinric Pro Business SDK arduino IDE]({{ site.github.url }}/public/img/sinricpro-business-sdk.png) + + +Isso também instalará *ArduinoJson (>=7.0.3), WebSockets (>=2.6.1), NimBLE-Arduino (>=1.4.2), SinricPro (>=3.2.1)* também. Personalize os mapeamentos GPIO para se adequar à sua configuração específica de dispositivo, compile e carregue o firmware no seu hardware. + +Em seguida, mude as configurações do Arduino IDE Tools -> Partition Scheme -> Minimal SPIFF (1.9MB APP ...). + +![Sinric Pro sinricpro wally arduino IDE tools settings]({{ site.github.url }}/public/img/arduino-ide-settings.png) + +Agora estamos prontos para carregar o código. + +![Sinric Pro sinricpro business acccount code download]({{ site.github.url }}/public/img/sinricpro-biz-acccount-setup-code-arduino-ide.png) + +Você pode encontrar o código de exemplo completo aqui: + +[https://github.com/sinricpro/esp32-business-sdk/tree/master/examples/Wally](https://github.com/sinricpro/esp32-business-sdk/tree/master/examples/Wally) + +#### Agora você pode configurar o produto via aplicativo Sinric Pro + +1. Baixe o aplicativo Sinric Pro do Google Play ou AppStore. + +2. Crie uma conta e faça login. + +3. Clique em *Add* e complete o processo de configuração. + +Aqui está a demonstração de provisionamento do produto: + + \ No newline at end of file diff --git a/pages/tutorials/general/device-creation-wizard.md b/pages/tutorials/general/device-creation-wizard.md new file mode 100644 index 0000000..13dd835 --- /dev/null +++ b/pages/tutorials/general/device-creation-wizard.md @@ -0,0 +1,168 @@ +--- +title: SinricPro Device Creation Wizard Guide +layout: post +lang: en +--- + + +This document provides a step-by-step guide for creating a new device using the SinricPro platform. The process is divided into four main sections: Device Information, Notifications, Timers, and Other settings. + +## Step 1: Device Information + +![Sinric Pro device creation info]({{ site.github.url }}/public/img/sinricpro-portal-device-creation-info.png) + +The first step in creating a new device involves configuring basic information about your device. + +### Fields + +- **Device Name** + - Enter a unique name for your device. This name will be used to identify the device within your home automation system. + - *Example*: "Bedroom Light" + +- **Description** + - Provide a brief description of the device's purpose or functionality. + - *Example*: "Main light in the bedroom" + +- **Device Type** + - Select the appropriate type of device from the dropdown menu: + - Switch + - Dimmable Switch + - Light + - TV + - Speaker + - Thermostat + - Fan + - Lock + - Doorbell + - Temperature Sensor + - Motion Sensor + - Contact Sensor + - Windows Air Conditioner + - Blinds + - Garage Door + - Camera + - Custom Devices (Once you create a custom device in [Device Template]({{ site.github.url }}/pages/custom-templates), it will appear under here) + + - *Note*: Click on the link `(How to create a custom device type?)` if you want to learn about how to create a custom device type. + +- **App Key** + - The App Key is your unique credential for authenticating your IoT device when it connects to the SinricPro platform. It acts as a distinct identifier for your specific hardware module within the SinricPro ecosystem. To ensure proper functionality and avoid conflicts, select an App Key that directly corresponds to your hardware module, and use a different key for each module. Upon signing up for an account, a default App Key is automatically generated for you. + +- **Room & Home** + - Assign the device to a specific room and home from the dropdown list. + - *Example*: "Bed Room (Home)" + +## Step 2: Notifications + +![Sinric Pro device creation info]({{ site.github.url }}/public/img/sinricpro-portal-device-creation-notifications.png) + +Configure which events trigger notifications for your device. + +### Enable Notifications +- **Alerts**: This toggle act as a global switch to enable and disable to allow push notifications to be send from this device to SinricPro app. (eg: `mySwitch.sendPushNotification("Hello SinricPro!")`). + +### Event-Based Notifications + +You can choose to receive notifications when certain device state changes occur: + +| Notification Type | Description | +|-------------------|----------------------------------------------| +| **Connect** | Notify when the device connects to the cloud. | +| **Disconnect** | Notify when the device disconnects. | +| **On** | Notify when the device turns on. | +| **Off** | Notify when the device turns off. | +| **Lock** | Notify when the lock changed to lock | +| **Unlock** | Notify when the lock changed to unlock | +| **Unlock** | Notify when the lock changed to unlock | +| **PM2.5 Air Quality** | Notify when Air Quality Rises above μg/m3 threshold | +| **PM2.5 Air Quality** | Notify when Air Quality Falls falls below μg/m3 threshold | +| **Motion** | Notify when a motion is detected (Daytime or Nightime) | +| **Camera Motion** | Notify when motion picture is taken | +| **Camera Snapshot** | Notify when snapshot taken and describe what is in the snapshot using AI | +| **Doorbell** | Notify when doorbell pressed | +| **Open** | Notify when open (Garage Door or Contact Sensor or Blinds) | +| **Closed** | Notify when closed (Garage Door or Contact Sensor) | +| **Temperature** | Notify when temperature rises above threshold | +| **Temperature** | Notify when temperature falls below threshold | + +What's Retrigger Time ? + +> It's the delay between one notification to another. It's used to stop sending continuous push notification. + +> **Tip**: Use these options to monitor device status and receive real-time update notifications via the SinricPro app or connected platforms. + + +## Step 3: Timers + +![Sinric Pro device creation timers]({{ site.github.url }}/public/img/sinricpro-portal-device-creation-timers.png) + +Set up automatic on/off behaviors for your device using cloud-managed timers. Minimum delay is 3 seconds. Ma interval cannot be more than 1 day. + +### Auto Off +- **Enable**: Toggle to activate auto-off. +- **Delay**: Set the number of seconds after which the device turns off automatically once turned on. + - *Default*: `3 seconds` (adjustable) + - *Example*: Set to `5` → device turns off 5 seconds after being turned on. + +### Auto On +- **Enable**: Toggle to activate auto-on. +- **Delay**: Set the number of seconds after which the device turns on automatically once turned off. + - *Default*: `3 seconds` (adjustable) + - *Example*: Set to `10` → device turns on 10 seconds after being turned off. + +> **Note**: Timers are cloud-based — they won't work if the device is temporarily offline. + +> **Use Cases**: +> - Blinking lights or strobe effects. +> - Safety shutoff for heaters or motors. + + +## Step 4: Other + +![Sinric Pro device creation timers]({{ site.github.url }}/public/img/sinricpro-portal-device-creation-others.png) + +Provide optional metadata about your device, especially energy consumption. + +### Energy Usage (Estimate) + +Toggle this option to enable energy estimation features. Server calculates the device's energy consumption based on on/off timing of the device. You can view the consumption in the Energy Estimates menu on Portal. + +#### Fields: +- **Stand by Wattage (W)** + Power consumed when the device is off or in standby. + > *Example*: Smart plug = `0.5W`, TV = `5W` + +- **On Wattage (W)** + Power consumed when the device is actively running. + > *Example*: LED bulb = `9W`, Fan = `50W` + +> **Why It Matters**: +> Energy data helps users estimate electricity costs via Alexa smart dashboards. + +> **Recommendation**: +> Use manufacturer specs or a watt-meter for accurate values. + + +### Restore Device State When Connect + +When this feature is enabled, the SinricPro server automatically sends the device’s most recent state—such as power status, brightness, custom settings, and other relevant data—immediately after the device reconnects. + +For example, if your device was **on** when it went offline, the server will send that last known power state (`true`) to the device upon reconnection—triggering your `onPowerState` callback and automatically restoring the device to its previous state. + +### Custom Settings in SinricPro + +Custom Settings allow you to define and manage your own device specific configuration parameters beyond the standard capabilities provided by SinricPro. + +For example, you could use Custom Settings to: +- Enable or disable a built-in LED on or off, +- Set minimum SSID strength to connect to a SSID, +- Set a **temperature offset** for a thermostat, +- Flag to set **automatic reboot** after a firmware update, +- Configure a **default brightness level** for startup. + + +[Complete Settings Tutorial]({{ site.github.url }}/pages/tutorials/general/sinricpro-settings-tutorial.html) + +--- + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/general/device-not-found-fauxmoESP-espalexa.md b/pages/tutorials/general/device-not-found-fauxmoESP-espalexa.md new file mode 100644 index 0000000..66d7e4b --- /dev/null +++ b/pages/tutorials/general/device-not-found-fauxmoESP-espalexa.md @@ -0,0 +1,154 @@ +--- +title: Espalexa or fauxmoESP "Device Not Found"? Why Emulation Fails and How to Fix It +layout: post +lang: en +--- + +If you are reading this, you are likely staring at a Serial Monitor trying to figure out why Alexa says "No new devices found" or "Device is unresponsive." + +You’ve probably been using libraries like **Espalexa** or **fauxmoESP**. They worked great for years, but recently, they have become hit-or-miss. Maybe they work on your Echo Dot Gen 2, but fail on your Gen 4. Maybe they work for an hour and then disappear. + +Here is the technical reason why your emulation is failing—and the reliable way to fix it for good. + +## The Problem: Local Emulation is Dying + +Libraries like Espalexa and fauxmoESP rely on **Local Emulation**. They try to trick Alexa into thinking your ESP32 is an old **Belkin WeMo** switch or a **Philips Hue** bridge. + +To do this, they use **UPnP** (Universal Plug and Play) and **SSDP** (Simple Service Discovery Protocol) over UDP multicast. + +### Why this fails today: + +1. **Amazon Firmware Updates:** Newer Amazon Echo devices (Gen 3, Gen 4, and Show) have significantly stricter security protocols. They often ignore the older, simple UDP broadcast packets that these libraries generate. + +2. **Router Blocking:** If your ESP device and your Alexa device are on different frequency bands (2.4GHz vs 5GHz) or different subnets, many modern routers block the Multicast packets required for discovery. + +3. **No Feedback Loop:** Emulation is a "hack." It is not an official API. When Amazon changes a discovery timeout or a header requirement, your device breaks instantly, and you have to wait for the library maintainer to update it. + +## The Solution: Cloud Integration (Sinric Pro) + +The only way to guarantee stability is to stop tricking Alexa and start talking to her officially. + +**Sinric Pro** takes a different approach. Instead of listening for finicky UDP packets on your local network, your ESP8266/ESP32 opens a secure, persistent **WebSocket connection** to the Sinric Pro cloud. + +When you ask Alexa to "Turn on the kitchen light": + +1. Alexa talks to the **Sinric Pro Smart Home Skill** (Official Cloud-to-Cloud integration). + +2. Sinric Pro sends a signal down the open WebSocket to your ESP device. + +3. Your ESP reacts instantly. + +Because the connection is outbound from your device, **it punches through firewalls and works across different subnets reliably.** + +## Migration Guide: Moving from Espalexa to Sinric Pro + +Switching is easier than you think. You don’t need to rewrite your whole logic; you just need to swap the connection handler. + +### 1\. The Setup + + * **Espalexa:** You define a device name in code. + + * **Sinric Pro:** You create a device in the [Sinric Pro Portal](https://portal.sinric.pro), get a `DEVICE_ID`, `APP_KEY`, `APP_SECRET` and paste it into your code. *This separates your hardware from your configuration.* + + +### 2\. The Code Comparison + +Here is a side-by-side look at how you handle a simple light switch. + +#### 1. The Old Way (fauxmoESP) + +*Relies on complex callback comparisons and UDP polling.* + +```cpp +#include + +fauxmoESP fauxmo; + +void setup() { + // ... wifi setup ... + + // You had to define devices by string names locally + fauxmo.addDevice("Kitchen Light"); + fauxmo.setPort(80); // Required for Gen3+ devices + fauxmo.enable(true); + + fauxmo.onSetState([](unsigned char device_id, const char * device_name, bool state, unsigned char value) { + // You had to check strings to find which device was triggered + if (strcmp(device_name, "Kitchen Light") == 0) { + Serial.println(state ? "ON" : "OFF"); + // Control relay here + } + }); +} + +void loop() { + fauxmo.handle(); // Must run constantly to catch UDP packets +} +``` +#### 2\. The Old Way (Espalexa) + +Relies on local discovery loop. + +```cpp + +#include + +Espalexa espalexa; + +void lightChanged(uint8_t brightness) { + // Control your relay/LED here +} + +void setup() { + // ... wifi setup ... + espalexa.addDevice("Kitchen Light", lightChanged); + espalexa.begin(); +} + +void loop() { + espalexa.loop(); // Must run constantly to catch UDP packets +} +``` + +#### The New Way (Sinric Pro) + +*Relies on event callbacks.* + +```cpp +#include +#include + +#define APP_KEY "YOUR-APP-KEY" +#define APP_SECRET "YOUR-APP-SECRET" +#define SWITCH_ID "YOUR-DEVICE-ID" // From Portal + +bool onPowerState(const String &deviceId, bool &state) { + Serial.printf("Device %s turned %s\r\n", deviceId.c_str(), state?"on":"off"); + // Control your relay/LED here + return true; // request handled properly +} + +void setup() { + // ... wifi setup ... + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + mySwitch.onPowerState(onPowerState); + + SinricPro.begin(APP_KEY, APP_SECRET); +} + +void loop() { + SinricPro.handle(); // Maintains WebSocket connection +} +``` + +## Why Switch? + + * **Reliability:** Works with **all** Alexa generations (Echo, Dot, Spot, Show, Flex). + + * **Features:** Supports dimming, color temperature, thermostats, blinds, and garage doors natively—things that are very hard to emulate with WeMo protocols. + + * **Mobile App:** You get SinricPro mobile app to control your devices when you aren't home (Espalexa only works when you are on the same WiFi). + +**Get your secrets for Free at [SinricPro](https://portal.sinric.pro)** + + \ No newline at end of file diff --git a/pages/tutorials/general/how-to-send-announcements-to-alexa.md b/pages/tutorials/general/how-to-send-announcements-to-alexa.md new file mode 100644 index 0000000..ffae409 --- /dev/null +++ b/pages/tutorials/general/how-to-send-announcements-to-alexa.md @@ -0,0 +1,34 @@ +--- +title: Sending Voice Announcements via Alexa Using SinricPro +layout: post +lang: en +--- + +The Amazon Alexa Smart Home API does not natively support sending arbitrary voice announcements (i.e., custom text-to-speech messages). However, you can achieve this functionality indirectly using only officially supported methods by combining **Alexa Routines** with a **Switch** in SinricPro. + +## Method: Alexa Routines + SinricPro Switch + +Follow these steps to enable Alexa voice announcements triggered from your SinricPro integration: + +1. **Create an Alexa Routine** + In the Alexa app, set up a new Routine that speaks your desired message. Configure it to be triggered by a specific smart home event—such as “When a smart device turns on.” + +2. **Add a Switch in SinricPro** + In your SinricPro dashboard, create a new **Switch** device (this will act as your virtual trigger). + +3. **Trigger the Announcement** + From your application or server, send a SinricPro `sendPowerStateEvent` event to turn **on** the virtual switch. This action will activate the Alexa Routine, causing Alexa to speak your announcement. + +--- + +Example code for ESP8266/ESP32: + +``` +void triggerVoiceAnnouncement() { + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + mySwitch.sendPowerStateEvent(true); +} +``` +--- + +> **Note:** This approach leverages only Amazon-approved mechanisms and does not require any unofficial workarounds. \ No newline at end of file diff --git a/pages/tutorials/general/how-to-send-announcements-to-google-home.md b/pages/tutorials/general/how-to-send-announcements-to-google-home.md new file mode 100644 index 0000000..07801fe --- /dev/null +++ b/pages/tutorials/general/how-to-send-announcements-to-google-home.md @@ -0,0 +1,45 @@ +--- +title: Sending Voice Announcements via Google Home Using SinricPro +layout: post +lang: en +--- + +Google Home **does not support arbitrary text-to-speech (TTS) announcements** through the Smart Home API for third-party integrations like SinricPro. However, you can achieve voice announcements **indirectly** using **Google Home Routines** (called *“Routines”* in the Google Home app) combined with a virtual device trigger. + +--- + +## Method: Google Home Routines + SinricPro Switch + +### Step-by-Step: + +1. **Create a Google Home Routine** + - Open the **Google Home app**. + - Go to **Routines** → **+ Create new routine**. + - Under **“When this happens”**, choose **“Device state”** (e.g., “When [Device] turns on”). + - Under **“Add action”**, select **“Assistant voice”** or **“Speak response”**, and enter your custom announcement (e.g., “The garage door is open.”). + - Save the routine. + +2. **Add a Switch in SinricPro** + - In your **SinricPro dashboard**, create a new **Switch** device. + - Give it a recognizable name (e.g., “Announcement Trigger”). + +3. **Trigger the Announcement** + - From your code or automation system, send a `sendPowerStateEvent` command to turn **on** the Switch via SinricPro. + - This state change is detected by Google Home and triggers the associated routine, causing the Google Assistant to speak your message. + +--- + +Example code for ESP8266/ESP32: + +``` +void triggerVoiceAnnouncement() { + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + mySwitch.sendPowerStateEvent(true); +} +``` +--- + +### Limitation: +This approach supports **predefined announcements only**. If you need to send **dynamic/runtime messages** (e.g., “Current temperature is 23°C”), Google Home **does not support this** via standard Smart Home APIs. In such cases, you’d need to explore alternative solutions like **broadcast notifications on Android devices** or **third-party TTS speakers**, which fall outside the official Google Smart Home framework. + +--- diff --git a/pages/tutorials/general/rf-transmitter-with-sinricpro.md b/pages/tutorials/general/rf-transmitter-with-sinricpro.md new file mode 100644 index 0000000..aa82c21 --- /dev/null +++ b/pages/tutorials/general/rf-transmitter-with-sinricpro.md @@ -0,0 +1,276 @@ +--- +title: ESP32 RF Transmitter + SinricPro Integration Tutorial +layout: post +lang: en +--- + +Control your RF devices (lights, fans, outlets) via Alexa, Google Home, or the SinricPro app — using your existing 433MHz RF transmitter! + +## What You’ll Achieve + +You’ll transform your ESP32 from a simple button-controlled RF remote into a **smart home hub** that can receive voice/app commands and transmit the same RF codes you’ve already captured. + +--- + +## Prerequisites + +- ESP32 Development Board +- 433MHz RF Transmitter Module +- Arduino IDE (or PlatformIO) +- WiFi Network +- SinricPro Account: [https://portal.sinric.pro](https://portal.sinric.pro) + +--- + +## Hardware Setup + +Connect your RF transmitter to the ESP32: + +| RF Transmitter Pin | ESP32 GPIO | +|--------------------|------------| +| VCC | 3.3V | +| GND | GND | +| DATA | GPIO 4 | + +*(You can remove the buttons — they’re optional once SinricPro is active.)* + +--- + +## Step 1: Install Required Libraries + +In **Arduino IDE**: + +1. Go to `Sketch → Include Library → Manage Libraries` +2. Install: + - `RCSwitch` by Suat Özgür + - `SinricPro` by SinricPro + +--- + +## Step 2: Set Up Devices in SinricPro Portal + +1. Go to [https://portal.sinric.pro](https://portal.sinric.pro) +2. Log in or create an account. +3. Click **“Add Device”** → Add: + - A **Switch** for Lights → Note its `Device ID` + - A **Switch** or **Fan** for Fan → Note its `Device ID` +4. Go to **“Account” → “Security”** → Copy your: + - `APP KEY` + - `APP SECRET` + +--- + +## Step 3: Upload the Integration Code + +Replace the placeholders with your credentials and RF codes. + +```cpp +#include +#include +#include +#include +#include + +// ======================== +// CONFIGURATION +// ======================== + +// WiFi Credentials +const char* WIFI_SSID = "YOUR_WIFI_SSID"; +const char* WIFI_PASS = "YOUR_WIFI_PASSWORD"; + +// SinricPro Credentials (from https://portal.sinric.pro) +#define APP_KEY "YOUR_APP_KEY_HERE" +#define APP_SECRET "YOUR_APP_SECRET_HERE" + +// Device IDs (from SinricPro portal) +#define LIGHTS_ID "YOUR_LIGHTS_DEVICE_ID" +#define FAN_ID "YOUR_FAN_DEVICE_ID" + +// RF Codes (your captured codes) +const unsigned long CODE_LIGHTS = 13651983; +const unsigned long CODE_HIGH = 13651971; +const unsigned long CODE_OFF = 13652160; + +// Initialize RF Transmitter +RCSwitch mySwitch = RCSwitch(); + +// ======================== +// CALLBACK FUNCTIONS +// ======================== + +// Handle Lights (ON/OFF) +bool onLights(const String &deviceId, bool &state) { + if (state) { + mySwitch.send(CODE_LIGHTS, 24); + Serial.println("RF -> Lights ON"); + } else { + mySwitch.send(CODE_OFF, 24); + Serial.println("RF -> Lights OFF"); + } + return true; // Command handled successfully +} + +// Handle Fan (ON=High / OFF=Off) +bool onFan(const String &deviceId, bool &state) { + if (state) { + mySwitch.send(CODE_HIGH, 24); + Serial.println("RF -> Fan HIGH"); + } else { + mySwitch.send(CODE_OFF, 24); + Serial.println("RF -> Fan OFF"); + } + return true; +} + +// ======================== +// SETUP +// ======================== + +void setup() { + Serial.begin(115200); + + // Initialize RF Transmitter on GPIO 4 + mySwitch.enableTransmit(4); + mySwitch.setPulseLength(228); // Adjust if needed + + // Connect to WiFi + Serial.print("Connecting to WiFi"); + WiFi.begin(WIFI_SSID, WIFI_PASS); + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + } + Serial.println("\nWiFi Connected!"); + + // Attach callbacks to SinricPro devices + SinricProSwitch &lights = SinricPro[LIGHTS_ID]; + lights.onPowerState(onLights); + + SinricProSwitch &fan = SinricPro[FAN_ID]; + fan.onPowerState(onFan); + + // Start SinricPro + SinricPro.begin(APP_KEY, APP_SECRET); +} + +// ======================== +// MAIN LOOP +// ======================== + +void loop() { + SinricPro.handle(); // Keep connection alive & listen for commands +} +``` + +--- + +## Step 4: Test It! + +1. Upload the code to your ESP32. +2. Open **Serial Monitor** (`Ctrl+Shift+M`) at 115200 baud. +3. Wait for “ WiFi Connected!” and “SinricPro Ready!” +4. Use Alexa / Google Assistant / SinricPro App: + - *“Alexa, turn on the lights”* + - *“Hey Google, turn off the fan”* + +You should see confirmation in Serial Monitor and your RF device should respond! + +--- + +## Bonus: Add Physical Buttons Back (Optional) + +Want both voice AND button control? Just merge your original `loop()` logic: + +```cpp +// GPIOs for buttons +const int BUTTON_LIGHTS = 12; +const int BUTTON_HIGH = 13; +const int BUTTON_OFF = 14; + +void setup() { + // ... [previous setup code] + + // Set buttons as INPUT_PULLUP + pinMode(BUTTON_LIGHTS, INPUT_PULLUP); + pinMode(BUTTON_HIGH, INPUT_PULLUP); + pinMode(BUTTON_OFF, INPUT_PULLUP); +} + +void loop() { + SinricPro.handle(); // Must run frequently + + // Manual button control (active LOW) + if (digitalRead(BUTTON_LIGHTS) == LOW) { + mySwitch.send(CODE_LIGHTS, 24); + Serial.println("Button: Lights ON"); + delay(500); // debounce + } + + if (digitalRead(BUTTON_HIGH) == LOW) { + mySwitch.send(CODE_HIGH, 24); + Serial.println("Button: Fan HIGH"); + delay(500); + } + + if (digitalRead(BUTTON_OFF) == LOW) { + mySwitch.send(CODE_OFF, 24); + Serial.println("Button: OFF"); + delay(500); + } +} +``` + +--- + +## Advanced: Multi-Speed Fan? + +If your fan has Low/Med/High, use `SinricProFanUS` instead of `SinricProSwitch`: + +```cpp +#include + +#define FAN_ID "YOUR_FAN_ID" + +bool onFanSpeed(const String &deviceId, int &speed) { + switch (speed) { + case 0: mySwitch.send(CODE_OFF, 24); break; + case 1: mySwitch.send(CODE_LOW, 24); break; + case 2: mySwitch.send(CODE_MED, 24); break; + case 3: mySwitch.send(CODE_HIGH, 24); break; + } + return true; +} + +// In setup(): +SinricProFanUS &fan = SinricPro[FAN_ID]; +fan.onPowerState([](const String &, bool &state) { + // Optional: handle simple on/off if needed + return true; +}); +fan.onPowerLevel(onFanSpeed); // Handles speed levels +``` + +> You’ll need to define `CODE_LOW` and `CODE_MED` if your remote supports them. + +--- + +## Troubleshooting Tips + +- Double-check your RF codes and pulse length. +- Ensure WiFi credentials and SinricPro keys are correct. +- Device IDs must match exactly (copy-paste from portal). +- If RF range is poor, add a 17cm wire as antenna to transmitter. + +--- + +## Done! + +You’ve now bridged your legacy RF devices with modern smart assistants — no replacing hardware required! + +Let me know if you want to add more devices, schedules, or local button feedback (LEDs/buzzer)! + +--- + +**Next Step:** Try saying *“Alexa, discover devices”* — and enjoy voice-controlled RF gadgets! +``` \ No newline at end of file diff --git a/pages/tutorials/general/sinricpro-settings-tutorial.md b/pages/tutorials/general/sinricpro-settings-tutorial.md new file mode 100644 index 0000000..e552188 --- /dev/null +++ b/pages/tutorials/general/sinricpro-settings-tutorial.md @@ -0,0 +1,339 @@ +--- +title: Settings Tutorial +layout: post +lang: en +--- + +Custom Settings is a powerful feature that allows you to define and manage configuration parameters for your devices and modules. Instead of hardcoding values in your firmware, you can create settings that can be changed remotely through the SinricPro Portal or app. + + +![Sinric Pro Settings]({{ site.github.url }}/public/img/sinricpro-device-settings.png) + +### SDK Requirements + +To use the Settings feature, ensure you have the following SDK versions: + +| SDK | Minimum Version | +|-----|-----------------| +| **ESP8266/ESP32 SDK** | 4.0 | +| **Node.js SDK** | 5.1.0 | +| **Python SDK** | 5.0.1 | + +--- + +**Note**: These settings are not controllable via Amazon Alexa or Google Home. + +The Settings feature enables you to: + +- **Define custom configuration parameters** for your devices (e.g., temperature thresholds, timer durations, operating modes) +- **Change device behavior remotely** without re-flashing firmware +- **Create reusable settings** that can be assigned to multiple devices +- **Organize settings by category** for better management + +### Types of Settings + +SinricPro supports three types of settings: + +| Type | Description | Example Use Cases | +|------|-------------|-------------------| +| **Number** | Numeric values with optional min/max range, precision, and units | Temperature threshold (0-100°C), Fan speed (0-100%), Timer duration (seconds) | +| **List** | Dropdown selection from predefined options | Operating mode (Off/Low/Medium/High), Power profile (Eco/Normal/Performance) | +| **Boolean** | Simple on/off toggle | Enable notifications, Debug mode, Night mode | + +Settings can be created at two levels: + +- **Device Settings**: Apply to individual IoT devices (e.g., a specific smart switch) +- **Module Settings**: Apply to ESP modules/controller boards (e.g., WiFi configuration for the module itself) + +--- + +## Setting Up Custom Settings + +### Step 1: Create a Global Setting + +![Sinric Pro Settings]({{ site.github.url }}/public/img/sinricpro-global-device-settings-management.png) + +Global settings are reusable templates that can be assigned to multiple devices. + +1. Navigate to **Devices** → **Global Device Settings** (for device settings) or **Modules** → **Global Module Settings** (for module settings) + +2. Click **Create New Setting** + +![Sinric Pro Settings]({{ site.github.url }}/public/img/sinricpro-create-settings.png) + +3. Fill in the **Basic Information**: + - **Name**: A descriptive name (e.g., "Temperature Threshold") + - **Setting ID**: Auto-generated from name (e.g., `id_temperature_threshold`) + - **Description**: Optional explanation of what this setting does + - **Category**: Group your settings (General, Operation, Timer, Sensors, etc.) + - **Order**: Sort order for display (0 = first) + +4. Configure the **Value Type**: + + **For Number Settings:** + - Set minimum and maximum values + - Choose precision (decimal places: 0-4) + - Optionally specify a unit (°C, %, RPM, sec, etc.) + - Enable "Is Percentage" for 0-100% range with automatic formatting + + **For List Settings:** + - Add 2-20 options + - Each option must be unique + - First option becomes the default + + **For Boolean Settings:** + - No additional configuration needed + - Displays as Enabled/Disabled toggle + +5. **Optional**: Enable **Read-Only** if the device sets this value and users should only view it (e.g., sensor readings) + +6. Click **Create** to save the setting + +### Step 2: Assign Settings to a Device + +![Sinric Pro Settings]({{ site.github.url }}/public/img/sinricpro-device-assign-settings.png) + +Once you've created global settings, assign them to your devices: + +*Option 1:* + +1. Go to **Devices** and select the device you want to configure, click **Edit** + +2. Click on the **Other** tab + +![Sinric Pro Settings]({{ site.github.url }}/public/img/sinricpro-device-edit-settings-other.png) + +3. In Custom Settings, click **Setup** to open the settings assignment dialog + +4. Click **Select a setting** dropdown and choose a setting to assign + +5. To assign multiple settings, click **+** + +6. Review the settings you've selected - you can see: + - Setting name and ID + - Type (Number/List/Boolean) + - Category + - Read-only status + +7. Click **Save** to apply the settings to your device + +*Option 2:* + +1. Go to **Dashboard** and select the device you want to configure, click **Settings** + +![Sinric Pro Settings]({{ site.github.url }}/public/img/sinricpro-device-settings-manage-settings.png) + +2. Click **Manage Settings** and **Select a setting** + +4. On **Select a setting** dialog, choose a setting to assign + +4. To assign multiple settings, click **+** + +5. Review the settings you've selected - you can see: + - Setting name and ID + - Type (Number/List/Boolean) + - Category + - Read-only status + +6. Click **Save** to apply the settings to your device + +### Step 3: Generate Code for Your Firmware + +After assigning settings, generate the callback code for your firmware: + +1. In the settings assignment dialog, click **Get Code** + +2. Select your SDK: + - **Arduino ESP-8266/ESP-32/RP2040** + - **NodeJS** + - **Python** + +3. Copy the generated code and integrate it into your firmware + +--- + +## Using Settings in Your Code + +### Arduino/ESP SDK + +#### Device Settings Callback + +```cpp +bool onSetDeviceSetting(const String& deviceId, const String& settingId, SettingValue& settingValue) { + // Handle device settings based on value type + if (std::holds_alternative(settingValue)) { + Serial.printf("Device %s: Setting %s = %d\r\n", deviceId.c_str(), settingId.c_str(), std::get(settingValue)); + } else if (std::holds_alternative(settingValue)) { + Serial.printf("Device %s: Setting %s = %.2f\r\n", deviceId.c_str(), settingId.c_str(), std::get(settingValue)); + } else if (std::holds_alternative(settingValue)) { + Serial.printf("Device %s: Setting %s = %s\r\n", deviceId.c_str(), settingId.c_str(), std::get(settingValue) ? "true" : "false"); + } else if (std::holds_alternative(settingValue)) { + Serial.printf("Device %s: Setting %s = %s\r\n", deviceId.c_str(), settingId.c_str(), std::get(settingValue).c_str()); + } + return true; +} + +void setupSinricPro() { + // ... your existing setup code ... + + // Register the device setting callback + myDevice.onSetSetting(onSetDeviceSetting); + // .. + SinricPro.begin(APP_KEY, APP_SECRET); +} +``` + +#### Device Settings Event + +```cpp +void sendLedState() { + SinricProSwitch& mySwitch = SinricPro[SWITCH_ID]; + Serial.printf("Sending device setting 'id_led' = %s\r\n", ledState ? "true" : "false"); + mySwitch.sendSettingEvent('id_led', ledState); +} +``` + + +#### Module Settings Callback + +```cpp +bool onSetModuleSetting(const String& id, SettingValue& value) { + // Handle module settings based on value type + if (std::holds_alternative(value)) { + Serial.printf("Module setting %s = %d\r\n", id.c_str(), std::get(value)); + } else if (std::holds_alternative(value)) { + Serial.printf("Module setting %s = %.2f\r\n", id.c_str(), std::get(value)); + } else if (std::holds_alternative(value)) { + Serial.printf("Module setting %s = %s\r\n", id.c_str(), std::get(value) ? "true" : "false"); + } else if (std::holds_alternative(value)) { + Serial.printf("Module setting %s = %s\r\n", id.c_str(), std::get(value).c_str()); + } + return true; +} + +void setupSinricPro() { + // ... your existing setup code ... + + // Register module setting callback + SinricPro.onSetSetting(onSetModuleSetting); + // .. + SinricPro.begin(APP_KEY, APP_SECRET); +} +``` + +#### Module Settings Event + +```cpp + int rssi = WiFi.RSSI(); + Serial.printf("Sending module setting 'id_wifi_rssi' = %d\r\n", rssi); + SinricPro.sendSettingEvent('id_wifi_rssi', rssi); +``` + + + +### NodeJS SDK + +```javascript +myDevice.onSetting(async (deviceId, setting, value) => { + if (setting === "id_temperature_threshold") { + console.log(`Device ${deviceId} setting: ${setting} = ${value}`); + // Apply your logic + await setTemperatureThreshold(value); + } else if (setting === "id_power_mode") { + console.log(`Device ${deviceId} setting: ${setting} = ${value}`); + await setPowerMode(value); + } + + return true; +}); +``` + +### Python SDK + +```python +async def on_setting(setting: str, value: Any) -> bool: + if setting == "id_temperature_threshold": + print(f"Setting {setting} = {value}") + await set_temperature_threshold(value) + elif setting == "id_power_mode": + print(f"Setting {setting} = {value}") + await set_power_mode(value) + + return True + +# In main() function +my_device.on_setting(on_setting) +``` + +--- + +## Best Practices + +### Naming Conventions + +- Use descriptive names: "Temperature Threshold" instead of "Temp" +- Setting IDs are auto-generated: `id_temperature_threshold` +- Group related settings using categories + +### Categories + +Organize your settings using the built-in categories: + +| Category | Use For | +|----------|---------| +| General | Basic device configuration | +| Operation | Operating modes and behaviors | +| Position | Position/level settings (blinds, dimmers) | +| Timer | Time-related settings (delays, durations) | +| Sensors | Sensor thresholds and calibration | +| Display | Display/LED settings | +| Power | Power management settings | +| Network | Network configuration | +| Other | Miscellaneous settings | + +### Read-Only Settings + +Use read-only settings for values that: +- Are set by the device (sensor readings, status indicators) +- Should be visible to users but not changeable +- Are computed or derived values + +### Validation Tips + +- **Number settings**: Always set appropriate min/max ranges to prevent invalid values +- **List settings**: Provide clear, descriptive option names +- **Precision**: Use precision = 0 for integers, precision > 0 for decimals + +--- + +## Troubleshooting + +### Setting Not Updating + +1. Ensure the callback is registered in `setupSinricPro()` +2. Verify the setting ID matches exactly (case-sensitive) +3. Check that `return true;` is included in the callback + +### Setting Not Appearing + +1. Confirm the setting is assigned to the device +2. Check that the setting is not marked as read-only (for write operations) +3. Refresh the device page + +### Code Generation Empty + +1. Ensure at least one non-read-only setting is assigned +2. Read-only settings are excluded from generated code + +--- + +## Summary + +The Settings feature provides a flexible way to manage device configuration: + +1. **Create** global settings with appropriate types and constraints +2. **Assign** settings to your devices +3. **Generate** callback code for your firmware +4. **Implement** the callback to handle setting changes + +This approach separates configuration from code, making your IoT devices more maintainable and user-friendly. diff --git a/pages/tutorials/light/LED-Stripe-5050.md b/pages/tutorials/light/LED-Stripe-5050.md new file mode 100644 index 0000000..f53ca73 --- /dev/null +++ b/pages/tutorials/light/LED-Stripe-5050.md @@ -0,0 +1,98 @@ +--- +title: Light Tutorial for LED Light Strip RGB 5050 +layout: post +--- + +In this section we’ll walk through creating a LED Light Strip using **ESP32**, **ESP8266** and then control it via **Amazon Alexa, Google Home or SmartThings**. + +### Prerequisites : + +1. ESP32, ESP8266 x 1. +2. IRF540N MOSFET, STP16nF06L MOSFET, S8050 NPN transistor or BC337 NPN transistor x 3 +3. 1k resistor x 3 +4. Jumper Wires. + +In this tutorial we are going to use BC337 NPN transistors. + +![Sinric Pro light strip 5050 wiring]({{ site.github.url }}/public/img/sinric_pro_light_5050-led-strip-wiring.jpg) + +### Quick introduction to 5050 LED strips +5050 LED strips are a type of LED strip that is made up of individual LEDs that are grouped together in sets of three. Each set of three LEDs is known as a pixel. The pixels are arranged in a long, thin strip, and they can be cut to length to fit your needs. 5050 LED strips are available in a variety of colors, including red, green, blue, white, and yellow. They can also be purchased in different brightness levels. 5050 LED strips are affordable LED strips that look similar to more expensive Neopixel strips. However, the LEDs in 5050 LED strips cannot be controlled individually. This means that you can only use one color for the entire strip at a time. + + +Here is a table that summarizes the key differences between 5050 LED strips and Neopixel strips: + + +| Feature | 5050 LED strips | Neopixel strips +| --------- | ------- | --------- +| Price | Affordable | More expensive +| Individually addressable LEDs | No | Yes +| Animations| Limited to common animations such as color changing and dimming | Complex animations with individual LEDs are possible + + +### Wiring + +![Sinric Pro light strip 5050 wiring]({{ site.github.url }}/public/img/sinric_pro_light_5050-led-strip.png) +![Sinric Pro light strip 5050 wiring]({{ site.github.url }}/public/img/sinric_pro_light_5050-led-strip-wiring-without-strip.jpg) + +| Strip | ESP32 PIN +| --------- | ------- +| 5V | 5V +| R | 14 +| G | 12 +| B | 27 + +Let's verify LED Strip is wired correctly and working. + + + +LED Strip will change the colors like this: + + + + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **LED strip**, description **My LED strip** and select the device type as **Smart Light Bulb**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_light_new_device.png) + +* Click **Next** the in the Notifications tab + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Complete Code + + + + + +Now you should be able to control via Alexa, GoogleHome and SmartThings as well. + + + +### Troubleshooting + +1. Use a power supply that can provide enough current for the LED strip. LED strips can consume a lot of current, so it is important to use a power supply that can provide enough current to meet the needs of the strip. + +2. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/light/LED-Stripe-5050.pt.md b/pages/tutorials/light/LED-Stripe-5050.pt.md new file mode 100644 index 0000000..d1afe37 --- /dev/null +++ b/pages/tutorials/light/LED-Stripe-5050.pt.md @@ -0,0 +1,99 @@ +--- +title: Tutorial de Luz para Fita LED RGB 5050 +layout: post +lang: pt +--- + +Nesta seção vamos criar uma Fita LED usando **ESP32**, **ESP8266** e depois controlá-la via **Amazon Alexa, Google Home ou SmartThings**. + +### Pré-requisitos: + +1. ESP32, ESP8266 x 1. +2. MOSFET IRF540N, MOSFET STP16nF06L, transistor NPN S8050 ou transistor NPN BC337 x 3 +3. Resistor de 1k x 3 +4. Cabos Jumper. + +Neste tutorial vamos usar transistores NPN BC337. + +![Sinric Pro light strip 5050 wiring]({{ site.github.url }}/public/img/sinric_pro_light_5050-led-strip-wiring.jpg) + +### Introdução rápida às fitas LED 5050 +As fitas LED 5050 são um tipo de fita LED feita de LEDs individuais que são agrupados em conjuntos de três. Cada conjunto de três LEDs é conhecido como um pixel. Os pixels são organizados em uma fita longa e fina, e podem ser cortados no comprimento para atender às suas necessidades. As fitas LED 5050 estão disponíveis em uma variedade de cores, incluindo vermelho, verde, azul, branco e amarelo. Elas também podem ser compradas em diferentes níveis de brilho. As fitas LED 5050 são fitas LED acessíveis que parecem similares às fitas Neopixel mais caras. No entanto, os LEDs nas fitas LED 5050 não podem ser controlados individualmente. Isso significa que você só pode usar uma cor para toda a fita por vez. + + +Aqui está uma tabela que resume as principais diferenças entre fitas LED 5050 e fitas Neopixel: + + +| Característica | Fitas LED 5050 | Fitas Neopixel +| --------- | ------- | --------- +| Preço | Acessível | Mais caro +| LEDs endereçáveis individualmente | Não | Sim +| Animações| Limitado a animações comuns como mudança de cor e dimmer | Animações complexas com LEDs individuais são possíveis + + +### Fiação + +![Sinric Pro light strip 5050 wiring]({{ site.github.url }}/public/img/sinric_pro_light_5050-led-strip.png) +![Sinric Pro light strip 5050 wiring]({{ site.github.url }}/public/img/sinric_pro_light_5050-led-strip-wiring-without-strip.jpg) + +| Fita | PINO ESP32 +| --------- | ------- +| 5V | 5V +| R | 14 +| G | 12 +| B | 27 + +Vamos verificar se a Fita LED está conectada corretamente e funcionando. + + + +A Fita LED mudará as cores assim: + + + + +### Passo 1: Criar um novo dispositivo no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Fita LED**, descrição **Minha Fita LED** e selecione o tipo de dispositivo como **Smart Light Bulb**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_light_new_device.png) + +* Clique em **Próximo** na aba Notificações + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Código Completo + + + + + +Agora você deve conseguir controlar via Alexa, GoogleHome e SmartThings também. + + + +### Solução de Problemas + +1. Use uma fonte de alimentação que pode fornecer corrente suficiente para a fita LED. As fitas LED podem consumir muita corrente, então é importante usar uma fonte de alimentação que possa fornecer corrente suficiente para atender às necessidades da fita. + +2. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/motion-sensors/HC-SR501-HC-SR505-AM312-HC-SR312.md b/pages/tutorials/motion-sensors/HC-SR501-HC-SR505-AM312-HC-SR312.md new file mode 100644 index 0000000..1a0dbda --- /dev/null +++ b/pages/tutorials/motion-sensors/HC-SR501-HC-SR505-AM312-HC-SR312.md @@ -0,0 +1,136 @@ +--- +title: Motion Sensor Tutorial for HC-SR501, HC-SR505, Mini AM312, HC-SR312 +layout: post +--- + +In this section we’ll walk through creating a PIR **Motion Sensor** using **ESP32**, **ESP8266** or **Raspberry Pi Pico W** and then view the motion changes via **Alexa or SmartThings**. + +### Prerequisites : + +1. ESP32, ESP8266 or Raspberry Pi Pico W x 1. +2. HC-SR501, HC-SR505, Mini AM312, HC-SR312 x 1. +3. Jumper Wires. + +| PIR | Working voltage | Delay time | Blocking time | Trigger | Distance +| --------- | ------- |------- |------- |------- |------- +| HC-SR312 |2.7-12V | 2 seconds | 2 seconds | Repeatable | 3-5 meters +| HC-SR505 |4.5-20V | 2 seconds | 2 seconds | Repeatable | 3 meters +| HC-SR501 |4.5-20V | Adjustable | Adjustable | Adjustable | 3 meters to 7 meters + +### Quick introduction to PIR Motion Sensors + +Passive infrared (PIR) motion sensors detect the presence of people or animals by measuring changes in infrared radiation. PIR sensors work by detecting the infrared radiation emitted by all objects that have a temperature above absolute zero. When a person or animal moves into the field of view of a PIR sensor, the sensor detects a change in the amount of infrared radiation and triggers an alarm or other output. PIR sensors are a versatile and cost-effective way to detect motion. They are easy to use and can be installed in a variety of locations. + +The output of the PIR Motion Sensor is: + +- ``HIGH`` when a movement is detected. +- ``LOW`` when no movement is detected. + +To get accurate measurements, **wait for the PIR sensor to calibrate properly, this will normally take from 10 to 60 seconds** after turning it on. + +The HC-SR501 has adjustable configurations: + +![Sinric Pro esp8266 HC-SR501 ]({{ site.github.url }}/public/img/sinric_pro_pir_sensor.png) + +###### Sensitivity Adjustment + +- Measuring distance is between 3 and 7 meters. + +- Turning clockwise or right - Decreases the sensivity. Fully right upto 3 meters. + +- Counter Turning clockwise or left - Decreases the sensivity. Fully left about 7 meters. + +###### Time-Delay Adjustment + +- Delay time that defines how long the output of the HC-SR501 stays ``HIGH`` after a motion is detected. It can be adjusted from 1 second to about 5 minutes. + +- Turning clockwise or right - Increase the delay. Fully right upto 5 mins. + +- Counter Turning clockwise or left - Decreases the delay. Fully left about 3 seconds. + + +###### Jumper Set + +- **Single Trigger Mode (L)**: Triggers a single motion. The time delay potentiometer determines how long the pin will stay ``HIGH``. Any further motion detection is blocked until turns to ``LOW``. + +**Example**: The motion detector's time delay is set to 3 seconds, but it cannot detect motion for about 6 seconds after detecting motion. + +![Sinric Pro esp8266 PIR Single Trigger Mode]({{ site.github.url }}/public/img/sinric_pro_motion_pir_single_trigger.png) + +- **Multiple Trigger Mode (H)**: Triggers series of motions. The time delay potentiometer determines how long the pin will stay ``HIGH``. In multiple trigger mode, the time delay is reset each time motion is detected, so there is no blocking of further detection. + +**Example**: The time delay is 3 seconds. After motion is detected, the time delay period restarts. However, detection is still blocked for 3 seconds after the time delay expires. This 3-second delay allows the sensor to rest before starting to detect motion again.. + +![Sinric Pro esp8266 PIR Multiple Trigger Mode]({{ site.github.url }}/public/img/sinric_pro_motion_pir_multi_trigger.png) + +### Wiring + +![Sinric Pro esp8266 PIR wiring]({{ site.github.url }}/public/img/sinric_pro_pir_sensor_wiring.png) + + +| MCU | PIR Pin | +| --------- | ------- | +| ESP32 | 16 | +| ESP8266 | 5 (D1) | +| Pico W | GP5 | + +Let's verify that motion sensor is wired correctly and working. + + + +Arduino IDE Serial Monitor will show the motion detections like this: + + + + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Motion Sensor**, description **My Motion Sensor** and select the device type as **Motion Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_contact_motion_new_device.png) + +* Click **Next** the in the Notifications tab + +![Sinric Pro motion sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_motion_sensor_notifications.png) + +You can set the threshold here to receive a push notification via the Sinric Pro app when the motion is detected at **Daytime** or **Nighttime**. Use the Retrigger Time to set the delay between push notifications. + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +You can **generate the code** using **Zero Code** feature or write it by your self. If you do not have programming experice, we recommend to use Zero Code feature in the Portal to generate the code, download and flash. + +#### 2.2 Complete Code + + + +Now you should be able to view the motions via Alexa, SmartThings + +![Sinric Pro motions via Alexa, SmartThings]({{ site.github.url }}/public/img/sinric_pro_contact_motion_home_alexa_smartthings.png) + +via Portal + +![Sinric Pro Portal Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_contact_motion_portal.png) + +Please note that Google Home not supported. + +### Troubleshooting + +1. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/motion-sensors/HC-SR501-HC-SR505-AM312-HC-SR312.pt.md b/pages/tutorials/motion-sensors/HC-SR501-HC-SR505-AM312-HC-SR312.pt.md new file mode 100644 index 0000000..f079975 --- /dev/null +++ b/pages/tutorials/motion-sensors/HC-SR501-HC-SR505-AM312-HC-SR312.pt.md @@ -0,0 +1,137 @@ +--- +title: Tutorial de Sensor de Movimento para HC-SR501, HC-SR505, Mini AM312, HC-SR312 +layout: post +lang: pt +--- + +Nesta seção vamos criar um **Sensor de Movimento** PIR usando **ESP32**, **ESP8266** ou **Raspberry Pi Pico W** e depois visualizar as mudanças de movimento via **Alexa ou SmartThings**. + +### Pré-requisitos: + +1. ESP32, ESP8266 ou Raspberry Pi Pico W x 1. +2. HC-SR501, HC-SR505, Mini AM312, HC-SR312 x 1. +3. Cabos Jumper. + +| PIR | Tensão de operação | Tempo de atraso | Tempo de bloqueio | Disparo | Distância +| --------- | ------- |------- |------- |------- |------- +| HC-SR312 |2.7-12V | 2 segundos | 2 segundos | Repetível | 3-5 metros +| HC-SR505 |4.5-20V | 2 segundos | 2 segundos | Repetível | 3 metros +| HC-SR501 |4.5-20V | Ajustável | Ajustável | Ajustável | 3 metros a 7 metros + +### Introdução rápida aos Sensores de Movimento PIR + +Sensores de movimento de infravermelho passivo (PIR) detectam a presença de pessoas ou animais medindo mudanças na radiação infravermelha. Sensores PIR funcionam detectando a radiação infravermelha emitida por todos os objetos que têm uma temperatura acima do zero absoluto. Quando uma pessoa ou animal se move para o campo de visão de um sensor PIR, o sensor detecta uma mudança na quantidade de radiação infravermelha e dispara um alarme ou outra saída. Sensores PIR são uma maneira versátil e econômica de detectar movimento. Eles são fáceis de usar e podem ser instalados em uma variedade de locais. + +A saída do Sensor de Movimento PIR é: + +- ``HIGH`` quando um movimento é detectado. +- ``LOW`` quando nenhum movimento é detectado. + +Para obter medições precisas, **aguarde o sensor PIR calibrar adequadamente, isso normalmente levará de 10 a 60 segundos** após ligá-lo. + +O HC-SR501 tem configurações ajustáveis: + +![Sinric Pro esp8266 HC-SR501 ]({{ site.github.url }}/public/img/sinric_pro_pir_sensor.png) + +###### Ajuste de Sensibilidade + +- A distância de medição está entre 3 e 7 metros. + +- Girando no sentido horário ou à direita - Diminui a sensibilidade. Totalmente à direita até 3 metros. + +- Girando no sentido anti-horário ou à esquerda - Diminui a sensibilidade. Totalmente à esquerda cerca de 7 metros. + +###### Ajuste de Tempo de Atraso + +- Tempo de atraso que define por quanto tempo a saída do HC-SR501 permanece ``HIGH`` após um movimento ser detectado. Pode ser ajustado de 1 segundo a cerca de 5 minutos. + +- Girando no sentido horário ou à direita - Aumenta o atraso. Totalmente à direita até 5 minutos. + +- Girando no sentido anti-horário ou à esquerda - Diminui o atraso. Totalmente à esquerda cerca de 3 segundos. + + +###### Configuração do Jumper + +- **Modo de Disparo Único (L)**: Dispara um único movimento. O potenciômetro de tempo de atraso determina por quanto tempo o pino permanecerá ``HIGH``. Qualquer detecção adicional de movimento é bloqueada até retornar para ``LOW``. + +**Exemplo**: O tempo de atraso do detector de movimento está definido para 3 segundos, mas não pode detectar movimento por cerca de 6 segundos após detectar movimento. + +![Sinric Pro esp8266 PIR Single Trigger Mode]({{ site.github.url }}/public/img/sinric_pro_motion_pir_single_trigger.png) + +- **Modo de Disparo Múltiplo (H)**: Dispara uma série de movimentos. O potenciômetro de tempo de atraso determina por quanto tempo o pino permanecerá ``HIGH``. No modo de disparo múltiplo, o tempo de atraso é reiniciado cada vez que movimento é detectado, então não há bloqueio de detecção adicional. + +**Exemplo**: O tempo de atraso é de 3 segundos. Após movimento ser detectado, o período de tempo de atraso reinicia. No entanto, a detecção ainda é bloqueada por 3 segundos após o tempo de atraso expirar. Este atraso de 3 segundos permite que o sensor descanse antes de começar a detectar movimento novamente. + +![Sinric Pro esp8266 PIR Multiple Trigger Mode]({{ site.github.url }}/public/img/sinric_pro_motion_pir_multi_trigger.png) + +### Fiação + +![Sinric Pro esp8266 PIR wiring]({{ site.github.url }}/public/img/sinric_pro_pir_sensor_wiring.png) + + +| MCU | Pino PIR | +| --------- | ------- | +| ESP32 | 16 | +| ESP8266 | 5 (D1) | +| Pico W | GP5 | + +Vamos verificar se o sensor de movimento está conectado corretamente e funcionando. + + + +O Monitor Serial do Arduino IDE mostrará as detecções de movimento assim: + + + + +### Passo 1: Criar um novo dispositivo no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Sensor de Movimento**, descrição **Meu Sensor de Movimento** e selecione o tipo de dispositivo como **Motion Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_contact_motion_new_device.png) + +* Clique em **Próximo** na aba Notificações + +![Sinric Pro motion sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_motion_sensor_notifications.png) + +Você pode definir o limite aqui para receber uma notificação push via aplicativo Sinric Pro quando movimento é detectado durante o **Dia** ou **Noite**. Use o Tempo de Re-disparo para definir o atraso entre notificações push. + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +Você pode **gerar o código** usando o recurso **Zero Code** ou escrevê-lo você mesmo. Se você não tem experiência em programação, recomendamos usar o recurso Zero Code no Portal para gerar o código, baixar e carregar. + +#### 2.2 Código Completo + + + +Agora você deve conseguir visualizar os movimentos via Alexa, SmartThings + +![Sinric Pro motions via Alexa, SmartThings]({{ site.github.url }}/public/img/sinric_pro_contact_motion_home_alexa_smartthings.png) + +via Portal + +![Sinric Pro Portal Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_contact_motion_portal.png) + +Note que Google Home não é suportado. + +### Solução de Problemas + +1. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/switch.md b/pages/tutorials/switch.md deleted file mode 100644 index 03c4e5f..0000000 --- a/pages/tutorials/switch.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Smart Switch -layout: post ---- - -In this section we’ll walk through creating a **Smart Switch** and controlling it using Amazon Alexa. - -### Step 1 : Create a Sinric Pro account - -* Visit [http://portal.sinric.pro/register](http://portal.sinric.pro/register) and sign up for a new account - - -### Step 2 : Link your Amazon Alexa account - -* Open your Amazon Alexa app. -* Goto Skills & Games. -* Search for **Sinric Pro**. -* Click **ENABLE TO USE**. -* Enter the credentails you created in step 1. - -### Step 3 : Create a new device: Switch - -* [Login](http://portal.sinric.pro) to your Sinric Pro account. -* Go to **Devices** menu on your left. -* Click **Add Device** button (On top left). -* Enter the device name **SwitchOne**, description **My First Switch** and select the type as **Switch**. - -![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric-pro-create-switch.png) - -* Click **Next** - -* Select appropreate notifications if you wish to receive push notification via Sinric Pro app. - -![Sinric Pro push notifications]({{ site.github.url }}/public/img/sinric-pro-create-device-notification.png) - -* Click **Next** - -* The timer can be configured to turn ON or OFF after a certain amount of seconds. eg: automatically switch off your iron after an hour once turned it on. - -![Sinric Pro push notifications]({{ site.github.url }}/public/img/sinric-pro-create-device-timers.png) - -* Click **Next** - -* Sinric Pro And Alexa (US) supports energy estimates. If you know how much electricity your connected appliance uses, you can enter it here. - -![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-other.png) - -* Click **Save** - -* Next screen will show the credentials required to connect the device you just created. - -![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) - -* Copy the **Device Id**, **App Key** and **App Secret** - - -* ***Keep these values secure. Sharing them will likely suspend your account.*** - -Once you click on the save button Alexa should automatically detect the device we just created (If you completed Step 2). You should see a push notification like below in your phone. - -![Sinric Pro alexa switch notification]({{ site.github.url }}/public/img/sinricpro_switch_pushNotification.png) - -If you did not get the push notification, you can either ask, "Alexa, discover devices", or use the Add Device workflow in the alexa app. - -### Step 4 : Build A smart switch -#### 4.1 Example below assumes a WeMos D1 Mini and associated relay shield. -* Any MCU capable of running C++ code (NodeMCU, ESP-8266, ESP-32, Arduino) can be used. -* For this example power is provided via USB -* Details such as converting line voltage to 3.3V or 5V DC are not covered here. - -![Sinric Pro alexa switch on D1 Mini]({{ site.github.url }}/public/img/sinricpro_d1-mini-switch.png) - -### Step 5 : Program your device. -* SinricPro can be used from the Arduino IDE or any modern C/C++ IDE -* SinricPro works with PlatformIO - tested on VSCode and Jetbrains CLion. -* Download the demo code from here - * [Arduino Sketch Example](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Switch/Switch) - * [PlatformIO Example](https://github.com/sinricpro/esp8266-esp32-sdk/tree/master/examples/Switch/Switch) - * [Full SDK documentation - All Devices](https://github.com/sinricpro/esp8266-esp32-sdk#examples) -* Update the *APP_KEY* with your *App Key* -* Update the *APP_SECRET* with your *App Secret* -* Update the *SWITCH_ID* with your *Device ID* -* Upload the code to your ESP module. -* Toggle 'SwitchOne' in your Alexa App. -* Each time you toggle the switch you should hear the relay click. - -> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython-raspberry-pi-picow-with-thonny.md b/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython-raspberry-pi-picow-with-thonny.md new file mode 100644 index 0000000..dff5fa3 --- /dev/null +++ b/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython-raspberry-pi-picow-with-thonny.md @@ -0,0 +1,173 @@ +--- +title: How to Control a Relay (Turn On/Off) Using MicroPython on an Raspberry Pi Pico W with Thonny +layout: post +--- + +In this guide, we’ll show you how to set up MicroPython on your Raspberry Pi Pico W, create a Sinric Pro smart switch, and control it using popular smart home platforms like Alexa, Google Home, and SmartThings. + +### Prerequisites : + +1. Raspberry Pi Pico W dev board x 1. +2. SPDT Relay controller x 1. +3. Jumper Wires. + +### Install MicroPython on Your Raspberry Pi Pico W + +1. Download the latest MicroPython firmware for the Raspberry Pi Pico W from: [https://rpf.io/pico-w-firmware](https://rpf.io/pico-w-firmware) + +2. Connect one end of a micro USB cable to your Raspberry Pi Pico W. + +3. Press and hold the **BOOTSEL button** on the Pico W. + +4. Plug the other end of the USB cable into your computer (desktop, laptop, or Raspberry Pi). + +5. The Pico W will **appear as a removable drive** (typically named `RPI-RP2`) in your file manager. + **Drag and drop** the downloaded MicroPython `.uf2` file onto this drive. + +The Pico W will automatically reboot and disconnect—this is normal. Once complete, MicroPython will be installed and ready to use. + + +### Test the Installation: + +1. Open the **Thonny editor**. + +2. At the bottom right, click on the text and select *MicroPython (Raspberry Pi Pico)* from the options. + +![sinricpro micropython thonny]({{ site.github.url }}/public/img/sinricpro-thonny-select-usb.png) + +In the shell, type +```py +print("Hello, MicroPython!") +``` + +![sinricpro micropython thonny hello world]({{ site.github.url }}/public/img/sinricpro-thonny-sinricpro-hello-world.png) + + +### Setup SinricPro library + +1. Download the latest Wheel `.whl` from [https://github.com/sinricpro/micropython-sinricpro-sdk/releases](https://github.com/sinricpro/micropython-sinricpro-sdk/releases) + +1. In Thonny, choose Tools > Manage packages. + +2. Click `Here` in `Install from Local File` section and continue the installtion. + +![Sinric Pro Pymakr]({{ site.github.url }}/public/img/sinricpro-thonny-install-whl.png) + +![Sinric Pro Pymakr]({{ site.github.url }}/public/img/sinricpro-thonny-installing-whl.png) + +![Sinric Pro Pymakr]({{ site.github.url }}/public/img/sinricpro-thonny-installed-whl.png) + + +### Sinric Pro integration + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Switch**, description **My First Switch** and select the device type as **Switch**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric-pro-create-switch.png) + +* Click **Next** the in the Notifications tab + +![Sinric Pro online offline push notifications]({{ site.github.url }}/public/img/sinric_pro_switch_tutorial_device_notifications.png) + +To receive push notifications when your device goes online or offline, enable the **"Connect and Disconnect"** option in the Sinric Pro app. To receive push notifications when your device turns on or off, enable the **"On and Off"** option. + + +* Click Others and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Coding + +Paste the following code in `main.py` + +```py +from sinricpro import SinricPro +from sinricpro.devices.sinricpro_switch import SinricProSwitch +from machine import Pin + +import uasyncio as a +import network + +# enter wifi details +ssid = "" +ssid_password = "" + +# enter appkey, appsecret and device id from above +app_key = "" +app_secret = "" +device_id = "" + +# relay is connected to GPIO 16 +relay = Pin(16, Pin.OUT) + +async def on_disconnected(): + print('Disconnected from SinricPro...reboot?') + +async def on_connected(): + print('Connected to SinricPro...') + +async def on_power_state_callback(device_id: str, state: bool): + print(f'device id: {device_id} state: {state}') + + if state: + relay.value(1) + else: + relay.value(0) + + return True + +# connect to wifi +def do_connect(): + sta_if = network.WLAN(network.STA_IF) + ap = network.WLAN(network.AP_IF) # create access-point interface + ap.active(False) # deactivate the interface + if not sta_if.isconnected(): + print('Connecting to network...') + sta_if.active(True) + sta_if.connect(ssid, ssid_password) + while not sta_if.isconnected(): + pass + print('Connected network config:', sta_if.ifconfig()) + +# start sinricpro +def do_sinricpro(): + sinricpro = SinricPro() + sinricpro.on_connected(on_connected) + sinricpro.on_disconnected(on_disconnected) + + sinricpro_switch = SinricProSwitch(device_id) + sinricpro_switch.on_power_state(on_power_state_callback) + + sinricpro.add_device(sinricpro_switch) + sinricpro.start(app_key, app_secret) + +# main coroutine +async def main(): + do_connect() + do_sinricpro() + + while True: + await a.sleep_ms(10_000) + +# start asyncio task and loop +try: + # start the main async tasks + a.run(main()) +finally: + # reset and start a new event loop for the task scheduler + a.new_event_loop() +``` + +That's it. + +![Sinric Pro MicroPython Connected]({{ site.github.url }}/public/img/sinricpro-thonny-sinricpro-running.png) + +Now the device is connected to Sinric Pro server and you can control it via Sinric Pro App, Alexa Skill, Google Home Action or SmartThings + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython.md b/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython.md new file mode 100644 index 0000000..5fc1d95 --- /dev/null +++ b/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython.md @@ -0,0 +1,238 @@ +--- +title: How to Control a Relay (Turn On/Off) Using MicroPython on an ESP32 with Pymakr +layout: post +--- + +In this guide, we'll walk you through the steps of setting up MicroPython on your ESP32, creating a Sinric Pro Switch and ultimately controlling it with smart home platforms like Alexa, Google Home, and SmartThings + +### Prerequisites : + +1. ESP32 dev board x 1. +2. SPDT Relay controller x 1. +3. Jumper Wires. + +### Setup MicroPython in ESP32 + +1. Install using pip: `pip install esptool` (You will need Python 3.7 or newer) + +2. MicroPython firmware: Download the latest version from [https://micropython.org/download/esp32/](https://micropython.org/download/esp32/). Choose the appropriate file based on your board's features (e.g., PSRAM, flash size). + +3. Connect the ESP32 to your computer via USB. + +4. Erase the ESP32's flash memory: `esptool --chip esp32 --port erase_flash` + +5. Write the MicroPython to the ESP32: + +`esptool --chip esp32 --port --baud 460800 write_flash -z 0x1000 ESP32_GENERIC-20231005-v1.21.0.bin` + + +### Test the Installation: + +1. Use a serial terminal program (e.g., PuTTY, CoolTerm, Thonny). + +![sinricpro micropython putty]({{ site.github.url }}/public/img/sinricpro-micropython-putty-config.png) + + +2. Configure with: Baud rate: **115200** Port: **The one connected to your ESP32**. + +3. Open the serial terminal to access the MicroPython REPL, where you can enter Python commands. + + +In the REPL, type +```py +print("Hello, MicroPython!") +``` + +![sinricpro micropython putty hello world]({{ site.github.url }}/public/img/sinricpro-micropython-putty-hello-world.png) + + + and press Enter. If successful, you'll see the message printed. + +Refer to the MicroPython documentation for details: [https://docs.micropython.org/en/latest/esp32/quickref.html](https://docs.micropython.org/en/latest/esp32/quickref.html) + +### Setup IDE + +We are going to use **VS Code** with **Pymakr** extension to program our ESP32 with MicroPython. So let's setup **Pymakr** extension + +1. Open VS Code. + +2. Go to the Extensions tab (Ctrl+Shift+X or Cmd+Shift+X). + +3. Search for "Pymakr" and click the "Install" button next to it. + +![Sinric Pro Pymakr]({{ site.github.url }}/public/img/sinricpro-micropython-install-pymakr.png) + +Reload VS Code when prompted. + +Click the "Pymakr" icon in the left sidebar of VS Code. + +### Wiring + +![Sinric Pro esp8266 relay wiring]({{ site.github.url }}/public/img/sinric-pro-relay-esp32-switch.png) + +Before we integrate with Sinric Pro, it is important to verify that the relay is wired correctly and it's working. + +Let's create a new Pymark Project. Press (Ctrl+Shift+P) and select `PyMark: Create new project` + +![Sinric Pro pymark new project]({{ site.github.url }}/public/img/sinricpro-micropython-pymakr-new-project.png) + +Paste this code in `main.py` + +```py +from machine import Pin +from time import sleep + +relay = Pin(16, Pin.OUT) + +while True: + relay.value(1) + sleep(5) + + relay.value(0) + sleep(5) +``` + +Select `PyMark` extention -> Connect to your ESP32 -> Click on Upload Icon. + +![Sinric Pro pymark new project]({{ site.github.url }}/public/img/sinricpro-micropython-pymakr-upload-mainpy.png) + +Once upload compleres, you must perform a **Hard reset device**. Then ESP32 will reboot and execute the code in `main.py` + +![Sinric Pro pymark hard reset device]({{ site.github.url }}/public/img/sinricpro-micropython-pymakr-hard-reset.png) + +Now your relay should trun on and off every 5 seconds. If the relay is working correctly, time to integrate with Sinric Pro. + +### Sinric Pro integration + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Switch**, description **My First Switch** and select the device type as **Switch**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric-pro-create-switch.png) + +* Click **Next** the in the Notifications tab + +![Sinric Pro online offline push notifications]({{ site.github.url }}/public/img/sinric_pro_switch_tutorial_device_notifications.png) + +To receive push notifications when your device goes online or offline, enable the **"Connect and Disconnect"** option in the Sinric Pro app. To receive push notifications when your device turns on or off, enable the **"On and Off"** option. + + +* Click Others and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Coding + +#### 2.1 Install Sinric Pro MicroPython Library + +Using mpremote: + +```shell +mpremote mip install github:sinricpro/micropython-sinricpro-sdk +``` + +Or using mip in MicroPython REPL prompt: + +```shell +import mip +mip.install("github:sinricpro/micropython-sinricpro-sdk")` +``` + +![Sinric Pro MicroPython SDK installtion]({{ site.github.url }}/public/img/sinricpro-micropython-install.png) + +#### 2.2 Complete Code + +Paste the following code in `main.py` + +```py +from sinricpro import SinricPro +from sinricpro.devices.sinricpro_switch import SinricProSwitch +from machine import Pin + +import uasyncio as a +import network + +# enter wifi details +ssid = "" +ssid_password = "" + +# enter appkey, appsecret and device id from above +app_key = "" +app_secret = "" +device_id = "" + +# relay is connected to GPIO 16 +relay = Pin(16, Pin.OUT) + +async def on_disconnected(): + print('Disconnected from SinricPro...reboot?') + +async def on_connected(): + print('Connected to SinricPro...') + +async def on_power_state_callback(device_id: str, state: bool): + print(f'device id: {device_id} state: {state}') + + if state: + relay.value(1) + else: + relay.value(0) + + return True + +# connect to wifi +def do_connect(): + sta_if = network.WLAN(network.STA_IF) + ap = network.WLAN(network.AP_IF) # create access-point interface + ap.active(False) # deactivate the interface + if not sta_if.isconnected(): + print('Connecting to network...') + sta_if.active(True) + sta_if.connect(ssid, ssid_password) + while not sta_if.isconnected(): + pass + print('Connected network config:', sta_if.ifconfig()) + +# start sinricpro +def do_sinricpro(): + sinricpro = SinricPro() + sinricpro.on_connected(on_connected) + sinricpro.on_disconnected(on_disconnected) + + sinricpro_switch = SinricProSwitch(device_id) + sinricpro_switch.on_power_state(on_power_state_callback) + + sinricpro.add_device(sinricpro_switch) + sinricpro.start(app_key, app_secret) + +# main coroutine +async def main(): + do_connect() + do_sinricpro() + + while True: + await a.sleep_ms(10_000) + +# start asyncio task and loop +try: + # start the main async tasks + a.run(main()) +finally: + # reset and start a new event loop for the task scheduler + a.new_event_loop() +``` + +That's it. + +![Sinric Pro MicroPython Connected]({{ site.github.url }}/public/img/sinricpro-micropython-connected.png) + + + +Now the device is connected to Sinric Pro server and you can control it via Sinric Pro App, Alexa Skill, Google Home Action or SmartThings + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython.pt.md b/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython.pt.md new file mode 100644 index 0000000..033d54f --- /dev/null +++ b/pages/tutorials/switch/micropython/how-to-turn-on-and-off-a-relay-using-micropython.pt.md @@ -0,0 +1,239 @@ +--- +title: Como ligar e desligar um relé usando MicroPython e ESP32 +layout: post +lang: pt +--- + +Neste guia, vamos orientá-lo através dos passos para configurar MicroPython no seu ESP32, criar um Interruptor Sinric Pro e finalmente controlá-lo com plataformas de casa inteligente como Alexa, Google Home e SmartThings + +### Pré-requisitos: + +1. Placa de desenvolvimento ESP32 x 1. +2. Controlador de relé SPDT x 1. +3. Cabos Jumper. + +### Configurar MicroPython no ESP32 + +1. Instalar usando pip: `pip install esptool` (Você precisará do Python 3.7 ou mais recente) + +2. Firmware MicroPython: Baixe a versão mais recente de [https://micropython.org/download/esp32/](https://micropython.org/download/esp32/). Escolha o arquivo apropriado baseado nas características da sua placa (ex: PSRAM, tamanho da flash). + +3. Conecte o ESP32 ao seu computador via USB. + +4. Apague a memória flash do ESP32: `esptool --chip esp32 --port erase_flash` + +5. Grave o MicroPython no ESP32: + +`esptool --chip esp32 --port --baud 460800 write_flash -z 0x1000 ESP32_GENERIC-20231005-v1.21.0.bin` + + +### Testar a Instalação: + +1. Use um programa de terminal serial (ex: PuTTY, CoolTerm, Thonny). + +![sinricpro micropython putty]({{ site.github.url }}/public/img/sinricpro-micropython-putty-config.png) + + +2. Configure com: Taxa de baud: **115200** Porta: **A que está conectada ao seu ESP32**. + +3. Abra o terminal serial para acessar o REPL do MicroPython, onde você pode inserir comandos Python. + + +No REPL, digite +```py +print("Olá, MicroPython!") +``` + +![sinricpro micropython putty hello world]({{ site.github.url }}/public/img/sinricpro-micropython-putty-hello-world.png) + + +e pressione Enter. Se bem-sucedido, você verá a mensagem impressa. + +Consulte a documentação do MicroPython para detalhes: [https://docs.micropython.org/en/latest/esp32/quickref.html](https://docs.micropython.org/en/latest/esp32/quickref.html) + +### Configurar IDE + +Vamos usar o **VS Code** com a extensão **Pymakr** para programar nosso ESP32 com MicroPython. Então vamos configurar a extensão **Pymakr** + +1. Abra o VS Code. + +2. Vá para a aba Extensions (Ctrl+Shift+X ou Cmd+Shift+X). + +3. Pesquise por "Pymakr" e clique no botão "Install" ao lado. + +![Sinric Pro Pymakr]({{ site.github.url }}/public/img/sinricpro-micropython-install-pymakr.png) + +Recarregue o VS Code quando solicitado. + +Clique no ícone "Pymakr" na barra lateral esquerda do VS Code. + +### Fiação + +![Sinric Pro esp8266 relay wiring]({{ site.github.url }}/public/img/sinric-pro-relay-esp32-switch.png) + +Antes de integrarmos com Sinric Pro, é importante verificar se o relé está corretamente conectado e funcionando. + +Vamos criar um novo Projeto Pymark. Pressione (Ctrl+Shift+P) e selecione `PyMark: Create new project` + +![Sinric Pro pymark new project]({{ site.github.url }}/public/img/sinricpro-micropython-pymakr-new-project.png) + +Cole este código em `main.py` + +```py +from machine import Pin +from time import sleep + +relay = Pin(16, Pin.OUT) + +while True: + relay.value(1) + sleep(5) + + relay.value(0) + sleep(5) +``` + +Selecione a extensão `PyMark` -> Conecte ao seu ESP32 -> Clique no ícone Upload. + +![Sinric Pro pymark new project]({{ site.github.url }}/public/img/sinricpro-micropython-pymakr-upload-mainpy.png) + +Uma vez que o upload seja concluído, você deve realizar um **Hard reset device**. Então o ESP32 irá reiniciar e executar o código em `main.py` + +![Sinric Pro pymark hard reset device]({{ site.github.url }}/public/img/sinricpro-micropython-pymakr-hard-reset.png) + +Agora seu relé deve ligar e desligar a cada 5 segundos. Se o relé estiver funcionando corretamente, é hora de integrar com Sinric Pro. + +### Integração Sinric Pro + +### Passo 1: Criar um novo dispositivo no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Interruptor**, descrição **Meu Primeiro Interruptor** e selecione o tipo de dispositivo como **Switch**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric-pro-create-switch.png) + +* Clique em **Próximo** na aba Notificações + +![Sinric Pro online offline push notifications]({{ site.github.url }}/public/img/sinric_pro_switch_tutorial_device_notifications.png) + +Para receber notificações push quando seu dispositivo ficar online ou offline, habilite a opção **"Conectar e Desconectar"** no aplicativo Sinric Pro. Para receber notificações push quando seu dispositivo ligar ou desligar, habilite a opção **"Ligar e Desligar"**. + + +* Clique em Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Programação + +#### 2.1 Instalar a Biblioteca MicroPython Sinric Pro + +Usando mpremote: + +```shell +mpremote mip install github:sinricpro/micropython-sinricpro-sdk +``` + +Ou usando mip no prompt REPL do MicroPython: + +```shell +import mip +mip.install("github:sinricpro/micropython-sinricpro-sdk") +``` + +![Sinric Pro MicroPython SDK installtion]({{ site.github.url }}/public/img/sinricpro-micropython-install.png) + +#### 2.2 Código Completo + +Cole o seguinte código em `main.py` + +```py +from sinricpro import SinricPro +from sinricpro.devices.sinricpro_switch import SinricProSwitch +from machine import Pin + +import uasyncio as a +import network + +# insira os detalhes do wifi +ssid = "" +ssid_password = "" + +# insira appkey, appsecret e device id de cima +app_key = "" +app_secret = "" +device_id = "" + +# relé está conectado ao GPIO 16 +relay = Pin(16, Pin.OUT) + +async def on_disconnected(): + print('Desconectado do SinricPro...reiniciar?') + +async def on_connected(): + print('Conectado ao SinricPro...') + +async def on_power_state_callback(device_id: str, state: bool): + print(f'device id: {device_id} state: {state}') + + if state: + relay.value(1) + else: + relay.value(0) + + return True + +# conectar ao wifi +def do_connect(): + sta_if = network.WLAN(network.STA_IF) + ap = network.WLAN(network.AP_IF) # criar interface access-point + ap.active(False) # desativar a interface + if not sta_if.isconnected(): + print('Conectando à rede...') + sta_if.active(True) + sta_if.connect(ssid, ssid_password) + while not sta_if.isconnected(): + pass + print('Configuração de rede conectada:', sta_if.ifconfig()) + +# iniciar sinricpro +def do_sinricpro(): + sinricpro = SinricPro() + sinricpro.on_connected(on_connected) + sinricpro.on_disconnected(on_disconnected) + + sinricpro_switch = SinricProSwitch(device_id) + sinricpro_switch.on_power_state(on_power_state_callback) + + sinricpro.add_device(sinricpro_switch) + sinricpro.start(app_key, app_secret) + +# corrotina principal +async def main(): + do_connect() + do_sinricpro() + + while True: + await a.sleep_ms(10_000) + +# iniciar tarefa asyncio e loop +try: + # iniciar as tarefas async principais + a.run(main()) +finally: + # resetar e iniciar um novo loop de eventos para o agendador de tarefas + a.new_event_loop() +``` + +É isso. + +![Sinric Pro MicroPython Connected]({{ site.github.url }}/public/img/sinricpro-micropython-connected.png) + + + +Agora o dispositivo está conectado ao servidor Sinric Pro e você pode controlá-lo via App Sinric Pro, Skill Alexa, Action Google Home ou SmartThings + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/switch/part-1.md b/pages/tutorials/switch/part-1.md new file mode 100644 index 0000000..3f2a07f --- /dev/null +++ b/pages/tutorials/switch/part-1.md @@ -0,0 +1,173 @@ +--- +title: Switch Tutorial Part 1 - Turn on and off a Relay +layout: post +lang: en +--- + +In this section we’ll walk through creating a Sinric Pro **Switch** for **ESP32**, **ESP8266** or **Raspberry Pi Zero W** and then control via **Alexa, Google Home or SmartThings**. + +### Prerequisites : + +1. ESP32, ESP8266 or RaspPi W x 1. +2. SPDT Relay controller x 1. +3. Jumper Wires. + +![Sinric Pro esp8266 esp32 picow]({{ site.github.url }}/public/img/esp32-esp8266-picow.png) +### Quick introduction to Relay + +A relay is an electrically operated switch that can be turned on or off by a low-voltage signal. It is like a regular switch in that it allows current to flow through or not, but it can be controlled by a much smaller voltage. This makes relays ideal for MCUs where it is necessary to control a high-voltage circuit with a low-voltage signal. + +#### How it works + +The operation of a relay can vary depending on the manufacturer, the wiring, and the type of relay controller being used. Some relay controllers require a high-level signal from the MCU to activate the relay, while others require a low-level signal. It is important to check the specifications of the relay controller before using it to ensure that it is compatible with your MCU. + +**High-level signal**: A high-level signal is a signal that is above a certain voltage threshold. For example, a 5V relay controller may require a signal that is above 3.3V to activate the relay. + +```c++ +digitalWrite(pin, HIGH); +``` + +**Low-level signal**: A low-level signal is a signal that is below a certain voltage threshold. For example, a 5V relay controller may require a signal that is below 0.8V to activate the relay. + +```c++ +digitalWrite(pin, LOW); +``` + +**High Voltage Connectors** +![High Voltage Connectors]({{ site.github.url }}/public/img/high_voltage_connectors.png) + + +The relay module in the above has a single connector with three sockets: **Common (COM)**, **Normally Closed (NC)**, and **Normally Open (NO)**. + +**Common (COM)**: COM is the common connection for both the NO and NC pins. Connect the high voltage device to the COM pin. + +**Normally Closed (NC)**: The circuit is closed by default. + +**Normally Open (NO)**: The circuit is open by default. + +Normally open (NO) and normally closed (NC) contacts allow you to use one pin to control two separate circuits depending on your requirements. For example, you could use one pin to control the power to a light bulb and another pin to control the power to a motor. When the pin is high/low the light bulb will turn on otherwise the motor will turn on. + +### Wiring + +![Sinric Pro esp8266 relay wiring]({{ site.github.url }}/public/img/sinric-pro-relay-esp32-switch.png) + +![Sinric Pro esp8266 relay wiring]({{ site.github.url }}/public/img/sinricpro-esp8266-relay-wired.png) + +| MCU | Pin | +| --------- | ------- | +| ESP32 | 16 | +| ESP8266 | 12 (D6) | +| RaspPi W | 6 | + +Before we integrate with Sinric Pro, it is important to verify that the relay is wired correctly. You can use the following code to check whether the relay turns on and off every 5 seconds. + + + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Switch**, description **My First Switch** and select the device type as **Switch**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric-pro-create-switch.png) + +* Click **Next** the in the Notifications tab + +![Sinric Pro online offline push notifications]({{ site.github.url }}/public/img/sinric_pro_switch_tutorial_device_notifications.png) + +To receive push notifications when your device goes online or offline, enable the **"Connect and Disconnect"** option in the Sinric Pro app. To receive push notifications when your device turns on or off, enable the **"On and Off"** option. + + +* Click Others and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Coding + +#### 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + + +You can **generate the code** using **Zero Code** feature or write it by your self. If you do not have programming experice, we recommend to use Zero Code feature in the Portal to generate the code, download and flash. + +#### 2.2 Complete Code + + + +Now you should be able to control the relay via Portal like in the below video. + + + +### Step 3 : Link [Sinric Pro](https://www.amazon.com/dp/B07ZT5VDT8) Alexa Skill with your account. + +
+ + + + + +
+

• Open your Amazon Alexa app.

+

• Goto Skills & Games.

+

• Search for Sinric Pro.

+

• Click ENABLE TO USE.

+

• Enter your Sinric Pro credentails in linking page.

+

• Ask Alexa to discover new devices.

+

• Ask Alexa to turn on the Switch

+
+
+
+ +### Step 4 : Link [Sinric Pro](https://assistant.google.com/services/a/uid/000000c715375dd7?hl=en) Google Home action with your account. + +
+ + + + + +
+

• Open Google Home and click on Add.

+

• Select Setup Device

+

• Select Works with Google Home

+

• Search for Sinric Pro.

+

• Link your account.

+

• Discover new devices

+

• Ask Google Home to turn on the Switch

+
+
+
+ +### Step 5 : Link [Sinric Pro](https://assistant.google.com/services/a/uid/000000c715375dd7?hl=en) SmartThings with your account. + +
+ + + + + +
+

• Open the SmartThings app and tap the + Icon

+

• Select Device

+

• Select Sinric Pro under By Brand

+

• Link your account.

+

• Now you can turn on or off Switch from the dashboard

+
+
+
+ +Continue to [Part 2]({{ site.github.url }}/pages/tutorials/switch/part-2.html) of this article series to learn how to add a push button to toggle the relay. + + +### Troubleshooting +Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for possible solutions to your issue. + + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/switch/part-1.pt.md b/pages/tutorials/switch/part-1.pt.md new file mode 100644 index 0000000..51345a6 --- /dev/null +++ b/pages/tutorials/switch/part-1.pt.md @@ -0,0 +1,168 @@ +--- +title: Tutorial de Interruptor Parte 1 - Ligar e desligar um Relé +layout: post +lang: pt +--- + +Nesta seção vamos criar um **Interruptor** Sinric Pro para **ESP32**, **ESP8266** ou **Raspberry Pi Zero W** e depois controlar via **Alexa, Google Home ou SmartThings**. + +### Pré-requisitos: + +1. ESP32, ESP8266 ou RaspPi W x 1. +2. Controlador de relé SPDT x 1. +3. Cabos jumper. + +![Sinric Pro esp8266 esp32 picow]({{ site.github.url }}/public/img/esp32-esp8266-picow.png) + +### Introdução rápida ao Relé + +Um relé é um interruptor operado eletricamente que pode ser ligado ou desligado por um sinal de baixa tensão. É como um interruptor regular no sentido de que permite que a corrente flua ou não, mas pode ser controlado por uma tensão muito menor. Isso torna os relés ideais para MCUs onde é necessário controlar um circuito de alta tensão com um sinal de baixa tensão. + +#### Como funciona + +A operação de um relé pode variar dependendo do fabricante, da fiação e do tipo de controlador de relé sendo usado. Alguns controladores de relé requerem um sinal de alto nível do MCU para ativar o relé, enquanto outros requerem um sinal de baixo nível. É importante verificar as especificações do controlador de relé antes de usá-lo para garantir que seja compatível com seu MCU. + +**Sinal de alto nível**: Um sinal de alto nível é um sinal que está acima de um certo limite de tensão. Por exemplo, um controlador de relé de 5V pode requerer um sinal que esteja acima de 3,3V para ativar o relé. + +```c++ +digitalWrite(pin, HIGH); +``` + +**Sinal de baixo nível**: Um sinal de baixo nível é um sinal que está abaixo de um certo limite de tensão. Por exemplo, um controlador de relé de 5V pode requerer um sinal que esteja abaixo de 0,8V para ativar o relé. + +```c++ +digitalWrite(pin, LOW); +``` + +**Conectores de Alta Tensão** +![Conectores de Alta Tensão]({{ site.github.url }}/public/img/high_voltage_connectors.png) + +O módulo relé acima tem um único conector com três soquetes: **Comum (COM)**, **Normalmente Fechado (NC)**, e **Normalmente Aberto (NO)**. + +**Comum (COM)**: COM é a conexão comum para ambos os pinos NO e NC. Conecte o dispositivo de alta tensão ao pino COM. + +**Normalmente Fechado (NC)**: O circuito está fechado por padrão. + +**Normalmente Aberto (NO)**: O circuito está aberto por padrão. + +Os contatos normalmente aberto (NO) e normalmente fechado (NC) permitem que você use um pino para controlar dois circuitos separados dependendo de seus requisitos. Por exemplo, você poderia usar um pino para controlar a energia de uma lâmpada e outro pino para controlar a energia de um motor. Quando o pino estiver alto/baixo, a lâmpada acenderá, caso contrário o motor ligará. + +### Fiação + +![Sinric Pro esp8266 relay wiring]({{ site.github.url }}/public/img/sinric-pro-relay-esp32-switch.png) + +![Sinric Pro esp8266 relay wiring]({{ site.github.url }}/public/img/sinricpro-esp8266-relay-wired.png) + +| MCU | Pino | +| --------- | ------- | +| ESP32 | 16 | +| ESP8266 | 12 (D6) | +| RaspPi W | 6 | + +Antes de integrarmos com Sinric Pro, é importante verificar se o relé está conectado corretamente. Você pode usar o seguinte código para verificar se o relé liga e desliga a cada 5 segundos. + + + +### Passo 1: Criar um novo dispositivo no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Interruptor**, descrição **Meu Primeiro Interruptor** e selecione o tipo de dispositivo como **Switch**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric-pro-create-switch.png) + +* Clique em **Próximo** na aba Notificações + +![Sinric Pro online offline push notifications]({{ site.github.url }}/public/img/sinric_pro_switch_tutorial_device_notifications.png) + +Para receber notificações push quando seu dispositivo ficar online ou offline, habilite a opção **"Conectar e Desconectar"** no aplicativo Sinric Pro. Para receber notificações push quando seu dispositivo ligar ou desligar, habilite a opção **"Ligar e Desligar"**. + +* Clique em Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Programação + +#### 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +Você pode **gerar o código** usando o recurso **Zero Code** ou escrevê-lo você mesmo. Se você não tem experiência em programação, recomendamos usar o recurso Zero Code no Portal para gerar o código, baixar e carregar. + +#### 2.2 Código Completo + + + +Agora você deve conseguir controlar o relé via Portal como no vídeo abaixo. + + + +### Passo 3: Vincular a Skill [Sinric Pro](https://www.amazon.com/dp/B07ZT5VDT8) da Alexa com sua conta. + +
+ + + + + +
+

• Abra seu aplicativo Amazon Alexa.

+

• Vá para Skills & Games.

+

• Pesquise por Sinric Pro.

+

• Clique em ATIVAR PARA USAR.

+

• Digite suas credenciais do Sinric Pro na página de vinculação.

+

• Peça à Alexa para descobrir novos dispositivos.

+

• Peça à Alexa para ligar o Interruptor

+
+
+
+ +### Passo 4: Vincular a ação [Sinric Pro](https://assistant.google.com/services/a/uid/000000c715375dd7?hl=en) do Google Home com sua conta. + +
+ + + + + +
+

• Abra o Google Home e clique em Adicionar.

+

• Selecione Configurar Dispositivo

+

• Selecione Funciona com Google Home

+

• Pesquise por Sinric Pro.

+

• Vincule sua conta.

+

• Descubra novos dispositivos

+

• Peça ao Google Home para ligar o Interruptor

+
+
+
+ +### Passo 5: Vincular [Sinric Pro](https://assistant.google.com/services/a/uid/000000c715375dd7?hl=en) SmartThings com sua conta. + +
+ + + + + +
+

• Abra o aplicativo SmartThings e toque no ícone +

+

• Selecione Dispositivo

+

• Selecione Sinric Pro em Por Marca

+

• Vincule sua conta.

+

• Agora você pode ligar ou desligar o Interruptor a partir do painel

+
+
+
+ +Continue para a [Parte 2]({{ site.github.url }}/pt/pages/tutorials/switch/part-2.html) desta série de artigos para aprender como adicionar um botão para alternar o relé. + +### Solução de Problemas +Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.html) para possíveis soluções para seu problema. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/switch/part-2.md b/pages/tutorials/switch/part-2.md new file mode 100644 index 0000000..ced87c6 --- /dev/null +++ b/pages/tutorials/switch/part-2.md @@ -0,0 +1,70 @@ +--- +title: Switch Tutorial Part 2 - How to use a push button to toggle the Relay +layout: post +--- + +In this section, we will continue from [Part 1]({{ site.github.url }}/pages/tutorials/switch/part-1.html) and add a push button to turn on and off the relay. We will also update the new status of the relay on the Sinric Pro server. + + +![sinricpro relay push button esp8266]({{ site.github.url }}/public/img/sinric_pro_relay_push_button_esp8266.png) +### Prerequisites : + + +| Component | Quantity | +| --------- | ------- | +| ESP32, ESP8266 or RaspPi W | 1 | +| SPDT Relay controller | 1 | +| Push button | 1 | +| 10K ohm resistor | 1 | +| Jumper Wires | 1 | + +### Quick introduction to Push button & debouncing + +Push buttons can often generate false signals when pressed. This is because the mechanical switch that makes up the button can bounce or chatter slightly when it is pressed. This can cause the button to send multiple signals to the MCU, even though it was only pressed once. The process of eliminating the these signals generated is called debouncing. To eliminate the noise of the push button, we can record a state change and then ignore further input for a few milliseconds. + +### Wiring + +There are two ways you can wire a push button. + +![Sinric Pro pull-up pull-down]({{ site.github.url }}/public/img/pull-up-pull-down.png) + +**Pull-Up** - When the switch is pressed, digitalRead reads LOW (0) signal. + +**Pull-Down** - When the switch is pressed, digitalRead reads HIGH (1) signal. + + + +| MCU | Pin | Component | +| --------- | ------- | ------- | +| ESP32 | 16 | Relay | +| ESP32 | 17 | Button | +| ESP8266 | 12 (D6) | Relay | +| ESP8266 | 15 (D8) | Button | +| RaspPi W | 6 | Relay | +| RaspPi W | 7 | Button | + +Before we integrate with sketch from part 1, it is important to verify that the button is wired correctly and working. You can use the following code to check whether the button press. + +We are going to use **Pull-Down** method to wire our push button. + + + +![Sinric Pro pull-down arduino serial monitor]({{ site.github.url }}/public/img/sinricpro-pushbutton-pull-down.png) + +Now let's complete sketch with push button, Relay controller with Sinric Pro integration. + + + + + + +Continue to [Part 3]({{ site.github.url }}/pages/tutorials/switch/part-2.html) of this article series to learn how to control multiple push buttons with multiple relays. + + +### Troubleshooting +Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for possible solutions to your issue. + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/switch/part-2.pt.md b/pages/tutorials/switch/part-2.pt.md new file mode 100644 index 0000000..97cabe1 --- /dev/null +++ b/pages/tutorials/switch/part-2.pt.md @@ -0,0 +1,71 @@ +--- +title: Tutorial de Interruptor Parte 2 - Como usar um botão para alternar o Relé +layout: post +lang: pt +--- + +Nesta seção, continuaremos da [Parte 1]({{ site.github.url }}/pt/pages/tutorials/switch/part-1.pt.html) e adicionaremos um botão para ligar e desligar o relé. Também atualizaremos o novo status do relé no servidor Sinric Pro. + + +![sinricpro relay push button esp8266]({{ site.github.url }}/public/img/sinric_pro_relay_push_button_esp8266.png) +### Pré-requisitos: + + +| Componente | Quantidade | +| --------- | ------- | +| ESP32, ESP8266 ou RaspPi W | 1 | +| Controlador de relé SPDT | 1 | +| Botão push | 1 | +| Resistor de 10K ohm | 1 | +| Cabos jumper | 1 | + +### Introdução rápida ao botão push e debouncing + +Os botões push podem frequentemente gerar sinais falsos quando pressionados. Isso ocorre porque o interruptor mecânico que compõe o botão pode saltar ou vibrar ligeiramente quando é pressionado. Isso pode fazer com que o botão envie múltiplos sinais para o MCU, mesmo que tenha sido pressionado apenas uma vez. O processo de eliminar esses sinais gerados é chamado de debouncing. Para eliminar o ruído do botão push, podemos registrar uma mudança de estado e então ignorar entradas adicionais por alguns milissegundos. + +### Fiação + +Existem duas maneiras de conectar um botão push. + +![Sinric Pro pull-up pull-down]({{ site.github.url }}/public/img/pull-up-pull-down.png) + +**Pull-Up** - Quando o interruptor é pressionado, digitalRead lê sinal LOW (0). + +**Pull-Down** - Quando o interruptor é pressionado, digitalRead lê sinal HIGH (1). + + + +| MCU | Pino | Componente | +| --------- | ------- | ------- | +| ESP32 | 16 | Relé | +| ESP32 | 17 | Botão | +| ESP8266 | 12 (D6) | Relé | +| ESP8266 | 15 (D8) | Botão | +| RaspPi W | 6 | Relé | +| RaspPi W | 7 | Botão | + +Antes de integrarmos com o sketch da parte 1, é importante verificar se o botão está conectado corretamente e funcionando. Você pode usar o seguinte código para verificar se o botão é pressionado. + +Vamos usar o método **Pull-Down** para conectar nosso botão push. + + + +![Sinric Pro pull-down arduino serial monitor]({{ site.github.url }}/public/img/sinricpro-pushbutton-pull-down.png) + +Agora vamos completar o sketch com botão push, controlador de relé com integração Sinric Pro. + + + + + + +Continue para a [Parte 3]({{ site.github.url }}/pt/pages/tutorials/switch/part-3.html) desta série de artigos para aprender como controlar múltiplos botões push com múltiplos relés. + + +### Solução de Problemas +Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para possíveis soluções para seu problema. + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/switch/part-3.md b/pages/tutorials/switch/part-3.md new file mode 100644 index 0000000..6e01aa0 --- /dev/null +++ b/pages/tutorials/switch/part-3.md @@ -0,0 +1,55 @@ +--- +title: Switch Tutorial Part 3 - Multiple relays with multiple tactile (push) buttons +layout: post +--- + +In this section, we will continue from [Part 2]({{ site.github.url }}/pages/tutorials/switch/part-2.html) and add multiple relays and tactile buttons (aka push buttons) + +### Prerequisites : + +Following components are required. + +| Component | Quantity | +| --------- | ------- | +| ESP32, ESP8266 or RaspPi W | 1 | +| SPDT Relay controller | 4 | +| Push button | 4 | +| 10K ohm resistor | 4 | +| Jumper Wires | 4 | + +### Wiring + +We are going to use Pull-Down method to wire our push button. If you are not sure what that means, please refer [Part 2]({{ site.github.url }}/pages/tutorials/switch/part-2.html) for more details. + + +| MCU | Pin | Component | +| --------- | ------- | ------- | +| ESP8266 | D1 | Relay | +| ESP8266 | D2 | Relay | +| ESP8266 | D3 | Relay | +| ESP8266 | D4 | Relay | +| ESP8266 | D5 | Push Button | +| ESP8266 | D6 | Push Button | +| ESP8266 | D7 | Push Button | +| ESP8266 | D8 | Push Button | +| ESP32 | 16 | Relay | +| ESP32 | 17 | Relay | +| ESP32 | 18 | Relay | +| ESP32 | 19 | Relay | +| ESP32 | 25 | Push Button | +| ESP32 | 26 | Push Button | +| ESP32 | 27 | Push Button | +| ESP32 | 28 | Push Button | + +![sinricpro relay push button esp8266]({{ site.github.url }}/public/img/MultiSwitch_advance_tactile-button.png) + +Now let's complete sketch with push buttons and relays with Sinric Pro integration. + + + +### Troubleshooting +Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for possible solutions to your issue. + + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/switch/part-3.pt.md b/pages/tutorials/switch/part-3.pt.md new file mode 100644 index 0000000..e990bed --- /dev/null +++ b/pages/tutorials/switch/part-3.pt.md @@ -0,0 +1,56 @@ +--- +title: Tutorial de Interruptor Parte 3 - Múltiplos relés com múltiplos botões táteis (push) +layout: post +lang: pt +--- + +Nesta seção, continuaremos da [Parte 2]({{ site.github.url }}/pt/pages/tutorials/switch/part-2.pt.html) e adicionaremos múltiplos relés e botões táteis (também conhecidos como botões push) + +### Pré-requisitos: + +Os seguintes componentes são necessários. + +| Componente | Quantidade | +| --------- | ------- | +| ESP32, ESP8266 ou RaspPi W | 1 | +| Controlador de relé SPDT | 4 | +| Botão push | 4 | +| Resistor de 10K ohm | 4 | +| Cabos jumper | 4 | + +### Fiação + +Vamos usar o método Pull-Down para conectar nosso botão push. Se você não tem certeza do que isso significa, consulte a [Parte 2]({{ site.github.url }}/pt/pages/tutorials/switch/part-2.pt.html) para mais detalhes. + + +| MCU | Pino | Componente | +| --------- | ------- | ------- | +| ESP8266 | D1 | Relé | +| ESP8266 | D2 | Relé | +| ESP8266 | D3 | Relé | +| ESP8266 | D4 | Relé | +| ESP8266 | D5 | Botão Push | +| ESP8266 | D6 | Botão Push | +| ESP8266 | D7 | Botão Push | +| ESP8266 | D8 | Botão Push | +| ESP32 | 16 | Relé | +| ESP32 | 17 | Relé | +| ESP32 | 18 | Relé | +| ESP32 | 19 | Relé | +| ESP32 | 25 | Botão Push | +| ESP32 | 26 | Botão Push | +| ESP32 | 27 | Botão Push | +| ESP32 | 28 | Botão Push | + +![sinricpro relay push button esp8266]({{ site.github.url }}/public/img/MultiSwitch_advance_tactile-button.png) + +Agora vamos completar o sketch com botões push e relés com integração Sinric Pro. + + + +### Solução de Problemas +Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para possíveis soluções para seu problema. + + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/temperature-sensors/BME280.md b/pages/tutorials/temperature-sensors/BME280.md new file mode 100644 index 0000000..5d49ae9 --- /dev/null +++ b/pages/tutorials/temperature-sensors/BME280.md @@ -0,0 +1,124 @@ +--- +title: Temperature, Humidity Sensor Tutorial for BME280 Sensor +layout: post +--- + +In this section we’ll walk through creating a **Temperature Sensor** using **ESP32**, **ESP8266** and then view the temperature via **Alexa, Google Home or SmartThings**. + +### Prerequisites : + +1. ESP32, ESP8266 x 1. +2. BME280 x 1. +3. Jumper Wires. + +### Quick introduction to BME280 Temperature Sensor + +The BME280 uses a temperature sensor based on the principle of thermal resistance. As the temperature changes, the resistance of the sensor changes. The BME280 measures this change in resistance and uses it to calculate the temperature. + +The BME280 communicates with other devices using the I2C or SPI communication protocol to exchange data with a microcontroller. + +**Please note that this tutorial is for BME280 not BMP280**. BME280 can measure air pressure, temperature, and humidity, while else; BMP280 can only measure air pressure and temperatures. + +**In this tutorial, we are going to use I2C communication protocol** + +### Wiring for BME280 with ESP8266 + +| ESP8266 | BME280 Pin | +| 3.3V | Vin | +| GND | GND | +| SCL | 5 (D1) | +| SDA | 4 (D2) | + +**Please note that you must use I2C pins in ESP8266.** + +![Sinric Pro ESP8266 I2C Pins]({{ site.github.url }}/public/img/sinricpro_esp8266_i2c_pins.png) + +### Wiring for BME280 with ESP32 + +| ESP32 | BME280 Pin | +| --------- | ------- | +| 3.3V | Vin | +| GND | GND | +| SCL | 22 | +| SDA | 21 | + +**Please note that you must use I2C pins in ESP32.** + +![Sinric Pro ESP32 I2C Pins ]({{ site.github.url }}/public/img/sinricpro_esp32_i2c_pins.png) + +![Sinric Pro ESP32 I2C BME280 Wiring ]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_BME280_Wiring.png) + +Let's verify that temperature is wired correctly and working. + +### Step 1 : Install supporting libraries + +1. Install the BME280 library +2. Install the Adafruit_Sensor library +3. Install Sinric Pro Library + +![Sinric Pro Install the BME280 library ]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_BME280_libs.png) + + + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Temperature Sensor**, description **My Temperature Sensor** and select the device type as **Temperature Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png) + +* Click **Next** the in the Notifications tab + +![Sinric Pro temperature sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png) + +You can set the threshold here to receive a push notification via the Sinric Pro app when the temperature goes **below** or **above** a certain temperature. Use the Retrigger Time to set the delay between notifications. + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Connect to Sinric Pro + +You can **generate the code** using **Zero Code** feature or write it by your self. If you do not have programming experice, we recommend to use Zero Code feature in the Portal to generate the code, download and flash. + +#### 2.1 Complete Code + + +Now you should be able to view the temperature via Sinric Pro App + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_app_temperature_sensor.png) + +Please note that Google Home App shows the temperature sensor as a Thermostat due to Google Home limitations. + +### Troubleshooting +1. This tutorial is for BME280. Make sure it's not BMP280 module. + +2. Error: **Could not find BME280 sensor!**. It's likely you have not wired correctly. You can run the [I2C scanner](https://learn.adafruit.com/scanning-i2c-addresses/arduino) sketch to check whether the sensor is wired correctly. + +3. BME280 by default is in auto mode for taking continuous readings. This will warm up the chip and affect the read temperature. Change to Weather Station Scenario for more accurate readings when running for a long period. + +{% highlight cpp %} + +Serial.println("-- Weather Station Scenario --"); +Serial.println("forced mode, 1x temperature / 1x humidity / 1x pressure oversampling,"); +Serial.println("filter off"); +bme.setSampling(Adafruit_BME280::MODE_FORCED, + Adafruit_BME280::SAMPLING_X1, // temperature + Adafruit_BME280::SAMPLING_X1, // pressure + Adafruit_BME280::SAMPLING_X1, // humidity + Adafruit_BME280::FILTER_OFF ); + +// suggested rate is 1/60Hz (1m) +delayTime = 60000; // in milliseconds +{% endhighlight %} + +Refer: https://github.com/adafruit/Adafruit_BME280_Library/blob/master/examples/advancedsettings/advancedsettings.ino + + +4. Please refer to our common [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/temperature-sensors/BME280.pt.md b/pages/tutorials/temperature-sensors/BME280.pt.md new file mode 100644 index 0000000..656991d --- /dev/null +++ b/pages/tutorials/temperature-sensors/BME280.pt.md @@ -0,0 +1,125 @@ +--- +title: Tutorial de Sensor de Temperatura e Umidade para Sensor BME280 +layout: post +lang: pt +--- + +Nesta seção vamos criar um **Sensor de Temperatura** usando **ESP32**, **ESP8266** e depois visualizar a temperatura via **Alexa, Google Home ou SmartThings**. + +### Pré-requisitos: + +1. ESP32, ESP8266 x 1. +2. BME280 x 1. +3. Cabos Jumper. + +### Introdução rápida ao Sensor de Temperatura BME280 + +O BME280 usa um sensor de temperatura baseado no princípio da resistência térmica. Conforme a temperatura muda, a resistência do sensor muda. O BME280 mede essa mudança na resistência e a usa para calcular a temperatura. + +O BME280 se comunica com outros dispositivos usando o protocolo de comunicação I2C ou SPI para trocar dados com um microcontrolador. + +**Note que este tutorial é para BME280 e não BMP280**. O BME280 pode medir pressão do ar, temperatura e umidade, enquanto o BMP280 pode medir apenas pressão do ar e temperatura. + +**Neste tutorial, vamos usar o protocolo de comunicação I2C** + +### Fiação para BME280 com ESP8266 + +| ESP8266 | Pino BME280 | +| 3.3V | Vin | +| GND | GND | +| SCL | 5 (D1) | +| SDA | 4 (D2) | + +**Note que você deve usar os pinos I2C no ESP8266.** + +![Sinric Pro ESP8266 I2C Pins]({{ site.github.url }}/public/img/sinricpro_esp8266_i2c_pins.png) + +### Fiação para BME280 com ESP32 + +| ESP32 | Pino BME280 | +| --------- | ------- | +| 3.3V | Vin | +| GND | GND | +| SCL | 22 | +| SDA | 21 | + +**Note que você deve usar os pinos I2C no ESP32.** + +![Sinric Pro ESP32 I2C Pins ]({{ site.github.url }}/public/img/sinricpro_esp32_i2c_pins.png) + +![Sinric Pro ESP32 I2C BME280 Wiring ]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_BME280_Wiring.png) + +Vamos verificar se a temperatura está conectada corretamente e funcionando. + +### Passo 1: Instalar bibliotecas de suporte + +1. Instalar a biblioteca BME280 +2. Instalar a biblioteca Adafruit_Sensor +3. Instalar a Biblioteca Sinric Pro + +![Sinric Pro Install the BME280 library ]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_BME280_libs.png) + + + +### Passo 1: Criar um novo dispositivo no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Sensor de Temperatura**, descrição **Meu Sensor de Temperatura** e selecione o tipo de dispositivo como **Temperature Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png) + +* Clique em **Próximo** na aba Notificações + +![Sinric Pro temperature sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png) + +Você pode definir o limite aqui para receber uma notificação push via aplicativo Sinric Pro quando a temperatura ficar **abaixo** ou **acima** de uma certa temperatura. Use o Tempo de Re-disparo para definir o atraso entre notificações. + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Conectar ao Sinric Pro + +Você pode **gerar o código** usando o recurso **Zero Code** ou escrevê-lo você mesmo. Se você não tem experiência em programação, recomendamos usar o recurso Zero Code no Portal para gerar o código, baixar e carregar. + +#### 2.1 Código Completo + + +Agora você deve conseguir visualizar a temperatura via App Sinric Pro + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_app_temperature_sensor.png) + +Note que o aplicativo Google Home mostra o sensor de temperatura como um Termostato devido às limitações do Google Home. + +### Solução de Problemas +1. Este tutorial é para BME280. Certifique-se de que não é um módulo BMP280. + +2. Erro: **Could not find BME280 sensor!**. É provável que você não tenha feito a fiação corretamente. Você pode executar o sketch [I2C scanner](https://learn.adafruit.com/scanning-i2c-addresses/arduino) para verificar se o sensor está conectado corretamente. + +3. O BME280 por padrão está em modo automático para fazer leituras contínuas. Isso aquecerá o chip e afetará a temperatura lida. Mude para o Cenário de Estação Meteorológica para leituras mais precisas quando executando por um longo período. + +{% highlight cpp %} + +Serial.println("-- Weather Station Scenario --"); +Serial.println("forced mode, 1x temperature / 1x humidity / 1x pressure oversampling,"); +Serial.println("filter off"); +bme.setSampling(Adafruit_BME280::MODE_FORCED, + Adafruit_BME280::SAMPLING_X1, // temperature + Adafruit_BME280::SAMPLING_X1, // pressure + Adafruit_BME280::SAMPLING_X1, // humidity + Adafruit_BME280::FILTER_OFF ); + +// suggested rate is 1/60Hz (1m) +delayTime = 60000; // in milliseconds +{% endhighlight %} + +Consulte: https://github.com/adafruit/Adafruit_BME280_Library/blob/master/examples/advancedsettings/advancedsettings.ino + + +4. Consulte nossa página comum de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/temperature-sensors/BMP180.md b/pages/tutorials/temperature-sensors/BMP180.md new file mode 100644 index 0000000..9698fba --- /dev/null +++ b/pages/tutorials/temperature-sensors/BMP180.md @@ -0,0 +1,100 @@ +--- +title: Temperature, Humidity Sensor Tutorial for BMP180 Sensor +layout: post +--- + +In this section we’ll walk through creating a **Temperature Sensor** using **ESP32**, **ESP8266** and then view the temperature via **Alexa, Google Home or SmartThings**. + +### Prerequisites : + +1. ESP32, ESP8266 x 1. +2. BMP180 x 1. +3. Jumper Wires. + +### Quick introduction to BMP180 Temperature Sensor +The BMP180 sensor is a digital barometric pressure and temperature sensor from Bosch. The BMP180 sensor can measure barometric pressure within a range of 300 to 1100 hPa (9000 m to -500 m above sea level) with an accuracy of ±0.12 hPa. It can also measure temperature within a range of -40 to +85 °C with an accuracy of ±2 °C. The BMP180 sensor communicates with other devices using the I2C interface. It is a low-power sensor that consumes only 3 μA in standby mode. + + +### Wiring for BMP180 with ESP8266 + +| ESP8266 | BMP180 Pin | +| 3.3V | Vin | +| GND | GND | +| SCL | 5 (D1) | +| SDA | 4 (D2) | + +**Please note that you must use I2C pins in ESP8266.** + +![Sinric Pro ESP8266 I2C Pins]({{ site.github.url }}/public/img/sinricpro_esp8266_i2c_pins.png) + +### Wiring for BMP180 with ESP32 + +| ESP32 | BMP180 Pin | +| --------- | ------- | +| 3.3V | Vin | +| GND | GND | +| SCL | 22 | +| SDA | 21 | + +**Please note that you must use I2C pins in ESP32.** + +![Sinric Pro ESP32 I2C Pins ]({{ site.github.url }}/public/img/sinricpro_esp32_i2c_pins.png) + +![Sinric Pro ESP32 I2C BMP180 Wiring ]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_BMP180_Wiring.png) + +Let's verify that temperature is wired correctly and working. + +### Step 1 : Install supporting libraries + +1. Install the [BMP_085 library](https://github.com/adafruit/Adafruit-BMP085-Library) +2. Install the [Adafruit_Sensor library](https://github.com/adafruit/Adafruit_Sensor) +3. Install Sinric Pro Library + +![Sinric Pro Install the BMP180 library ]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_BMP180_libs.png) + + + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Temperature Sensor**, description **My Temperature Sensor** and select the device type as **Temperature Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png) + +* Click **Next** the in the Notifications tab + +![Sinric Pro temperature sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png) + +You can set the threshold here to receive a push notification via the Sinric Pro app when the temperature goes **below** or **above** a certain temperature. Use the Retrigger Time to set the delay between notifications. + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Connect to Sinric Pro + +You can **generate the code** using **Zero Code** feature or write it by your self. If you do not have programming experice, we recommend to use Zero Code feature in the Portal to generate the code, download and flash. + +#### 2.1 Complete Code + + + + +Now you should be able to view the temperature via Sinric Pro App + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_app_temperature_sensor.png) + +Please note that Google Home App shows the temperature sensor as a Thermostat due to Google Home limitations. + +### Troubleshooting +1. This tutorial is for BMP180. Make sure it's not BME280 module. + +2. Error: **Could not find BMP180 sensor!**. It's likely you have not wired correctly. You can run the [I2C scanner](https://learn.adafruit.com/scanning-i2c-addresses/arduino) sketch to check whether the sensor is wired correctly. + +3. Please refer to our common [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/temperature-sensors/BMP180.pt.md b/pages/tutorials/temperature-sensors/BMP180.pt.md new file mode 100644 index 0000000..355bb47 --- /dev/null +++ b/pages/tutorials/temperature-sensors/BMP180.pt.md @@ -0,0 +1,101 @@ +--- +title: Tutorial de Sensor de Temperatura e Umidade para Sensor BMP180 +layout: post +lang: pt +--- + +Nesta seção vamos criar um **Sensor de Temperatura** usando **ESP32**, **ESP8266** e depois visualizar a temperatura via **Alexa, Google Home ou SmartThings**. + +### Pré-requisitos: + +1. ESP32, ESP8266 x 1. +2. BMP180 x 1. +3. Cabos Jumper. + +### Introdução rápida ao Sensor de Temperatura BMP180 +O sensor BMP180 é um sensor digital de pressão barométrica e temperatura da Bosch. O sensor BMP180 pode medir pressão barométrica dentro de uma faixa de 300 a 1100 hPa (9000 m a -500 m acima do nível do mar) com uma precisão de ±0,12 hPa. Ele também pode medir temperatura dentro de uma faixa de -40 a +85 °C com uma precisão de ±2 °C. O sensor BMP180 se comunica com outros dispositivos usando a interface I2C. É um sensor de baixo consumo que consome apenas 3 μA em modo standby. + + +### Fiação para BMP180 com ESP8266 + +| ESP8266 | Pino BMP180 | +| 3.3V | Vin | +| GND | GND | +| SCL | 5 (D1) | +| SDA | 4 (D2) | + +**Note que você deve usar os pinos I2C no ESP8266.** + +![Sinric Pro ESP8266 I2C Pins]({{ site.github.url }}/public/img/sinricpro_esp8266_i2c_pins.png) + +### Fiação para BMP180 com ESP32 + +| ESP32 | Pino BMP180 | +| --------- | ------- | +| 3.3V | Vin | +| GND | GND | +| SCL | 22 | +| SDA | 21 | + +**Note que você deve usar os pinos I2C no ESP32.** + +![Sinric Pro ESP32 I2C Pins ]({{ site.github.url }}/public/img/sinricpro_esp32_i2c_pins.png) + +![Sinric Pro ESP32 I2C BMP180 Wiring ]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_BMP180_Wiring.png) + +Vamos verificar se a temperatura está conectada corretamente e funcionando. + +### Passo 1: Instalar bibliotecas de suporte + +1. Instalar a [biblioteca BMP_085](https://github.com/adafruit/Adafruit-BMP085-Library) +2. Instalar a [biblioteca Adafruit_Sensor](https://github.com/adafruit/Adafruit_Sensor) +3. Instalar a Biblioteca Sinric Pro + +![Sinric Pro Install the BMP180 library ]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_BMP180_libs.png) + + + +### Passo 1: Criar um novo dispositivo no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Sensor de Temperatura**, descrição **Meu Sensor de Temperatura** e selecione o tipo de dispositivo como **Temperature Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png) + +* Clique em **Próximo** na aba Notificações + +![Sinric Pro temperature sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png) + +Você pode definir o limite aqui para receber uma notificação push via aplicativo Sinric Pro quando a temperatura ficar **abaixo** ou **acima** de uma certa temperatura. Use o Tempo de Re-disparo para definir o atraso entre notificações. + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Conectar ao Sinric Pro + +Você pode **gerar o código** usando o recurso **Zero Code** ou escrevê-lo você mesmo. Se você não tem experiência em programação, recomendamos usar o recurso Zero Code no Portal para gerar o código, baixar e carregar. + +#### 2.1 Código Completo + + + + +Agora você deve conseguir visualizar a temperatura via App Sinric Pro + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_app_temperature_sensor.png) + +Note que o aplicativo Google Home mostra o sensor de temperatura como um Termostato devido às limitações do Google Home. + +### Solução de Problemas +1. Este tutorial é para BMP180. Certifique-se de que não é um módulo BME280. + +2. Erro: **Could not find BMP180 sensor!**. É provável que você não tenha feito a fiação corretamente. Você pode executar o sketch [I2C scanner](https://learn.adafruit.com/scanning-i2c-addresses/arduino) para verificar se o sensor está conectado corretamente. + +3. Consulte nossa página comum de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/temperature-sensors/DHTx_AMx_RHTx.md b/pages/tutorials/temperature-sensors/DHTx_AMx_RHTx.md new file mode 100644 index 0000000..3f23573 --- /dev/null +++ b/pages/tutorials/temperature-sensors/DHTx_AMx_RHTx.md @@ -0,0 +1,113 @@ +--- +title: Temperature Sensor Tutorial for DHT11, DHT22, AM2302, RHT03 +layout: post +--- + +In this section we’ll walk through creating a **Temperature Sensor** using **ESP32**, **ESP8266** and then view the temperature via **Alexa, Google Home or SmartThings**. + +### Prerequisites : + +1. ESP32, ESP8266 x 1. +2. DHT11 or DHT22, AM2302, RHT03 x 1. +3. Jumper Wires. + +### Quick introduction to Temperature Sensor + +The DHT and AM series are low-cost digital sensor for sensing temperature and humidity. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air and then spits out a digital signal on the data pin. + + +### Wiring + +![Sinric Pro esp8266 DHT22 wiring]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial.png) + +Note: Some DHT22 sensors do not come with a pull-up resistor, so you may need to connect one yourself. A 10k resistor is typically used, and it should be connected from the data pin of the sensor to the +3.3V or +5V power supply. + + + +| MCU | DHT Pin | +| --------- | ------- | +| ESP32 | 16 | +| ESP8266 | 14 (D5) | + + + +### Setup arduino-DHT library + +We will be using [arduino-DHT](https://github.com/markruys/arduino-DHT) library to read the temperature and humidity from our sensor. Goto [arduino-DHT](https://github.com/markruys/arduino-DHT) and download the library as a zip file. + +![Sinric Pro esp8266 DHT22 wiring]({{ site.github.url }}/public/img/download-arduino-DHT-library.png) + +Then extract the zip file to `C:\Users\\Documents\Arduino\libraries\arduino-DHT`. This is how it should look like. + +![Sinric Pro esp8266 DHT22 wiring]({{ site.github.url }}/public/img/extract-arduino-DHT-library.png) + +Let's verify that temperature is wired correctly and working. + + + +Arduino IDE Serial Monitor will show the current temperature like this + +![Sinric Pro DHT Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_sensor_readings.png) + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Temperature Sensor**, description **My Temperature Sensor** and select the device type as **Temperature Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png) + +* Click **Next** the in the Notifications tab + +![Sinric Pro temperature sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png) + +You can set the threshold here to receive a push notification via the Sinric Pro app when the temperature goes **below** or **above** a certain temperature. Use the Retrigger Time to set the delay between notifications. + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +You can **generate the code** using **Zero Code** feature or write it by your self. If you do not have programming experice, we recommend to use Zero Code feature in the Portal to generate the code, download and flash. + +#### 2.2 Complete Code + + + +Now you should be able to view the temperature via Sinric Pro App + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_app_temperature_sensor.png) + +Charts via Portal + +![Sinric Pro Portal Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_portal_temperature_sensor.png) + +Alexa, Google Home and SmartThings + +![Sinric Pro Portal Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_alexa_googlehome_smartthings_temperature_sensor.png) + +Please note that Google Home App shows the temperature sensor as a Thermostat due to Google Home limitations. + +### Troubleshooting + +1. error: no matching function for call to 'DHT::DHT()' or error: 'class DHT' has no member named 'getMinimumSamplingPeriod' + + **Solution**: Please make sure correct DHT library is installed. This example was made with https://github.com/markruys/arduino-DHT. Remove any other DHT libraries you may have previously installed eg: https://github.com/adafruit/DHT-sensor-library + +2. Compilation error: DHT.h: No such file or directory + + **Solution**: Please make sure correct DHT library is installed. + +2. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/temperature-sensors/DHTx_AMx_RHTx.pt.md b/pages/tutorials/temperature-sensors/DHTx_AMx_RHTx.pt.md new file mode 100644 index 0000000..5dbffc5 --- /dev/null +++ b/pages/tutorials/temperature-sensors/DHTx_AMx_RHTx.pt.md @@ -0,0 +1,114 @@ +--- +title: Tutorial de Sensor de Temperatura para DHT11, DHT22, AM2302, RHT03 +layout: post +lang: pt +--- + +Nesta seção vamos criar um **Sensor de Temperatura** usando **ESP32**, **ESP8266** e depois visualizar a temperatura via **Alexa, Google Home ou SmartThings**. + +### Pré-requisitos: + +1. ESP32, ESP8266 x 1. +2. DHT11 ou DHT22, AM2302, RHT03 x 1. +3. Cabos Jumper. + +### Introdução rápida ao Sensor de Temperatura + +As séries DHT e AM são sensores digitais de baixo custo para detectar temperatura e umidade. Ele usa um sensor de umidade capacitivo e um termistor para medir o ar ambiente e então emite um sinal digital no pino de dados. + + +### Fiação + +![Sinric Pro esp8266 DHT22 wiring]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial.png) + +Nota: Alguns sensores DHT22 não vêm com um resistor pull-up, então você pode precisar conectar um você mesmo. Um resistor de 10k é tipicamente usado, e deve ser conectado do pino de dados do sensor para a fonte de alimentação +3.3V ou +5V. + + + +| MCU | Pino DHT | +| --------- | ------- | +| ESP32 | 16 | +| ESP8266 | 14 (D5) | + + + +### Configurar biblioteca arduino-DHT + +Vamos usar a biblioteca [arduino-DHT](https://github.com/markruys/arduino-DHT) para ler a temperatura e umidade do nosso sensor. Vá para [arduino-DHT](https://github.com/markruys/arduino-DHT) e baixe a biblioteca como arquivo zip. + +![Sinric Pro esp8266 DHT22 wiring]({{ site.github.url }}/public/img/download-arduino-DHT-library.png) + +Então extraia o arquivo zip para `C:\Users\\Documents\Arduino\libraries\arduino-DHT`. Assim deve ficar. + +![Sinric Pro esp8266 DHT22 wiring]({{ site.github.url }}/public/img/extract-arduino-DHT-library.png) + +Vamos verificar se a temperatura está conectada corretamente e funcionando. + + + +O Monitor Serial do Arduino IDE mostrará a temperatura atual assim + +![Sinric Pro DHT Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_sensor_readings.png) + +### Passo 1: Criar um novo dispositivo no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Sensor de Temperatura**, descrição **Meu Sensor de Temperatura** e selecione o tipo de dispositivo como **Temperature Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png) + +* Clique em **Próximo** na aba Notificações + +![Sinric Pro temperature sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png) + +Você pode definir o limite aqui para receber uma notificação push via aplicativo Sinric Pro quando a temperatura ficar **abaixo** ou **acima** de uma certa temperatura. Use o Tempo de Re-disparo para definir o atraso entre notificações. + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +Você pode **gerar o código** usando o recurso **Zero Code** ou escrevê-lo você mesmo. Se você não tem experiência em programação, recomendamos usar o recurso Zero Code no Portal para gerar o código, baixar e carregar. + +#### 2.2 Código Completo + + + +Agora você deve conseguir visualizar a temperatura via App Sinric Pro + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_app_temperature_sensor.png) + +Gráficos via Portal + +![Sinric Pro Portal Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_portal_temperature_sensor.png) + +Alexa, Google Home e SmartThings + +![Sinric Pro Portal Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_alexa_googlehome_smartthings_temperature_sensor.png) + +Note que o aplicativo Google Home mostra o sensor de temperatura como um Termostato devido às limitações do Google Home. + +### Solução de Problemas + +1. error: no matching function for call to 'DHT::DHT()' ou error: 'class DHT' has no member named 'getMinimumSamplingPeriod' + + **Solução**: Certifique-se de que a biblioteca DHT correta está instalada. Este exemplo foi feito com https://github.com/markruys/arduino-DHT. Remova quaisquer outras bibliotecas DHT que você possa ter instalado anteriormente, ex: https://github.com/adafruit/DHT-sensor-library + +2. Erro de compilação: DHT.h: No such file or directory + + **Solução**: Certifique-se de que a biblioteca DHT correta está instalada. + +2. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/temperature-sensors/DS18B20.md b/pages/tutorials/temperature-sensors/DS18B20.md new file mode 100644 index 0000000..01e35ae --- /dev/null +++ b/pages/tutorials/temperature-sensors/DS18B20.md @@ -0,0 +1,95 @@ +--- +title: Temperature Sensor Tutorial for DS18B20 and DS1822, DS1820, MAX31820, MAX31850 +layout: post +--- + +In this section we’ll walk through creating a **Temperature Sensor** using **ESP32**, **ESP8266** and then view the temperature via **Alexa, Google Home or SmartThings**. + +### Prerequisites : + +1. ESP32, ESP8266 x 1. +2. DS18B20 or DS1822, DS1820, MAX31820, MAX31850 x 1. +3. 4.7k Ohm resistor x 1 +4. Jumper Wires. + +### Quick introduction to Temperature Sensor + +The DS18B20 is a digital temperature sensor that communicates over a 1-Wire bus. It is a popular choice for many applications, including home automation, environmental monitoring, and industrial automation. The DS18B20 works by measuring the resistance of a thermistor. The thermistor is a semiconductor device whose resistance changes with temperature. The DS18B20 has a built-in 12-bit ADC that converts the thermistor's resistance to a digital value. + +### Wiring + +![Sinric Pro esp8266 DS18B20 wiring]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_DS18B20_Wiring.png) + +**If you are using the DS18B20, ground pins 1 and 3. The centre pin is the data line '1-wire'.** + +| MCU | GPIO Pin | +| --------- | ------- | +| ESP32 | 16 | +| ESP8266 | 14 (D5) | + +Let's verify that temperature is wired correctly and working. + + + +Arduino IDE Serial Monitor will show the current temperature like this + +![Sinric Pro DS18B20 Temperature Sensor]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_DS18B20_readings.png) + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Temperature Sensor**, description **My Temperature Sensor** and select the device type as **Temperature Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png) + +* Click **Next** the in the Notifications tab + +![Sinric Pro temperature sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png) + +You can set the threshold here to receive a push notification via the Sinric Pro app when the temperature goes **below** or **above** a certain temperature. Use the Retrigger Time to set the delay between notifications. + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +You can **generate the code** using **Zero Code** feature or write it by your self. If you do not have programming experice, we recommend to use Zero Code feature in the Portal to generate the code, download and flash. + +#### 2.2 Complete Code + + + + +Now you should be able to view the temperature via Sinric Pro App + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_app_temperature_sensor.png) + +Please note that Google Home App shows the temperature sensor as a Thermostat due to Google Home limitations. + +### Troubleshooting + +1. error: DallasTemperature.h: No such file or directory + + **Solution**: Please make sure correct temperature library is installed. https://github.com/milesburton/Arduino-Temperature-Control-Library + +2. Reading invalid values like -127.00C, -196.60F, -127.00C, -196.60F + + **Solution**: Make sure you have wired correcrly or you do not have loose connection. + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_DS18B20_invalid_readings.png) + + + +2. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/temperature-sensors/DS18B20.pt.md b/pages/tutorials/temperature-sensors/DS18B20.pt.md new file mode 100644 index 0000000..29ca385 --- /dev/null +++ b/pages/tutorials/temperature-sensors/DS18B20.pt.md @@ -0,0 +1,96 @@ +--- +title: Tutorial de Sensor de Temperatura para DS18B20 e DS1822, DS1820, MAX31820, MAX31850 +layout: post +lang: pt +--- + +Nesta seção vamos criar um **Sensor de Temperatura** usando **ESP32**, **ESP8266** e depois visualizar a temperatura via **Alexa, Google Home ou SmartThings**. + +### Pré-requisitos: + +1. ESP32, ESP8266 x 1. +2. DS18B20 ou DS1822, DS1820, MAX31820, MAX31850 x 1. +3. Resistor de 4.7k Ohm x 1 +4. Cabos Jumper. + +### Introdução rápida ao Sensor de Temperatura + +O DS18B20 é um sensor de temperatura digital que se comunica através de um barramento 1-Wire. É uma escolha popular para muitas aplicações, incluindo automação residencial, monitoramento ambiental e automação industrial. O DS18B20 funciona medindo a resistência de um termistor. O termistor é um dispositivo semicondutor cuja resistência muda com a temperatura. O DS18B20 tem um ADC de 12 bits integrado que converte a resistência do termistor para um valor digital. + +### Fiação + +![Sinric Pro esp8266 DS18B20 wiring]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_DS18B20_Wiring.png) + +**Se você estiver usando o DS18B20, conecte os pinos 1 e 3 ao terra. O pino central é a linha de dados '1-wire'.** + +| MCU | Pino GPIO | +| --------- | ------- | +| ESP32 | 16 | +| ESP8266 | 14 (D5) | + +Vamos verificar se a temperatura está conectada corretamente e funcionando. + + + +O Monitor Serial do Arduino IDE mostrará a temperatura atual assim + +![Sinric Pro DS18B20 Temperature Sensor]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_DS18B20_readings.png) + +### Passo 1: Criar um novo dispositivo no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Sensor de Temperatura**, descrição **Meu Sensor de Temperatura** e selecione o tipo de dispositivo como **Temperature Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png) + +* Clique em **Próximo** na aba Notificações + +![Sinric Pro temperature sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png) + +Você pode definir o limite aqui para receber uma notificação push via aplicativo Sinric Pro quando a temperatura ficar **abaixo** ou **acima** de uma certa temperatura. Use o Tempo de Re-disparo para definir o atraso entre notificações. + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +Você pode **gerar o código** usando o recurso **Zero Code** ou escrevê-lo você mesmo. Se você não tem experiência em programação, recomendamos usar o recurso Zero Code no Portal para gerar o código, baixar e carregar. + +#### 2.2 Código Completo + + + + +Agora você deve conseguir visualizar a temperatura via App Sinric Pro + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_app_temperature_sensor.png) + +Note que o aplicativo Google Home mostra o sensor de temperatura como um Termostato devido às limitações do Google Home. + +### Solução de Problemas + +1. error: DallasTemperature.h: No such file or directory + + **Solução**: Certifique-se de que a biblioteca de temperatura correta está instalada. https://github.com/milesburton/Arduino-Temperature-Control-Library + +2. Lendo valores inválidos como -127.00C, -196.60F, -127.00C, -196.60F + + **Solução**: Certifique-se de que você fez a fiação corretamente ou não tem conexão solta. + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_DS18B20_invalid_readings.png) + + + +2. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/temperature-sensors/LMx.md b/pages/tutorials/temperature-sensors/LMx.md new file mode 100644 index 0000000..08a8e99 --- /dev/null +++ b/pages/tutorials/temperature-sensors/LMx.md @@ -0,0 +1,85 @@ +--- +title: Temperature Sensor Tutorial for LM35 (LM35DZ), LM335 and LM34 +layout: post +--- + +In this section we’ll walk through creating a **Temperature Sensor** using **ESP32**, **ESP8266** and then view the temperature via **Alexa, Google Home or SmartThings**. + +### Prerequisites : + +1. ESP32, ESP8266 x 1. +2. LM35, LM335 and LM34 x 1. +3. Jumper Wires. + +### Quick introduction to Temperature Sensor + +The LM35/LM34 temperature sensors are a linear integrated circuit temperature sensor that works by measuring the voltage drop between the base and emitter of a diode-connected transistor. The voltage drop between the base and emitter of a diode-connected transistor decreases at a known rate as the temperature increases. + +- LM35 provides temperature measurements in Celsius (°C) + +- LM32 provides temperature measurements in Fahrenheit (ºF). + +- LM335 provides temperature measurements in Kelvin (ºK) + +### Wiring for LM35 or LM34 with ESP8266 + +![Sinric Pro LM35 or LM34 wiring]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_LM35-and-LM34_Wiring.png) + +### Wiring for LM335 with ESP8266 + +![Sinric Pro LM335 wiring]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_LM335_Wiring.png) + +**Pull-up via 2.2k Ohm resistor** + +| MCU | GPIO Pin | +| --------- | ------- | +| ESP32 | 36 (ADC0) | +| ESP8266 | A0 (ADC0) | + +Let's verify that temperature is wired correctly and working. + + + +### Step 1 : Create a new device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). +* Enter the device name **Temperature Sensor**, description **My Temperature Sensor** and select the device type as **Temperature Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png) + +* Click **Next** the in the Notifications tab + +![Sinric Pro temperature sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png) + +You can set the threshold here to receive a push notification via the Sinric Pro app when the temperature goes **below** or **above** a certain temperature. Use the Retrigger Time to set the delay between notifications. + +* Click Others tab and Click **Save** + +* Next screen will show the credentials required to connect the device you just created. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Connect to Sinric Pro + +#### Step 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +You can **generate the code** using **Zero Code** feature or write it by your self. If you do not have programming experice, we recommend to use Zero Code feature in the Portal to generate the code, download and flash. + +#### 2.2 Complete Code + + + +Now you should be able to view the temperature via Sinric Pro App + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_app_temperature_sensor.png) + +Please note that Google Home App shows the temperature sensor as a Thermostat due to Google Home limitations. + +### Troubleshooting +1. Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for more details. + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/temperature-sensors/LMx.pt.md b/pages/tutorials/temperature-sensors/LMx.pt.md new file mode 100644 index 0000000..2c7f1a7 --- /dev/null +++ b/pages/tutorials/temperature-sensors/LMx.pt.md @@ -0,0 +1,86 @@ +--- +title: Tutorial de Sensor de Temperatura para LM35 (LM35DZ), LM335 e LM34 +layout: post +lang: pt +--- + +Nesta seção vamos criar um **Sensor de Temperatura** usando **ESP32**, **ESP8266** e depois visualizar a temperatura via **Alexa, Google Home ou SmartThings**. + +### Pré-requisitos: + +1. ESP32, ESP8266 x 1. +2. LM35, LM335 e LM34 x 1. +3. Cabos Jumper. + +### Introdução rápida ao Sensor de Temperatura + +Os sensores de temperatura LM35/LM34 são sensores de temperatura de circuito integrado linear que funcionam medindo a queda de tensão entre a base e o emissor de um transistor conectado como diodo. A queda de tensão entre a base e o emissor de um transistor conectado como diodo diminui a uma taxa conhecida à medida que a temperatura aumenta. + +- LM35 fornece medições de temperatura em Celsius (°C) + +- LM32 fornece medições de temperatura em Fahrenheit (ºF). + +- LM335 fornece medições de temperatura em Kelvin (ºK) + +### Fiação para LM35 ou LM34 com ESP8266 + +![Sinric Pro LM35 or LM34 wiring]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_LM35-and-LM34_Wiring.png) + +### Fiação para LM335 com ESP8266 + +![Sinric Pro LM335 wiring]({{ site.github.url }}/public/img/sinricpro_temperature_sensor_LM335_Wiring.png) + +**Pull-up via resistor de 2.2k Ohm** + +| MCU | Pino GPIO | +| --------- | ------- | +| ESP32 | 36 (ADC0) | +| ESP8266 | A0 (ADC0) | + +Vamos verificar se a temperatura está conectada corretamente e funcionando. + + + +### Passo 1: Criar um novo dispositivo no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). +* Digite o nome do dispositivo **Sensor de Temperatura**, descrição **Meu Sensor de Temperatura** e selecione o tipo de dispositivo como **Temperature Sensor**. + +![Sinric Pro create device alexa]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png) + +* Clique em **Próximo** na aba Notificações + +![Sinric Pro temperature sensor device notifications]({{ site.github.url }}/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png) + +Você pode definir o limite aqui para receber uma notificação push via aplicativo Sinric Pro quando a temperatura ficar **abaixo** ou **acima** de uma certa temperatura. Use o Tempo de Re-disparo para definir o atraso entre notificações. + +* Clique na aba Outros e Clique em **Salvar** + +* A próxima tela mostrará as credenciais necessárias para conectar o dispositivo que você acabou de criar. + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Conectar ao Sinric Pro + +#### Passo 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +Você pode **gerar o código** usando o recurso **Zero Code** ou escrevê-lo você mesmo. Se você não tem experiência em programação, recomendamos usar o recurso Zero Code no Portal para gerar o código, baixar e carregar. + +#### 2.2 Código Completo + + + +Agora você deve conseguir visualizar a temperatura via App Sinric Pro + +![Sinric Pro App Temperature Sensor]({{ site.github.url }}/public/img/sinric_pro_app_temperature_sensor.png) + +Note que o aplicativo Google Home mostra o sensor de temperatura como um Termostato devido às limitações do Google Home. + +### Solução de Problemas +1. Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para mais detalhes. + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/tv/ir-transceiver-esp8285.md b/pages/tutorials/tv/ir-transceiver-esp8285.md new file mode 100644 index 0000000..a2b51d1 --- /dev/null +++ b/pages/tutorials/tv/ir-transceiver-esp8285.md @@ -0,0 +1,142 @@ +--- +title: TV Tutorial - IR Transceiver +layout: post +--- + + +In this section we’ll walk through controlling your TV using an IR transceiver and then use voice to control the TV via **Alexa, Google Home or SmartThings**. + +### Prerequisites : + +1. ESP8285 ESP-01M IR Transceiver x1. + +In this tutorial, we'll be using the ESP8285 ESP-01M IR Transceiver, a popular option readily available [online](https://www.google.com/search?q=esp8285+esp-01m+ir+transceiver). While we'll be focusing on this specific module, the concepts can be applied to other 38KHz infrared transmitters as well. + +![Sinric Pro ir transceiver]({{ site.github.url }}/public/img/sinricpro-ir-transceiver-esp8285.png) + +### Quick introduction to ESP8285 ESP-01M IR Transceiver + +An Infrared ESP8285 Wireless WIFI Transceiver Module is a circuit board that combines two functionalities: + +**Infrared (IR) Transceiver:** This part allows the module to transmit and receive infrared signals. IR transmitter is connected to `GPIO4` and IR receiver is connected to `GPIO14` + +**ESP8285 Wi-Fi Module:** This is a separate chip on the board that enables the module to connect to a Wi-Fi network. ESP8285 is a ESP8266 with 1M Flash, which can withstand high temperatures up to 125 degrees Celsius. + +**To Upload Firmware** : Connect the Jumper `GPIO01` and `GND`. + +**To Run Firmware** : Remove the Jumper and replug the USB programmer + +### Wiring + +![Sinric Pro esp8266 relay wiring]({{ site.github.url }}/public/img/sinricpro-ir-transceiver-esp8285-wiring.png) + +| ESP8285 | TTL | +| --------- | ------- | +| 5V | 5V | +| GND | GND | +| TX | RX | +| RX | TX | + + + +Before we integrate with Sinric Pro, it is important to verify that the relay is wired correctly and you can record IR signals. + +### Step 1: Recording IR + +1. Install [IRremoteESP8266](https://github.com/crankyoldgit/IRremoteESP8266) + + * Click the "Sketch" -> "Include Library" -> "Manage Libraries..." Menu items. + + * Enter `IRremoteESP8266` into the "Filter your search..." top right search box. + + * Click on the `IRremoteESP8266` result of the search. + + * Select the version you wish to install and click `Install`. + +2. Connect the Jumper `GPIO0` to `GND` to upload the firmware. + +3. Flash the [IRrecvDumpV3](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/examples/IRrecvDumpV3/IRrecvDumpV3.ino) No need to change the sketch. It's already using correct GPIO pins. + +![transceiver esp8285 flash]({{ site.github.url }}/public/img/sinricpro-ir-transceiver-esp8285-flash.png) + +4. Remove the Jumper connecting `GPIO0` to `GND` and replug the USB programmer. Now ESP chip will run the `IRrecvDumpV3` sketch. Set the Arduino Serial BaudRate to `115200` see the logs. + +6. Time to record the **power on** button of your TV remote control. + +![record tv remote esp82266]({{ site.github.url }}/public/img/sinricpro-ir-transceiver-record-tv-remote.png) + +Would output the IR codes like this below in the Arduino Serial Monitor. + +Copy **rawData** array + +![record tv remote esp82266 arduino serial]({{ site.github.url }}/public/img/sinricpro-ir-transceiver-record-tv-remote-serial-arduino.png) + + +### Step 2: Sending IR + +```c++ +#include +#include +#include + +const uint16_t kIrLed = 4; + +IRsend irsend(kIrLed); + +uint16_t rawData[3] = {9004, 2218, 586}; // TODO: Change this to your remote control power button + +void setup() { + irsend.begin(); + Serial.begin(115200); +} + +void loop() { + Serial.println("a rawData capture from dump"); + irsend.sendRaw(rawData, 3 /* IR len */, 38 /* kHz */); // TODO: adjust IR len according to rawData length. + delay(2000); +} + +``` + +**Flash the above sketch and remove the the Jumper to run the the firmware.** + +When the sketch sends the signal, TV should either turn on or off. Now you can repeate the process to record other buttons such as volume up, down, mute ect.. + +### Step 3 : Create a new TV device in Sinric Pro + +* [Login](http://portal.sinric.pro) to your Sinric Pro account, go to **Devices** menu on your left and click **Add Device** button (On top left). + +* Enter the device name **TV**, description **TV** and select the device type as **TV**. + +* Click Others and Click **Save** + +![record tv remote esp82266 arduino serial]({{ site.github.url }}/public/img/sinricpro-tv-new-device.png) + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys-no-hilight.png) + +* Copy the **Device Id**, **App Key** and **App Secret** ***Keep these values secure. DO NOT SHARE THEM ON PUBLIC FORUMS !*** + +### Step 2 : Coding + +#### 2.1 Install Sinric Pro Library + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Complete Code + +Now we can complete the SinricPro TV sketch with the IR codes. + + + + + +Now you should be able to control the TV via Sinric Pro App, Google Home, Alexa as well. + +### Troubleshooting +Please refer to our [Troubleshooting]({{ site.github.url }}/pages/troubleshooting.html) page for possible solutions to your issue. + + + +> This document is open source. See a typo? Please create an [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/tutorials/tv/ir-transceiver-esp8285.pt.md b/pages/tutorials/tv/ir-transceiver-esp8285.pt.md new file mode 100644 index 0000000..1ec8bec --- /dev/null +++ b/pages/tutorials/tv/ir-transceiver-esp8285.pt.md @@ -0,0 +1,143 @@ +--- +title: Tutorial de TV - Transceptor IR +layout: post +lang: pt +--- + + +Nesta seção vamos controlar sua TV usando um transceptor IR e depois usar voz para controlar a TV via **Alexa, Google Home ou SmartThings**. + +### Pré-requisitos: + +1. Transceptor IR ESP8285 ESP-01M x1. + +Neste tutorial, usaremos o Transceptor IR ESP8285 ESP-01M, uma opção popular facilmente disponível [online](https://www.google.com/search?q=esp8285+esp-01m+ir+transceiver). Embora nos concentremos neste módulo específico, os conceitos podem ser aplicados a outros transmissores infravermelhos de 38KHz também. + +![Sinric Pro ir transceiver]({{ site.github.url }}/public/img/sinricpro-ir-transceiver-esp8285.png) + +### Introdução rápida ao Transceptor IR ESP8285 ESP-01M + +Um Módulo Transceptor WIFI Wireless Infravermelho ESP8285 é uma placa de circuito que combina duas funcionalidades: + +**Transceptor Infravermelho (IR):** Esta parte permite que o módulo transmita e receba sinais infravermelhos. O transmissor IR está conectado ao `GPIO4` e o receptor IR está conectado ao `GPIO14` + +**Módulo Wi-Fi ESP8285:** Este é um chip separado na placa que permite ao módulo conectar-se a uma rede Wi-Fi. ESP8285 é um ESP8266 com Flash de 1M, que pode suportar altas temperaturas até 125 graus Celsius. + +**Para Carregar Firmware**: Conecte o Jumper `GPIO01` e `GND`. + +**Para Executar Firmware**: Remova o Jumper e reconecte o programador USB + +### Fiação + +![Sinric Pro esp8266 relay wiring]({{ site.github.url }}/public/img/sinricpro-ir-transceiver-esp8285-wiring.png) + +| ESP8285 | TTL | +| --------- | ------- | +| 5V | 5V | +| GND | GND | +| TX | RX | +| RX | TX | + + + +Antes de integrarmos com Sinric Pro, é importante verificar se o relé está conectado corretamente e você pode gravar sinais IR. + +### Passo 1: Gravando IR + +1. Instalar [IRremoteESP8266](https://github.com/crankyoldgit/IRremoteESP8266) + + * Clique nos itens do menu "Sketch" -> "Include Library" -> "Manage Libraries...". + + * Digite `IRremoteESP8266` na caixa de pesquisa "Filter your search..." no canto superior direito. + + * Clique no resultado `IRremoteESP8266` da pesquisa. + + * Selecione a versão que deseja instalar e clique em `Install`. + +2. Conecte o Jumper `GPIO0` ao `GND` para carregar o firmware. + +3. Carregue o [IRrecvDumpV3](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/examples/IRrecvDumpV3/IRrecvDumpV3.ino) Não há necessidade de alterar o sketch. Já está usando os pinos GPIO corretos. + +![transceiver esp8285 flash]({{ site.github.url }}/public/img/sinricpro-ir-transceiver-esp8285-flash.png) + +4. Remova o Jumper conectando `GPIO0` ao `GND` e reconecte o programador USB. Agora o chip ESP executará o sketch `IRrecvDumpV3`. Configure o BaudRate do Arduino Serial para `115200` para ver os logs. + +6. Hora de gravar o botão **power on** do controle remoto da sua TV. + +![record tv remote esp82266]({{ site.github.url }}/public/img/sinricpro-ir-transceiver-record-tv-remote.png) + +Irá produzir os códigos IR como abaixo no Monitor Serial do Arduino. + +Copie o array **rawData** + +![record tv remote esp82266 arduino serial]({{ site.github.url }}/public/img/sinricpro-ir-transceiver-record-tv-remote-serial-arduino.png) + + +### Passo 2: Enviando IR + +```c++ +#include +#include +#include + +const uint16_t kIrLed = 4; + +IRsend irsend(kIrLed); + +uint16_t rawData[3] = {9004, 2218, 586}; // TODO: Mude isso para o botão power do seu controle remoto + +void setup() { + irsend.begin(); + Serial.begin(115200); +} + +void loop() { + Serial.println("a rawData capture from dump"); + irsend.sendRaw(rawData, 3 /* IR len */, 38 /* kHz */); // TODO: ajuste IR len de acordo com o comprimento do rawData. + delay(2000); +} + +``` + +**Carregue o sketch acima e remova o Jumper para executar o firmware.** + +Quando o sketch enviar o sinal, a TV deve ligar ou desligar. Agora você pode repetir o processo para gravar outros botões como volume para cima, para baixo, mudo etc.. + +### Passo 3: Criar um novo dispositivo de TV no Sinric Pro + +* [Faça login](http://portal.sinric.pro) na sua conta Sinric Pro, vá ao menu **Dispositivos** à esquerda e clique no botão **Adicionar Dispositivo** (no canto superior esquerdo). + +* Digite o nome do dispositivo **TV**, descrição **TV** e selecione o tipo de dispositivo como **TV**. + +* Clique em Outros e Clique em **Salvar** + +![record tv remote esp82266 arduino serial]({{ site.github.url }}/public/img/sinricpro-tv-new-device.png) + +![Sinric Pro copy device id]({{ site.github.url }}/public/img/sinric-pro-create-device-keys-no-hilight.png) + +* Copie o **ID do Dispositivo**, **Chave do App** e **Segredo do App** ***Mantenha esses valores seguros. NÃO OS COMPARTILHE EM FÓRUNS PÚBLICOS!*** + +### Passo 2: Programação + +#### 2.1 Instalar a Biblioteca Sinric Pro + +![Sinric Pro install SinricPro library]({{ site.github.url }}/public/img/sinricpro_arduinoIDE-library-manager.png) + +#### 2.2 Código Completo + +Agora podemos completar o sketch de TV SinricPro com os códigos IR. + + + + + +Agora você deve conseguir controlar a TV via App Sinric Pro, Google Home, Alexa também. + +### Solução de Problemas +Consulte nossa página de [Solução de Problemas]({{ site.github.url }}/pt/pages/troubleshooting.pt.html) para possíveis soluções para seu problema. + + + +> Este documento é código aberto. Viu um erro de digitação? Por favor, crie uma [issue](https://github.com/sinricpro/help-docs) \ No newline at end of file diff --git a/pages/utterances.md b/pages/utterances.md new file mode 100644 index 0000000..2bbd05a --- /dev/null +++ b/pages/utterances.md @@ -0,0 +1,282 @@ +--- +title: Utterances +weight: 3 +lang: en +--- + +**Sample utterances for Amazon Alexa and Google Home** + +#### Switch + Power: + Alexa, Turn on Lounge Light + Hey Google, Turn off Lounge Light + + +#### Switch with Dimming + Power: + Alexa, Turn on the light switch + Hey Google, Turn off the light switch + + Power level: + Alexa, set the power to 40 percent on the light switch. + Alexa, increase the power level by 12 on the light switch. + Alexa, set the light switch to thirty percent. + + Hey Google, Adjust my light switch to 65% brightness. + + Query: + Hey Google, What is the brightness level of my light switch? + + +#### Smart Light Bulb + Power: + Alexa, Turn on the bathroom light + Hey Google, Turn off the bathroom light + + Brightness: + Alexa, (increase | reduce | dim) the bathroom light. + Alexa, set the bedroom light to fifty percent. + + Hey Google, Adjust bedroom light to 65% brightness. + Hey Google, Brighten bedroom light by 20%. + + Color: + Alexa, set the bathroom light to blue. + Alexa, change the bathroom light to the color blue. + + Hey Google, Make the bathroom light magenta. + + Color Temperature: + Alexa, set the bathroom light to [warm, warm white, white, daylight, daylight white, cool, cool white] + Hey Google, Make the bathroom light warm white. + + Query: + Hey Google, What is the brightness level of bathroom light? + Hey Google, What is the color of the bathroom light? + +#### Window AC Unit + Power: + Alexa, Turn on the AC + Hey Google, Turn off the AC + + Thermostat: + Alexa, set the AC to seventy-five. + Alexa, make it warmer in here. + Alexa, make it cooler in here. + Alexa, set AC to automatic, cool, heat, eco. + Alexa, set the AC fan speed to 1..3 + Alexa, set the AC fan speed to Highest. + + Hey Google, Set the AC temperature to 22 degrees. + Hey Google, Set the AC to off,cool,fan-only,on mode. + Hey Google, Increase temperature 5 degrees + Hey Google, Decrease the temperature a lot + + Query: + Alexa, what mode is my thermostat set to? + Hey Google, What is the current AC temperature? + +#### Fan + Power: + Alexa, Turn on the fan + Hey Google, Turn off the fan + + Speed control + Alexa, set the fan speed to 1 + Alexa, set the fan speed to 2 + Alexa, set the fan speed to 3 + Alexa, set the fan speed to Highest. + + Hey Google, set the fan speed to low. + Hey Google, set the fan speed to medium. + Hey Google, set the fan speed to high. + Hey Google, set the fan speed to level 1. + Hey Google, set the fan speed to level 2. + Hey Google, set the fan speed to level 3. + + Query: + Hey Google, What's the fan speed ? + Alexa, What's the fan speed ? + +#### Thermostat + Power: + Alexa, Turn on the thermostat + Hey Google, Turn off the thermostat + + Thermostat: + Alexa, set the thermostat to seventy-five. + Alexa, make it warmer in here. + Alexa, make it cooler in here. + Alexa, set thermostat to off, heat, cool, auto + Alexa, set the thermostat fan speed to 1..3 + Alexa, set the thermostat fan speed to Highest. + + Hey Google, Set the thermostat temperature to 22 degrees. + Hey Google, Set the thermostat to off, heat, cool mode. + Hey Google, Increase temperature 5 degrees + Hey Google, Decrease the temperature a lot + + Query: + Alexa, what mode is my thermostat set to? + Hey Google, What is the current thermostat temperature? + +#### TV + Power: + Alexa, Turn on the tv + Hey Google, Turn off the tv + + Playback: + Alexa, fast forward on tv. + Alexa, go forward on tv. + Alexa, pause tv. + Alexa, resume tv. + Alexa, play tv. + Alexa, previous on tv. + Alexa, rewind on tv. + Alexa, start over on tv. + Alexa, stop tv. + + Hey Google, pause tv. + Hey Google, resume tv. + Hey Google, stop tv. + Hey Google, Turn on closed captioning in English + + Input: + Alexa, change the input to DVD on the tv. + + AUX 1, AUX 2, AUX 3, BLURAY, CABLE, CD, COAX 1, COAX 2, COMPOSITE 1, DVD, GAME, HD RADIO, HDMI 1, HDMI 2, HDMI 3, HDMI ARC, INPUT 1, INPUT 2, INPUT 3, + IPOD, LINE 1, LINE 2, LINE 3, MEDIA PLAYER, HDMI 1, HDMI 2, HDMI 3, HDMI ARC, OPTICAL 1, OPTICAL 2, PHONO, PLAYSTATION, PLAYSTATION 3, PLAYSTATION 4, + SATELLITE, SMARTCAST, TUNER, TV, USB DAC, VIDEO 1, VIDEO 2, VIDEO 3, XBOX + + Hey Google, Select HDMI input + + HDMI, HDMI 1, DVD player, HDMI 2, TV, HDMI 3, HDMI ARC, AUX, AUX 1, AUX 2, AUX 3, AUX 4, AUX 5, AUX 6, AUX 7, INPUT, INPUT 1, INPUT 2, INPUT 3, INPUT 4, INPUT 5, + INPUT 6, INPUT 7, INPUT 8, INPUT 9, INPUT 10, BLURAY, CABLE, COMPOSITE, COMPOSITE 1, CD, COAX, COAX 1, COAX 2, GAME, PLAYSTATION, PLAYSTATION 2, PLAYSTATION 3, + PLAYSTATION 4, PLAYSTATION 5, SATELLITE, TUNER, VIDEO, VIDEO 1, VIDEO 2, VIDEO 3, OPTICAL, OPTICAL 1, Fire TV, Nintendo Switch, Switch, Steam Link, WE, Wii, + HD RADIO, PHONO, SMARTCAST + + Channel control: + Alexa, change the channel to two hundred on the tv. + Alexa, next channel on the tv. + Alexa, channel up on the tv. + Alexa, channel down on the tv. + + Hey Google, Change to KTVU, Fox, ABC on the tv. + Hey Google, Turn to channel three on the tv. + + Volume control: + Alexa, set the volume of tv to fifty. + Alexa, turn the volume down tv by twenty. + Alexa, mute tv. + Alexa, unmute tv. + + Hey Google, Mute tv + Hey Google, Set the tv volume to 50 precent + Hey Google, Volume up on tv + Hey Google, Volume down on TV + + + Apps: + Hey Google, Launch Youtube, NetFlix, Disney on TV + +#### Smart Speaker + Power: + Alexa, Turn on the speaker + Hey Google, Turn off the speaker + + Playback: + Alexa, fast forward on speaker. + Alexa, go forward on speaker. + Alexa, pause speaker. + Alexa, resume speaker. + Alexa, play speaker. + Alexa, previous on speaker. + Alexa, rewind on speaker. + Alexa, start over on speaker. + Alexa, stop speaker. + + Hey Google, pause speaker. + Hey Google, resume speaker. + Hey Google, stop speaker. + + Volume control: + Hey Google, Mute speaker + Hey Google, Set the speaker volume to 50 precent + Hey Google, Volume up on speaker + Hey Google, Volume down on speaker + + Equalizer control: + Alexa, set bass to minus two on the speakers. + Alexa, increase bass on the speaker. + Alexa, increase bass by three on the speaker. + Alexa, reset bass on the speaker. + Alexa, reset equalizer on the speaker. + Alexa, set mode to movie on the speaker. + + Input: + Alexa, change the input to CD on the speaker. + + AUX 1, AUX 2, AUX 3, BLURAY, CABLE, CD, COAX 1, COAX 2, COMPOSITE 1, DVD, GAME, HD RADIO, HDMI 1, HDMI 2, HDMI 3, HDMI ARC, INPUT 1, INPUT 2, INPUT 3, + IPOD, LINE 1, LINE 2, LINE 3, MEDIA PLAYER, HDMI 1, HDMI 2, HDMI 3, HDMI ARC, OPTICAL 1, OPTICAL 2, PHONO, PLAYSTATION, PLAYSTATION 3, PLAYSTATION 4, + SATELLITE, SMARTCAST, TUNER, TV, USB DAC, VIDEO 1, VIDEO 2, VIDEO 3, XBOX + +#### Lock + Alexa, lock my front door. + Alexa, unlock the front door. + + Hey Google, Lock the front door. + Hey Google, unlock the front door. + + For Google unlock pin is defined during the device creation. + + +#### Blinds + Power: + Alexa, Turn on the bedroom blinds + Hey Google, Turn off the bedroom blinds + + Open/Clode: + Alexa, open the bedroom blinds. + Alexa, close the bedroom blinds. + Alexa, raise the bedroom blinds. + Alexa, lower the bedroom bedroom blinds. + Alexa, set the bedroom blinds to fifty precent. + + Hey Google, open the bedroom blinds. + Hey Google, close the bedroom blinds. + Hey Google, set the bedroom blinds to fifty precent. + +#### Garage door + Power: + Alexa, Turn on the garage door + Hey Google, Turn off the garage door + + Open/Clode: + Alexa, open the garage door. + Alexa, close the garage door. + Alexa, raise the garage door. + Alexa, lower the garage door. + + Hey Google, open the garage door. + Hey Google, close the garage door. + +#### Temperature Sensor + Alexa, what is the temperature the living room? + +#### Contact Sensor + Alexa, is the bedroom window open? + +#### Scene Control + Alexa, turn on party mode + Hey Google, start party mode + +#### Air Quality Sensor + Alexa, What is the [device name] Air Quality. + + Hey Google, what's the PM2.5 level in the bedroom (room where your Air Quality Sensor is) + Google will automatically notify you when the air quality is unhealthy. (Must enable notifications in the Google Home app. Does not support assistant) + https://www.youtube.com/shorts/qaczcy4XaNE + +#### Custom Devices + +- Please take a look inside the capabilities [Here]({{ site.github.url }}/pages/custom-templates.html) diff --git a/public/css/emacs.css b/public/css/emacs.css new file mode 100644 index 0000000..489c0ad --- /dev/null +++ b/public/css/emacs.css @@ -0,0 +1,61 @@ +.highlight .hll { background-color: #ffffcc } +.highlight .c { color: #008800; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #AA22FF; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #008800 } /* Comment.Preproc */ +.highlight .c1 { color: #008800; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #008800; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #808080 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0040D0 } /* Generic.Traceback */ +.highlight .kc { color: #AA22FF; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #AA22FF; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #AA22FF; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #AA22FF } /* Keyword.Pseudo */ +.highlight .kr { color: #AA22FF; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #00BB00; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BB4444 } /* Literal.String */ +.highlight .na { color: #BB4444 } /* Name.Attribute */ +.highlight .nb { color: #AA22FF } /* Name.Builtin */ +.highlight .nc { color: #0000FF } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #00A000 } /* Name.Function */ +.highlight .nl { color: #A0A000 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #B8860B } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sb { color: #BB4444 } /* Literal.String.Backtick */ +.highlight .sc { color: #BB4444 } /* Literal.String.Char */ +.highlight .sd { color: #BB4444; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BB4444 } /* Literal.String.Double */ +.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BB4444 } /* Literal.String.Heredoc */ +.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #BB6688 } /* Literal.String.Regex */ +.highlight .s1 { color: #BB4444 } /* Literal.String.Single */ +.highlight .ss { color: #B8860B } /* Literal.String.Symbol */ +.highlight .bp { color: #AA22FF } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #B8860B } /* Name.Variable.Class */ +.highlight .vg { color: #B8860B } /* Name.Variable.Global */ +.highlight .vi { color: #B8860B } /* Name.Variable.Instance */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ diff --git a/public/css/github.css b/public/css/github.css new file mode 100644 index 0000000..4a8dc5a --- /dev/null +++ b/public/css/github.css @@ -0,0 +1,61 @@ +.highlight .hll { background-color: #ffffcc } +.highlight .c { color: #999988; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { color: #000000; font-weight: bold } /* Keyword */ +.highlight .o { color: #000000; font-weight: bold } /* Operator */ +.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #445588; font-weight: bold; font-style: italic } /* Comment.Preproc */ +.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #999999 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { color: #000000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #000000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #000000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #000000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #009999 } /* Literal.Number */ +.highlight .s { color: #d01040 } /* Literal.String */ +.highlight .na { color: #008080 } /* Name.Attribute */ +.highlight .nb { color: #0086B3 } /* Name.Builtin */ +.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ +.highlight .no { color: #008080 } /* Name.Constant */ +.highlight .nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #800080 } /* Name.Entity */ +.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #990000; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #555555 } /* Name.Namespace */ +.highlight .nt { color: #000080 } /* Name.Tag */ +.highlight .nv { color: #008080 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #009999 } /* Literal.Number.Float */ +.highlight .mh { color: #009999 } /* Literal.Number.Hex */ +.highlight .mi { color: #009999 } /* Literal.Number.Integer */ +.highlight .mo { color: #009999 } /* Literal.Number.Oct */ +.highlight .sb { color: #d01040 } /* Literal.String.Backtick */ +.highlight .sc { color: #d01040 } /* Literal.String.Char */ +.highlight .sd { color: #d01040 } /* Literal.String.Doc */ +.highlight .s2 { color: #d01040 } /* Literal.String.Double */ +.highlight .se { color: #d01040 } /* Literal.String.Escape */ +.highlight .sh { color: #d01040 } /* Literal.String.Heredoc */ +.highlight .si { color: #d01040 } /* Literal.String.Interpol */ +.highlight .sx { color: #d01040 } /* Literal.String.Other */ +.highlight .sr { color: #009926 } /* Literal.String.Regex */ +.highlight .s1 { color: #d01040 } /* Literal.String.Single */ +.highlight .ss { color: #990073 } /* Literal.String.Symbol */ +.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #008080 } /* Name.Variable.Class */ +.highlight .vg { color: #008080 } /* Name.Variable.Global */ +.highlight .vi { color: #008080 } /* Name.Variable.Instance */ +.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ diff --git a/public/css/hyde.css b/public/css/hyde.css index d183c55..7d2d255 100644 --- a/public/css/hyde.css +++ b/public/css/hyde.css @@ -32,7 +32,7 @@ */ html { - font-family: "PT Sans", Helvetica, Arial, sans-serif; + font-family: "Segoe UI",system-ui,-apple-system,sans-serif; } @media (min-width: 48em) { html { @@ -41,7 +41,7 @@ html { } @media (min-width: 58em) { html { - font-size: 20px; + font-size: 18px; } } @@ -128,7 +128,7 @@ a.sidebar-nav-item:focus { @media (min-width: 48em) { .content { - max-width: 38rem; + max-width: 64rem; margin-left: 20rem; margin-right: 2rem; } diff --git a/public/css/native.css b/public/css/native.css new file mode 100644 index 0000000..eac4a78 --- /dev/null +++ b/public/css/native.css @@ -0,0 +1,70 @@ +.highlight pre { background-color: #404040 } +.highlight .hll { background-color: #404040 } +.highlight .c { color: #999999; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .g { color: #d0d0d0 } /* Generic */ +.highlight .k { color: #6ab825; font-weight: bold } /* Keyword */ +.highlight .l { color: #d0d0d0 } /* Literal */ +.highlight .n { color: #d0d0d0 } /* Name */ +.highlight .o { color: #d0d0d0 } /* Operator */ +.highlight .x { color: #d0d0d0 } /* Other */ +.highlight .p { color: #d0d0d0 } /* Punctuation */ +.highlight .cm { color: #999999; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */ +.highlight .c1 { color: #999999; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ +.highlight .gd { color: #d22323 } /* Generic.Deleted */ +.highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #d22323 } /* Generic.Error */ +.highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #589819 } /* Generic.Inserted */ +.highlight .go { color: #cccccc } /* Generic.Output */ +.highlight .gp { color: #aaaaaa } /* Generic.Prompt */ +.highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ +.highlight .gt { color: #d22323 } /* Generic.Traceback */ +.highlight .kc { color: #6ab825; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #6ab825; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #6ab825; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #6ab825 } /* Keyword.Pseudo */ +.highlight .kr { color: #6ab825; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #6ab825; font-weight: bold } /* Keyword.Type */ +.highlight .ld { color: #d0d0d0 } /* Literal.Date */ +.highlight .m { color: #3677a9 } /* Literal.Number */ +.highlight .s { color: #ed9d13 } /* Literal.String */ +.highlight .na { color: #bbbbbb } /* Name.Attribute */ +.highlight .nb { color: #24909d } /* Name.Builtin */ +.highlight .nc { color: #447fcf; text-decoration: underline } /* Name.Class */ +.highlight .no { color: #40ffff } /* Name.Constant */ +.highlight .nd { color: #ffa500 } /* Name.Decorator */ +.highlight .ni { color: #d0d0d0 } /* Name.Entity */ +.highlight .ne { color: #bbbbbb } /* Name.Exception */ +.highlight .nf { color: #447fcf } /* Name.Function */ +.highlight .nl { color: #d0d0d0 } /* Name.Label */ +.highlight .nn { color: #447fcf; text-decoration: underline } /* Name.Namespace */ +.highlight .nx { color: #d0d0d0 } /* Name.Other */ +.highlight .py { color: #d0d0d0 } /* Name.Property */ +.highlight .nt { color: #6ab825; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #40ffff } /* Name.Variable */ +.highlight .ow { color: #6ab825; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #666666 } /* Text.Whitespace */ +.highlight .mf { color: #3677a9 } /* Literal.Number.Float */ +.highlight .mh { color: #3677a9 } /* Literal.Number.Hex */ +.highlight .mi { color: #3677a9 } /* Literal.Number.Integer */ +.highlight .mo { color: #3677a9 } /* Literal.Number.Oct */ +.highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */ +.highlight .sc { color: #ed9d13 } /* Literal.String.Char */ +.highlight .sd { color: #ed9d13 } /* Literal.String.Doc */ +.highlight .s2 { color: #ed9d13 } /* Literal.String.Double */ +.highlight .se { color: #ed9d13 } /* Literal.String.Escape */ +.highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */ +.highlight .si { color: #ed9d13 } /* Literal.String.Interpol */ +.highlight .sx { color: #ffa500 } /* Literal.String.Other */ +.highlight .sr { color: #ed9d13 } /* Literal.String.Regex */ +.highlight .s1 { color: #ed9d13 } /* Literal.String.Single */ +.highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */ +.highlight .bp { color: #24909d } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #40ffff } /* Name.Variable.Class */ +.highlight .vg { color: #40ffff } /* Name.Variable.Global */ +.highlight .vi { color: #40ffff } /* Name.Variable.Instance */ +.highlight .il { color: #3677a9 } /* Literal.Number.Integer.Long */ diff --git a/public/css/poole.css b/public/css/poole.css index 8ec27e7..5182638 100644 --- a/public/css/poole.css +++ b/public/css/poole.css @@ -286,7 +286,7 @@ tbody tr:nth-child(odd) th { */ .container { - max-width: 38rem; + max-width: 64rem; padding-left: 1rem; padding-right: 1rem; margin-left: auto; @@ -389,7 +389,7 @@ tbody tr:nth-child(odd) th { overflow: hidden; /* clearfix */ margin-left: -1rem; margin-right: -1rem; - font-family: "PT Sans", Helvetica, Arial, sans-serif; + font-family: "Segoe UI",system-ui,-apple-system,sans-serif; color: #ccc; text-align: center; } diff --git a/public/css/sinric.css b/public/css/sinric.css index 482adad..bd331d5 100644 --- a/public/css/sinric.css +++ b/public/css/sinric.css @@ -13,6 +13,7 @@ img.sidebar-social-icon { img.sidebar-logo { float: left; border: 0px solid white; + max-width: 90%; } div.sidebar-social-icons a { @@ -51,3 +52,75 @@ table.wide-table td { table.wide-table th { font-size: 0.8em; } + + +/* tab controllers for device templates */ + +/* Style the tab */ +.tab { + overflow: hidden; + border: 1px solid #ccc; + background-color: #f1f1f1; +} + +/* Style the buttons inside the tab */ +.tab button { + background-color: inherit; + float: left; + border: none; + outline: none; + cursor: pointer; + padding: 14px 16px; + transition: 0.3s; + font-size: 17px; +} + +/* Change background color of buttons on hover */ +.tab button:hover { + background-color: #ddd; +} + +/* Create an active/current tablink class */ +.tab button.active { + background-color: #ccc; +} + +/* Style the tab content */ +.tabcontent { + display: none; + padding: 6px 12px; + border: 1px solid #ccc; + border-top: none; +} + +.tabcontent p { + margin: 10px 0; +} + +/* Style that matches the example image */ +.tab { + display: flex; + flex-wrap: wrap; + background-color: #f1f1f1; + border-radius: 0; + border: 1px solid #ccc; +} + +.tab button { + padding: 15px 20px; + background-color: #f1f1f1; + border-radius: 0; + font-weight: normal; +} + +.tab button.active { + background-color: white; + border-bottom: 3px solid #0070e0; + color: #0070e0; + font-weight: normal; +} + +.tabcontent { + border: 1px solid #ccc; + border-top: none; +} \ No newline at end of file diff --git a/public/css/vs.css b/public/css/vs.css new file mode 100644 index 0000000..e1e55d8 --- /dev/null +++ b/public/css/vs.css @@ -0,0 +1,33 @@ +.highlight .hll { background-color: #ffffcc } +.highlight .c { color: #008000 } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #0000ff } /* Keyword */ +.highlight .cm { color: #008000 } /* Comment.Multiline */ +.highlight .cp { color: #0000ff } /* Comment.Preproc */ +.highlight .c1 { color: #008000 } /* Comment.Single */ +.highlight .cs { color: #008000 } /* Comment.Special */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gh { font-weight: bold } /* Generic.Heading */ +.highlight .gp { font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { font-weight: bold } /* Generic.Subheading */ +.highlight .kc { color: #0000ff } /* Keyword.Constant */ +.highlight .kd { color: #0000ff } /* Keyword.Declaration */ +.highlight .kn { color: #0000ff } /* Keyword.Namespace */ +.highlight .kp { color: #0000ff } /* Keyword.Pseudo */ +.highlight .kr { color: #0000ff } /* Keyword.Reserved */ +.highlight .kt { color: #2b91af } /* Keyword.Type */ +.highlight .s { color: #a31515 } /* Literal.String */ +.highlight .nc { color: #2b91af } /* Name.Class */ +.highlight .ow { color: #0000ff } /* Operator.Word */ +.highlight .sb { color: #a31515 } /* Literal.String.Backtick */ +.highlight .sc { color: #a31515 } /* Literal.String.Char */ +.highlight .sd { color: #a31515 } /* Literal.String.Doc */ +.highlight .s2 { color: #a31515 } /* Literal.String.Double */ +.highlight .se { color: #a31515 } /* Literal.String.Escape */ +.highlight .sh { color: #a31515 } /* Literal.String.Heredoc */ +.highlight .si { color: #a31515 } /* Literal.String.Interpol */ +.highlight .sx { color: #a31515 } /* Literal.String.Other */ +.highlight .sr { color: #a31515 } /* Literal.String.Regex */ +.highlight .s1 { color: #a31515 } /* Literal.String.Single */ +.highlight .ss { color: #a31515 } /* Literal.String.Symbol */ diff --git a/public/img/HC-SR04-ultrasonic-sensor-practical-test.png b/public/img/HC-SR04-ultrasonic-sensor-practical-test.png new file mode 100644 index 0000000..9686bd6 Binary files /dev/null and b/public/img/HC-SR04-ultrasonic-sensor-practical-test.png differ diff --git a/public/img/HC-SR04-ultrasonic-sensor-test-readings.png b/public/img/HC-SR04-ultrasonic-sensor-test-readings.png new file mode 100644 index 0000000..c592c58 Binary files /dev/null and b/public/img/HC-SR04-ultrasonic-sensor-test-readings.png differ diff --git a/public/img/HC-SR04-ultrasonic-sensor-water-tank-measurements-as-precentage.png b/public/img/HC-SR04-ultrasonic-sensor-water-tank-measurements-as-precentage.png new file mode 100644 index 0000000..4e25d3c Binary files /dev/null and b/public/img/HC-SR04-ultrasonic-sensor-water-tank-measurements-as-precentage.png differ diff --git a/public/img/HC-SR04-ultrasonic-sensor-wiring.png b/public/img/HC-SR04-ultrasonic-sensor-wiring.png new file mode 100644 index 0000000..74ad014 Binary files /dev/null and b/public/img/HC-SR04-ultrasonic-sensor-wiring.png differ diff --git a/public/img/HW-390-capacitive-soil-moisture-sensor-intro.jpg b/public/img/HW-390-capacitive-soil-moisture-sensor-intro.jpg new file mode 100644 index 0000000..e69091c Binary files /dev/null and b/public/img/HW-390-capacitive-soil-moisture-sensor-intro.jpg differ diff --git a/public/img/HW-390-capacitive-soil-moisture-sensor-test-readings-as-precentage.png b/public/img/HW-390-capacitive-soil-moisture-sensor-test-readings-as-precentage.png new file mode 100644 index 0000000..6f881fa Binary files /dev/null and b/public/img/HW-390-capacitive-soil-moisture-sensor-test-readings-as-precentage.png differ diff --git a/public/img/HW-390-capacitive-soil-moisture-sensor-test-readings.png b/public/img/HW-390-capacitive-soil-moisture-sensor-test-readings.png new file mode 100644 index 0000000..dd045e9 Binary files /dev/null and b/public/img/HW-390-capacitive-soil-moisture-sensor-test-readings.png differ diff --git a/public/img/HW-390-capacitive-soil-moisture-sensor-wiring.png b/public/img/HW-390-capacitive-soil-moisture-sensor-wiring.png new file mode 100644 index 0000000..6833e66 Binary files /dev/null and b/public/img/HW-390-capacitive-soil-moisture-sensor-wiring.png differ diff --git a/public/img/MultiSwitch_advance_tactile-button.png b/public/img/MultiSwitch_advance_tactile-button.png new file mode 100644 index 0000000..d8d2e83 Binary files /dev/null and b/public/img/MultiSwitch_advance_tactile-button.png differ diff --git a/public/img/apple-shortcut-api-create3.gif b/public/img/apple-shortcut-api-create3.gif new file mode 100644 index 0000000..b574946 Binary files /dev/null and b/public/img/apple-shortcut-api-create3.gif differ diff --git a/public/img/arduino-ide-settings.png b/public/img/arduino-ide-settings.png new file mode 100644 index 0000000..a9d9e97 Binary files /dev/null and b/public/img/arduino-ide-settings.png differ diff --git a/public/img/capacitive-air-quality-set-template-drop-range-mode.png b/public/img/capacitive-air-quality-set-template-drop-range-mode.png new file mode 100644 index 0000000..14ad9ff Binary files /dev/null and b/public/img/capacitive-air-quality-set-template-drop-range-mode.png differ diff --git a/public/img/capacitive-soil-moisture-sensor-alexa.jpg b/public/img/capacitive-soil-moisture-sensor-alexa.jpg new file mode 100644 index 0000000..78077ba Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-alexa.jpg differ diff --git a/public/img/capacitive-soil-moisture-sensor-click-code-generator.png b/public/img/capacitive-soil-moisture-sensor-click-code-generator.png new file mode 100644 index 0000000..987f546 Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-click-code-generator.png differ diff --git a/public/img/capacitive-soil-moisture-sensor-import-template.png b/public/img/capacitive-soil-moisture-sensor-import-template.png new file mode 100644 index 0000000..a55c067 Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-import-template.png differ diff --git a/public/img/capacitive-soil-moisture-sensor-portal.png b/public/img/capacitive-soil-moisture-sensor-portal.png new file mode 100644 index 0000000..a5b53b2 Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-portal.png differ diff --git a/public/img/capacitive-soil-moisture-sensor-save-device.png b/public/img/capacitive-soil-moisture-sensor-save-device.png new file mode 100644 index 0000000..3e5c408 Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-save-device.png differ diff --git a/public/img/capacitive-soil-moisture-sensor-saved-template.png b/public/img/capacitive-soil-moisture-sensor-saved-template.png new file mode 100644 index 0000000..cc79beb Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-saved-template.png differ diff --git a/public/img/capacitive-soil-moisture-sensor-set-template-drop-range-mode.png b/public/img/capacitive-soil-moisture-sensor-set-template-drop-range-mode.png new file mode 100644 index 0000000..14ad9ff Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-set-template-drop-range-mode.png differ diff --git a/public/img/capacitive-soil-moisture-sensor-set-template-mode-range-settings.png b/public/img/capacitive-soil-moisture-sensor-set-template-mode-range-settings.png new file mode 100644 index 0000000..c207bfb Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-set-template-mode-range-settings.png differ diff --git a/public/img/capacitive-soil-moisture-sensor-set-template-mode-settings.png b/public/img/capacitive-soil-moisture-sensor-set-template-mode-settings.png new file mode 100644 index 0000000..54f787a Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-set-template-mode-settings.png differ diff --git a/public/img/capacitive-soil-moisture-sensor-set-template-name-desc-type.png b/public/img/capacitive-soil-moisture-sensor-set-template-name-desc-type.png new file mode 100644 index 0000000..8a5f71e Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-set-template-name-desc-type.png differ diff --git a/public/img/capacitive-soil-moisture-sensor-set-template-range-settings.png b/public/img/capacitive-soil-moisture-sensor-set-template-range-settings.png new file mode 100644 index 0000000..320f98f Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-set-template-range-settings.png differ diff --git a/public/img/capacitive-soil-moisture-sensor-set-template-saved-modes-range.png b/public/img/capacitive-soil-moisture-sensor-set-template-saved-modes-range.png new file mode 100644 index 0000000..b84141e Binary files /dev/null and b/public/img/capacitive-soil-moisture-sensor-set-template-saved-modes-range.png differ diff --git a/public/img/device-templates-device-push-notification-alerts-enabled.png b/public/img/device-templates-device-push-notification-alerts-enabled.png new file mode 100644 index 0000000..261ae01 Binary files /dev/null and b/public/img/device-templates-device-push-notification-alerts-enabled.png differ diff --git a/public/img/device-templates-modes.png b/public/img/device-templates-modes.png new file mode 100644 index 0000000..993f365 Binary files /dev/null and b/public/img/device-templates-modes.png differ diff --git a/public/img/device-templates-open-close.png b/public/img/device-templates-open-close.png new file mode 100644 index 0000000..36b5ed1 Binary files /dev/null and b/public/img/device-templates-open-close.png differ diff --git a/public/img/device-templates-range.png b/public/img/device-templates-range.png new file mode 100644 index 0000000..2664df6 Binary files /dev/null and b/public/img/device-templates-range.png differ diff --git a/public/img/device-templates-settings.png b/public/img/device-templates-settings.png new file mode 100644 index 0000000..96fe367 Binary files /dev/null and b/public/img/device-templates-settings.png differ diff --git a/public/img/device-templates-start-stop-pause.png b/public/img/device-templates-start-stop-pause.png new file mode 100644 index 0000000..f97e5f4 Binary files /dev/null and b/public/img/device-templates-start-stop-pause.png differ diff --git a/public/img/download-arduino-DHT-library.png b/public/img/download-arduino-DHT-library.png new file mode 100644 index 0000000..82520b1 Binary files /dev/null and b/public/img/download-arduino-DHT-library.png differ diff --git a/public/img/esp32-esp8266-picow.png b/public/img/esp32-esp8266-picow.png new file mode 100644 index 0000000..7add158 Binary files /dev/null and b/public/img/esp32-esp8266-picow.png differ diff --git a/public/img/extract-arduino-DHT-library.png b/public/img/extract-arduino-DHT-library.png new file mode 100644 index 0000000..f18188a Binary files /dev/null and b/public/img/extract-arduino-DHT-library.png differ diff --git a/public/img/gas-sensor-set-template-drop-range-mode.png b/public/img/gas-sensor-set-template-drop-range-mode.png new file mode 100644 index 0000000..d3915b2 Binary files /dev/null and b/public/img/gas-sensor-set-template-drop-range-mode.png differ diff --git a/public/img/high_voltage_connectors.png b/public/img/high_voltage_connectors.png new file mode 100644 index 0000000..512e95c Binary files /dev/null and b/public/img/high_voltage_connectors.png differ diff --git a/public/img/logo_png/web_hi_res_512.jpg b/public/img/logo_png/web_hi_res_512.jpg index 832092e..be4cfe8 100644 Binary files a/public/img/logo_png/web_hi_res_512.jpg and b/public/img/logo_png/web_hi_res_512.jpg differ diff --git a/public/img/pull-up-pull-down.png b/public/img/pull-up-pull-down.png new file mode 100644 index 0000000..1a4bec1 Binary files /dev/null and b/public/img/pull-up-pull-down.png differ diff --git a/public/img/sinric-pro-create-custom-device-code-download.png b/public/img/sinric-pro-create-custom-device-code-download.png new file mode 100644 index 0000000..54347d7 Binary files /dev/null and b/public/img/sinric-pro-create-custom-device-code-download.png differ diff --git a/public/img/sinric-pro-create-custom-device-keys.png b/public/img/sinric-pro-create-custom-device-keys.png new file mode 100644 index 0000000..8684b6b Binary files /dev/null and b/public/img/sinric-pro-create-custom-device-keys.png differ diff --git a/public/img/sinric-pro-create-device-keys-no-hilight.png b/public/img/sinric-pro-create-device-keys-no-hilight.png new file mode 100644 index 0000000..984e5b0 Binary files /dev/null and b/public/img/sinric-pro-create-device-keys-no-hilight.png differ diff --git a/public/img/sinric-pro-create-device-keys.pn.png b/public/img/sinric-pro-create-device-keys.pn.png new file mode 100644 index 0000000..916d358 Binary files /dev/null and b/public/img/sinric-pro-create-device-keys.pn.png differ diff --git a/public/img/sinric-pro-create-device-keys.png b/public/img/sinric-pro-create-device-keys.png index 15794c5..5a737b3 100644 Binary files a/public/img/sinric-pro-create-device-keys.png and b/public/img/sinric-pro-create-device-keys.png differ diff --git a/public/img/sinric-pro-create-device-notification.png b/public/img/sinric-pro-create-device-notification.png index dcadca0..67c44ce 100644 Binary files a/public/img/sinric-pro-create-device-notification.png and b/public/img/sinric-pro-create-device-notification.png differ diff --git a/public/img/sinric-pro-create-device-template-basic-info.png b/public/img/sinric-pro-create-device-template-basic-info.png index 3109367..213b4eb 100644 Binary files a/public/img/sinric-pro-create-device-template-basic-info.png and b/public/img/sinric-pro-create-device-template-basic-info.png differ diff --git a/public/img/sinric-pro-create-device.png b/public/img/sinric-pro-create-device.png deleted file mode 100644 index 4517170..0000000 Binary files a/public/img/sinric-pro-create-device.png and /dev/null differ diff --git a/public/img/sinric-pro-create-switch.png b/public/img/sinric-pro-create-switch.png index ba59675..43cdbf4 100644 Binary files a/public/img/sinric-pro-create-switch.png and b/public/img/sinric-pro-create-switch.png differ diff --git a/public/img/sinric-pro-generate-code.png b/public/img/sinric-pro-generate-code.png index 1938380..c2ad8d2 100644 Binary files a/public/img/sinric-pro-generate-code.png and b/public/img/sinric-pro-generate-code.png differ diff --git a/public/img/sinric-pro-relay-esp32-switch.png b/public/img/sinric-pro-relay-esp32-switch.png new file mode 100644 index 0000000..fd30eb6 Binary files /dev/null and b/public/img/sinric-pro-relay-esp32-switch.png differ diff --git a/public/img/sinric_pro_RobotDyn_dimmer_pwm_indicator.jpg b/public/img/sinric_pro_RobotDyn_dimmer_pwm_indicator.jpg new file mode 100644 index 0000000..9d829a5 Binary files /dev/null and b/public/img/sinric_pro_RobotDyn_dimmer_pwm_indicator.jpg differ diff --git a/public/img/sinric_pro_RobotDyn_dimmer_switch_wiring.png b/public/img/sinric_pro_RobotDyn_dimmer_switch_wiring.png new file mode 100644 index 0000000..7f7f688 Binary files /dev/null and b/public/img/sinric_pro_RobotDyn_dimmer_switch_wiring.png differ diff --git a/public/img/sinric_pro_alexa_googlehome_smartthings_temperature_sensor.png b/public/img/sinric_pro_alexa_googlehome_smartthings_temperature_sensor.png new file mode 100644 index 0000000..762e285 Binary files /dev/null and b/public/img/sinric_pro_alexa_googlehome_smartthings_temperature_sensor.png differ diff --git a/public/img/sinric_pro_app_temperature_sensor.png b/public/img/sinric_pro_app_temperature_sensor.png new file mode 100644 index 0000000..725633a Binary files /dev/null and b/public/img/sinric_pro_app_temperature_sensor.png differ diff --git a/public/img/sinric_pro_apple_shortcut_home_screen.jpg b/public/img/sinric_pro_apple_shortcut_home_screen.jpg new file mode 100644 index 0000000..5463bae Binary files /dev/null and b/public/img/sinric_pro_apple_shortcut_home_screen.jpg differ diff --git a/public/img/sinric_pro_contact_dimmer_new_device.png b/public/img/sinric_pro_contact_dimmer_new_device.png new file mode 100644 index 0000000..256eded Binary files /dev/null and b/public/img/sinric_pro_contact_dimmer_new_device.png differ diff --git a/public/img/sinric_pro_contact_motion_home_alexa_smartthings.png b/public/img/sinric_pro_contact_motion_home_alexa_smartthings.png new file mode 100644 index 0000000..d245d06 Binary files /dev/null and b/public/img/sinric_pro_contact_motion_home_alexa_smartthings.png differ diff --git a/public/img/sinric_pro_contact_motion_new_device.png b/public/img/sinric_pro_contact_motion_new_device.png new file mode 100644 index 0000000..90c0691 Binary files /dev/null and b/public/img/sinric_pro_contact_motion_new_device.png differ diff --git a/public/img/sinric_pro_contact_motion_portal.png b/public/img/sinric_pro_contact_motion_portal.png new file mode 100644 index 0000000..2d79b63 Binary files /dev/null and b/public/img/sinric_pro_contact_motion_portal.png differ diff --git a/public/img/sinric_pro_contact_sensor_alexa.jpg b/public/img/sinric_pro_contact_sensor_alexa.jpg new file mode 100644 index 0000000..eeeb2e4 Binary files /dev/null and b/public/img/sinric_pro_contact_sensor_alexa.jpg differ diff --git a/public/img/sinric_pro_contact_sensor_bg.jpg b/public/img/sinric_pro_contact_sensor_bg.jpg new file mode 100644 index 0000000..00e8e69 Binary files /dev/null and b/public/img/sinric_pro_contact_sensor_bg.jpg differ diff --git a/public/img/sinric_pro_contact_sensor_google_home.jpg b/public/img/sinric_pro_contact_sensor_google_home.jpg new file mode 100644 index 0000000..3127ea2 Binary files /dev/null and b/public/img/sinric_pro_contact_sensor_google_home.jpg differ diff --git a/public/img/sinric_pro_contact_sensor_google_home_alexa_smartthings.jpg b/public/img/sinric_pro_contact_sensor_google_home_alexa_smartthings.jpg new file mode 100644 index 0000000..19d95d7 Binary files /dev/null and b/public/img/sinric_pro_contact_sensor_google_home_alexa_smartthings.jpg differ diff --git a/public/img/sinric_pro_contact_sensor_new_device.png b/public/img/sinric_pro_contact_sensor_new_device.png new file mode 100644 index 0000000..2925373 Binary files /dev/null and b/public/img/sinric_pro_contact_sensor_new_device.png differ diff --git a/public/img/sinric_pro_contact_sensor_notifications.png b/public/img/sinric_pro_contact_sensor_notifications.png new file mode 100644 index 0000000..24d99a7 Binary files /dev/null and b/public/img/sinric_pro_contact_sensor_notifications.png differ diff --git a/public/img/sinric_pro_contact_sensor_smartthings.jpg b/public/img/sinric_pro_contact_sensor_smartthings.jpg new file mode 100644 index 0000000..1ceb80c Binary files /dev/null and b/public/img/sinric_pro_contact_sensor_smartthings.jpg differ diff --git a/public/img/sinric_pro_light_5050-led-strip-wiring-esp8266.png b/public/img/sinric_pro_light_5050-led-strip-wiring-esp8266.png new file mode 100644 index 0000000..2c0f68d Binary files /dev/null and b/public/img/sinric_pro_light_5050-led-strip-wiring-esp8266.png differ diff --git a/public/img/sinric_pro_light_5050-led-strip-wiring-without-strip.jpg b/public/img/sinric_pro_light_5050-led-strip-wiring-without-strip.jpg new file mode 100644 index 0000000..a2d956f Binary files /dev/null and b/public/img/sinric_pro_light_5050-led-strip-wiring-without-strip.jpg differ diff --git a/public/img/sinric_pro_light_5050-led-strip-wiring.jpg b/public/img/sinric_pro_light_5050-led-strip-wiring.jpg new file mode 100644 index 0000000..e0d62da Binary files /dev/null and b/public/img/sinric_pro_light_5050-led-strip-wiring.jpg differ diff --git a/public/img/sinric_pro_light_5050-led-strip.png b/public/img/sinric_pro_light_5050-led-strip.png new file mode 100644 index 0000000..7d78a88 Binary files /dev/null and b/public/img/sinric_pro_light_5050-led-strip.png differ diff --git a/public/img/sinric_pro_light_new_device.png b/public/img/sinric_pro_light_new_device.png new file mode 100644 index 0000000..ffe391a Binary files /dev/null and b/public/img/sinric_pro_light_new_device.png differ diff --git a/public/img/sinric_pro_motion_dimmer_switch_wiring.png b/public/img/sinric_pro_motion_dimmer_switch_wiring.png new file mode 100644 index 0000000..b5885fe Binary files /dev/null and b/public/img/sinric_pro_motion_dimmer_switch_wiring.png differ diff --git a/public/img/sinric_pro_motion_pir_multi_trigger.png b/public/img/sinric_pro_motion_pir_multi_trigger.png new file mode 100644 index 0000000..a94e132 Binary files /dev/null and b/public/img/sinric_pro_motion_pir_multi_trigger.png differ diff --git a/public/img/sinric_pro_motion_pir_single_trigger.png b/public/img/sinric_pro_motion_pir_single_trigger.png new file mode 100644 index 0000000..0688670 Binary files /dev/null and b/public/img/sinric_pro_motion_pir_single_trigger.png differ diff --git a/public/img/sinric_pro_motion_sensor_notifications.png b/public/img/sinric_pro_motion_sensor_notifications.png new file mode 100644 index 0000000..b3583aa Binary files /dev/null and b/public/img/sinric_pro_motion_sensor_notifications.png differ diff --git a/public/img/sinric_pro_node_red_response.png b/public/img/sinric_pro_node_red_response.png new file mode 100644 index 0000000..c59e240 Binary files /dev/null and b/public/img/sinric_pro_node_red_response.png differ diff --git a/public/img/sinric_pro_nodered_app_credential.png b/public/img/sinric_pro_nodered_app_credential.png new file mode 100644 index 0000000..2f2ccf3 Binary files /dev/null and b/public/img/sinric_pro_nodered_app_credential.png differ diff --git a/public/img/sinric_pro_nodered_function_node.png b/public/img/sinric_pro_nodered_function_node.png new file mode 100644 index 0000000..f186ea3 Binary files /dev/null and b/public/img/sinric_pro_nodered_function_node.png differ diff --git a/public/img/sinric_pro_pir_sensor.png b/public/img/sinric_pro_pir_sensor.png new file mode 100644 index 0000000..3587688 Binary files /dev/null and b/public/img/sinric_pro_pir_sensor.png differ diff --git a/public/img/sinric_pro_pir_sensor_wiring.png b/public/img/sinric_pro_pir_sensor_wiring.png new file mode 100644 index 0000000..e1adaf3 Binary files /dev/null and b/public/img/sinric_pro_pir_sensor_wiring.png differ diff --git a/public/img/sinric_pro_portal_temperature_sensor.png b/public/img/sinric_pro_portal_temperature_sensor.png new file mode 100644 index 0000000..e467c71 Binary files /dev/null and b/public/img/sinric_pro_portal_temperature_sensor.png differ diff --git a/public/img/sinric_pro_relay_push_button_esp8266.png b/public/img/sinric_pro_relay_push_button_esp8266.png new file mode 100644 index 0000000..8a9a1e6 Binary files /dev/null and b/public/img/sinric_pro_relay_push_button_esp8266.png differ diff --git a/public/img/sinric_pro_switch_tutorial_device_notifications.png b/public/img/sinric_pro_switch_tutorial_device_notifications.png new file mode 100644 index 0000000..76b63bd Binary files /dev/null and b/public/img/sinric_pro_switch_tutorial_device_notifications.png differ diff --git a/public/img/sinric_pro_switch_with_dimmer_alexa_google_home_smartthings.png b/public/img/sinric_pro_switch_with_dimmer_alexa_google_home_smartthings.png new file mode 100644 index 0000000..ebe77db Binary files /dev/null and b/public/img/sinric_pro_switch_with_dimmer_alexa_google_home_smartthings.png differ diff --git a/public/img/sinric_pro_switch_with_dimmer_dimmable_example.png b/public/img/sinric_pro_switch_with_dimmer_dimmable_example.png new file mode 100644 index 0000000..50e1d5b Binary files /dev/null and b/public/img/sinric_pro_switch_with_dimmer_dimmable_example.png differ diff --git a/public/img/sinric_pro_switch_with_dimmer_google_home_alexa_smartthings.jpg b/public/img/sinric_pro_switch_with_dimmer_google_home_alexa_smartthings.jpg new file mode 100644 index 0000000..8b2b0b0 Binary files /dev/null and b/public/img/sinric_pro_switch_with_dimmer_google_home_alexa_smartthings.jpg differ diff --git a/public/img/sinric_pro_switch_with_dimmer_pwm_YYAC-3S.png b/public/img/sinric_pro_switch_with_dimmer_pwm_YYAC-3S.png new file mode 100644 index 0000000..6bd8b10 Binary files /dev/null and b/public/img/sinric_pro_switch_with_dimmer_pwm_YYAC-3S.png differ diff --git a/public/img/sinric_pro_temperature_sensor_dht_sensor_readings.png b/public/img/sinric_pro_temperature_sensor_dht_sensor_readings.png new file mode 100644 index 0000000..44158db Binary files /dev/null and b/public/img/sinric_pro_temperature_sensor_dht_sensor_readings.png differ diff --git a/public/img/sinric_pro_temperature_sensor_dht_tutorial.png b/public/img/sinric_pro_temperature_sensor_dht_tutorial.png new file mode 100644 index 0000000..f1bd3ab Binary files /dev/null and b/public/img/sinric_pro_temperature_sensor_dht_tutorial.png differ diff --git a/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png b/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png new file mode 100644 index 0000000..19591d5 Binary files /dev/null and b/public/img/sinric_pro_temperature_sensor_dht_tutorial_portal_new_device.png differ diff --git a/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png b/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png new file mode 100644 index 0000000..6097dd2 Binary files /dev/null and b/public/img/sinric_pro_temperature_sensor_tutorial_device_notifications.png differ diff --git a/public/img/sinricpro-air-quality-device-portal.png b/public/img/sinricpro-air-quality-device-portal.png new file mode 100644 index 0000000..f8551d8 Binary files /dev/null and b/public/img/sinricpro-air-quality-device-portal.png differ diff --git a/public/img/sinricpro-air-quality-device-template-range-and-mode.png b/public/img/sinricpro-air-quality-device-template-range-and-mode.png new file mode 100644 index 0000000..8adc0ef Binary files /dev/null and b/public/img/sinricpro-air-quality-device-template-range-and-mode.png differ diff --git a/public/img/sinricpro-air-quality-intro.png b/public/img/sinricpro-air-quality-intro.png new file mode 100644 index 0000000..e87686f Binary files /dev/null and b/public/img/sinricpro-air-quality-intro.png differ diff --git a/public/img/sinricpro-air-quality-sensor-alexa.jpg b/public/img/sinricpro-air-quality-sensor-alexa.jpg new file mode 100644 index 0000000..743147a Binary files /dev/null and b/public/img/sinricpro-air-quality-sensor-alexa.jpg differ diff --git a/public/img/sinricpro-air-quality-sensor-device-new-device-info.png b/public/img/sinricpro-air-quality-sensor-device-new-device-info.png new file mode 100644 index 0000000..4b2ef5e Binary files /dev/null and b/public/img/sinricpro-air-quality-sensor-device-new-device-info.png differ diff --git a/public/img/sinricpro-air-quality-sensor-device-template-basic-info.png b/public/img/sinricpro-air-quality-sensor-device-template-basic-info.png new file mode 100644 index 0000000..7a32c92 Binary files /dev/null and b/public/img/sinricpro-air-quality-sensor-device-template-basic-info.png differ diff --git a/public/img/sinricpro-air-quality-sensor-new-device-select-template.png b/public/img/sinricpro-air-quality-sensor-new-device-select-template.png new file mode 100644 index 0000000..bf6821c Binary files /dev/null and b/public/img/sinricpro-air-quality-sensor-new-device-select-template.png differ diff --git a/public/img/sinricpro-air-quality-sensor-template-range-and-mode-configured.png b/public/img/sinricpro-air-quality-sensor-template-range-and-mode-configured.png new file mode 100644 index 0000000..8e3272c Binary files /dev/null and b/public/img/sinricpro-air-quality-sensor-template-range-and-mode-configured.png differ diff --git a/public/img/sinricpro-alexa-doorbell-settings.jpg b/public/img/sinricpro-alexa-doorbell-settings.jpg new file mode 100644 index 0000000..3c13659 Binary files /dev/null and b/public/img/sinricpro-alexa-doorbell-settings.jpg differ diff --git a/public/img/sinricpro-apple-shortcut.png b/public/img/sinricpro-apple-shortcut.png new file mode 100644 index 0000000..6853048 Binary files /dev/null and b/public/img/sinricpro-apple-shortcut.png differ diff --git a/public/img/sinricpro-biz-acccount-add-product.png b/public/img/sinricpro-biz-acccount-add-product.png new file mode 100644 index 0000000..8ab00e5 Binary files /dev/null and b/public/img/sinricpro-biz-acccount-add-product.png differ diff --git a/public/img/sinricpro-biz-acccount-enter-product-details.png b/public/img/sinricpro-biz-acccount-enter-product-details.png new file mode 100644 index 0000000..1c49644 Binary files /dev/null and b/public/img/sinricpro-biz-acccount-enter-product-details.png differ diff --git a/public/img/sinricpro-biz-acccount-enter-product-features.png b/public/img/sinricpro-biz-acccount-enter-product-features.png new file mode 100644 index 0000000..54cc0ad Binary files /dev/null and b/public/img/sinricpro-biz-acccount-enter-product-features.png differ diff --git a/public/img/sinricpro-biz-acccount-setup-code-arduino-ide.png b/public/img/sinricpro-biz-acccount-setup-code-arduino-ide.png new file mode 100644 index 0000000..3052c4f Binary files /dev/null and b/public/img/sinricpro-biz-acccount-setup-code-arduino-ide.png differ diff --git a/public/img/sinricpro-biz-acccount-setup-code-download.png b/public/img/sinricpro-biz-acccount-setup-code-download.png new file mode 100644 index 0000000..6070b04 Binary files /dev/null and b/public/img/sinricpro-biz-acccount-setup-code-download.png differ diff --git a/public/img/sinricpro-biz-acccount-setup-default-values-example.png b/public/img/sinricpro-biz-acccount-setup-default-values-example.png new file mode 100644 index 0000000..69280ea Binary files /dev/null and b/public/img/sinricpro-biz-acccount-setup-default-values-example.png differ diff --git a/public/img/sinricpro-business-sdk.png b/public/img/sinricpro-business-sdk.png new file mode 100644 index 0000000..6cbbd8b Binary files /dev/null and b/public/img/sinricpro-business-sdk.png differ diff --git a/public/img/sinricpro-create-new-api-key.png b/public/img/sinricpro-create-new-api-key.png new file mode 100644 index 0000000..50d33a8 Binary files /dev/null and b/public/img/sinricpro-create-new-api-key.png differ diff --git a/public/img/sinricpro-create-settings.png b/public/img/sinricpro-create-settings.png new file mode 100644 index 0000000..89345b9 Binary files /dev/null and b/public/img/sinricpro-create-settings.png differ diff --git a/public/img/sinricpro-device-assign-settings.png b/public/img/sinricpro-device-assign-settings.png new file mode 100644 index 0000000..f292980 Binary files /dev/null and b/public/img/sinricpro-device-assign-settings.png differ diff --git a/public/img/sinricpro-device-edit-settings-other.png b/public/img/sinricpro-device-edit-settings-other.png new file mode 100644 index 0000000..98b2567 Binary files /dev/null and b/public/img/sinricpro-device-edit-settings-other.png differ diff --git a/public/img/sinricpro-device-settings-manage-settings.png b/public/img/sinricpro-device-settings-manage-settings.png new file mode 100644 index 0000000..44de734 Binary files /dev/null and b/public/img/sinricpro-device-settings-manage-settings.png differ diff --git a/public/img/sinricpro-device-settings.png b/public/img/sinricpro-device-settings.png new file mode 100644 index 0000000..b40f453 Binary files /dev/null and b/public/img/sinricpro-device-settings.png differ diff --git a/public/img/sinricpro-doorbell-create-device.png b/public/img/sinricpro-doorbell-create-device.png new file mode 100644 index 0000000..45bc9ca Binary files /dev/null and b/public/img/sinricpro-doorbell-create-device.png differ diff --git a/public/img/sinricpro-esp8266-relay-wired.png b/public/img/sinricpro-esp8266-relay-wired.png new file mode 100644 index 0000000..e5d704d Binary files /dev/null and b/public/img/sinricpro-esp8266-relay-wired.png differ diff --git a/public/img/sinricpro-gas-sensor-alexa.jpg b/public/img/sinricpro-gas-sensor-alexa.jpg new file mode 100644 index 0000000..781c276 Binary files /dev/null and b/public/img/sinricpro-gas-sensor-alexa.jpg differ diff --git a/public/img/sinricpro-gas-sensor-device-new-device-info.png b/public/img/sinricpro-gas-sensor-device-new-device-info.png new file mode 100644 index 0000000..d481988 Binary files /dev/null and b/public/img/sinricpro-gas-sensor-device-new-device-info.png differ diff --git a/public/img/sinricpro-gas-sensor-device-portal.png b/public/img/sinricpro-gas-sensor-device-portal.png new file mode 100644 index 0000000..e32d4e4 Binary files /dev/null and b/public/img/sinricpro-gas-sensor-device-portal.png differ diff --git a/public/img/sinricpro-gas-sensor-device-template-basic-info.png b/public/img/sinricpro-gas-sensor-device-template-basic-info.png new file mode 100644 index 0000000..f19eb80 Binary files /dev/null and b/public/img/sinricpro-gas-sensor-device-template-basic-info.png differ diff --git a/public/img/sinricpro-gas-sensor-device-template-mode.png b/public/img/sinricpro-gas-sensor-device-template-mode.png new file mode 100644 index 0000000..142b81a Binary files /dev/null and b/public/img/sinricpro-gas-sensor-device-template-mode.png differ diff --git a/public/img/sinricpro-gas-sensor-intro.jpg b/public/img/sinricpro-gas-sensor-intro.jpg new file mode 100644 index 0000000..c9c0d8c Binary files /dev/null and b/public/img/sinricpro-gas-sensor-intro.jpg differ diff --git a/public/img/sinricpro-gas-sensor-template-range-and-mode-configured.png b/public/img/sinricpro-gas-sensor-template-range-and-mode-configured.png new file mode 100644 index 0000000..4e90a13 Binary files /dev/null and b/public/img/sinricpro-gas-sensor-template-range-and-mode-configured.png differ diff --git a/public/img/sinricpro-global-device-settings-management.png b/public/img/sinricpro-global-device-settings-management.png new file mode 100644 index 0000000..2ea4e27 Binary files /dev/null and b/public/img/sinricpro-global-device-settings-management.png differ diff --git a/public/img/sinricpro-homebridge-plugin-device-discovert.png b/public/img/sinricpro-homebridge-plugin-device-discovert.png new file mode 100644 index 0000000..2321a8b Binary files /dev/null and b/public/img/sinricpro-homebridge-plugin-device-discovert.png differ diff --git a/public/img/sinricpro-homebridge-plugin-homekit-app.png b/public/img/sinricpro-homebridge-plugin-homekit-app.png new file mode 100644 index 0000000..892c69b Binary files /dev/null and b/public/img/sinricpro-homebridge-plugin-homekit-app.png differ diff --git a/public/img/sinricpro-homebridge-plugin-install.png b/public/img/sinricpro-homebridge-plugin-install.png new file mode 100644 index 0000000..fa44d57 Binary files /dev/null and b/public/img/sinricpro-homebridge-plugin-install.png differ diff --git a/public/img/sinricpro-homebridge-plugin-new-api-key-generated.png b/public/img/sinricpro-homebridge-plugin-new-api-key-generated.png new file mode 100644 index 0000000..b0243f4 Binary files /dev/null and b/public/img/sinricpro-homebridge-plugin-new-api-key-generated.png differ diff --git a/public/img/sinricpro-homebridge-plugin-new-api-key.png b/public/img/sinricpro-homebridge-plugin-new-api-key.png new file mode 100644 index 0000000..100c6f2 Binary files /dev/null and b/public/img/sinricpro-homebridge-plugin-new-api-key.png differ diff --git a/public/img/sinricpro-homebridge-plugin-search.png b/public/img/sinricpro-homebridge-plugin-search.png new file mode 100644 index 0000000..e03cdcd Binary files /dev/null and b/public/img/sinricpro-homebridge-plugin-search.png differ diff --git a/public/img/sinricpro-homebridge-plugin-settings.png b/public/img/sinricpro-homebridge-plugin-settings.png new file mode 100644 index 0000000..cf04ad2 Binary files /dev/null and b/public/img/sinricpro-homebridge-plugin-settings.png differ diff --git a/public/img/sinricpro-ir-transceiver-esp8285-flash.png b/public/img/sinricpro-ir-transceiver-esp8285-flash.png new file mode 100644 index 0000000..e0dc44c Binary files /dev/null and b/public/img/sinricpro-ir-transceiver-esp8285-flash.png differ diff --git a/public/img/sinricpro-ir-transceiver-esp8285-wiring.png b/public/img/sinricpro-ir-transceiver-esp8285-wiring.png new file mode 100644 index 0000000..4dc78ff Binary files /dev/null and b/public/img/sinricpro-ir-transceiver-esp8285-wiring.png differ diff --git a/public/img/sinricpro-ir-transceiver-esp8285.png b/public/img/sinricpro-ir-transceiver-esp8285.png new file mode 100644 index 0000000..7d99311 Binary files /dev/null and b/public/img/sinricpro-ir-transceiver-esp8285.png differ diff --git a/public/img/sinricpro-ir-transceiver-record-tv-remote-serial-arduino.png b/public/img/sinricpro-ir-transceiver-record-tv-remote-serial-arduino.png new file mode 100644 index 0000000..a176684 Binary files /dev/null and b/public/img/sinricpro-ir-transceiver-record-tv-remote-serial-arduino.png differ diff --git a/public/img/sinricpro-ir-transceiver-record-tv-remote.png b/public/img/sinricpro-ir-transceiver-record-tv-remote.png new file mode 100644 index 0000000..ef58c3a Binary files /dev/null and b/public/img/sinricpro-ir-transceiver-record-tv-remote.png differ diff --git a/public/img/sinricpro-micropython-connected.png b/public/img/sinricpro-micropython-connected.png new file mode 100644 index 0000000..a9796d1 Binary files /dev/null and b/public/img/sinricpro-micropython-connected.png differ diff --git a/public/img/sinricpro-micropython-install-pymakr.png b/public/img/sinricpro-micropython-install-pymakr.png new file mode 100644 index 0000000..4073c90 Binary files /dev/null and b/public/img/sinricpro-micropython-install-pymakr.png differ diff --git a/public/img/sinricpro-micropython-install.png b/public/img/sinricpro-micropython-install.png new file mode 100644 index 0000000..8d02b86 Binary files /dev/null and b/public/img/sinricpro-micropython-install.png differ diff --git a/public/img/sinricpro-micropython-putty-config.png b/public/img/sinricpro-micropython-putty-config.png new file mode 100644 index 0000000..eae094f Binary files /dev/null and b/public/img/sinricpro-micropython-putty-config.png differ diff --git a/public/img/sinricpro-micropython-putty-hello-world.png b/public/img/sinricpro-micropython-putty-hello-world.png new file mode 100644 index 0000000..bc88c81 Binary files /dev/null and b/public/img/sinricpro-micropython-putty-hello-world.png differ diff --git a/public/img/sinricpro-micropython-pymakr-hard-reset.png b/public/img/sinricpro-micropython-pymakr-hard-reset.png new file mode 100644 index 0000000..7c7bf86 Binary files /dev/null and b/public/img/sinricpro-micropython-pymakr-hard-reset.png differ diff --git a/public/img/sinricpro-micropython-pymakr-new-project.png b/public/img/sinricpro-micropython-pymakr-new-project.png new file mode 100644 index 0000000..9e9b57d Binary files /dev/null and b/public/img/sinricpro-micropython-pymakr-new-project.png differ diff --git a/public/img/sinricpro-micropython-pymakr-upload-mainpy.png b/public/img/sinricpro-micropython-pymakr-upload-mainpy.png new file mode 100644 index 0000000..bd36e0b Binary files /dev/null and b/public/img/sinricpro-micropython-pymakr-upload-mainpy.png differ diff --git a/public/img/sinricpro-module-example.png b/public/img/sinricpro-module-example.png new file mode 100644 index 0000000..b98eb89 Binary files /dev/null and b/public/img/sinricpro-module-example.png differ diff --git a/public/img/sinricpro-ota-devices.png b/public/img/sinricpro-ota-devices.png new file mode 100644 index 0000000..33bd9a3 Binary files /dev/null and b/public/img/sinricpro-ota-devices.png differ diff --git a/public/img/sinricpro-ota-host.png b/public/img/sinricpro-ota-host.png new file mode 100644 index 0000000..07cce45 Binary files /dev/null and b/public/img/sinricpro-ota-host.png differ diff --git a/public/img/sinricpro-ota-update-inprogress.png b/public/img/sinricpro-ota-update-inprogress.png new file mode 100644 index 0000000..1c2f086 Binary files /dev/null and b/public/img/sinricpro-ota-update-inprogress.png differ diff --git a/public/img/sinricpro-ota-update-upload.png b/public/img/sinricpro-ota-update-upload.png new file mode 100644 index 0000000..703d022 Binary files /dev/null and b/public/img/sinricpro-ota-update-upload.png differ diff --git a/public/img/sinricpro-portal-automation-creation-add-time-delay.png b/public/img/sinricpro-portal-automation-creation-add-time-delay.png new file mode 100644 index 0000000..9e1e164 Binary files /dev/null and b/public/img/sinricpro-portal-automation-creation-add-time-delay.png differ diff --git a/public/img/sinricpro-portal-automation-creation-between-two-times.png b/public/img/sinricpro-portal-automation-creation-between-two-times.png new file mode 100644 index 0000000..5958df5 Binary files /dev/null and b/public/img/sinricpro-portal-automation-creation-between-two-times.png differ diff --git a/public/img/sinricpro-portal-automation-creation-flow.png b/public/img/sinricpro-portal-automation-creation-flow.png new file mode 100644 index 0000000..adf0304 Binary files /dev/null and b/public/img/sinricpro-portal-automation-creation-flow.png differ diff --git a/public/img/sinricpro-portal-automation-creation-info.png b/public/img/sinricpro-portal-automation-creation-info.png new file mode 100644 index 0000000..2a65d47 Binary files /dev/null and b/public/img/sinricpro-portal-automation-creation-info.png differ diff --git a/public/img/sinricpro-portal-automation-creation-push-notification.png b/public/img/sinricpro-portal-automation-creation-push-notification.png new file mode 100644 index 0000000..d4abcc7 Binary files /dev/null and b/public/img/sinricpro-portal-automation-creation-push-notification.png differ diff --git a/public/img/sinricpro-portal-automation-creation-select-a-time.png b/public/img/sinricpro-portal-automation-creation-select-a-time.png new file mode 100644 index 0000000..d6bef8e Binary files /dev/null and b/public/img/sinricpro-portal-automation-creation-select-a-time.png differ diff --git a/public/img/sinricpro-portal-automation-creation-sunset-or-sunrise.png b/public/img/sinricpro-portal-automation-creation-sunset-or-sunrise.png new file mode 100644 index 0000000..39a7708 Binary files /dev/null and b/public/img/sinricpro-portal-automation-creation-sunset-or-sunrise.png differ diff --git a/public/img/sinricpro-portal-device-creation-info.png b/public/img/sinricpro-portal-device-creation-info.png new file mode 100644 index 0000000..c4d74f4 Binary files /dev/null and b/public/img/sinricpro-portal-device-creation-info.png differ diff --git a/public/img/sinricpro-portal-device-creation-notifications.png b/public/img/sinricpro-portal-device-creation-notifications.png new file mode 100644 index 0000000..0b7fd5c Binary files /dev/null and b/public/img/sinricpro-portal-device-creation-notifications.png differ diff --git a/public/img/sinricpro-portal-device-creation-others.png b/public/img/sinricpro-portal-device-creation-others.png new file mode 100644 index 0000000..7debfb3 Binary files /dev/null and b/public/img/sinricpro-portal-device-creation-others.png differ diff --git a/public/img/sinricpro-portal-device-creation-timers.png b/public/img/sinricpro-portal-device-creation-timers.png new file mode 100644 index 0000000..2884186 Binary files /dev/null and b/public/img/sinricpro-portal-device-creation-timers.png differ diff --git a/public/img/sinricpro-pushbutton-pull-down.png b/public/img/sinricpro-pushbutton-pull-down.png new file mode 100644 index 0000000..1ae825d Binary files /dev/null and b/public/img/sinricpro-pushbutton-pull-down.png differ diff --git a/public/img/sinricpro-thonny-install-whl.png b/public/img/sinricpro-thonny-install-whl.png new file mode 100644 index 0000000..63cecb2 Binary files /dev/null and b/public/img/sinricpro-thonny-install-whl.png differ diff --git a/public/img/sinricpro-thonny-installed-whl.png b/public/img/sinricpro-thonny-installed-whl.png new file mode 100644 index 0000000..515accf Binary files /dev/null and b/public/img/sinricpro-thonny-installed-whl.png differ diff --git a/public/img/sinricpro-thonny-installing-whl.png b/public/img/sinricpro-thonny-installing-whl.png new file mode 100644 index 0000000..60c49e9 Binary files /dev/null and b/public/img/sinricpro-thonny-installing-whl.png differ diff --git a/public/img/sinricpro-thonny-select-usb.png b/public/img/sinricpro-thonny-select-usb.png new file mode 100644 index 0000000..f66208b Binary files /dev/null and b/public/img/sinricpro-thonny-select-usb.png differ diff --git a/public/img/sinricpro-thonny-sinricpro-hello-world.png b/public/img/sinricpro-thonny-sinricpro-hello-world.png new file mode 100644 index 0000000..e4d01a2 Binary files /dev/null and b/public/img/sinricpro-thonny-sinricpro-hello-world.png differ diff --git a/public/img/sinricpro-thonny-sinricpro-running.png b/public/img/sinricpro-thonny-sinricpro-running.png new file mode 100644 index 0000000..5a51057 Binary files /dev/null and b/public/img/sinricpro-thonny-sinricpro-running.png differ diff --git a/public/img/sinricpro-tv-new-device.png b/public/img/sinricpro-tv-new-device.png new file mode 100644 index 0000000..f53308e Binary files /dev/null and b/public/img/sinricpro-tv-new-device.png differ diff --git a/public/img/sinricpro-wally.png b/public/img/sinricpro-wally.png new file mode 100644 index 0000000..6821f85 Binary files /dev/null and b/public/img/sinricpro-wally.png differ diff --git a/public/img/sinricpro-water-sensor-alexa.jpg b/public/img/sinricpro-water-sensor-alexa.jpg new file mode 100644 index 0000000..8e41c7b Binary files /dev/null and b/public/img/sinricpro-water-sensor-alexa.jpg differ diff --git a/public/img/sinricpro-water-sensor-device-new-device-info.png b/public/img/sinricpro-water-sensor-device-new-device-info.png new file mode 100644 index 0000000..454186f Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-new-device-info.png differ diff --git a/public/img/sinricpro-water-sensor-device-portal.png b/public/img/sinricpro-water-sensor-device-portal.png new file mode 100644 index 0000000..ab8f1e6 Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-portal.png differ diff --git a/public/img/sinricpro-water-sensor-device-template-basic-info.png b/public/img/sinricpro-water-sensor-device-template-basic-info.png new file mode 100644 index 0000000..4bf014d Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-template-basic-info.png differ diff --git a/public/img/sinricpro-water-sensor-device-template-capabilities-modes.png b/public/img/sinricpro-water-sensor-device-template-capabilities-modes.png new file mode 100644 index 0000000..2590ec0 Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-template-capabilities-modes.png differ diff --git a/public/img/sinricpro-water-sensor-device-template-empty-tank-height.png b/public/img/sinricpro-water-sensor-device-template-empty-tank-height.png new file mode 100644 index 0000000..0a78103 Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-template-empty-tank-height.png differ diff --git a/public/img/sinricpro-water-sensor-device-template-full-alexa-sinricpro.jpg b/public/img/sinricpro-water-sensor-device-template-full-alexa-sinricpro.jpg new file mode 100644 index 0000000..60f57ce Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-template-full-alexa-sinricpro.jpg differ diff --git a/public/img/sinricpro-water-sensor-device-template-full-empty-tank-height.png b/public/img/sinricpro-water-sensor-device-template-full-empty-tank-height.png new file mode 100644 index 0000000..094c849 Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-template-full-empty-tank-height.png differ diff --git a/public/img/sinricpro-water-sensor-device-template-full-tank-height.png b/public/img/sinricpro-water-sensor-device-template-full-tank-height.png new file mode 100644 index 0000000..67f564b Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-template-full-tank-height.png differ diff --git a/public/img/sinricpro-water-sensor-device-template-full-template.png b/public/img/sinricpro-water-sensor-device-template-full-template.png new file mode 100644 index 0000000..f35d3fa Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-template-full-template.png differ diff --git a/public/img/sinricpro-water-sensor-device-template-range-and-mode-configured.png b/public/img/sinricpro-water-sensor-device-template-range-and-mode-configured.png new file mode 100644 index 0000000..05d167f Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-template-range-and-mode-configured.png differ diff --git a/public/img/sinricpro-water-sensor-device-template-range-and-mode.png b/public/img/sinricpro-water-sensor-device-template-range-and-mode.png new file mode 100644 index 0000000..e232395 Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-template-range-and-mode.png differ diff --git a/public/img/sinricpro-water-sensor-device-template-saved.png b/public/img/sinricpro-water-sensor-device-template-saved.png new file mode 100644 index 0000000..0e33aa9 Binary files /dev/null and b/public/img/sinricpro-water-sensor-device-template-saved.png differ diff --git a/public/img/sinricpro-water-sensor-intro.png b/public/img/sinricpro-water-sensor-intro.png new file mode 100644 index 0000000..9030091 Binary files /dev/null and b/public/img/sinricpro-water-sensor-intro.png differ diff --git a/public/img/sinricpro-water-sensor-test-readings.png b/public/img/sinricpro-water-sensor-test-readings.png new file mode 100644 index 0000000..eead16f Binary files /dev/null and b/public/img/sinricpro-water-sensor-test-readings.png differ diff --git a/public/img/sinricpro-water-tank-HC-SR04-intro.png b/public/img/sinricpro-water-tank-HC-SR04-intro.png new file mode 100644 index 0000000..e621e4a Binary files /dev/null and b/public/img/sinricpro-water-tank-HC-SR04-intro.png differ diff --git a/public/img/sinricpro-water-tank-HC-SR04-portal.png b/public/img/sinricpro-water-tank-HC-SR04-portal.png new file mode 100644 index 0000000..63b3445 Binary files /dev/null and b/public/img/sinricpro-water-tank-HC-SR04-portal.png differ diff --git a/public/img/sinricpro-water-tank-alexa.jpg b/public/img/sinricpro-water-tank-alexa.jpg new file mode 100644 index 0000000..1b0da8f Binary files /dev/null and b/public/img/sinricpro-water-tank-alexa.jpg differ diff --git a/public/img/sinricpro-water-tank-hc-sr04.png b/public/img/sinricpro-water-tank-hc-sr04.png new file mode 100644 index 0000000..aa44277 Binary files /dev/null and b/public/img/sinricpro-water-tank-hc-sr04.png differ diff --git a/public/img/sinricpro-water-tank-new-device-code-download.png b/public/img/sinricpro-water-tank-new-device-code-download.png new file mode 100644 index 0000000..bda6e3f Binary files /dev/null and b/public/img/sinricpro-water-tank-new-device-code-download.png differ diff --git a/public/img/sinricpro-water-tank-new-device-from-template.png b/public/img/sinricpro-water-tank-new-device-from-template.png new file mode 100644 index 0000000..57e0bfb Binary files /dev/null and b/public/img/sinricpro-water-tank-new-device-from-template.png differ diff --git a/public/img/sinricpro-water-tank-new-device-template-basic-info.png b/public/img/sinricpro-water-tank-new-device-template-basic-info.png new file mode 100644 index 0000000..45628f0 Binary files /dev/null and b/public/img/sinricpro-water-tank-new-device-template-basic-info.png differ diff --git a/public/img/sinricpro-water-tank-new-device-template-capabilities.png b/public/img/sinricpro-water-tank-new-device-template-capabilities.png new file mode 100644 index 0000000..7bd730b Binary files /dev/null and b/public/img/sinricpro-water-tank-new-device-template-capabilities.png differ diff --git a/public/img/sinricpro-water-tank-new-device-template-range-capability.png b/public/img/sinricpro-water-tank-new-device-template-range-capability.png new file mode 100644 index 0000000..7be735e Binary files /dev/null and b/public/img/sinricpro-water-tank-new-device-template-range-capability.png differ diff --git a/public/img/sinricpro-what-is-a-module.png b/public/img/sinricpro-what-is-a-module.png new file mode 100644 index 0000000..036baa9 Binary files /dev/null and b/public/img/sinricpro-what-is-a-module.png differ diff --git a/public/img/sinricpro_alexa_doorbell_push_notification.jpg b/public/img/sinricpro_alexa_doorbell_push_notification.jpg index b8f9f22..89ffc57 100644 Binary files a/public/img/sinricpro_alexa_doorbell_push_notification.jpg and b/public/img/sinricpro_alexa_doorbell_push_notification.jpg differ diff --git a/public/img/sinricpro_arduinoIDE-library-manager.png b/public/img/sinricpro_arduinoIDE-library-manager.png new file mode 100644 index 0000000..08b4903 Binary files /dev/null and b/public/img/sinricpro_arduinoIDE-library-manager.png differ diff --git a/public/img/sinricpro_esp32_i2c_pins.png b/public/img/sinricpro_esp32_i2c_pins.png new file mode 100644 index 0000000..852eb7f Binary files /dev/null and b/public/img/sinricpro_esp32_i2c_pins.png differ diff --git a/public/img/sinricpro_esp8266_i2c_pins.png b/public/img/sinricpro_esp8266_i2c_pins.png new file mode 100644 index 0000000..be39296 Binary files /dev/null and b/public/img/sinricpro_esp8266_i2c_pins.png differ diff --git a/public/img/sinricpro_mq135-test-reading.png b/public/img/sinricpro_mq135-test-reading.png new file mode 100644 index 0000000..375e9c7 Binary files /dev/null and b/public/img/sinricpro_mq135-test-reading.png differ diff --git a/public/img/sinricpro_mq135-wiring-diagram.png b/public/img/sinricpro_mq135-wiring-diagram.png new file mode 100644 index 0000000..231b295 Binary files /dev/null and b/public/img/sinricpro_mq135-wiring-diagram.png differ diff --git a/public/img/sinricpro_mq3-test-jack-daniels-reading.png b/public/img/sinricpro_mq3-test-jack-daniels-reading.png new file mode 100644 index 0000000..9d45b84 Binary files /dev/null and b/public/img/sinricpro_mq3-test-jack-daniels-reading.png differ diff --git a/public/img/sinricpro_mq3-test-reading.png b/public/img/sinricpro_mq3-test-reading.png new file mode 100644 index 0000000..4695282 Binary files /dev/null and b/public/img/sinricpro_mq3-test-reading.png differ diff --git a/public/img/sinricpro_mq3-wiring-diagram.png b/public/img/sinricpro_mq3-wiring-diagram.png new file mode 100644 index 0000000..231b295 Binary files /dev/null and b/public/img/sinricpro_mq3-wiring-diagram.png differ diff --git a/public/img/sinricpro_node_red_install.png b/public/img/sinricpro_node_red_install.png new file mode 100644 index 0000000..cdbe5a7 Binary files /dev/null and b/public/img/sinricpro_node_red_install.png differ diff --git a/public/img/sinricpro_node_red_nodes.png b/public/img/sinricpro_node_red_nodes.png new file mode 100644 index 0000000..fd15e8d Binary files /dev/null and b/public/img/sinricpro_node_red_nodes.png differ diff --git a/public/img/sinricpro_pi_camera_create_camera_device.png b/public/img/sinricpro_pi_camera_create_camera_device.png new file mode 100644 index 0000000..4311638 Binary files /dev/null and b/public/img/sinricpro_pi_camera_create_camera_device.png differ diff --git a/public/img/sinricpro_pi_camera_create_camera_other_webrtc.png b/public/img/sinricpro_pi_camera_create_camera_other_webrtc.png new file mode 100644 index 0000000..633e7b5 Binary files /dev/null and b/public/img/sinricpro_pi_camera_create_camera_other_webrtc.png differ diff --git a/public/img/sinricpro_pi_camera_create_camera_ready_to_connect.png b/public/img/sinricpro_pi_camera_create_camera_ready_to_connect.png new file mode 100644 index 0000000..52cec44 Binary files /dev/null and b/public/img/sinricpro_pi_camera_create_camera_ready_to_connect.png differ diff --git a/public/img/sinricpro_pi_camera_mediamtx_config.png b/public/img/sinricpro_pi_camera_mediamtx_config.png new file mode 100644 index 0000000..160b518 Binary files /dev/null and b/public/img/sinricpro_pi_camera_mediamtx_config.png differ diff --git a/public/img/sinricpro_pi_contact_sensor_open_close.png b/public/img/sinricpro_pi_contact_sensor_open_close.png new file mode 100644 index 0000000..a7be0c2 Binary files /dev/null and b/public/img/sinricpro_pi_contact_sensor_open_close.png differ diff --git a/public/img/sinricpro_pi_contact_sensor_wiring.png b/public/img/sinricpro_pi_contact_sensor_wiring.png new file mode 100644 index 0000000..a44d0d6 Binary files /dev/null and b/public/img/sinricpro_pi_contact_sensor_wiring.png differ diff --git a/public/img/sinricpro_pi_doorbell-wiring-diagram.png b/public/img/sinricpro_pi_doorbell-wiring-diagram.png new file mode 100644 index 0000000..98d572c Binary files /dev/null and b/public/img/sinricpro_pi_doorbell-wiring-diagram.png differ diff --git a/public/img/sinricpro_pi_webrtc_alexa_app_camera.jpg b/public/img/sinricpro_pi_webrtc_alexa_app_camera.jpg new file mode 100644 index 0000000..fad8916 Binary files /dev/null and b/public/img/sinricpro_pi_webrtc_alexa_app_camera.jpg differ diff --git a/public/img/sinricpro_pi_webrtc_camera_how_to_connect.png b/public/img/sinricpro_pi_webrtc_camera_how_to_connect.png new file mode 100644 index 0000000..e6ecb11 Binary files /dev/null and b/public/img/sinricpro_pi_webrtc_camera_how_to_connect.png differ diff --git a/public/img/sinricpro_pi_webrtc_camera_intro.png b/public/img/sinricpro_pi_webrtc_camera_intro.png new file mode 100644 index 0000000..8cf8baa Binary files /dev/null and b/public/img/sinricpro_pi_webrtc_camera_intro.png differ diff --git a/public/img/sinricpro_pi_webrtc_camera_with_alexa_googlehome_sequnce_diagram.png b/public/img/sinricpro_pi_webrtc_camera_with_alexa_googlehome_sequnce_diagram.png new file mode 100644 index 0000000..cf3ebf9 Binary files /dev/null and b/public/img/sinricpro_pi_webrtc_camera_with_alexa_googlehome_sequnce_diagram.png differ diff --git a/public/img/sinricpro_pi_webrtc_google_home_camera.jpg b/public/img/sinricpro_pi_webrtc_google_home_camera.jpg new file mode 100644 index 0000000..da1770b Binary files /dev/null and b/public/img/sinricpro_pi_webrtc_google_home_camera.jpg differ diff --git a/public/img/sinricpro_temperature_sensor_Adafruit_Sensor_lib.png b/public/img/sinricpro_temperature_sensor_Adafruit_Sensor_lib.png new file mode 100644 index 0000000..796710b Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_Adafruit_Sensor_lib.png differ diff --git a/public/img/sinricpro_temperature_sensor_BME280_Wiring.png b/public/img/sinricpro_temperature_sensor_BME280_Wiring.png new file mode 100644 index 0000000..2bf321f Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_BME280_Wiring.png differ diff --git a/public/img/sinricpro_temperature_sensor_BME280_libs.png b/public/img/sinricpro_temperature_sensor_BME280_libs.png new file mode 100644 index 0000000..65736c4 Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_BME280_libs.png differ diff --git a/public/img/sinricpro_temperature_sensor_BMP180_Wiring.png b/public/img/sinricpro_temperature_sensor_BMP180_Wiring.png new file mode 100644 index 0000000..606bd8a Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_BMP180_Wiring.png differ diff --git a/public/img/sinricpro_temperature_sensor_BMP180_libs.png b/public/img/sinricpro_temperature_sensor_BMP180_libs.png new file mode 100644 index 0000000..40c19ee Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_BMP180_libs.png differ diff --git a/public/img/sinricpro_temperature_sensor_DHT22_Wiring.png b/public/img/sinricpro_temperature_sensor_DHT22_Wiring.png new file mode 100644 index 0000000..1aa8092 Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_DHT22_Wiring.png differ diff --git a/public/img/sinricpro_temperature_sensor_DS18B20_Wiring.png b/public/img/sinricpro_temperature_sensor_DS18B20_Wiring.png new file mode 100644 index 0000000..882dc23 Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_DS18B20_Wiring.png differ diff --git a/public/img/sinricpro_temperature_sensor_DS18B20_bb.png b/public/img/sinricpro_temperature_sensor_DS18B20_bb.png new file mode 100644 index 0000000..b4ab994 Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_DS18B20_bb.png differ diff --git a/public/img/sinricpro_temperature_sensor_DS18B20_invalid_readings.png b/public/img/sinricpro_temperature_sensor_DS18B20_invalid_readings.png new file mode 100644 index 0000000..2e22f1a Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_DS18B20_invalid_readings.png differ diff --git a/public/img/sinricpro_temperature_sensor_DS18B20_readings.png b/public/img/sinricpro_temperature_sensor_DS18B20_readings.png new file mode 100644 index 0000000..c66feb0 Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_DS18B20_readings.png differ diff --git a/public/img/sinricpro_temperature_sensor_LM335_Wiring.png b/public/img/sinricpro_temperature_sensor_LM335_Wiring.png new file mode 100644 index 0000000..18f9738 Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_LM335_Wiring.png differ diff --git a/public/img/sinricpro_temperature_sensor_LM35-and-LM34_Wiring.png b/public/img/sinricpro_temperature_sensor_LM35-and-LM34_Wiring.png new file mode 100644 index 0000000..e649dea Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_LM35-and-LM34_Wiring.png differ diff --git a/public/img/sinricpro_temperature_sensor_adafruit_bme280_lib.png b/public/img/sinricpro_temperature_sensor_adafruit_bme280_lib.png new file mode 100644 index 0000000..127c2a1 Binary files /dev/null and b/public/img/sinricpro_temperature_sensor_adafruit_bme280_lib.png differ diff --git a/public/img/sinricpro_water_sensor_wiring.png b/public/img/sinricpro_water_sensor_wiring.png new file mode 100644 index 0000000..a347ca9 Binary files /dev/null and b/public/img/sinricpro_water_sensor_wiring.png differ diff --git a/public/img/smart-button-app.png b/public/img/smart-button-app.png new file mode 100644 index 0000000..d3b7560 Binary files /dev/null and b/public/img/smart-button-app.png differ diff --git a/public/img/smart-button-portal-dashboard.png b/public/img/smart-button-portal-dashboard.png new file mode 100644 index 0000000..65aa6dc Binary files /dev/null and b/public/img/smart-button-portal-dashboard.png differ diff --git a/public/img/smart-button-save-device.png b/public/img/smart-button-save-device.png new file mode 100644 index 0000000..9771002 Binary files /dev/null and b/public/img/smart-button-save-device.png differ diff --git a/public/img/smart-button-saved-template.png b/public/img/smart-button-saved-template.png new file mode 100644 index 0000000..9bbc0d5 Binary files /dev/null and b/public/img/smart-button-saved-template.png differ diff --git a/public/img/smart-button-set-template-drop-smart-button.png b/public/img/smart-button-set-template-drop-smart-button.png new file mode 100644 index 0000000..8df2895 Binary files /dev/null and b/public/img/smart-button-set-template-drop-smart-button.png differ diff --git a/public/img/smart-button-set-template-name-desc-type.png b/public/img/smart-button-set-template-name-desc-type.png new file mode 100644 index 0000000..5e69211 Binary files /dev/null and b/public/img/smart-button-set-template-name-desc-type.png differ diff --git a/public/img/spdt-transparent-switch.png b/public/img/spdt-transparent-switch.png new file mode 100644 index 0000000..4b774e3 Binary files /dev/null and b/public/img/spdt-transparent-switch.png differ diff --git a/public/js/scripts.js b/public/js/scripts.js new file mode 100644 index 0000000..ecea0a2 --- /dev/null +++ b/public/js/scripts.js @@ -0,0 +1,39 @@ +function openLanguage(evt, language) { + // Get the language code (e.g., "nl-NL" from "alexa-nl-NL" or "gh-nl-NL") + var langCode = language.split('-').slice(1).join('-'); + var section = language.split('-')[0]; // "alexa" or "gh" + + // Hide all tab content + var tabcontent = document.getElementsByClassName("tabcontent"); + for (var i = 0; i < tabcontent.length; i++) { + tabcontent[i].style.display = "none"; + } + + // Remove active class from all tabs + var tablinks = document.getElementsByClassName("tablinks"); + for (var i = 0; i < tablinks.length; i++) { + tablinks[i].className = tablinks[i].className.replace(" active", ""); + } + + // Show the clicked tab content + document.getElementById(language).style.display = "block"; + + // Add active class to the clicked tab + evt.currentTarget.className += " active"; + + // Synchronize with the corresponding tab in the other section + var otherSection = (section === "alexa") ? "gh" : "alexa"; + var otherTabId = otherSection + "-" + langCode; + + // Check if the corresponding tab exists in the other section + if (document.getElementById(otherTabId)) { + // Show the corresponding tab content + document.getElementById(otherTabId).style.display = "block"; + + // Find and activate the corresponding tab button + var otherTabLinks = document.querySelectorAll('button[onclick*="' + otherTabId + '"]'); + if (otherTabLinks.length > 0) { + otherTabLinks[0].className += " active"; + } + } +} diff --git a/public/video/2023-10-21 11-01-23.mkv b/public/video/2023-10-21 11-01-23.mkv new file mode 100644 index 0000000..571e84a Binary files /dev/null and b/public/video/2023-10-21 11-01-23.mkv differ diff --git a/public/video/alexa-eco-show-webrtc-camera-demo.mp4 b/public/video/alexa-eco-show-webrtc-camera-demo.mp4 new file mode 100644 index 0000000..4e60336 Binary files /dev/null and b/public/video/alexa-eco-show-webrtc-camera-demo.mp4 differ diff --git a/public/video/light-widget-demo.mp4 b/public/video/light-widget-demo.mp4 new file mode 100644 index 0000000..19686e0 Binary files /dev/null and b/public/video/light-widget-demo.mp4 differ diff --git a/public/video/portal-relay-on-off.mp4 b/public/video/portal-relay-on-off.mp4 new file mode 100644 index 0000000..56d2944 Binary files /dev/null and b/public/video/portal-relay-on-off.mp4 differ diff --git a/public/video/portal-webrtc-camera-demo.mp4 b/public/video/portal-webrtc-camera-demo.mp4 new file mode 100644 index 0000000..f8d7f46 Binary files /dev/null and b/public/video/portal-webrtc-camera-demo.mp4 differ diff --git a/public/video/prov.mp4 b/public/video/prov.mp4 new file mode 100644 index 0000000..67b3ffe Binary files /dev/null and b/public/video/prov.mp4 differ diff --git a/public/video/relay-on-off-switch.mp4 b/public/video/relay-on-off-switch.mp4 new file mode 100644 index 0000000..5a5c488 Binary files /dev/null and b/public/video/relay-on-off-switch.mp4 differ diff --git a/public/video/sinricpro-app-webrtc-camera-demo.mp4 b/public/video/sinricpro-app-webrtc-camera-demo.mp4 new file mode 100644 index 0000000..bcc039a Binary files /dev/null and b/public/video/sinricpro-app-webrtc-camera-demo.mp4 differ diff --git a/public/video/sinricpro-contact-sensor-open-close.mp4 b/public/video/sinricpro-contact-sensor-open-close.mp4 new file mode 100644 index 0000000..f898fe9 Binary files /dev/null and b/public/video/sinricpro-contact-sensor-open-close.mp4 differ diff --git a/public/video/sinricpro-ir-tv-demo.mp4 b/public/video/sinricpro-ir-tv-demo.mp4 new file mode 100644 index 0000000..5423d67 Binary files /dev/null and b/public/video/sinricpro-ir-tv-demo.mp4 differ diff --git a/public/video/sinricpro-motion-sensor-demo.mp4 b/public/video/sinricpro-motion-sensor-demo.mp4 new file mode 100644 index 0000000..09813bf Binary files /dev/null and b/public/video/sinricpro-motion-sensor-demo.mp4 differ diff --git a/public/video/sinricpro-swith-light-5050-led-strip-demo.mp4 b/public/video/sinricpro-swith-light-5050-led-strip-demo.mp4 new file mode 100644 index 0000000..6c824fd Binary files /dev/null and b/public/video/sinricpro-swith-light-5050-led-strip-demo.mp4 differ diff --git a/public/video/sinricpro-swith-light-5050-led-strip-sinricpro-portal-demo.mp4 b/public/video/sinricpro-swith-light-5050-led-strip-sinricpro-portal-demo.mp4 new file mode 100644 index 0000000..c951444 Binary files /dev/null and b/public/video/sinricpro-swith-light-5050-led-strip-sinricpro-portal-demo.mp4 differ diff --git a/public/video/sinricpro-swith-with-dimmer-RobotDyn.mp4 b/public/video/sinricpro-swith-with-dimmer-RobotDyn.mp4 new file mode 100644 index 0000000..4fda193 Binary files /dev/null and b/public/video/sinricpro-swith-with-dimmer-RobotDyn.mp4 differ diff --git a/public/video/sinricpro-swith-with-dimmer-YYAC3S.mp4 b/public/video/sinricpro-swith-with-dimmer-YYAC3S.mp4 new file mode 100644 index 0000000..aa3986e Binary files /dev/null and b/public/video/sinricpro-swith-with-dimmer-YYAC3S.mp4 differ diff --git a/public/video/sinricpro-swith-with-dimmer-google-home-demo.mp4 b/public/video/sinricpro-swith-with-dimmer-google-home-demo.mp4 new file mode 100644 index 0000000..bcf4e4e Binary files /dev/null and b/public/video/sinricpro-swith-with-dimmer-google-home-demo.mp4 differ diff --git a/public/video/sinricpro-water-sensor-demo.mp4 b/public/video/sinricpro-water-sensor-demo.mp4 new file mode 100644 index 0000000..a6b69d2 Binary files /dev/null and b/public/video/sinricpro-water-sensor-demo.mp4 differ diff --git a/public/video/sinricpro-water-tank.mp4 b/public/video/sinricpro-water-tank.mp4 new file mode 100644 index 0000000..e24fcb8 Binary files /dev/null and b/public/video/sinricpro-water-tank.mp4 differ diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..f6fdda2 --- /dev/null +++ b/robots.txt @@ -0,0 +1,5 @@ +--- +layout: none +--- +User-agent: * +Sitemap: {{ site.url }}/sitemap.xml \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..36e0fc3 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,15 @@ +--- +layout: null +--- + + + {% for page in site.pages %} + {% if page.layout != nil %} + {% if page.layout != 'feed' %} + + {{site.url}}{{ page.url | remove: 'index.html' }} + + {% endif %} + {% endif %} + {% endfor %} + \ No newline at end of file