# README
fritzbox-based-presence
Show who is home based on devices connected to FritzBox that are currently online.
Features
- show who is currently connected to your home network and online
- single go binary
- docker images for all popular platforms
- Telegram bot support
Requirements
- Fritz!OS 7.57+ (they changed the data format inbetween)
Installation
- Download latest release and spin up the binary as systemd service, screen etc.
- OR use the prebuilt docker images (see Usage for an full example)
Usage
Fritz!Box User
- Create a dedicated Fritz!Box user
-
Navigate to fritz.box in your browser
-
Login
-
Create a user under
System > Fritz!Box Users
-
Create a docker-compose file with the following contents:
version: "3.5" services: fritzbox-presence: image: timoreymann/fritzbox-based-presence:latest # check for version to use if you would like to pin it restart: always ports: - <public-port>:8090 environment: FB_PRESENCE__SHOW_GUESTS: "true" FB_PRESENCE__FRITZ_BOX_URL: http://192.168.178.1 FB_PRESENCE__FRITZ_BOX_USERNAME: <your-user> FB_PRESENCE__FRITZ_BOX_PASSWORD: <your-password> FB_PRESENCE__DEVICE_NAME_MAPPING: Name=device1,device2|Name2=device1 FB_PRESENCE__AUTH_PASSWORD: <<password here>>
-
Start service with docker-compose
- Run
docker compose up -d
- Open your browser at
<host IP>:<public port>
- Optionally add to your DynDNS, cloudflared tunnel etc. to make it available
For all available options just run the binary without any required variable set to get an overview, or if you are familiar with go code check the config sources
Setup telegram bot
If you want to use the telegram functionality, follow this guide.
- Create your bot with @BotFather
/newbot
- Enter the desired name to be displayed in chats e.g.
My Home Stalker
- Give it a username ending in
bot
e.g. `my_home_stalker_bot - Copy the token you get, you will need it later
- Set up some sugar
/setcommands
@your_bot_name
start - Establish SkyNet home - See who is home online - See who is currently connected to your home
/setuserpic
- Send the bot the profile picture you want to see
- Configure the service
- Set the env var
FB_PRESENCE__TELEGRAM_BOT_TOKEN
to the token you received - Set
FB_PRESENCE__TELEGRAM_BOT_ALLOWED_USERS
to a comma seperated list of users that should be allowed to use the bot
- Set the env var
Setup discord bot
- Create the application & bot for discord
- Make sure you’re logged on to the Discord website.
- Navigate to the application page
- Click on the “New Application” button.
- Give the application a name and click “Create”.
- Navigate to the “Bot” tab to configure it.
- Make sure that Public Bot is unticked.
- You should also make sure that Require OAuth2 Code Grant is unchecked
- Copy the token using the “Copy” button.
- Configure the service
- Set the env var
FB_PRESENCE__DISCORD_BOT_TOKEN
to the token you received - Set
FB_PRESENCE__DISCROD_BOT_ALLOWED_USERS
to a comma seperated list of users that should be allowed to use the bot
- Set the env var
Motivation
Living together can be hard. And knowing who will be home is a nice thing to have.
Manual maintenance with signs or something analog or the good old message is boring, so lets use something a bit more reliable.
Contributing
I love your input! I want to make contributing to this project as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the configuration
- Submitting a fix
- Proposing new features
- Becoming a maintainer
To get started please read the Contribution Guidelines.
Development
Requirements
- GNU make
- Docker
- pre-commit
- Go 1.21
Test
make test
Build
make build
Alternatives
- writing messages
- analog signs
- talking to other people (scary)