i am certainly not an internet coder, but im slowly and gradually muddling through setting up my home automations.
in another thread i was given the following advice
"Create an RM or groovy module that monitors the virtual device's volume setting, then sends an http get command (of your design with the volume percent) to EG when it changes."
i simply dont even know where to start trying to learn how to write code for a groovy module, so im here to ask for some help with this one. please and maybe some pointers where i could at least research some basic info so i can begin to learn
It subscribes to Contact events on a device that the user selects while configuring the app. This is important -- you can't just subscribe to events from any old device without selecting it in an app preferences page. You need to find the relevant capability from this page to filter on in the input.
For your use-case, you could handle the actual volume updating on the device a couple of ways:
If an existing driver exists that exposes a capability such as MusicPlayer, you can just execute commands on that device in the event handler of your custom app. In this case, you would want to create and configure a child device of the music player's type, as shown in the example I linked and using the interfaces further documented here.
If a driver doesn't exist or you prefer not to use one, you can just do the HTTP accesses directly in the handler method of your app. The typical HTTP methods are documented here, and a useful example of usage (in a driver, though it's basically the same in an app) is here: HubitatPublic/httpGetSwitch.groovy at master · hubitat/HubitatPublic · GitHub