ကျွန်တော့်ရဲ့ IOT (internet of things) ခလုတ်လေးတွေ
အားလုံး မင်္ဂလာပါ။
အရင်ပို့စ်မှာတော့ 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
!LUV
@princekham, @walarhein(1/5) sent you LUV. wallet | market | tools | discord | community | <>< daily
HiveWiki
HiveBuzz.me NFT for Peace
Thanks!
!LUV
@walarhein, @princekham(3/5) sent you LUV. wallet | market | tools | discord | community | <>< daily
HiveWiki
HiveBuzz.me NFT for Peace
!PIZZA
Thanks!
!PIZZA
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!
!LOL
lolztoken.com
I don’t know and I don’t care.
Credit: reddit
@princekham, I sent you an $LOLZ on behalf of @golden.future
Are You Ready for some $FUN? Learn about LOLZ's new FUN tribe!
(3/4)
!LOL
Thanks!
lolztoken.com
Nothing. It just let out a little wine.
Credit: reddit
@golden.future, I sent you an $LOLZ on behalf of @princekham
Delegate Hive Tokens to Farm $LOLZ and earn 110% Rewards. Learn more.
(1/4)
အသိပညာ တခု ရတဲ့ အတွက် ကျေးဇူးတင်ပါတယ် !MEME
Credit: dadspardan
Earn Crypto for your Memes @ hiveme.me!
ဟုတ်ကဲ့
!PGM !MEME !LOL
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!
Discord
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
lolztoken.com
He told me to stop going to those places.
Credit: benthomaswwd
@kaungsett8388, I sent you an $LOLZ on behalf of @princekham
Use the !LOL or !LOLZ command to share a joke and an $LOLZ
(2/4)
Credit: memess
Earn Crypto for your Memes @ hiveme.me!
Thanks for your sharing a lot knowledges!
!LUV
!PIZZA
!MEME
!DIY
@princekham, @asterkame(4/5) sent you LUV. wallet | market | tools | discord | community | <>< daily
HiveWiki
HiveBuzz.me NFT for Peace
Credit: cmmemes
Earn Crypto for your Memes @ hiveme.me!
No problem!
!LUV !MEME !PIZZA
@asterkame, @princekham(4/5) sent you LUV. wallet | market | tools | discord | community | <>< daily
HiveWiki
HiveBuzz.me NFT for Peace
Credit: arthursiq5
Earn Crypto for your Memes @ hiveme.me!
!LOL
!MEME
!PIZZA
Credit: ninjamike
Earn Crypto for your Memes @ hiveme.me!
Thanks!
!PGM !MEME !LOL
lolztoken.com
They raise the roof.
Credit: reddit
@htwegyi, I sent you an $LOLZ on behalf of @princekham
Have you tried the !gif !lolz !meme combo? It is a wall of fun!
(3/4)
Via Tenor
Credit: arthursiq5
Earn Crypto for your Memes @ hiveme.me!
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!
Discord
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
Credit: tomakami
Earn Crypto for your Memes @ hiveme.me!
!LUV !PIZZA
@princekham, @uthantzin(4/10) sent you LUV. wallet | market | tools | discord | community | <>< daily
HiveWiki
HiveBuzz.me NFT for Peace
Thanks!
!LUV
!PIZZA
@uthantzin, @princekham(6/10) sent you LUV. wallet | market | tools | discord | community | <>< daily
HiveWiki
HiveBuzz.me NFT for Peace