MQTT Support / Home Assistant Integration#1195
Conversation
|
@PH89 I've tested this on my JetKVM device and it seems to work well - I'll play around with it next week to see if I spot any issues. I wonder if there's a simple way to add a debounce delay for certain things like ATX HDD LED which can flick on and off repeatedly/quickly for long read/write sessions (if I'm using my NAS, this spams my broker and Home Assistant 😅). |
|
I will check this out. Normally it should be possible. But should be configurable. For MQTT server it should not be a problem to handle such change frequency. On the Home Assistant site it could cause a quick pollution of the history log. So maybe it is better to disable logging for these entities. |
1be2637 to
6aa24d5
Compare
|
@Igglybuff Integrated debounce delay for ATX HDD Led. |
I've just tested your branch and played around with the debounce setting, but I'm not sure it's behaving as expected. No matter what value I set it to (500, 1000, 0), the ATX HDD LED sensor is stuck disabled:
Though this could be because I need to start fresh and re-register with my broker? Not sure. Were there any other features you were thinking of adding? I would be curious to hear what the JetKVM maintainers think of this PR - maybe they don't look at drafts 😄 |
|
Actually I think the debounce is working now (PEBKAC error) - I had it disabled from a couple weeks ago, but for some reason it took a few attempts for Home Assistant to enable it again and for the entity state to start populating. This shouldn't be a problem when setting it up for the first time I don't think. |
|
I've been testing this, and all seems to work great. The only issue I've noticed on reboot of the jetkvm it doesn't reconnect to MQTT and requires the save & connect to be selected |
|
Thanks for the feedback. I will check on this. I guess I will finalise the PR this weekend and mark it as ready for review. |
58675b1 to
b4ac1c6
Compare
|
Ready for review. |
|
I've been testing this for around a month now with each new iteration, and the current implementation appears solid, with absolutely no issues to report. The only area I haven't tested is the TLS connection |
just to follow up, ive tested TLS connections with and without verification and it appears to work fine |
Restructure the MQTT settings page for clarity and usability: UI Structure: - Organize settings into logical sections (Auth, Home Assistant, Advanced) - Use progressive disclosure for port (Auto/Custom) and base topic (Default/Custom) - Move connection status badge into page header - Conditionally show HDD debounce only when ATX extension is active - Add inline validation for required broker field Connection & Error Handling: - Add test-then-save flow: Save & Reconnect validates connectivity before persisting - Add standalone Test Connection button for dry-run validation - Add testMqttConnection RPC with 5s timeout (no retry, no side effects) - Surface friendly i18n-ready error messages for common failures (auth, timeout, TLS, DNS) - Track last connection error on MQTTManager for status reporting Copy: - Rewrite all descriptions for clarity and brevity - Use benefit-oriented, active-voice microcopy throughout
bfaa183 to
b994cb1
Compare
|
Apologies if this is staring right at me, but has this been added to Home Assistant yet? Also, instructions for setting it up?Thank you. |
This is not needed since we are using the Home Assistant MQTT integration. Just set up MQTT according to documentation in Home Assistant. After that you can add it. |
|
I already have MQTT setup for getting info for Rasperry Pi's. Can I assume the following:
|
|
@Brianr1028 What you describe is adding a manual MQTT Entity. This is not needed since I implemented auto discovery. You only need to enter the MQTT configuration in the JetKVM settings. After that it should be discovered automatically by HA, as long you have auto discovery in your HA mqtt options enabled. If you are interested how this technically works I advise you the documentation of the MQTT integration of HA (https://www.home-assistant.io/integrations/mqtt/) |
|
@PH89 Got this working - thank you. In addition to reporting JetKVM is up to date can we pull in the current version so it shows on a HA card or if its not up to date will it show the current version? I do know clicking on up to date does show version which is all fine. Beyond that very nice and certainly easier than other MQTT's I have setup with my limited knowledge of topic. |
Yes this is possible already with the state_content attribute on the HA card Like this: state_content:
Hope it helps. |
|
@PH89 I have a lovelace card I am trying to use. In particular I would like to graph out the CPU load. Is it possible in the next release to add unit-of-measurement attribute? I realize this can be defined in configuation.yaml, but I noticed storage free and storage used had that already defined. Sorry don't mean to be a pest. thank you |



Summary
rootcertsand optional insecure modeEnableActionsconfig toggle — when disabled, controllable entities are replaced with read-only sensors/binary sensors while keeping full monitoring capability. The firmware update entity remains visible but without install command.in_progressstatus andupdate_percentageduring OTA updatessourceattribute (storage/url/none)state_class: measurementfor graphs), SoC temperature, memory usage, storage used/freeRelated Issues:
Test plan
EnableActionsoff → confirm switches become binary sensors, buttons disappear, select becomes sensor, update entity loses install buttonEnableActionson → confirm controllable entities reappearsourceattribute isurlPreview