Cov txheej txheem:

Alexa IoT TV-Controller ESP8266: 10 Cov Kauj Ruam (nrog Duab)
Alexa IoT TV-Controller ESP8266: 10 Cov Kauj Ruam (nrog Duab)

Video: Alexa IoT TV-Controller ESP8266: 10 Cov Kauj Ruam (nrog Duab)

Video: Alexa IoT TV-Controller ESP8266: 10 Cov Kauj Ruam (nrog Duab)
Video: How to make Universal Remote control using ESP8266 Google Assistant & Cadio 2024, Hlis ntuj nqeg
Anonim
Alexa IoT TV-Controller ESP8266
Alexa IoT TV-Controller ESP8266
Alexa IoT TV-Controller ESP8266
Alexa IoT TV-Controller ESP8266
Alexa IoT TV-Controller ESP8266
Alexa IoT TV-Controller ESP8266

Tsis ntev los no kuv tau yuav Amazon Echo Dot thaum lub sijhawm Amazon Prime hnub rau ~ 20 €.

Cov suab pab me me no pheej yig thiab zoo rau DIY Tsev Automation yog tias koj paub tias muaj peev xwm ua tau thiab yuav tsim cov cuab yeej ntse li cas.

Kuv muaj Samsung Smart TV tab sis kuv xav ua kom nws ntse dua. Hauv Cov Lus Qhia Kuv yuav qhia koj li cas los tsim Tus Tswj rau koj lub TV kom tswj tau nws lub wireless siv koj lub suab. Qee qhov ua tau thiab muaj txiaj ntsig cov lus txib tuaj yeem yog:

  • Qhib/Tawm TV
  • Volume Volume (Up/Down/Mute)
  • Hloov mus rau lwm qhov chaw (HDMI Port, TV, thiab lwm yam …)
  • Qhib Netflix/Amazon Prime/YouTube…

Yog tias koj lub TV muaj USB-Port uas ib txwm-ntawm koj muaj nyiaj ntau! Yog tias tsis yog, koj tuaj yeem siv loong USB-cable lossis Pawg Tswj Xyuas Hluav Taws Xob Me uas txo qis qhov hluav taws xob ntawm 12.5 thiab 16V mus rau 5V. Kuv siv qhov no vim tias kuv twb muaj lub hwj chim 12V ncaj qha hauv qab ntawm kuv lub txaj rau qee qhov LED-Strips:)

Lwm txoj hauv kev thiab yog vim li cas kuv thiaj koom nrog hauv Kev Sib Tw Roj Teeb, yog qhov kuv tsim 3D-luam tsev nyob muaj qhov chaw rau 150mAh LiPo Roj Teeb thiab Charger Board. Yog li koj tuaj yeem khaws nws kiag li wirelessly!

Hmoov tsis zoo txawm tias kuv tsis muaj duab ntawm nws vim kuv lub iPhone tuag thaum lub sijhawm iOs-Hloov tshiab thiab cov duab tsis tau muab tso rau hauv kuv li iCloud:(Yog li cov duab muab tsuas yog tsis muaj lub roj teeb sab hauv, uas kuv txuas tom qab kev sib dhos zaum kawg …

Txawm li cas los xij, yog tias koj xav tsim koj tus kheej Tus Tswj, ntawm no yog yam koj xav tau:

Khoom siv:

  • Cov Cuab Yeej:

    • Soldering hlau
    • Kub kua nplaum
    • 3D-Tshuab Luam Ntawv (xaiv tau)
    • Heatshrink
  • Cheebtsam: (Cov kev sib txuas tsuas yog ua piv txwv!)
  • 1x ESP8266-01s Pawg + Programmer:
  • 1x NPN Transistor 2N2222A:
  • 1x 100 Ohm Resistor:
  • 2x 10k Ohm Resistor: saib txuas saum toj no
  • 1x Hloov Me (NC - Qhov tseem ceeb !!):
  • 1x 3mm IR-Emitter LED:
  • 1x Mini Step-Down Converter:
  • 1x Micro-USB Poj niam txuas lub rooj tsavxwm:
  • 1x TP4056 Charging Board (Tsis teb los tau):
  • 1x Mini LiPo Roj Teeb (Yeem Xaiv):

Ntxiv:

Txhawm rau tsim txoj haujlwm no koj xav tau lub kaw lus ua haujlwm pub dawb "ioBroker". Nov yog MQTT-Broker pub dawb uas tso cai rau ESP8266 txuas rau nws thiab qhia nws cov ntaub ntawv. ioBroker kuj tseem muaj Alexa-Adapter, uas peb tuaj yeem siv los ua peb ESP wirelessly sib txuas lus rau Alexa.

Kuv khiav ioBroker ntawm lub Laptop-Motherboard qub-tab sis rau kev siv lub tshuab me me, Raspberry-Pi yuav txaus los khiav nws. Koj tuaj yeem rub tawm ioBroker ntawm nws lub vev xaib raug cai ntawm no:

Koj kuj xav tau Tasmota-Firmware! Koj tuaj yeem rub nws ntawm no:

Xaiv koj hom lus

Yog tias koj xav siv nws nrog Alexa, koj yuav tsum paub lub cev Alexa lub cuab yeej xav tau dab tsi! Alexa-App tsis ua haujlwm! Alexa-Kev Sib Txuas tsuas yog xaiv tau-koj kuj tseem tuaj yeem hloov koj lub TV los ntawm nias lub MQTT-khawm me me zoo li qhov no:

Kauj ruam 1: Program ESP8266

Program ESP8266
Program ESP8266

Vim tias peb tab tom yuav solder ESP8266 rau PCB tom qab, peb yuav tsum tau program nws ua ntej. Txhawm rau ua qhov no, Kuv qhia koj kom siv tus programmer tus nqi pheej yig - Tus uas kuv siv tsis tau pom zoo! Kuv tau hloov kho nws kom nws ua haujlwm yog li tshawb xyuas qhov txuas rau saum (saib: Cov Khoom Siv).

Thaum xub ntsaws ESP rau hauv tus programmer. Tom qab ntawd pib lub Flash-Tool ntawm koj lub Computer. Tam sim no ntsaws tus Programmer ntawm USB thiab nias FLASH-Khawm ntawm PCB thaum ntsaws nws. Tso nws tom qab ob peb feeb. Tam sim no yuav tsum tau qhia pom COM-Port hauv Txoj Haujlwm-Cuab Yeej. Xaiv nws thiab txuas ntxiv los ntawm kev xaiv Tasmota-Firmware. Baud-Tus Nqi yuav tsum yog 115.000 thiab xaiv QIO hom. Thaum ua tiav, nyem rau ntawm Flash-Button ntawm Cov Cuab Yeej. Tam sim no tus programmer pib.

Thaum ua tiav, nws yuav hais DONE.

Tam sim no koj tuaj yeem tshem tus Programmer ntawm koj lub PC thiab tso nws rov qab tom qab koj hloov tus programmer mus rau UART-Mode (hloov ntawm PCB).

Kauj Ruam 2: Teeb Koj Li ESP - WiFi

Teeb Koj Li ESP - WiFi
Teeb Koj Li ESP - WiFi

Tam sim no ESP tau teeb tsa thiab txuas rau koj lub khoos phis tawj hauv UART-Mode, mus rau wifi-teeb tsa ntawm koj lub cuab yeej thiab tshawb rau lub network uas muaj "tasmota" hauv SSID (piv txwv li "Tasmota-31278D"). Txuas rau nws, mus rau koj tus browser thiab mus rau 192.168.4.1.

Hauv qab no kuv piav qhia qhov koj yuav tsum tau ua hauv kev teeb tsa:

Chaw Wifi:

  • WLAN1:

    • SSID ntawm koj li Wifi-Router
    • Lo lus zais ntawm koj li Wifi-Router
  • WLAN2:

    • SSID ntawm koj (thib ob) Router (yeem)
    • Lo lus zais ntawm koj (thib ob) Router (yeem)
  • Hostname: Lub npe uas tau qhia hauv lub network - Kuv pom zoo "TV -Remote"

Paub meej tias koj qhov chaw los ntawm txhaj "Txuag" (ntsuab khawm). Tam sim no ESP sim txuas rau koj li WiFi network.

Yog tias txheej txheem no ua tsis tiav, ESP yuav qhib nws tus kheej Tasmota-Wifi-Network dua.

Kauj Ruam 3: Teeb Koj Li ESP - Module Config

Teeb Koj Li ESP - Module Config
Teeb Koj Li ESP - Module Config

Thaum koj li ESP txuas nrog koj lub network hauv tsev ua tiav, koj yuav tsum tshawb nrhiav nws tus IP-Chaw Nyob hauv koj li Router-Menu.

Ntaus tus Adress rau hauv koj tus browser. Nplooj ntawv tasmota ntawm ESP yuav raug qhia. Tam sim no mus rau Chaw Teeb Kho Module thiab xaiv "Generic (18)".

Thaum ua tiav, tshawb hauv Drop-Down-Menu ntawm GPIO-2 rau IRsend (8) thiab xaiv nws.

Nias Txuag!

Kauj Ruam 4: Teeb Koj Li ESP - MQTT

Teeb Koj Li ESP - MQTT
Teeb Koj Li ESP - MQTT

ESP xav tau txuas rau peb MQTT-Broker (ioBroker). Peb tuaj yeem teeb tsa MQTT-teeb tsa ntawm tab SettingsConfigure MQTT. Muaj koj yuav tsum nkag mus rau koj li Broker-IP, Broker-Port, MQTT-User (yog tias koj tsis paub nws koj tuaj yeem pom nws ntawm koj MQTT-Adapter teeb tsa ntawm ioBroker!). Tsis tas li ntawd koj yuav tsum ntaus hauv MQTT-Password, Client-Name (yuav ua li cas lub cuab yeej tau qhia hauv ioBroker) thiab cov ncauj lus. Cov ncauj lus yog lub npe ntawm daim nplaub tshev hauv iobroker. Yog tias koj xav siv ntau MQTT-cov cuab yeej, Kuv pom zoo kom tshaj tawm tag nrho cov ncauj lus xws li chav nyob/%ntsiab lus%lossis chav ua noj/%ntsiab lus%. Tab sis koj tsis tas yuav ua qhov ntawd tab sis nws yuav pab koj tom qab thaum koj muaj ntau lub cuab yeej txuas nrog koj tus broker!

Tsis txhob hnov qab txuag txhua yam tom qab!:)

Thiab nws yog! ESP tau npaj siv tam sim no!

Kauj ruam 5: Teeb Koj IoBroker

Teeb koj li IoBroker
Teeb koj li IoBroker

Tam sim no ESP tau npaj siv, peb yuav tsum teeb tsa MQTT-Broker- thiab xaiv tau Alexa-Adapter.

Mus rau koj ioBroker-webpage (ip-adress + chaw nres nkoj (8081) zoo li 192.168.178.188:8081 hauv kuv li).

Nkag mus rau "Adapters" thiab tshawb rau "MQTT Broker/Client" thiab "Alexa2".

MQTT-Adapter xav tau, Alexa yog xaiv tau.

Kuv pom zoo kom pib nrog MQTT-Adapter. Tom qab kev teeb tsa lub qhov rai yuav qhib qhov twg koj yuav tsum teeb tsa koj tus broker.

Xaiv cov kev xaiv raws li qhia hauv daim duab.

Koj tuaj yeem xaiv MQTT-Tus neeg siv thiab tus lej zais raws li koj nyiam!

Raws li ib txwm, tsis txhob hnov qab txuag koj cov chaw (sab laug hauv qab).

Kauj Ruam 6: Xeem MQTT-Kev Sib Txuas

Xeem MQTT-Kev Sib Txuas
Xeem MQTT-Kev Sib Txuas

Txhawm rau sim qhov kev sib txuas los ntawm ESP rau tus tswv lag luam, koj yuav tsum tshem ESP los ntawm koj lub PC thiab ntsaws nws rov qab nrog xaiv ib txwm Pib-Hom dua.

Tos ob peb feeb thiab tshawb xyuas koj li nplooj ntawv iobroker nplooj ntawv "xwm txheej" thiab saib "lub teeb" -cov cim ntawm MQTT-Adapter. Yog tias koj li ESP tau teev nyob rau ntawd, nws txuas nrog ua tiav!

MQTT-cov ntawv yuav tshwm tuaj ntawm nplooj ntawv "Cov Phiaj Xwm"!

Kauj Ruam 7: Tsim MQTT-hloov pauv

Tsim MQTT-hloov pauv
Tsim MQTT-hloov pauv
Tsim MQTT-hloov pauv
Tsim MQTT-hloov pauv

Nkag mus rau "Cov Phiaj Xwm" -Tab ntawm ioBroker.

Qhib daim nplaub tshev mqtt.0/YourTopic/cmnd.

Sab hauv ntawm daim ntawv cmnd (hais kom ua) no, koj yuav tsum tsim cov ntaub ntawv tshiab. Koj tuaj yeem ua qhov no los ntawm txhaj rau + (ntxiv) -Symbol nyob rau saum toj.

Lub npe: IRsend

yam: Datapoint

datapointtype: txoj hlua

Btw thov txim uas pom cov ntsiab lus duab yog lus German, tab sis kuv tsis paub yuav hloov pauv lus Askiv li cas rau cov lus qhia no:/

Kauj Ruam 8: Luam thiab Luam Ntawv

Soldering thiab Luam Ntawv
Soldering thiab Luam Ntawv
Soldering thiab Luam Ntawv
Soldering thiab Luam Ntawv
Soldering thiab Luam Ntawv
Soldering thiab Luam Ntawv

Software tau ua tiav - soldering tom ntej!

PCB yuav tsum nyob hauv cov duab ib puag ncig nrog 50mm txoj kab uas hla.

Solder txhua yam ua ke zoo li tau qhia hauv cov phiaj xwm. Nco ntsoov tias koj tsis txuas IR-Emitter thim rov qab! Tej zaum LED yuav tsis muaj sia nyob qhov ntawd.

Kuv siv me 2-tus pin-txuas rau IR-LED, Hloov thiab Micro-USB-Power-Board. Yog tias koj xav ua qhov ntawd ib yam, nco ntsoov tias koj kos koj li + thiab - kev sib txuas ntawm ib sab ntawm qhov txuas. Kev hloov pauv tsis muaj teeb meem!

Yog tias koj muaj 3d -Tshuab Luam Ntawv ntawm tes, koj tuaj yeem siv kuv cov ntaub ntawv muab - Nws yog qhov yooj yim 3cm tuab rooj uas haum rau txhua qhov khoom siv zoo!

Txawm tias lub roj teeb me me thiab them nyiaj txiag haum rau sab hauv!

Kuv luam nws nrog kuv Anycubic I3-Mega thiab Dub Anycubic Filament:)

Kuv glued PCB, IR-LED, Hloov thiab USB-Port sab hauv siv cov nplaum kub. Tsis tas li ntawd kuv tau kaw cov ntaub ntawv tom qab kuv lub TV nrog qee daim kab xev ob tog. Ua haujlwm zoo!

Txhawm rau pib lub cuab yeej tam sim no, koj yuav tsum thawb Lub Khawm thaum ntsaws nws rau ob peb feeb. Qhov hloov pauv txuas IR-LED los ntawm GPIO-2 thaum nias tias ESP tuaj yeem pib. Tasmota tsuas yog txhawb nqa GPIO-2 thiab GPIO-0 ntawm ESP-01 rau IRSender yog li kuv xav tau ua li no. Tso lub pob tom qab ca. 5 vib nas this…

Kauj Ruam 9: Lub Sijhawm Automation:)

Automation Sijhawm:)
Automation Sijhawm:)

Tam sim no txhua yam kho vajtse-raws tau ua tiav.

Automation-Software tam sim no:)

Txhawm rau ua qee qhov txias txias, peb yuav tsum rub lub Adapter "Scripts" hauv ioBroker. Tom qab koj teeb tsa nws, yuav muaj ib daim teb tshiab nyob rau sab laug, hu ua "Scripts". Qhib nws thiab tsim cov Blockly -Script tshiab - qhov no yog ib txoj hauv kev yooj yim heev rau kev siv lub ntsej muag ua haujlwm.

Txhawm rau tswj hwm koj lub TV, koj yuav tsum paub nws yog IR-Codes. Koj tuaj yeem yooj yim pom lawv hauv is taws nem - tshawb rau koj Tus Qauv + IR Codes. Kuv pom cov lej rau kuv lub TV online thiab. Tab sis koj tuaj yeem yooj yim txiav lawv nrog IR-Txais thiab Arduino! Yog tias koj tsis paub yuav ua li cas, tshawb hauv Instructables;)

Hauv kuv qhov teeb meem, lub teeb liab kom tig/tua TV yog "0xE0E040BF". Qhov sib txawv IRsend uas peb tsim ua ntej tam sim no xav tau. Qhov kev pab cuam piv txwv sau cov Code rau hauv qhov sib txawv. Tab sis ua ntej thiab tom qab IRsend tau teeb tsa 0 nrog qee qhov qeeb. Qhov no tseem ceeb heev vim tias TV tsis ua dab tsi.

Koj yuav tsum siv hom ntawv no rau IRsend: {"raws tu qauv": "NEC", "Khoom": 32, "Cov Ntaub Ntawv": YourIRCode}

Qhov ua rau TV tig mus yuav yog qhov sib txawv hauv koj ioBroker. Yog tias koj xav ua nws nrog Alexa, ib txwm tsim Tus Txheej Txheem Tshiab hauv Alexa-App ntawm koj lub smartphone thiab hu nws xws li. "Qhib TV rau".

Koj tuaj yeem pom qhov sib txawv hauv koj li Alexa-adapter nplaub tshev ntawm "Cov Khoom" -tab ntawm koj ioBroker. Qhov kev hloov pauv no yuav tsum tau xaiv raws li qhov tshwm sim tshwm sim rau saum kuv tsab ntawv piv txwv (yog-mob).

Yog tias koj muaj lub TV ntse koj tuaj yeem pib ua piv txwv Netflix, Amazon Prime, YouTube thiab lwm yam.

Koj yuav tsum taug qab lub TV ib kauj ruam ib kauj ruam raws li koj yuav ua nws siv lub chaw taws teeb. Tsis txhob hnov qab teeb tsa IRsend rau 0 ntawm cov lus txib nrog kev ncua me me. Kev ncua yuav tsum ua haujlwm nrog qhov tseem ceeb ntawm 500 thiab 1000ms. Tsuas yog sim nws:)

Kauj ruam 10: Puas muaj lus nug?:)

Kuv vam tias koj tuaj yeem nkag siab txhua cov kauj ruam nws siv los tsim kuv Smart-IR-Controller.

Yog tias koj muaj lus nug, thov nug kuv hauv cov lus:) vam tias koj nyiam kuv qhov project: D

Btw. thov txim rau kuv cov lus Askiv tsis zoo, Kuv tuaj ntawm teb chaws Yelemees: p

Pom zoo: