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

Add Home Assistant custom component to HACS #28

Open
DomiStyle opened this issue Oct 5, 2020 · 13 comments
Open

Add Home Assistant custom component to HACS #28

DomiStyle opened this issue Oct 5, 2020 · 13 comments

Comments

@DomiStyle
Copy link
Contributor

It would be nice to have the custom component available in HACS so updating is easier.

The requirements are listed here: https://hacs.xyz/docs/publish/start

While it's possible to get a sub directory added as repository it probably would make more sense to copy the current HA component to a new repository?

@gluap
Copy link
Owner

gluap commented Oct 6, 2020

This sounds like a good idea. Also at first glance the requirements seem achievable with reasonable effort. I'll try to look into this over the weekend. Do you already have experience with providing components via HACS?

@DomiStyle
Copy link
Contributor Author

@gluap I don't but I would be willing to help if there's a repository to work with.

@gluap
Copy link
Owner

gluap commented Oct 12, 2020

@DomiStyle status update: I started working on it in a separate repository (I agree this makes more sense) and think the best will be to move the custom component there completely once it works (while leaving a readme in this repo for people to find that installed the old way and maybe another readme in the new repo for those who don't want to switch to hacs).

Currently it's just a stub but you can find it here https://github.com/gluap/pyduofern-hacs .

So far I only did the first few steps in the tutorial and haven't really set up anything yet so I wouldn't expect it to work. But after promising to work on it over the weekend I thought I should post an update.

@DomiStyle
Copy link
Contributor Author

I added the repository to my Home Assistant instance and it looks like this in HACS:

hacs_ui
hacs_ui2

I didn't try to install it yet since i need to disable the original custom component first but looks good so far.

This is the repository for HACS itself so it can probably be used as reference for the readme and info file:
https://github.com/hacs/integration

@gluap
Copy link
Owner

gluap commented Oct 21, 2020

I ran a first test using it as a custom component and it works (installs latest version of pyduofern and the module "just works" with the existing config). I'll implement some more suggestions from their readme and at some point send a pull request to add it to hacs.

@DomiStyle
Copy link
Contributor Author

Took me quite some time but with the release of Home Assistant 2020.12 I finally found some time to switch over to the HACS version.

So far no issues, everything works perfectly and should be a lot easier to maintain.

@rakaandro
Copy link
Contributor

Hello, thanks for your work!

I wanted to test it too:

  • A fresh installation of HACS on my test server was not possible under 2020.12.0.

  • With HASS.IO 0.118.5 and HACS 1.8.0 I don't find any integration "DUOFERN" .....

RaKa

@gluap
Copy link
Owner

gluap commented Dec 14, 2020

hi @rakaandro, it's not yet at the stage where it's available from hassHACS from the default repos, to install it via HACS you need to add the hacs repo https://github.com/gluap/pyduofern-hacs as a source for integrations. You can add custom repositories by clicking three menu dots on the top right in HACS and selecting "Custom Repositories"
image

@bcutter
Copy link

bcutter commented Jan 17, 2021

What´s the current status on this?

Sounds like the easiest way to use your great work in Home Assistant especially when using HASS OS.

@DomiStyle
Copy link
Contributor Author

@bcutter Works perfectly from HACS, just follow the steps a post above and it will be installed automatically.

@bcutter
Copy link

bcutter commented Feb 14, 2021

Alright, installation done. But the pairing process for new devices is somehow intransparent. I

  • set pairing mode on the device to "On"
  • in HA I ran service "duofern.start_pairing" with "timeout: 120"
  • as nothing happened, after some time I ran service "duofern.sync_devices"
  • After some time the device (has display) switched from "00 devices in DuoFern network" to "01", at the same time duofern.json had a new device added (ID matches the one I wanted to pair)

BUT: what is the expected outcome in Home Assistant? Integration still shows:
grafik

grafik

Shouldn´t there be a new device and an entity? Please assist. Adding the integration by the way worked smoothly.

Update: found the entity named with the paired device' ID.

Would be good to have them shown on the integration page, mockup see:
grafik

@gluap
Copy link
Owner

gluap commented Feb 14, 2021

Hi @bcutter, what kind of device are you trying to pair?

When going through your entities, does searching for "duofern" list the entity you paired?

I see that other integrations do somehow manage to show their integrated devices and entities on that pane. My guess is that the whole pairing mechanism used by the duofern integration somehow works around what was meant for pairing from the homeassistant side. Back when I wrote it there just was no framework available for pairing-like actions (or maybe it was too hard to find). This is also why pyduofern is using the "call a service" as a workaround to trigger pairing.

I'll file this as a new bug, but as it is hacs-only It'll be in the issue tracker of pyduofern-hacs

@bcutter
Copy link

bcutter commented Feb 14, 2021

Everything is working meanwhile in terms of pairing. Besides very few situations where commands have not been executed by the RolloTron device and few log warnings and fewer errors everything is fine.

Thanks for filing the idea as separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants