Home Assistant automatic device discovery over MQTT #465
Replies: 20 comments 73 replies
-
The best way to do this is simply ask njsPC for its current configuration. Simply send |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
This is great work on this so far. I was looking into making an integration via HACS but I've had some issues fiddling my way through python. |
Beta Was this translation helpful? Give feedback.
-
In case anyone else is interested, here is the current version of homeassistant.json. I added a few things like icons and pump stats. I am still working on connecting pool/spa heater as a HVAC object and temp sensors.
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hmmm... If you delete the node and restart njsPC does it come back? |
Beta Was this translation helpful? Give feedback.
-
Pull njsPC I believe I found and fixed the issue. There was an id mismatch that first set the pool circuit to spa then changed it to pool. |
Beta Was this translation helpful? Give feedback.
-
Keep in mind there are some big breaking changes coming for MQTT in upcoming HA release. |
Beta Was this translation helpful? Give feedback.
-
@gadget-monk Issue: I tested this by manually changing so if ${ctx.rootTopic} returns only my unique name ie. intellitouch-i93s and not pool/intellitouch-i93s, then everything should work in my case. Please guide me how to fix this. |
Beta Was this translation helpful? Give feedback.
-
Close njsPC and edit your config.json. Scroll down to the Home assistant interface configuration and change the rootTopic line to remove the pool portion at the beginning of the root topic. This is there so that no changes should need to be made to the interface configuration in order to adjust to your configuration. For instance here is my configuration... notice how the MQTT topic is prefixed with pool.
|
Beta Was this translation helpful? Give feedback.
-
Here is the latest version of the json. Still need to fix a few other issues (simplify the way root topics work and incorporate the MAC ID unique key generation method from rstrouse) |
Beta Was this translation helpful? Give feedback.
-
If you only make changes in the config.json you can simply pull and use the most recent copy of the HASS interface file. I suspect you only needed to change rootTopic in the config.json and leave the rest of the interface alone. |
Beta Was this translation helpful? Give feedback.
-
I am able to see the Heaters as climate entities in Home Assistant (and other circuits). I am able to turn the heater on/off and set temperature. But the status does not get updated in Home Assistant. DashPanel shows correct status. (for example, if the heater is turned on through HA, it still shows as off and vice versa). The current water temperature also does not update. This actually is true in general for all the switches as well. I can control, but in HomeAssistant, the status is not updated, so no way to know if worked unless you go in DashPanel. The Pump sensor seems to update RPM sporadically. If I delete the "Device" and re-add, correct status shows up. From my lay-person logic, it seems that HA needs to check the status more frequently. |
Beta Was this translation helpful? Give feedback.
-
I think you need to enable the MQTT interface as well. The events are not included in the device discovery bindings. |
Beta Was this translation helpful? Give feedback.
-
here is an updated version of the interface file. hopefully this fixes all the bugs. This version ignores the rootTopic in config.json but the two topic variables in the vars section must be correctly set. |
Beta Was this translation helpful? Give feedback.
-
Have there been any updates to the Home Assistant integration? Is this working with the current MQTT changes in HA? |
Beta Was this translation helpful? Give feedback.
-
For those who have this working, any suggestions? Can I get the latest/greatest json file and any pointers on setting this up painlessly in Home Assistant? |
Beta Was this translation helpful? Give feedback.
-
Hey everyone, I'll continue to play around but appreciate all the hard work everyone has already put into this... |
Beta Was this translation helpful? Give feedback.
-
I made a new discussion for it, but I know there are home assistant user lurking in this one. I made a home assistant integration installable through HACS that uses the same communication as dash panel. It’s still a work in progress, but most things should be working. Here is the discussion for it, take a look: Here is the repository: |
Beta Was this translation helpful? Give feedback.
-
Yes I put it in nodejs-PoolController/web/bindings/custom
Pic from phone…so hard to arrange to see everything, but this is where it
hangs.
…On Wed, Jun 15, 2022 at 2:49 PM rstrouse ***@***.***> wrote:
It is likely a permissions or ownership issue. When you manually added it
where did you put it. It should be in the web/bindings/custom folder.
—
Reply to this email directly, view it on GitHub
<#465 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAU53BPQJ6JHFA7BTGNJQGDVPIQSVANCNFSM5XFYNYYA>
.
You are receiving this because you commented.Message ID:
<tagyoureit/nodejs-poolController/repo-discussions/465/comments/2958487@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Is there a way to get automatic device discovery to work with MQTT and Home Assistant? Currently I have to edit the configuration.yaml and manually add each switch and sensor. However, Home Assistant can read a specifically formatted device discovery message sent to the "homeassistant" topic. I tried to edit the MQTTAlt.json in njspc to get it to send auto discovery messages, but it was a challenge to set it up - the message payload needs to be a JSON payload and I can't seem to get it to work.
Beta Was this translation helpful? Give feedback.
All reactions