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

It would be great if the instructions could be made clearer, just needs a small update #16

Open
marshalleq opened this issue Sep 16, 2024 · 3 comments

Comments

@marshalleq
Copy link

Checkout the code

With the manifest, I assume I add something to the existing Skyconnect.json? What do we do with that?

Which operating systems are supported to run this on, Linux? Mac?

@puddly
Copy link
Collaborator

puddly commented Sep 16, 2024

What are you trying to do?

@marshalleq
Copy link
Author

I was trying to update the firmware on my home assistant usb stick. I'm relatively familiar with running python commands, npm linux etc but not a developer and couldn't ultimately make it work and ended up installing the full home assistant OS in a VM to do it, which I think worked. I think I figured out that for that stick I didn't have to do anything as it was already in the manifest. And I assume it's linux, though I tried both Mac and linux and didn't get it to work on either. I just felt the instructions weren't that clear and needed a bit of extra context.

@milas
Copy link

milas commented Nov 16, 2024

I believe the original question here is how to use this as a web component.

To help others, since I just went through this after finding home-assistant/connectzbt1.home-assistant.io#137, here's some notes/instructions.

Option 1 - Use unpkg.com CDN

This is what the Home Assistant ZBT-1 docs do (see firmware-update.html).

No installation is required in this instance, but it requires the third-party unpkg.com service to load the Javascript at runtime. [Caveat: see below, the component loads libraries from third-party CDNs at runtime for Python execution regardless.]

<script
  type="module"
  src="https://unpkg.com/@nabucasa/[email protected]/dist/web/nabucasa-zigbee-flasher.js?module"
></script>

Option 2 - Install as NPM dependency

npm i @nabucasa/sl-web-tools
<script
  type="module"
  src="/node_modules/@nabucasa/sl-web-tools/dist/web/nabucasa-zigbee-flasher.js"
></script>

NOTE: Even in this approach, when the component actually connects to a USB device via web serial, it'll load more files from jsdelivr (to get the Pyodide runtime) and then Python packages from pypi.org.

Manifest + Firmware

The nabucasa-zigbee-flasher web component requires a JSON manifest. There's one available in this repo, but it's behind what's in the Home Assistant ZBT-1 docs, so I'd consider it a schema reference but not rely on it otherwise.

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

3 participants