g4klx / MMDVMHost

The host program for the MMDVM
GNU General Public License v2.0
378 stars 275 forks source link

Feature Request: DMR custom TG to trigger callback script #398

Open g2rHP7prvJqO opened 6 years ago

g2rHP7prvJqO commented 6 years ago

I wish there was a way to configure certain TG to trigger callbacks for flexible external control. This could be implemented by adding any number of "CallBack_NNNNNN.sh" shell scripts in a dedicated folder and CallBack_123456.sh being automatically executed when a call to TG 123456 is received. The script could be used to controls a GPIO or implement a profile switching (like SharkRF OpenSPOT but much better) by stopping MMDVM host services, copying a specific MMDVM.ini that replaces the existing one and activate it by restarting the services. Ideally, using the commands could be restricted to a whitelist of DMR ids like CallBackWhiteList=...

g0wfv commented 6 years ago

Not quite built in as you suggest, but I've already done the hard work for you in the form of the already existing script in the Linux directory. You could modify tg_shutdown.sh for your needs.

On Fri, 23 Feb 2018, 02:15 g2rHP7prvJqO, notifications@github.com wrote:

I wish there was a way to configure certain TG to trigger callbacks for flexible external control. This could be implemented by adding any number of "CallBack_NNNNNN.sh" shell scripts in a dedicated folder and CallBack_123456.sh being automatically executed when a call to TG 123456 is received. The script could be used to controls a GPIO or implement a profile switching (like SharkRF OpenSPOT) by stopping MMDVM host services, replacing the MMDVM.ini by a specific configuration file and restarting etc. Ideally, using the commands could be restricted to a whitelist of DMR ids like CallBackWhiteList=...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/g4klx/MMDVMHost/issues/398, or mute the thread https://github.com/notifications/unsubscribe-auth/AQf_4m7xBh1vI-s0YiJVVmAxz7vNC5Nuks5tXh8qgaJpZM4SQSWp .

--

A J Corbett G0WFV

g0wfv commented 5 years ago

Already exists .....

I wrote it years ago! Look in the Linux folder for tg_shutdown.sh - it can be modified to do anything you like it only shuts down and reboots a computer at the moment!

On Tue, 18 Dec 2018, 19:15 Jay, notifications@github.com wrote:

My method for this is via APRS and my DMR radio, I modified WXBot to listen for custom commands from me including weather, fortune, time/date, rebooting servers, opening, closing and getting status of my garage door. All based on bash scripts. Possibilities are endless ;) I also added the commands in quick text and then assigned them buttons on my radio ;)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/g4klx/MMDVMHost/issues/398#issuecomment-448336442, or mute the thread https://github.com/notifications/unsubscribe-auth/AQf_4gINrBZ5Hj-ps4-n30BuUcdVY2DPks5u6T7CgaJpZM4SQSWp .

--

A J Corbett G0WFV