A smart home assistant server with the following features:
- IoT device management
- Switch device on/off
- Monitor device status
- Monitor/get/set temperatures
- Automatic temperature management
- Home assistant Telegram bot
- Food stock tracking using OpenAI API
- ?
- Use Node.js 24 (
.nvmrc) and npm. - Install dependencies with
npm ci. - Copy
env.sampleto.envand setMQTT_SERVER,REDIS_URL,TELEGRAM_BOT_TOKEN, andTELEGRAM_NOTIFICATIONS_TARGET. - Run a local Redis server if needed:
docker run --restart=always --name redis -d -p 6379:6379 redis redis-server --save 60 1 --loglevel warningnpm run devstartssrc/index.tswithtsx watchandpino-prettylogs.npm startruns the same entrypoint without pretty logging.npm run buildcompiles TypeScript and rewrites TS path aliases inbuild/.npm run typecheck,npm run lint, andnpm testrun focused checks.
helptemperaturesystemabort
Note: /food is still registered in the bot entrypoint, but there is no food handler in src/lib/telegram/handlers/index.ts yet.
The bot sends different notifications based on the reported values/events from connected devices.
Examples:
- Abnormal voltage changes
- Water pump flow
- High temperature/humidity