azuwis / zigbee2mqtt-networkmap

Home Assistant Custom Card to show Zigbee2mqtt network map
261 stars 18 forks source link

[Enhancement]: Create Addon for HassOs #11

Closed ciotlosm closed 4 years ago

ciotlosm commented 5 years ago

Describe the bug This is not a bug, but a feature

Additional context Considering you have already 'yarn' available to serve content locally, would be nice to create (and package) this version with it's own web server as a HassOs addon, so people can still use the default Lovelace (autogenerated) UI and still benefit of this network diagram.

CC: @danielwelch

azuwis commented 5 years ago

I'm familiar with HassOs.

The custom card is just one javascript static file, yarn is just needed to build it.

You can still use the default Lovelace UI, all you need is add the javascript to the resources:.

ciotlosm commented 5 years ago

@azuwis I know, but a separate addon that has a mini http server to display this component with some out of the box configs would be helpful for people that don't want to take control of their lovelace UI and just use the auto-generated one. I'll try to see if I can package it.

azuwis commented 5 years ago

I mean I'm NOT familiar with HassOS, sorry for the typo.

If you use a separate http server to serve the javascript, you need to change the resource type from module to js.

Also the js from yarn serve is a development one, since it's for development purpose.

danielwelch commented 5 years ago

Not sure my opinion really matters here, but an add-on seems like overkill. I'm not too familiar with this project, but setup/installation looks fairly straight forward. I don't imagine anyone who wants the depth of a network graph would have a problem with manually editing their Lovelace UI. Plus it's already installable via HACS, making it pretty user-friendly as is. Maybe just some updated docs regarding the HACS installation process?

azuwis commented 5 years ago

I don't use the default Lovelace UI and HACS, so I don't know the detail steps to use custom cards on them.

I agree that document need update. I'm 99% sure this custom card does not need Lovelace YAML mode, still I wrote the step in README for the reason mentioned above.

If you update the document and make pull requests, I'm more than happy to accept them.

carldebilly commented 5 years ago

@danielwelch @azuwis An add-on doing network mapping already exists! Check my project... https://github.com/yllibed/Zigbee2MqttAssistant