Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nut-scanner: add support for Home Assistant config format #2220

Closed

Conversation

aquette
Copy link
Member

@aquette aquette commented Dec 10, 2023

Add "-H, --disp_home_assistant_conf" to display nut-scanner results in the Home Assistant format

Add "-H, --disp_home_assistant_conf" to display nut-scanner results
in the Home Assistant format

Signed-off-by: Arnaud Quette <[email protected]>
@aquette
Copy link
Member Author

aquette commented Dec 10, 2023

Additional notes:

  • Example output with a USB device:
    • ups.conf format:
[nutdev1]
driver = "usbhid-ups"
port = "auto"
vendorid = "0463"
productid = "FFFF"
product = "Protection Station"
serial = "XXXXXXX"
vendor = "EATON"
bus = "001"
device = "015"
###NOTMATCHED-YET###bcdDevice = "0100"
  • Home Assistant format
devices:
  - name: nutdev1
    driver: usbhid-ups
    port: auto
    config:
    - vendorid = "0463"
    - productid = "FFFF"
    - product = "Protection Station"
    - serial = "XXXXXXX"
    - vendor = "EATON"
    - bus = "001"
    - device = 015
    - ###NOTMATCHED-YET###bcdDevice = 0100

@aquette aquette added the Home Assistant (HA) Use of NUT with third-party plugin for Home Assistant (HA) label Dec 10, 2023
Some additional config values, such as vendor, may contain spaces.
This will cause startup errors, and side effects such as "insufficient
permissions on everything" for USB devices

Signed-off-by: Arnaud Quette <[email protected]>
@frenck
Copy link

frenck commented Dec 11, 2023

As an FYI, same response as on Discord; this is not something I'm considering adding to the add-on.

../Frenck

@jimklimov
Copy link
Member

@frenck : I was not in on that chat, would you please elaborate here as to why? :)

@aquette
Copy link
Member Author

aquette commented Dec 12, 2023

privet @jimklimov
in fact, this was just a misplaced short-term hotfix to a wider UX/integration problem. Hence, closing.

The fruitful discussions with @frenck led me to rethink the whole, and revive the old HAL integration, into a refreshed version (over MQTT, homekit, ...).
I've created a SmartNUT project to document and track that, and will definitely appreciate your support on this one old chap ;)
Also see #2224

@aquette aquette closed this Dec 12, 2023
@aquette aquette deleted the nutscanner_home_assistant branch December 12, 2023 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Home Assistant (HA) Use of NUT with third-party plugin for Home Assistant (HA) nut-scanner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants