Doorbell bot for matrix
Go to file
Henrik Kjernmoen Gran b0ac3ea19c Commands are case insensitive, checks using startwith, commands added to config, catches error on webhook request 2024-08-24 19:32:19 +02:00
.gitignore Doorbell works, added user friendliness for setup 2024-08-16 00:31:24 +02:00
README.md Commands are case insensitive, checks using startwith, commands added to config, catches error on webhook request 2024-08-24 19:32:19 +02:00
config.json.template Commands are case insensitive, checks using startwith, commands added to config, catches error on webhook request 2024-08-24 19:32:19 +02:00
flake.lock add flake 2024-08-16 19:37:58 +02:00
flake.nix add flake 2024-08-16 19:37:58 +02:00
index.mjs Commands are case insensitive, checks using startwith, commands added to config, catches error on webhook request 2024-08-24 19:32:19 +02:00
logAuthToken.json.template Doorbell works, added user friendliness for setup 2024-08-16 00:31:24 +02:00
logAuthToken.mjs Doorbell works, added user friendliness for setup 2024-08-16 00:31:24 +02:00
package-lock.json Bot runs (epic) 2024-08-15 21:57:13 +02:00
package.json Bot runs (epic) 2024-08-15 21:57:13 +02:00

README.md

doorbell-matrix-bot

Doorbell bot for matrix

The bot will only respond & join in authorized rooms (add authorized room IDs in `config.json` => `rooms`). NOTE: The bot needs to have the room authorized before being invited. If the bot is invited, then has the room authorized in the config, it will not join!

The commands to trigger the doorbell are defined in the config file

How to run:

Step 1: Getting an access token

Step 1.1: Inserting required info to generate token

  • Fill in: homeserver (config.json)
  • Fill in: username (logAuthToken.json)
  • Fill in: password (logAuthToken.json)

Step 1.2: Getting the token

  • Run: logAuthToken.mjs (Command: node logAuthToken.mjs)
  • If all is done correctly, an access token should be logged in the console

Step 2: Running the bot

Step 2.1: Inserting more required information

  • Fill in: homeserver (config.json) (This should already be filled if step 1.1 was done)
  • Fill in: token (config.json) (This is the token you got in step 1.2)
  • Fill in: prefix (config.json)
  • Fill in: commands (config.json) (Commands are case insensitive, and should not include the prefix)
  • Fill in: rooms (config.json)
  • Fill in: doorbellWebhook (config.json)

Step 2.2: Actually running the bot

  • Run: index.mjs (Command: node index.mjs)
  • If all is done correctly, the bot should be running