Creating an ISM RF Module plugin

I want to create a plugin which sends a given msg with a ISM RF module, connected to the pi running octoprint, when a button on the web interface is pressed. I can program this in Python and my idea was to run a python program when the button is pressed. But i have no idea on how to do this.

I followed the basic plugin creation tutorial, and figured out how to make a button. And searched on the internet for similiar project but with no succes.

These two statements seem to be in conflict with one another. I guess the question would be are you getting hung up on how to send an action from a button press to the server side python code of your plugin, or you don't know how to interface with the RF module?

I can see how this can be confusing. What i mean is this. I know how to make a program which can control the RF module, if i would program this by it self on a raspberry or something. But What I don't know and find difficult to figure out is how to integrate this in Octoprint. What modules i need to make the interaction on the web interface possible, Using modules like ocotprint.plugin.SettingsPlugin, knowing what functions to make to use these modules. And how the connected between the init.py of a plugin and the templates works.

I have to say that I'm just a basic python programmer and know my way around object oriented programming for creating IoT or automation projects (being an Electrical student). So this project might be to much for me. But i wanted to give it a shot anyway. I guess what i would really like to know is how to get familiar with the possibilities of Octoprint plugin development and using these possibilities in the "correct" way

Gotcha, so if you have the programming knowledge to control the module via python then the things you basically are needing is how the templating/knockout binding work I suspect. I find the easiest way to explain that is through example. One of the more common approaches for interacting from the front end web interface to the backend server-side python code is through use of the simpleApiPlugin mixin implementation on the python side and the use of OctoPrint.simpleApiCommand on the js side. You then have a knockout click binding in your jinja template to run that command in the js file. The examples linked above are within the settings template, but the same would apply for a navbar template (I do this in my IoT power related plugins) or a tab (I do this in Bed Level Visualizer plugin and others).