{"id":18596043,"url":"https://github.com/losuler/opnsense-update-notify","last_synced_at":"2025-08-19T18:45:12.914Z","repository":{"id":133523330,"uuid":"268009067","full_name":"losuler/opnsense-update-notify","owner":"losuler","description":"An update notification script for OPNsense.","archived":false,"fork":false,"pushed_at":"2020-08-06T09:02:02.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T22:07:07.164Z","etag":null,"topics":["notifications","opnsense","script","update"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/losuler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-30T04:29:27.000Z","updated_at":"2024-01-16T04:11:19.000Z","dependencies_parsed_at":"2023-07-10T01:33:16.705Z","dependency_job_id":null,"html_url":"https://github.com/losuler/opnsense-update-notify","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/losuler%2Fopnsense-update-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/losuler%2Fopnsense-update-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/losuler%2Fopnsense-update-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/losuler%2Fopnsense-update-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/losuler","download_url":"https://codeload.github.com/losuler/opnsense-update-notify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239379324,"owners_count":19628684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notifications","opnsense","script","update"],"created_at":"2024-11-07T01:22:53.868Z","updated_at":"2025-02-17T23:09:40.868Z","avatar_url":"https://github.com/losuler.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cp align=\"center\"\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ch3 align=\"center\"\u003eOPNsense Update Notify\u003c/h3\u003e\n    \u003cp align=\"center\"\u003e\n      An update notification script for OPNsense.\n    \u003c/p\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n## About\n\nThis is a script that makes an API connection to OPNsense and checks if there is any pending updates and if there are, it sends a message with details.\n\nBased on the script by Bart J. Smit, 'ObecalpEffect' and Franco Fichtner, forked from https://github.com/bartsmit/opnsense-update-email.\n\n## Setup\n\nIt's recommended to create a user with access restricted to the API endpoints required to retrieve update information needed by the script. The steps to do this are as follows:\n\n1. Add a new group under `System`\u003e`Access`\u003e`Groups`. All that is required here is `Group name`.\n\n2. After creating the group, click on `Edit` for the newly created group. Under `Assigned Privileges` click `Edit`.\n\n3. Scroll down to or search for `System: Firmware`. Tick to add the priviledges to the group (click the `i` to view the endpoints).\n\n4. Add a new user under `System`\u003e`Access`\u003e`Users`. \n\n    1. Provide a `Username`. \n\n    2. Under `Password` tick `Generate a scrambled password to prevent local database logins for this user.`. \n\n    3. Then under `Group Memberships` click the previously created group and click `Add groups` (`-\u003e`).\n\n5. After creating the new user, click on `Edit`. Under `API keys` click `Create API key` (`+`). Your browser will prompt you to download or open a text file. This file will have the `api_key` and `api_secret` values used in the config (see the [Config](#config) below).\n\n## Config\n\nThe configuration file `config.yml` has three main sections (see `config.yml.example`). The already filled in values in the example config are the defaults.\n\n### OPNsense\n\n```yaml\nopnsense:\n  host:\n  self_signed: true\n  api_key:\n  api_secret:\n```\n\n`host` is either the ip address or hostname of the OPNsense web interface.\n\n`self_signed` refers to whether the TLS certificate is self signed or not, it maybe be either `true` or `false`. Since OPNsense creates it's own self signed cert by default, the default for this value is `true`.\n\n`api_key` and `api_secret` refers to the values provided in step 5 of the [Setup](#setup) section above.\n\n### Emitters\n\n```yaml\nemitter: telegram\n```\n\nThe `emitter` refers to one of the message services listed in the subsections below (only Telegram for now). \n\n#### Telegram\n\n```yaml\ntelegram:\n  token:\n  chatid:\n```\n\n`token` is the token for the Telegram bot, which is provided by creating a bot by following the steps provided in the [Telegram bot API documentation](https://core.telegram.org/bots#3-how-do-i-create-a-bot).\n\n`chatid` is the unique identifier for the target chat. It can be obtained by messaging the bot and executing the following command (replace `$BOT_TOKEN`). The ID may be found at `\"chat\": {\"id\": 12345678},`:\n\n```sh\ncurl https://api.telegram.org/bot$BOT_TOKEN/getUpdates | python -m json.tool\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flosuler%2Fopnsense-update-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flosuler%2Fopnsense-update-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flosuler%2Fopnsense-update-notify/lists"}