A Windows service, written in .NET Framework 4.8 to send Telegram notifications when:
- a planned power outage is scheduled in Belgrade, Serbia
- a planned water outage is scheduled in Belgrade, Serbia
- an unplanned water outage occurs in Belgrade, Serbia
- a parking fine is received in Belgrade, Serbia
- Follow these instructions to create your own bot
- Send "/token" to BotFather to obtain the token for your bot and replace the token in the
bot-token.example.txt
file - Rename the
bot-token.example.txt
file tobot-token.txt
- Send "/my_id" to https://t.me/get_id_bot
Note down your Chat ID which the bot will tell you
Example: Your Chat ID = 123456 - In
userdata.example.csv
, replace "123456" with your Chat ID - Replace the "Палилула" and "САВЕ МРКАЉА" with your own District Name and Street Name
- Rename
userdata.example.csv
touserdata.csv
- Build the project in Visual Studio
- From an admin console run
install.bat
Note:install.bat
uses installutil, which needs to be installed beforehand. This tool is automatically installed with Visual Studio. - Press Win+R and type "services.msc" then press "OK"
- Double-check in Services that the PowerOutageNotifier is running and that the startup is set to "automatic"
- Double-check that the Bot you created sent you a message "Service running on <computer_name>"