MQTT Plugin Crash on HOOBS 4.0
I have a plugin that keeps crashing and won't run on the latest version of Hoobs 4. I originally contacted the plugin developer who could not locate the problem. I decided to setup a vanilla version of Homebridge and the plugin has run just fine without any issues so I'm starting to think it may be Hoobs 4. I also started up my old Hoobs 3 version and the plugin ran there without any issues as well.

I am running the latest version of Hoobs 4 Beta (Version: 4.0.69).

The plugin in question is [homebridge-mqtt](https://plugins.hoobs.org/plugin/homebridge-mqtt.) I have a bridge setup with just this one plugin installed. When I first install the plugin and configure the plugin to point to my MQTT broker I have no issues. I can then add an accessory without any issues. However, once I have an accessory added, the bridge will crash any time it is restarted.

Here are the relevant log files. It's not much information to go off of. I tried to figure out how to get the full stack trace for the crash and haven't been able to locate this.

```
7/2/2021, 8:58:42 AMMqtt BridgeLoaded plugin 'homebridge-mqtt'
7/2/2021, 8:58:42 AMMqtt BridgeLoading 1 platforms...
7/2/2021, 8:58:42 AMMqtt Bridgemqtthomebridge-mqtt v1.0.1
7/2/2021, 8:58:42 AMMqtt BridgemqttNumber of cached Accessories: 0
7/2/2021, 8:58:42 AMMqtt BridgemqttclientId = homebridge-mqtt_e537b52d
7/2/2021, 8:58:42 AMMqtt BridgemqttConnecting..
7/2/2021, 8:58:42 AMMqtt BridgeBridge is running on port 56826.
7/2/2021, 8:58:42 AMMqtt Bridgemqttconnected (url = mqtt://192.168.1.17)
7/2/2021, 9:00:15 AMMqtt BridgemqttaddAccessory true, accessory 'office_occupancy', service_name 'Office Occupancy' is added. [0]
<MANUALLY RESTARTED BRIDGE>
7/2/2021, 9:00:39 AMmqttbridge stopping
7/2/2021, 9:00:43 AMMqtt Bridge starting
7/2/2021, 9:00:45 AMMqtt BridgeLoaded plugin 'homebridge-mqtt'
7/2/2021, 9:00:45 AMMqtt BridgeLoading 1 platforms...
7/2/2021, 9:00:45 AMMqtt Bridgemqtthomebridge-mqtt v1.0.1
7/2/2021, 9:00:45 AMMqtt BridgeWARNINGunhandled rejection: TypeError: Cannot read property 'on' of undefined
<CLEARED CACHE AND RESTARTED BRIDGE>
7/2/2021, 9:02:24 AMmqttbridge stopping
7/2/2021, 9:02:29 AMMqtt Bridge starting
7/2/2021, 9:02:31 AMMqtt BridgeLoaded plugin 'homebridge-mqtt'
7/2/2021, 9:02:31 AMMqtt BridgeLoading 1 platforms...
7/2/2021, 9:02:31 AMMqtt Bridgemqtthomebridge-mqtt v1.0.1
7/2/2021, 9:02:31 AMMqtt BridgemqttNumber of cached Accessories: 0
7/2/2021, 9:02:31 AMMqtt BridgemqttclientId = homebridge-mqtt_3f0ceb90
7/2/2021, 9:02:31 AMMqtt BridgemqttConnecting..
7/2/2021, 9:02:31 AMMqtt BridgeBridge is running on port 56826.
7/2/2021, 9:02:31 AMMqtt Bridgemqttconnected (url = mqtt://192.168.1.17)
```

If there is other helpful information I can gather, let me know. I'm not sure what else to do at this point but feel I have ruled out all other variables besides running Hoobs 4 beta.
