🚧 [Alpha] tg+rpi smart-home bot that controls: light, sound, volume, homemates presense, voice (tts+asr)
homemates presense | voice over |
music & volume | light |
macos alfred |
- Any raspbery pi (I use Raspberry Pi Model B Rev 2 and Pi Rev 3)
- Light driver (I use very own one based on Reley(solid-state/thyristor omron-g3mb-202p))
- @a-x-'s esp-light-ctr
- Sound system (I use external rpi sound card HIFIBERRY DAC+ and usual amp+speakers system Edifier R980T)
- meta: rpi-bins — primary-rpi:~/bin
- meta: rpi-services — primary-rpi:~/services holds sub repos
- 📱🎵 shairport-sync — nodejs airplay v1 server (syncronous multiroom music from iphone/mac)
- 🔈🎵 snapcast — Synchronous multi-room audio player (rpi self sourced music)
- 📱💡 HAP-NodeJS — nodejs homekit server (siri:
turn light on
) - ⏰💨 @a-x-'s former cron jobs — (in js now) download & play podcasts, random jokes, sound volume, light scenarios, etc.
- 🖲💡 @a-x-'s Alfred.app light control workflow; look the screenshot above; read more about Alfred
- 🎵💨 @a-x-/megapolist-podcast-crawler — any podcast crawler & player
- 💡🌐 @a-x-/stupid-light-server — stupid light control http-server
- 💦📏 @a-x-/rpi-water-isr — water meter
- 💬⚙️ tg — telegram cli
🚧 work in progress
primary-rpi
akarpi2main
— bot, control-center, music source, sound system#1, jobssecondary-rpi
akarpi3
akarpi-media
— torrents, large storage, LCD-display with fullhd, sound system#2
npm add -g forever
# ... rpi-bin
# ... tg-rpi-smart-home-bot
# npm i
# ... crontab -e
BOT_TOKEN=$(node -p "require('./config').signals.sources.telegram.token") forever start /home/pi/services/tg-rpi/
# forever process with logs
npm run start
npm run restart
npm run watch-logs
- tests
- add some tests
- setup CI
- fix CI
- increase test coverage
- более тесная интеграция с бота homekit
- volume control
- two-side mapping (sync everything instantly, pubsub)
- split into modules
- create Installer
- think about Docker
- draft
- write or use some Platform
- with plugins, signals, commands, jobs, machines, sensors, configs, state-management, etc.
- state and signals (actions)
- universal rest/tg/in-app/app-api/sensor signal (action/event) adaptor
- programming finite state maschine transitions via
tg
- think about redux
- platform example: http://hobbyquaker.github.io/ccu.io
- configs: separate; specify
- ?? separate:
(config)
<--({command}.config)
- ?? specify:
command(config)
<--command(config.commands.list.command))
- ?? separate:
- ifttt integrations
- home presense
- не включ будильник/музыкальный подкаст если меня нет
- ! mini-bank e.g. use transity under the hood
- wip delivery club automation
- router integration (remote restart, lan dns mngmnt)
- no-interactive actions debug_chat log
- run on any machine abstraction layer (rpi2, rpi3)
- #rock-sci NLP (natural lang processing) improve text command flexibility
- word2vec,
levinshtain
for 1) command matching, 2) music search -
api.ai
for intent mining -
RandomForest
(that better than CatBoosk) for ML classification -
xgboost
for simple general purpose ML - wip music genres pleer.net
- repeat, undo, ask detaild commands
- learnings new commands synonyms (— do magic — ... — I say to you, bot! — wow, do you mean 'switch magic on'?)
- word2vec,
- ! reminders
- transcribing voice messages, interpret commands
- get tg audio ->
asr voice.ogg 'audio/ogg;codecs=opus'
- get tg audio ->
- automatic problem diagnosis
- #rock-sci CBR case-based reasoning aka copy-pasete development aka stackoverflow/google development
- VAD+mics
- think about amazon alexa with its skills integration
- I18N
- fix HomeKit external data updating https://github.com/KhaosT/HAP-NodeJS/issues/497
- light control, scrpts
- volume control, scrpts
- automatic smooth volume changing
- local volume (e.g. alarm smooth increasing)
- sound control: play by url, pause/resume/stop, scrpts
- voice over
- basic weather
- weather
- (with icons and smart recommendations)
- AAA aka Authorization
- telegram nicknames whitelist
- granular ACL
- auth command (add name, role, ifttt, mac/ip/hostname)
-
/commands
for usual cases - basic presense control
- over wi-wi mac addr based
- ifttt geolocation webhooks
- presense/movement sensors
- alternative solution I dislike
- handle photos, voice-records, music, torrent-files and links
- torrents: wait for downloading started
- video: check rpi3 alive. abort failed by timeout videos.
- dont answer done innediately to torrent status command
- fun
- jokes
- jokes random schedule
- сделать так, чтобы на похвалу бот отвечал в стиле "хозяин любит нас ^-^"
- jokes
- Data sequences streams, data series db
- viewer: Initial State Platform
- scheduled / delayed tg messages via tg message-commands
- light toggle button
- tablet screen
- window blinds control (servo-drive)
- separate sound control
- voice control microphones
- presense sensors
- external light intensity (LUX) sensors
- advanced LEDs
- dimmed fine mixed triple stripes 2700K, 4200K, 6400K
- ceiling panels
- Philips HUE lamps (itsnt my choise)
- Xiaomi smart lamps
- pros
- cons
- frontend gui centric
- not a telegram first sitizen
- SQL
- everything is js?
- no homekit, airplay intergation?
home-assistant (python3)
- cons
- python