Adding lua to manually created device?

I posted this to the Denon plugin forum, but thought I might get more attention here. I hope this is OK:

Since I was having issues with the current Denon plugin, I manually created a dimmer device to control the volume of my Denon S-900W receiver using the instructions from the Mios website. I also found this site that shows some lua code that can be attached to the dimmer device to control the volume. My problem is I am unsure where to add this code and was wondering if someone here would be able to help.

The example lua code I found is here: Show DENON AV reciever input in Text switch - Page 3 - Domoticz

Does someone know how I can go about doing this?

Thanks,
Andy

It looks like that code, at least part of it, is specific to Domoticz, so would need adjusting.

The place to put code for dummy devices is either in some scene Lua or the Lua Startup code area of Vera. This would be called either by callback or polling the slider position. It’s exactly that part which would be different from the code you pointed to.