Cov txheej txheem:

Kho vajtse thiab Software Hack Smart Devices, Tuya thiab Broadlink LEDbulb, Sonoff, BSD33 Ntse Plug: 7 Kauj Ruam
Kho vajtse thiab Software Hack Smart Devices, Tuya thiab Broadlink LEDbulb, Sonoff, BSD33 Ntse Plug: 7 Kauj Ruam

Video: Kho vajtse thiab Software Hack Smart Devices, Tuya thiab Broadlink LEDbulb, Sonoff, BSD33 Ntse Plug: 7 Kauj Ruam

Video: Kho vajtse thiab Software Hack Smart Devices, Tuya thiab Broadlink LEDbulb, Sonoff, BSD33 Ntse Plug: 7 Kauj Ruam
Video: Qhia tai ib lub kho qhov muag nyob hauv xov tooj 2024, Hlis ntuj nqeg
Anonim
Kho vajtse thiab Software Hack Smart Devices, Tuya thiab Broadlink LEDbulb, Sonoff, BSD33 Ntse Plug
Kho vajtse thiab Software Hack Smart Devices, Tuya thiab Broadlink LEDbulb, Sonoff, BSD33 Ntse Plug

Hauv Cov Lus Qhia no kuv qhia koj li cas kuv tau nthuav tawm ob peb lub cuab yeej ntse nrog kuv tus kheej firmware, yog li kuv tuaj yeem tswj hwm lawv los ntawm MQTT ntawm kuv teeb tsa Openhab.

Kuv yuav ntxiv cov cuab yeej tshiab thaum kuv hack lawv.

Tau kawg muaj lwm qhov software raws li txoj hauv kev rau flash kev cai firmware, zoo li Tuya hloov pauv, tab sis kuv nyiam nkag siab tias lub cuab yeej ua haujlwm li cas thiab dab tsi yog 'hauv qab lub hood'.

Code tau sau thiab flashed siv Arduino IDE.

Kuv tswj kuv cov cuab yeej ntawm Openhab thiab Google Tsev (ntawm Openhab), yog tias koj xav paub ntau ntxiv lossis xav tau cov ntaub ntawv.items thiab lwm yam, thov qhia rau kuv paub hauv cov lus.

Kev nyab xeeb ua ntej

Ceev faj vim peb tab tom ua haujlwm ntawm cov khoom siv hluav taws xob muaj zog. Txuas cov cuab yeej los ntawm lub hwj chim ua ntej ua haujlwm rau lawv.

Kuv koj muaj kev ua xyem xyav yog tias lub cuab yeej muaj kev nyab xeeb tom qab hloov kho, thov muab pov tseg.

Khoom siv

Rau feem ntau hacks koj xav tau FDTI programmer txuas rau lub khoos phis tawj siv Arduino IDE, qee lub xov hlau txuas, hlau txuas, qee qhov tiv thaiv thiab ESP8266 lossis ESP8285 cov qauv.

Kauj Ruam 1: Tuya LED RGBW Ntse Teeb

Tuya LED RGBW Ntse Teeb
Tuya LED RGBW Ntse Teeb
Tuya LED RGBW Ntse Teeb
Tuya LED RGBW Ntse Teeb
Tuya LED RGBW Ntse Teeb
Tuya LED RGBW Ntse Teeb

Intro

Kuv yuav lub teeb no los ntawm Aliexpress. Nws ua haujlwm zoo nrog Smart Life app, tab sis kuv xav tswj nws ntawm MQTT los ntawm Openhab. Kuv twb tau ua kuv tus kheej li Sonoff B1 firmware, yog li kuv tau sim nyem lub teeb no nrog lub khoos phis tawj ntawd.

Flashing

Koj qhib lub teeb los ntawm kev ua tib zoo tshem lub hau yas, los ntawm txhais tes los ntawm kev siv lub zog lossis los ntawm kev sib tw ntawm tus ntsia hlau tsav ntawm cov hlau thiab yas. Koj tuaj yeem pom qhov liab qab ESP8266 nti.

Cov kev xav tau sib txuas tau nthuav tawm los ntawm cov ntaub qhwv me me ntawm PCB (3v3, GND, RX, TX thiab IO0 (GPIO0))

Kuv xub muab qee cov laug txuas rau cov pawm thiab cov laug rau cov xov hlau thiab tom qab ntawd muab lawv ua ke. Kuv siv tiewrap thiab qee cov kua nplaum kub los txuas cov xov hlau rau lub teeb.

GPIO0 xav tau los nqa ESP8266 hauv hom haujlwm. Txuas nws mus rau hauv av thaum lub zog ESP8266. Koj tuaj yeem muaj hwj chim thiab nyem ESP8266 siv FTDI programmer.

Firmware

Lub khoos phis tawj tau ua raws li kuv li Sonoff B1 firmware, tab sis raug hloov kho, vim tias Sonoff B1 siv MY9231 LED tsav tsheb uas tau tsav los ntawm ESP8285 nti thiab hauv Tuya Ntse teeb lub 4 channel (RGBW) tau tsav los ntawm mosfets hloov los ntawm PWM teeb liab ncaj qha los ntawm ESP8266.

Cov channel ntsuab txuas nrog GPIO12, liab rau GPIO14, xiav rau GPIO13 thiab cov channel dawb txuas nrog GPIO4. Hauv txoj cai koj pom tias: #define GREENPIN 12 #define REDPIN 14 #define BLUEPIN 13 #define WHITEPIN 4.

Cov lej ua tiav yog nyob ntawm kuv Github.

Kauj Ruam 2: Cov Khoom Siv Hluav Taws Xob Dawb Dawb Dawb - Ntu 1

Generic Warm White LED Bulbs - Ntu 1
Generic Warm White LED Bulbs - Ntu 1
Generic Warm White LED Bulbs - Ntu 1
Generic Warm White LED Bulbs - Ntu 1
Generic Warm White LED Bulbs - Ntu 1
Generic Warm White LED Bulbs - Ntu 1

Intro

Kuv yuav cov qij LED no los ntawm Aliexpress lub thawv xiav/dawb thiab lub thawv dub. Lawv tau hais kom tswj hwm ntawm Magic home smart home app thiab Techlife pro app. Kuv tsis tau sim cov ntawv thov no, txij li kuv xav tswj lub teeb LED ntawm MQTT los ntawm Openhab. Txij li thaum kuv twb muaj lub khoos phis tawj rau lub teeb RGBW, kuv siv qhov ntawd tsis yog plaub (RGBW) raws, tab sis tsuas yog ib txoj hauv kev.

Flashing

Koj qhib lub teeb los ua tib zoo tshem lub hau yas. Kuv pom tias lub hau tau txuas me ntsis rau cov hlau, yog li kuv xav tau quab yuam los ntawm tus ntsia hlau tsav ntawm cov hlau thiab yas.

Kuv cia siab tias yuav pom ESP8266 lossis ESP8285 nti, txawm li cas los nws yog Broadlink module. Tus qauv zoo ib yam li ESP12 tus qauv, tab sis kuv pom tias tus pinout tau sib txawv kiag li. Los ntawm kev tshem cov hlau npog, Kuv pom tias nws yog RDA 5981AM nti.

Kuv qhov kev daws teeb meem los hloov cov nti no los ntawm ESP tau qhia hauv qib tom ntej.

Kauj Ruam 3: Cov Khoom Siv Hluav Taws Xob Dawb Dawb Dawb - Ntu 2

Generic Warm White LED Bulbs - Ntu 2
Generic Warm White LED Bulbs - Ntu 2
Generic Warm White LED Bulbs - Ntu 2
Generic Warm White LED Bulbs - Ntu 2
Generic Warm White LED Bulbs - Ntu 2
Generic Warm White LED Bulbs - Ntu 2
Generic Warm White LED Bulbs - Ntu 2
Generic Warm White LED Bulbs - Ntu 2

Cov qauv tau txuas nrog lub hauv paus ntawm lub teeb ntawm 3 tus pin, saib thawj daim duab:

  • 3V3 (3.3V)
  • GND (hauv av)
  • PWM (mem tes dav tes taws los piav)

Tus PWM tus pin tau siv los teeb lub teeb ntawm lub teeb PWM, uas tuaj yeem sib txawv ntawm 0 (teeb tau tawm) mus rau 100 (teeb yog ua tiav) thiab txhua tus nqi nyob nruab nrab. Saib lub vev xaib no rau qee cov ntaub ntawv ntau ntxiv txog PWM cov cim.

Txij li ESP8266 thiab ESP8285 modules khiav ntawm 3.3V thiab tuaj yeem tsim tau yooj yim PWM teeb liab, Kuv tau hloov Broadlink modules rau ESP8266 lossis ESP8285 modules kuv tau tso ncig.

ESP-01S (ESP8266) cov qauv tau teeb los ntawm ib tus programmer cais, saib cov kauj ruam 3 ntawm Cov Lus Qhia no. Kuv tau siv tus poj niam lub taub hau taub hau rau lub teeb nrog rub tawm cov tshuaj tiv thaiv ntawm 3V3 thiab EN (pab tau). Nov yog kuv thawj qhov kev sim, tom qab ntawd kuv hloov mus rau ESP8285 cov qauv.

ESP-M1, ESP-M3 thiab ESP-01F (ESP8285) cov qauv tau teeb los ntawm cov xaim hluav taws xob txuas rau cov kev xav tau sib txuas (3V3, GND, RX, TX thiab GPIO0 (saib cov kauj ruam 1, lub teeb ntawm Tuya ntse teeb). Kuv soldered rub tawm resistor ntawm 3V3 thiab EN (pab kom).

Nrog ESP-M3 tus qauv, Kuv siv GPIO4 los tsim PWM teeb liab. Thaum xub thawj kuv siv GPIO2, tab sis thaum lub teeb LED yog ntawm, qhov qis GPIO2 ua rau pom kev ntawm lub on-board LED, uas ua rau lub teeb xiav tsis xav tau hauv LEDbulb.

Ntxiv qee daim kab xev kapton txhawm rau txhim kho kev sib cais ntawm tus qauv thiab teeb lub hauv paus sib txuas.

Kho kom raug: Kuv pom tias ESP-01F tus qauv tsis muaj kev ntseeg tau pib, tej zaum yog vim lub zog tsis muaj zog ntawm lub zog. Kuv daws qhov no los ntawm kev ntxiv 10 uF tantalum capacitor nruab nrab ntawm GND thiab VCC. Qhov tseem ceeb ntawm cov khoom siv hluav taws xob 10 uF capacitor tsis ua haujlwm.

Kauj Ruam 4: Cov Khoom Siv Hluav Taws Xob Dawb Dawb Dawb - Ntu 3

Generic Warm White LED Bulbs - Ntu 3
Generic Warm White LED Bulbs - Ntu 3

Firmware

Cov cai nyob ntawm kuv Github.

Lub khoos phis tawj suav nrog lub vev xaib sib txuas los tswj hwm LEDbulb, thiab tseem muaj kev xaiv los hloov kho lub firmware OTA ntawm Webupdate

Kauj Ruam 5: Sonoff lossis BSD33 Ntse Plug - Ntu 1

Sonoff lossis BSD33 Ntse Plug - Ntu 1
Sonoff lossis BSD33 Ntse Plug - Ntu 1
Sonoff lossis BSD33 Ntse Plug - Ntu 1
Sonoff lossis BSD33 Ntse Plug - Ntu 1
Sonoff lossis BSD33 Ntse Plug - Ntu 1
Sonoff lossis BSD33 Ntse Plug - Ntu 1
Sonoff lossis BSD33 Ntse Plug - Ntu 1
Sonoff lossis BSD33 Ntse Plug - Ntu 1

Intro

Kuv yuav lub WiFi ntse ntsaws no los ntawm Aliexpress. Nws ua haujlwm zoo nrog Smart Life app, tab sis kuv xav tswj nws ntawm MQTT los ntawm Openhab. Kuv twb tau ua kuv tus kheej Sonoff firmware rau cov ntse ntsaws thiab qhov ntsaws, yog li kuv tau sim nyem lub teeb no nrog lub khoos phis tawj ntawd.

Kuv kuj tseem siv lub khoos phis tawj no kom nyem kuv Sonof S20 thiab Sonoff S26 ntse ntsaws thiab Sonoff yooj yim thiab Sonoff Basic R3 ntse hloov pauv. Yuav ua li cas qhib thiab kho vajtse txuas Sonoff cov cuab yeej rau flashing tau piav qhia rau Tasmota ntawm wiki ntawm tasmota, yog li qhov no tsis tau piav qhia ntawm no.

Qhib lub qhov (socket)

Lub ntse ntsaws yog ua ke. Txhawm rau qhib nws muab lub taub hau ntswj rau hauv qhov txiav tawm ntawm lub ntiaj teb thiab siv qee qhov quab yuam los ntawm kev siv sab nraud ntawm lub qhov (socket) los ua pivot point (hint los ntawm netpokin cov ncauj lus no). Txoj hauv kev no koj yuav tsum tuaj yeem rub nws tawm yam tsis ua rau lub qhov (socket) puas.

Hauv cov duab koj pom sab hauv ntawm lub ntsaws. Nws suav nrog lub rooj tsav xwm tseem ceeb nrog kev xa tawm lub pcb me me uas ESP8266 nti thiab lub cim xeeb tau teeb tsa. Cov laug cam tau txuas nrog ntawm kev siv cov laug txuas txuas tau yooj yim.

Kauj Ruam 6: Sonoff lossis BSD33 Ntse Plug - Ntu 2

Sonoff lossis BSD33 Ntse Plug - Ntu 2
Sonoff lossis BSD33 Ntse Plug - Ntu 2
Sonoff lossis BSD33 Ntse Plug - Ntu 2
Sonoff lossis BSD33 Ntse Plug - Ntu 2
Sonoff lossis BSD33 Ntse Plug - Ntu 2
Sonoff lossis BSD33 Ntse Plug - Ntu 2
Sonoff lossis BSD33 Ntse Plug - Ntu 2
Sonoff lossis BSD33 Ntse Plug - Ntu 2

Flashing

Kuv thim rov qab tsim kho cov txuas txuas. Saib daim duab rau kev piav qhia ntawm kev sib txuas. Kuv pom tias:

  • GPIO2 txuas nrog LED (hauv lub pob ntsaws).
  • GPIO13 txuas nrog khawm nws tus kheej.
  • GPIO15 txuas nrog rau mosfet uas hloov pauv qhov tseem ceeb.

Koj tuaj yeem muaj hwj chim thiab nyem ESP8266 siv FTDI programmer. Txuas cov poj niam dupont cables rau cov txuas hauv qab no: (VCC (3.3V), GND, RX, TX thiab GPIO0)

GPIO0 xav tau los nqa ESP8266 hauv hom haujlwm. Txuas nws mus rau hauv av thaum lub zog ESP8266.

Ntawm kuv tus FTDI programmer kuv ntxiv 470uF capacitor ntawm av thiab VCC. Hauv lwm qhov haujlwm kuv pom tias qhov no nce kev ruaj ntseg.

FTDI programmer muaj qee qhov tsis siv GND thiab VCC tus pin, koj tuaj yeem siv lawv txuas GPIO0 rau GND.

Kauj Ruam 7: Sonoff lossis BSD33 Ntse Plug - Ntu 3

Sonoff lossis BSD33 Ntse Plug - Ntu 3
Sonoff lossis BSD33 Ntse Plug - Ntu 3
Sonoff lossis BSD33 Ntse Plug - Ntu 3
Sonoff lossis BSD33 Ntse Plug - Ntu 3
Sonoff lossis BSD33 Ntse Plug - Ntu 3
Sonoff lossis BSD33 Ntse Plug - Ntu 3
Sonoff lossis BSD33 Ntse Plug - Ntu 3
Sonoff lossis BSD33 Ntse Plug - Ntu 3

Firmware

Kuv lub firmware nyob ntawm kuv Github.

Qhov tseem ceeb ntawm cov firmware

  • Kev sib txuas rau WiFi thiab MQTT server
  • Kev hloov pauv ntawm tes thaum online thiab offline (thaum pib)
  • Yog tias qhov hloov pauv tau hloov pauv tus kheej thaum lub cuab yeej tsis siv, nws xa lub xeev ntawm MQTT thaum rov txuas dua
  • Lub xeev hloov pauv tau khaws cia hauv RTC nco (saib cov vis dis aus no hais txog RTC nco ntawm ESP8266)
  • Web interface rau kev tswj hwm qhov hloov pauv thiab nkag mus rau Webupdate rau OTA
  • Lub khoos phis tawj haum rau BSD33 qhov ntse ntsaws, tab sis kuj rau Sonoff li: Sonoff S20, Sonoff S26, Sonoff yooj yim, Sonof Basic R3

Openhab kev koom ua ke

Kuv siv lub ntsaws no los tswj lub zog ntawm kuv lub tshuab kas fes. Ntawm Openhab thiab Google Tsev Kuv tuaj yeem tswj nws ntawm lub suab.

Kuv ua raws lub sijhawm uas hloov ntawm kuv lub tshuab kas fes tom qab lub sijhawm ua ntej, saib daim duab ntawm kuv Openhab sitemap. Lub sijhawm ua ntej tau txhaj rau hauv NodeRed, nrog rau lub sijhawm sib txawv ua ntej hnub ua haujlwm thiab hnub so.

Saib kuv Github rau cov piv txwv ntawm cov khoom, cov cai thiab cov ntaub ntawv sitemap.

Pom zoo: