[OLD] MQTT app beta1 and pre beta2 - please use beta3 thread

Ahh.. that's different - let me take a look I might be able to get those working...
It does look like a bug...

@kevin - I had noticed you stated the Text driver hasn't really been tested. Would you like testing details on that? I don't think I am having success in getting it to work. I expected to the see captured value in the current state.

Thank You

Can you show me the 'data' for that device - the inbuilt 'current states' are a carryover to keep it working with alpha4 and alpha5. They will likely be ignored in beta 1.

You created it via 'Virtual MQTT Data' ?
(actually you may not have been able to do that in beta 1 .. or edit it to add the required 'data' values)

That's the issue. I created it directly as a virtual device. I indeed, do not have the "Virtual MQTT Data" option. So apparently I cannot take advantage of this Text driver yet.

I also see "RM Connector Variable" as a virtual device option. Doesn't appear to work though. I just get empty MQTT enabled list. The Edit button just shows the previously selected device I was editing and won't let me clear that.

You'll have to await beta 2
image

HE has no inbuilt ability to add/edit data values on a device. You might fudge it by using another device type , editing and then reverting it but not persuing that.

.. and do you have any RM Variable virtuals you expected to be listed there ?

Cool. Will look forward to it. Thanks.

OK, I am going down another rabbit hole blind with you guys. I thought I installed the Device and App correctly but it doesn't seem to be publishing to the homeassistant Discovery Topic if I am reading MQTT Explorer correctly. HA is definitely not discovering anything. The Tele & Stat are from some Tasmotized Sonoff devices I have.

Here are my latest logs after going thru OPTION C "Enabling Automatic of HE Devices.... Assistant Discovery Protocol":

Should my logs look more like this from instructional PDF indicating a quantity of discovered devices. ?

Finally, here is the Device Page:
image
image

I noticed that "topic0" in my variables does not look like others that I have seen that work.

Any help would be appreciated. Feel free to talk to me like a newbie (bcuz I am) but eager to learn. All of this S&%t is amazing, intimidating, fascinating, and frustrating all at the same time. Thank you.

What is the topic you have configured for HA Discovery publishing ?

You have not published (enabled) any devices from HE to MQTT for HA to discover... You need to enable the HE devices in the app first page using the drop downs that you want HA to have access to.

[0] Total HE devices are enabled on MQTT

Don’t worry about topic0

I missed in the instructions where you had to push the button "Publish these device capabilities to MQTT" and Select All there too.

I did that and now have all of the devices showing up in HE logs and i have things being published according to MQTT Explorer but not to homeassistant topic as I put in this form:

If i am reading this correctly, it is publishing to hubitat-hub-mqtt-beta which is normHubName variable in the MQTT device.

From Home Assistant:
image

Taking baby steps toward success!

EDIT: MODERATORS-If this should be moved to the Home Assistant-specific thread, please do so. Thank you

I did not at the time. Since the MQTT app needed to create the devices for other virtuals, I was taking the approach that it also needed to create the RM Connector Variables.

So I attempted this again using a different approach. I first created the RM global variable and added a connector to it.

Here is the device setup.

I then went through MQTT app, toggled all device permissions on, then found and configured the new RM connector variable with the needed topic. The MQTT data was not sourced into the global var.

Here is the device state:

Here is the device data:

Finally...here is what is in the broker:

Any thoughts or ideas? Need anymore debugging info? Thank You.

You must create the RM variable within my app so it is a child device.

I will check on what happens if you create it outside but it is missing the origin: user data value. I can see that grouping with the connector and named access to these variables from a RM rule is useful though. It is possible that non child devices will not create subscriptions on the broker - do you see a

subscribing to aqualink/Filter_Pump/RPM

message in the client driver logs ?

Also just so as you aware only one attribute can be linked to a specific MQTT topic. (Only one will update)

I think I am starting to discover the root of my errors with these RM variables and some other device creations. On the second screen in MQTT app, if I had previously been editing another MQTT device and then I come back into that screen and choose another type, the previously edited selection won't clear. Thus, I don't get the option to create a new device. That continues to lead me astray at times, thinking I have to create it outside of the app. I have also noticed that if I remove the previously edited device from the device list, then when I go back into MQTT app, it's not already selected, thus now getting the option to create a new one.

BTW...If I try to delete a MQTT device from the app, it always throws errors.

The way to get the 'create' button is to ensure no devices are selected for editing and then the create button appears. (click on any selected device to deselect it)

I'm aware of the residual values in these settings , and also that when entering that screen it isn't cleared. I haven't found a way to programatically select and unselect devices in dropdowns, maybe that's not possible. Still something to improve.

That data editor is best described as quirky and it also doesn't handle mutiple _ON and _OFF attribute map values well. _Topic and _Cmd seem OK.

Yes, that error is thrown because you have deleted a device that was being displayed (selected) , it's purely a cosmetic thing but not 'professional' - if you refresh the page with F5 or leave and return to that page it works fine.

I'll see what can be done to make this visually better as we move through the release. Or any code change suggestions welcome.

The home assistant discovery topic as you've configured will be..

/homeassistant not
/homie/hubitat-hub-mqtt-beta/homeassistant

That seems to match what HA is expecting from configuration.yaml too.

Do you now see that topic on your broker and does it have content ? The homie tree will have data too.

You can delete that temporary topic completely

Nope, I posted my MQTT explorer in previous post and that's all I see. I don't see anything referencing "homeassistant", only the "hubitat-hub-mqtt-beta".

Do not expand the homie tree - it would not be within that. It's a root level topic.

Believe I discovered an issue with virtual contact sensors. Whenever I add one, I do not see its value getting set and I see errors in the logs.

[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:12.523 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: ================== Startup complete ==================
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:12.521 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: [1] Total Hubitat endpoints enabled on MQTT
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:12.518 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: [0] Total Hubitat devices are enabled on MQTT
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:12.349 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: ==================================================
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:12.347 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: Initialize exit
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:12.189 am [error](http://192.168.1.7/installedapp/configure/97)groovy.lang.MissingPropertyException: No such property: name for class: java.lang.String on line 4003 (LookupManual)
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:11.651 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: Skipping homie MQTT discovery
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:11.645 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: HE device publishing to MQTT has completed in 0 secs
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:11.609 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: Resynch MQTT device states and HA discovery topics
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:11.331 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: Starting HE device publishing to MQTT for 0 HE devices with 0 attributes
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:10.592 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: There are now 1 instances running
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:10.572 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: MQTT has now connected
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:34:00.565 am [warn](http://192.168.1.7/installedapp/configure/97)MQTT: MQTT .. awaiting connection .. [0]
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:59.270 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: Hubitat hub name is : Coordinator
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:58.975 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: initialising with App count 0
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:58.927 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: MQTT Updated
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:40.201 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: FYI your MQTT child devices are [Pool Light, Spa Light, Pool Water Feature, Spa Blower, Pool Cleaner, Spa Mode, Pool Filter Pump, Pool Water Temp, Pool Air Temp, Pool Freeze Protection Temp, Pool Freeze Protection Enabled]
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:16.401 am [error](http://192.168.1.7/installedapp/configure/97)java.lang.NullPointerException: Cannot invoke method getTypeName() on null object on line 3940 (LookupManual)
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:15.022 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: FYI your MQTT child devices are [Pool Light, Spa Light, Pool Water Feature, Spa Blower, Pool Cleaner, Spa Mode, Pool Filter Pump, Pool Water Temp, Pool Air Temp, Pool Freeze Protection Temp, Pool Freeze Protection Enabled]
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:11.613 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: FYI your MQTT child devices are [Pool Light, Spa Light, Pool Water Feature, Spa Blower, Pool Cleaner, Spa Mode, Pool Filter Pump, Pool Water Temp, Pool Air Temp, Pool Freeze Protection Temp, Pool Freeze Protection Enabled]
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:07.316 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: FYI your MQTT child devices are [Pool Light, Spa Light, Pool Water Feature, Spa Blower, Pool Cleaner, Spa Mode, Pool Filter Pump, Pool Water Temp, Pool Air Temp, Pool Freeze Protection Temp, Pool Freeze Protection Enabled]
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:07.094 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: Adding default contact_ON= **open** data to Pool Freeze Protection Enabled
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:07.088 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: Adding default contact_OFF= **closed** data to Pool Freeze Protection Enabled
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:07.080 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: Adding data contact_Topic to Pool Freeze Protection Enabled
[app:97](http://192.168.1.7/logs/past#app97)2020-02-05 11:33:07.027 am [info](http://192.168.1.7/installedapp/configure/97)MQTT: Created Child Virtual Contact Sensor with name Pool Freeze Protection Enabled

Actually, even if I remove the contact sensor, I still see this error in the logs:
groovy.lang.MissingPropertyException: No such property: name for class: java.lang.String on line 4003 (LookupManual)

and this error:
java.lang.NullPointerException: Cannot invoke method getTypeName() on null object on line 3940 (LookupManual)

device=getChildDevice(LookupID)

The child 'device' was not found for a lookup - is it possible that one of these devices that you have configured is a real HE device that you have later edited rather than a child device created through my app ? The child devices you have are listed here.

FYI your MQTT child devices are [Pool Light, Spa Light, Pool Water Feature, Spa Blower, Pool Cleaner, Spa Mode, Pool Filter Pump, Pool Water Temp, Pool Air Temp, Pool Freeze Protection Temp, Pool Freeze Protection Enabled]

I can protect against this error but that won't make it work ..

I collapsed it and it is reduced to this:
image

I then searched for "homeassistant" in the search bar and it didn't find it.

Here are logs from this morning for device:

@stephen_nutt Hmm , I am not sure why this is not working for you. It's not an issue that has ever been reported and it works here for me. It should show a homeassistant topic in that collapsed tree. It gets populated as the homie tree is populated

You don't have two MQTT brokers do you ? .. and the MQTT Connect device is showing 'present' (which means connected) and ongoing device change events from HE are being reflected in MQTT within the homie tree ?

Do restart the app by clicking through done once again and if that doesn't help also try turning HA MQTT Discovery protocol off (restarting app) and then on (restarting app)