Unable to receive UDP messages

I’m trying to build an app to control my Devialet Expert Pro Amplifier. The amp is emitting UDP status packages on port 45454 on the local network (including information such as volume, channel, mute status, power status etc). I have created a node script that is able to listen to this using the dgram module. However when implementing this into a Homey app, I’m not able to receive any messages.

Does anybody know whether Homey is preventing me from accessing the connected local network? Or are you aware of any other issues that may be leading to this?

This is the relevant parts of my device.js:

'use strict';

const Homey = require('homey');
const dgram = require('dgram');
const UDP_PORT_STATUS = 45454;
var devices = [];
var reachable = 0;

class DevialetExpertProDevice extends Homey.Device {
    onInit() {
        this.log('device init');
        this.log('name: ', this.getName());
        this.log('class: ', this.getClass());
        let id = this.getData().id;
        this.log('id: ', id);
        let settings = this.getSettings();
        this.log('settings: ', this.getSettings());
        this.log('settings IP address: ' + settings["settingIPAddress"])

        devices[id] = {};
        devices[id].client = {};
        devices[id].receivedData = "";

       client.on('message', (msg, rinfo) => {
            this.log(`Received message from ${rinfo.address}:${rinfo.port}`);
        client.on('error', (err) => {
            this.log(`server error:\n${err.stack}`);

module.exports = DevialetExpertProDevice;

If you happen to be using homey app run to test your app, switch to using homey app run --remote

The former runs your app inside a local Docker container that has limited networking capabilities.

Thank you! That did the trick!