ကျွန်တော့်ရဲ့ IOT (internet of things) ခလုတ်လေးတွေ

avatar
(Edited)

အားလုံး မင်္ဂလာပါ။

အရင်ပို့စ်မှာတော့ wifi နဲ့ချိတ်ဆက်သုံးနိုင်တဲ့ timer ခလုတ် တွေ အကြောင်း ရေးဖြစ်ခဲ့ပါတယ်။ အဲဒီ တိုင်မာ ခလုတ်တွေက အိမ်က အင်တာနက်ရှိတဲ့ router နဲ့ ချိတ်ဆက်ထားတာဖြစ်လို့ ဒီခလုတ်ကလဲ အင်တာနက်နဲ့ ချိတ်ဆက်နေပါတယ်။

အိမ်မှာ အပင်ရေလှောင်းဖို့ တိုင်မာ ခလုတ်သုံးခု တပ်ထားပါတယ်။ ဒီပိုစ့်မှာတော့ ဒီခလုတ်သုံးခုကို အင်တာနက်ကနေ ဖွင့်ပိတ်လုပ်ပုံအဆင့်ဆင့်ကို မှတ်တမ်းတင် ဖော်ပြသွားမှာ ဖြစ်ပါတယ်။

အင်တာနက်နဲ့ ချိတ်ဆက်ဖို့ ကြားမှာ Raspberry Pi လေး သုံးထားပါတယ်။ ကျွန်တော်သုံးနေတဲ့ model ကတော့ Raspberry Pi 3 B+ ဖြစ်ပါတယ်။ ဒီ Raspberry Pi မှာ ကွန်ပျူတာတွေမှာလို processor unit, RAM, memory, input/output စတာတွေပါတာကြောင့် အသေးစားကွန်ပျူတာတစ်ခုပဲ ဖြစ်ပါတယ်။ ကျွန်တော်က ဒီ Raspberry Pi ကို ဆာဗာ အနေနဲ့ သုံးမှာ ဖြစ်ပါတယ်။ ဆာဗာ အနေနဲ့ သုံးမှာမို့ 24/7 ‌ဖွင့်ထားမှာပါ (မီးပျက်တဲ့ အချိန်ကလွဲလို့)။ အောက်ပုံကတော့ ကျွန်တော့်ရဲ့ Raspberry Pi ကို ဗူးထဲမှာ ထည့်ထားတာဖြစ်ပါတယ်။

အပေါ်ပုံက အမဲရောင်ဗူးလေး က Raspberry Pi ဖြစ်ပါတယ်။ အဲဒါကို မော်နီတာ ၊ ကီးဘုတ်၊ မောက်နဲ့ တွဲထားတာ ဖြစ်ပါတယ်။ သူက processing power မများလို့ Linux OS (Raspberry Pi အတွက် သီးသန့် OS) ကိုပဲ တင်လို့ အဆင်ပြေပါတယ်။

ပထမ Server ပေါ်မှာ NodeRed, MQTT ကို ထည့် ပါတယ်။ အောက်က ဆိုက်ကို ရည်ညွန်း အသုံးပြုပြီး လုပ်ဆောင်နိုင်ပါတယ်။

https://www.makeuseof.com/install-mqtt-server-node-red-raspberry-pi-home-automation/

  • NodeRed ဆိုတာက တော့ IOT လို့ခေါ်တဲ့ internet of things တွေအတွက် brower ပေါ်ကနေ ပရိုဂရမ်တွေရေးဖို့ IBM ကနေ စဦး ပြုလုပ်ထားတဲ့ java scripts အခြေပြု development tool တစ်ခု ဖြစ်ပါတယ်။
  • MQTT ဆိုတာကတော့ စက်တစ်လုံးနဲ့ တစ်လုံး စာနဲ့ အချင်းချင်း ဆက်သွယ်နိုင်တဲ့ network protocol တစ်ခုပဲဖြစ်ပါတယ်။ ကျွန်တော့်ရဲ့ တိုင်မာတွေနဲ့ Raspberry Pi တို့ဟာ ဒီ MQTT စာပို့ စနစ်နဲ့ ဆက်သွယ်ကြမှာ ဖြစ်ပါတယ်။

အောက်ပုံကတော့ ကျွန်တော့်ရဲ့ NodeRed program ဖြစ်ပါတယ်။

ပုံမှာ မြင်ရတဲ့ အတိုင်း flow chart ပုံစံနဲ့ ပရိုဂရမ် ကို ချိတ်ဆက်ရေးသားရတာဖြစ်ပါတယ်။ ဒီ NodeRed မှာ ကိုယ်အသုံးပြုမယ့်ပုံပေါ်မှာ မူတည်ပြီး လိုအပ်တဲ့ packages လေးတွေကို သွင်းရပါတယ် (browser မှာ addon လေးတွေသုံးသလိုမျိုးပါ)။ ကျွန်တော်သုံးထားတဲ့ packages လေးတွေကတော့

  • တိုင်မာနဲ့ Raspberry Pi နဲ့ချိတ်ဖို့ node-red-contrib-tasmota
  • Raspberry Pi နဲ့ Telegram က bot နဲ့ ချိတ်ဆက်ဖို့ node-red-contrib-telegrambot ။ Telegram မှာ bot တစ်ခု create လုပ်ရပါတယ်။ https://haefelfinger.ch/posts/2019/2019-12-23-using-node-red-mqtt-telegram/ မှာ Telegram bot ပြုလုပ်ပုံ အဆင့်အဆင့်ကို ဖတ်ရှုနိုင်ပါတယ်။

ပြီးရင် ကျွန်တော့်ရဲ့ ခလုတ်လေး တွေကို Raspberry Pi ကတစ်ဆင့် NodeRed ကို အသုံးပြုပြီး Telegram app ကနေ ထိန်းချုပ် နိုင်ပါပြီ မို့ ဒီတိုင်မာ ခလုတ်လေးတွေဟာ IOT (internet of things) အဖြစ်မှတ်ယူလို့ရပါပြီ။ အောက်က Telegram app က ကျွန်တော့် bot ရဲ့ UI ပုံစံဖြစ်ပါတယ်။ ကျွန်တော့်ရဲ့ Raspberry Pi ဆာဗာကို ဖွင့်ထားသရွေ့ အင်တာနက်ရှိနေသရွေ့ ကျွန်တော့်ဖုန်းကနေ ဒီ IOT ခလုတ် လေးတွေကိုအဖွင့်အပိတ်လုပ်နိုင်မှာပဲ ဖြစ်ပါတယ်။

အားလုံးကျန်းမာချမ်းသာကြပါစေ။

@princekham
18th Nov 2022
Myanmar



0
0
0.000
36 comments
avatar
(Edited)

🍕 PIZZA Party!

I gifted $PIZZA slices here:
uthantzin tipped princekham (x1)
htwegyi tipped princekham (x1)
@princekham(4/5) tipped @uthantzin (x1)
princekham tipped tin.aung.soe (x1)
tin.aung.soe tipped princekham (x1)

Learn more at https://hive.pizza!

0
0
0.000
avatar

!LOL

0
0
0.000
avatar

အသိပညာ တခု ရတဲ့ အတွက် ကျေးဇူးတင်ပါတယ် !MEME

0
0
0.000
avatar

ဟုတ်ကဲ့
!PGM !MEME !LOL

0
0
0.000
avatar

Sent 0.1 PGM - 0.1 LVL- 1 STARBITS - 0.05 DEC - 15 SBT - 0.1 THG - tokens to @princekham

remaining commands 9

BUY AND STAKE THE PGM TO SEND A LOT OF TOKENS!

The tokens that the command sends are: 0.1 PGM-0.1 LVL-0.1 THGAMING-0.05 DEC-15 SBT-1 STARBITS-[0.00000001 BTC (SWAP.BTC) only if you have 2500 PGM in stake or more ]

5000 PGM IN STAKE = 2x rewards!

image.png
Discord image.png

Support the curation account @ pgm-curator with a delegation 10 HP - 50 HP - 100 HP - 500 HP - 1000 HP

Get potential votes from @ pgm-curator by paying in PGM, here is a guide

I'm a bot, if you want a hand ask @ zottone444


0
0
0.000
avatar

Thanks for your sharing a lot knowledges!
!LUV
!PIZZA
!MEME
!DIY

0
0
0.000
avatar
asterkame just sent you a DIY token as a little appreciation for your post! Feel free to multiply it by sending someone else !DIY in a comment :) You can do that x times a day depending on your balance so:

Don't be shy - share some DIY!

0
0
0.000
avatar

!LOL
!MEME
!PIZZA

0
0
0.000
avatar

Thanks!
!PGM !MEME !LOL

0
0
0.000
avatar

Sent 0.1 PGM - 0.1 LVL- 1 STARBITS - 0.05 DEC - 15 SBT - 0.1 THG - tokens to @princekham

remaining commands 8

BUY AND STAKE THE PGM TO SEND A LOT OF TOKENS!

The tokens that the command sends are: 0.1 PGM-0.1 LVL-0.1 THGAMING-0.05 DEC-15 SBT-1 STARBITS-[0.00000001 BTC (SWAP.BTC) only if you have 2500 PGM in stake or more ]

5000 PGM IN STAKE = 2x rewards!

image.png
Discord image.png

Support the curation account @ pgm-curator with a delegation 10 HP - 50 HP - 100 HP - 500 HP - 1000 HP

Get potential votes from @ pgm-curator by paying in PGM, here is a guide

I'm a bot, if you want a hand ask @ zottone444


0
0
0.000