openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
820 stars 252 forks source link

Raspberry Pi Imager: Add openHAB/openHABian in the home automation section #1703

Closed Larsen-Locke closed 2 years ago

Larsen-Locke commented 2 years ago

Raspberry Pi Imager offers quite a few home automation Systems (under section "other specific purpose os"), but no openHAB.

This should be changed! To get openHAB included in rpi-imager a json-file describing the download parameters has to be provided in the download location of the image and a json-section has to be added to the application. I made a first draft: rpi-imager-openhabian.json and json-section. The result in rpi-imager would look like this:

image

And below the two options for 32bit and 64 bit, like that:

image

What do you think? Is the description (escpecially openhab/openhabian) correct? Any improvements? As soon as the json is available I would ask the maintainers of rpi-imager to include the openhab-section in their application (they have to do it manually).

mstormi commented 2 years ago

omit the "(via wifi-hotspot)". @openhab-maintainers any proposal or comment ?

Larsen-Locke commented 2 years ago

omit the "(via wifi-hotspot)". @mstormi : The intention was to prevent people from attaching keyboards and monitors during first boot. But maybe not the best way... I removed it

mstormi commented 2 years ago

use (headless) or omit Can we add this link ? https://www.openhab.org/docs/installation/openhabian.html#raspberry-pi-prepackaged-sd-card-image

Larsen-Locke commented 2 years ago

use (headless) or omit Can we add this link ? https://www.openhab.org/docs/installation/openhabian.html#raspberry-pi-prepackaged-sd-card-image

The only possibility for a link is the info-icon. I changed it like that: The info icon of the first menu (first screenshot) points to openhab.org and the info-icons of the next menu (second screenshot) point to the installation page. I updated the screenshots accordingly (please check). What do you think?

mstormi commented 2 years ago

well strictly speaking openHAB itself is the only part that does not care about 32 or 64 bit, so maybe omit it? It's in the title already. Can you wrap the line at the "-" ? (no "-" needed then)

Larsen-Locke commented 2 years ago

well strictly speaking openHAB itself is the only part that does not care about 32 or 64 bit, so maybe omit it? It's in the title already. Can you wrap the line at the "-" ? (no "-" needed then)

Sure. json and Screenshots are updated

mstormi commented 2 years ago

LGTM go ahead please

Larsen-Locke commented 2 years ago

LGTM go ahead please

The json-file has to be made available at the openhabian download location. Precise questions: Should the file rpi-imager.json be generated from a template during build or do you prefer a static file just for this version? (The latter means it has to be updated manually for each new version of openhabian) I could prepare some code for the generation but i don't know where to put it (build.bash?), where to put the template (build-image?) and the output-file (github.com/openhab/openhabian/releases/download/ )

mstormi commented 2 years ago

Let's see... am I right that we do not create the rpi-imager.json but just contribute our OH addition to the combined version? I'd think we wouldn't want to have to contact the RPi foundation to update it every time we release a new image. So yes I want it to be created during build. Image build is started through GH actions and puts the result on GH so we need to do the same with the hash file. See https://github.com/openhab/openhabian/blob/main/.github/workflows/build-action.yml I'm unsure as Ethan did most of the work on GH actions (@ecdye do you copy ? Any comment ?)

Not sure if the image filename already contains the hash but I'd think others to use GH to build releases will have had the same question and will have solved it so let's google for their solutions. See e.g. https://github.com/Gerschtli/generate-nix-hash

Larsen-Locke commented 2 years ago

Let's see... am right that we do not create the rpi-imager.json but just contribute our OH addition to the combined version?

not quite: It takes two parts, one is static and one changes with versions (separate file in download location)

Hope it's a bit clearer now.

mstormi commented 2 years ago

anything you need to proceed?

Larsen-Locke commented 2 years ago

(Just some time and energy) I think I can finish my part this weekend, but someone has to help integrating it in the build-scripts.

mstormi commented 2 years ago

No stress. We'll figure that out. I'd guess we'll have to do something like duplicate lines 41, 72 and 84 of the build workflow yaml (above). Please provide a PR for a start.

Larsen-Locke commented 2 years ago

Please provide a PR for a start.

And here it is: https://github.com/openhab/openhabian/pull/1708

mstormi commented 2 years ago

Closed-By: #1708

thanks

mstormi commented 2 years ago

It was just merged into Raspi imager and works right away.

Thanks for your efforts!

Larsen-Locke commented 2 years ago

Thanks. Just wanted to adjust the docs but apparently already accomplished. 👍