Implement a new "tripwire" feature (HTTP webhooks on COS)
allebb opened this issue · 1 comments
This new feature will enable the user to configure an internet-connected Pirrot repeater to automatically send a HTTP JSON payload to a web URL when the COS is tripped.
This will have many potential use cases including the following:
- Recording repeater activity (when the repeater is used and how long for)
- Ability to build apps to alert repeater users that "operators are online" and they may like to join too.
- Provide data to generate repeater usage graphs on a club website etc.
Additional settings should be added ot the Pirrot configuration file to allow for a user-configurable "ignored interval" this will ensure that during long two-way radio transmissions that there is not masses of HTTP requests being generated. I will implement the functionality so that, by default HTTP requests are sent to a configurable endpoint once every 5 minutes - The user can reduce or increase this interval in the settings if they wish.
This HTTP request should be pushed to a backend thread to ensure that the HTTP request lifecycle does not impact the main Pirrot processes (audio recording and re-transmission of radio messages).
This has now been implemented and tested. This will be released in Pirrot v2.0.0.