yes, I see it but it doesn't seem to line up with @hovee 's code
Just wanting to let everyone know I'm here listening and taking notes of any issues ....
I have another project/controller that is absorbing some attention now but I will be issuing (the final) beta in a week or two. Just noting any bug reports of which there are fortunately few. There's a pull request too yay thanks ! Then beta 3e and if no issues this will become the release version shortly afterwards.
I am trying to get something working with the latest Hubitat MQTT inbuilt client but it's eluding me currently and Chuck has left Hubitat
So get any issues reported.... and hopefully this will be a solid release.
MQTT App logs errors and does not publish anything for the button I've configured to publish to MQTT.
Logs:
app:7212020-08-13 04:59:03.505 pm errorjava.lang.NullPointerException: Cannot invoke method reset() on null object on line 1054 (updated)
app:7212020-08-13 04:59:03.476 pm infoMQTT: Waiting for MQTT connection: false
app:7212020-08-13 04:59:03.341 pm infoMQTT: initialising with App count 0
app:7212020-08-13 04:59:03.323 pm errorMQTT: FATAL: No MQTT broker configured
app:7212020-08-13 04:59:03.318 pm infoMQTT: Hubitat hub name is : Home
app:7212020-08-13 04:59:03.303 pm errorMQTT: MQTT client failed to create
app:7212020-08-13 04:59:03.219 pm infoMQTT: Creating MQTT client child driver
app:7212020-08-13 04:59:03.214 pm infoMQTT: FYI your MQTT child devices are []
app:7212020-08-13 04:59:03.150 pm infoMQTT: MQTT Updated
It says no broker configured in the logs, but I've configured in the App: tcp://192.168.1.177:1883
Hi @muxa. @kevin is very responsive, but he has recently taken to sleeping at night. I'm by no way as good as him, but willing to try to help and if I fail, I'm sure he'll respond tomorrow.
I think you are doing a new install?
Did the app create a device on you system like this?
If so, does its settings look like this (your settings might be different, what's more important is that they are showing)?
There may be issues with it creating that child device on initial install. If the above isn't as I've shown it, I would:
- Delete the child device created, if it created one.
- Make sure you have installed both the app and the client driver from MQTT.
- Confirm your settings are all correct in the app, here are mine:
- Then hit done again and make sure it creates that child device and that the device is connecting.
Until that client device is present and connecting correctly, nothing will publish to MQTT.
Thanks, @AndyM, for taking your time to write such thorough instructions! After I deleted the device and pressed the Done button on the app, the logs shows that MQTT broker is connected and " MQTT: Child device driver" is "present".
I can see MQTT messages under homie
topic when I press a button that I linked in the MQTT App.
The next problem I have is I'm not seeing anything in the homeassistance
discovery topic, event though MQTT App is configured to also provide HA discovery:
Also looking at the app log I saw this:
dev:7892020-08-13 05:29:51.002 pm infoMQTT> MQTT unsubscribing from: null/cover/+/current_position
dev:7892020-08-13 05:29:50.976 pm infoMQTT> MQTT unsubscribing from: null/cover/+/state
dev:7892020-08-13 05:29:50.953 pm infoMQTT> MQTT unsubscribing from: null/person/+/state
dev:7892020-08-13 05:29:50.928 pm infoMQTT> MQTT unsubscribing from: null/input_boolean/+/state
dev:7892020-08-13 05:29:50.904 pm infoMQTT> MQTT unsubscribing from: null/group/+/state
dev:7892020-08-13 05:29:50.880 pm infoMQTT> MQTT unsubscribing from: null/binary_sensor/+/state
dev:7892020-08-13 05:29:50.850 pm infoMQTT> MQTT unsubscribing from: null/sensor/+/state
dev:7892020-08-13 05:29:50.826 pm infoMQTT> MQTT unsubscribing from: null/light/+/brightness
dev:7892020-08-13 05:29:50.802 pm infoMQTT> MQTT unsubscribing from: null/light/+/state
dev:7892020-08-13 05:29:50.779 pm infoMQTT> MQTT unsubscribing from: null/switch/+/state
dev:7892020-08-13 05:29:49.296 pm infoMQTT> MQTT subscribing to: homie/home/+/+/+/set
dev:7892020-08-13 05:29:49.270 pm infoMQTT> MQTT subscribing to: homie/home/+/+/set
dev:7892020-08-13 05:29:48.551 pm warnMQTT> ## Restarted ##
The null/
in there suggests that the Home Assistant Discovery Topic that I've specified is not bing picked up.
Did I miss anything?
I'm happy to have brought you to the next step, sounds like the app is now working correctly if you can see the topic in your MQTT tree (if you aren't already, @kevin highly recommends http://mqtt-explorer.com/ for viewing you tree).
Unfortunately, that's about as far as I can get you as I don't use Home Assistant.
But if you are trying to bring devices into HE from HA, then you might now go back into the app and look into this section of the settings and see if it has discovered anything:
If you are trying to go from HE to HA, then I assume you need to do something in HA to discover what you just posted to your tree.
I know that's pretty generic, but I'm sorry I don't use HA. I'm not sure those logs are anything to worry about at this point, but kevin will be more help. I see similar things sometimes. Though it is interesting they say "null" instead of a device name. I assume those topics are coming from Home Assistant and not from Kevin's app?
Hi there... @muxa...
Just to clarify you are trying to discover HA devices into HE or the other way around ?
Assuming the former what do you have configured under 'Discovery into HE' ? Do you have that Home Assistant Statestream topic filled in ?
If the latter (HE devices being discovered by HA) do you not see a homeassistant topic in your MQTT tree ? It is not within the homie tree. Can you also check you have suitable (light switch etc) HE devices published - HA does not support 'buttons' for example.
Thank you @AndyM and @kevin for helping me out.
I should have made it clearer what I am trying to do. I am trying to publish HE devices to HA.
Here's what my config looks like:
This was my problem - I was only exposing a button.
I have now configured a temperature sensor to be exported to HA and it now appears in MQTT under homeassistant
topic:
Problem solved
At some stage I tried with buttons and some users have reported success using the MQTT topics as a trigger into HA. I did expand how HE reports button presses into individual MQTT button topics.
Then I sort of decided it was a losing battle, or one for someone else better versed with HA.
Hello New User here - so forgive me if this is really stupid.
I am in the process of setting up the MQTT Client. I have an AqualinkD system setup and running and Mosquito setup on that Pi.
When going into the MQTT client and add a broker I would assume I add the Aqulink Mosquito ip and port as the broker.
I seen i believe it was beta 2 that someone had it working but being new to the MQTT world I couldnt figure it out.
I also see aqualink mqtt in MQTT Explorer - and when adding a virtual device using MQTT Client I have no options under preferences.
Thanks
I got a little further - though I think I am missing where to subscribe to a topic
dev:4002020-08-24 11:43:17.133 pm infoMQTT> MQTT unsubscribing from: null/cover/+/current_position
dev:4002020-08-24 11:43:17.082 pm infoMQTT> MQTT unsubscribing from: null/cover/+/state
dev:4002020-08-24 11:43:17.022 pm infoMQTT> MQTT unsubscribing from: null/person/+/state
dev:4002020-08-24 11:43:16.983 pm infoMQTT> MQTT unsubscribing from: null/input_boolean/+/state
dev:4002020-08-24 11:43:16.940 pm infoMQTT> MQTT unsubscribing from: null/group/+/state
dev:4002020-08-24 11:43:16.878 pm infoMQTT> MQTT unsubscribing from: null/binary_sensor/+/state
dev:4002020-08-24 11:43:16.843 pm infoMQTT> MQTT unsubscribing from: null/sensor/+/state
dev:4002020-08-24 11:43:16.787 pm infoMQTT> MQTT unsubscribing from: null/light/+/brightness
dev:4002020-08-24 11:43:16.735 pm infoMQTT> MQTT unsubscribing from: null/light/+/state
dev:4002020-08-24 11:43:16.700 pm infoMQTT> MQTT unsubscribing from: null/switch/+/state
dev:4002020-08-24 11:43:16.179 pm infoMQTT> MQTT subscribing to: homie/pool/+/+/+/set
dev:4002020-08-24 11:43:16.143 pm infoMQTT> MQTT subscribing to: homie/pool/+/+/set
dev:4002020-08-24 11:43:15.323 pm warnMQTT> ## Restarted ##
dev:4002020-08-24 11:43:15.315 pm infoMQTT> Log level set to 2
dev:4002020-08-24 11:43:12.129 pm infoMQTT> MQTT unsubscribing from: homie/pool/$fw/version
dev:4002020-08-24 11:43:12.042 pm infoMQTT> MQTT unsubscribing from: homie/pool/$fw/client
dev:4002020-08-24 11:43:11.937 pm infoMQTT> MQTT unsubscribing from: homie/pool/$fw/name
dev:4002020-08-24 11:43:01.076 pm infoMQTT> MQTT subscribing to: homie/pool/$implementation/heartbeat
Hi Dave,
Can you show me a screen grab of the expanded Aqualink topics on your MQTT broker , as shown in MQTT Explorer.
What virtual device(s) did you try to create to import this into HE ?
Also you may have two clients running - that 'null' should not be there . Or you may have a badly created virtual device for import from MQTT
If it persists then delete the MQTT client device (not the driver) and then restart your hub. A new client will be created again when you run my app through to 'done'. Also let's look at a screenshot of the virtual device you created.
OK - that is called Pool Test but it is an MQTT client driver. My app uses one (and only one) of those that it auto creates. You should not manually create one.
Now - can we focus on a particular value from the AqualinkD - it is providing about 16 different topics to MQTT. Which one(s) are you wanting to get into HE and as what type of virtual device.
Then can you expand those specific topics by clicking on the black triangle on the left hand side of the topic so I can see the content. I'm guessing Temperature is one of them If there are further topics within those that can be further expanded then please expand those too and post a screenshot.
The 'adhoc' import of MQTT devices into HE is the most complex use of the application as they can not be auto discovered / imported but I'll get you going ...
I got the temperature part figured took me a bit - now I just need to figure out how to convert C to F.
Also on the Lamp post thats tied in... I couldn't figure out the last temp on that, but I feel like im getting closer.
I have three virtual switches that interact with MQTT. Can those remain intact?
I think Yes .. but I am not sure I have grasped the question/situation.. Can you elaborate a bit
This is a lamp 'Aux1' - it has a temperature ??
The topic isn't expanded (but has no sub topics) but it looks like it publishes 0 for off and 1 for on..
If so the payload map values should be [1,0] not [on,off]
If the lamp is controllable via MQTT can you post me an example message that shows how (the topic) ?? The 'command' topic will not be the same as the 'status' topic