xAPPO / MQTT

MQTT client for Hubitat
Other
41 stars 15 forks source link

MQTT Client - Preferences Remarked Out? #6

Closed gnvdude closed 3 years ago

gnvdude commented 4 years ago

I think I'm seeing this correct...the posted github MQTT Client groovy device driver code has the 'Preferences' section remarked out. I first noticed this when I assigned the driver to a new virtual device and the preferences didn't show up..so I checked the driver code and noticed it looked remarked out so I unremmed..preferences showed up..but not sure what else in the driver may be wrong so I'm posting here JIC

https://github.com/xAPPO/MQTT/blob/beta3/MQTT%20Client%20driver

image

xAPPO commented 4 years ago

The driver has been updated recently and the above code with commented out ‘residual’ preferences is correct. The preferences, now deprecated, were used in a previous driver version when the driver operated autonomously from the app. In recent versions it is implemented and created automatically as a child device driver to the app.

Now there is an MQTT Broker menu option in the app and you configure these options from there. They are then transferred to the device driver automatically. This was done to stop multiple device drivers being created that would run independently and very persistently in the background causing lots of issues.

when I assigned the driver to a new virtual device”. - you should not do this and the lack of config options is there so that even if you did it can’t attempt a broker connection. The device is automatically created as a child by the MQTT app.

gnvdude commented 4 years ago

Thank you. OK so just install the APP and configure there? and don't create a virtual device with the MQTT driver? correct?

xAPPO commented 4 years ago

Here’s what’s best..

Install the app and run It through ‘done’ - do NOT configure the driver. Now after running the app once delete any device(s) you have that are using the client MQTT driver, leave the actual driver code installed. Now reboot your hub. This step is important Then re-run the app and it will automatically create a new driver device as a child Now configure the driver from the menu option in the app.