Skip to content

Commit

Permalink
initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
Standarduser committed Oct 14, 2023
1 parent 9320dc3 commit 7573310
Show file tree
Hide file tree
Showing 22 changed files with 2,463 additions and 303 deletions.
110 changes: 46 additions & 64 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,72 +3,54 @@ name: Test and Release
# Run this job on all pushes and pull requests
# as well as tags with a semantic version
on:
push:
branches:
- "main"
tags:
# normal versions
- "v[0-9]+.[0-9]+.[0-9]+"
# pre-releases
- "v[0-9]+.[0-9]+.[0-9]+-**"
pull_request: {}
push:
branches:
- "main"
tags:
# normal versions
- "v[0-9]+.[0-9]+.[0-9]+"
# pre-releases
- "v[0-9]+.[0-9]+.[0-9]+-**"
pull_request: {}

# Cancel previous PR/branch runs when a new commit is pushed
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
# Performs quick checks before the expensive test runs
check-and-lint:
if: contains(github.event.head_commit.message, '[skip ci]') == false

runs-on: ubuntu-latest

steps:
- uses: ioBroker/testing-action-check@v1
with:
node-version: '16.x'
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'


# TODO: To enable automatic npm releases, create a token on npmjs.org
# Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options
# Then uncomment the following block:

# # Deploys the final package to NPM
# deploy:
# needs: [check-and-lint]
#
# # Trigger this step only when a commit on any branch is tagged with a version number
# if: |
# contains(github.event.head_commit.message, '[skip ci]') == false &&
# github.event_name == 'push' &&
# startsWith(github.ref, 'refs/tags/v')
#
# runs-on: ubuntu-latest
#
# # Write permissions are required to create Github releases
# permissions:
# contents: write
#
# steps:
# - uses: ioBroker/testing-action-deploy@v1
# with:
# node-version: '16.x'
# # Uncomment the following line if your adapter cannot be installed using 'npm ci'
# # install-command: 'npm install'
# npm-token: ${{ secrets.NPM_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
#
# # When using Sentry for error reporting, Sentry can be informed about new releases
# # To enable create a API-Token in Sentry (User settings, API keys)
# # Enter this token as a GitHub secret (with name SENTRY_AUTH_TOKEN) in the repository options
# # Then uncomment and customize the following block:
# sentry: true
# sentry-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
# sentry-project: "iobroker-vis-homekittiles"
# sentry-version-prefix: "iobroker.vis-homekittiles"
# # If your sentry project is linked to a GitHub repository, you can enable the following option
# # sentry-github-integration: true
# Performs quick checks before the expensive test runs
check-and-lint:
if: contains(github.event.head_commit.message, '[skip ci]') == false

runs-on: ubuntu-latest

steps:
- uses: ioBroker/testing-action-check@v1
with:
node-version: '16.x'

# Deploys the final package to NPM
deploy:
needs: [check-and-lint]

# Trigger this step only when a commit on any branch is tagged with a version number
if: |
contains(github.event.head_commit.message, '[skip ci]') == false &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest

# Write permissions are required to create Github releases
permissions:
contents: write

steps:
- uses: ioBroker/testing-action-deploy@v1
with:
node-version: '16.x'
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'
npm-token: ${{ secrets.NPM_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
90 changes: 27 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![Logo](admin/vis-homekittiles.png)
<img src="doc/img/title-pic_hkt-on-ipad.png" />

# ioBroker.vis-homekittiles

[![NPM version](https://img.shields.io/npm/v/iobroker.vis-homekittiles.svg)](https://www.npmjs.com/package/iobroker.vis-homekittiles)
Expand All @@ -10,75 +11,38 @@

**Tests:** ![Test and Release](https://github.com/Standarduser/ioBroker.vis-homekittiles/workflows/Test%20and%20Release/badge.svg)

## vis-homekittiles adapter for ioBroker

VIS widgets in HomeKit style

## Developer manual
This section is intended for the developer. It can be deleted later.

### DISCLAIMER

Please make sure that you consider copyrights and trademarks when you use names or logos of a company and add a disclaimer to your README.
You can check other adapters for examples or ask in the developer community. Using a name or logo of a company without permission may cause legal problems for you.

### Getting started

You are almost done, only a few steps left:
1. Create a new repository on GitHub with the name `ioBroker.vis-homekittiles`

1. Push all files to the GitHub repo. The creator has already set up the local repository for you:
```bash
git push origin main
```
1. Add a new secret under https://github.com/Standarduser/ioBroker.vis-homekittiles/settings/secrets. It must be named `AUTO_MERGE_TOKEN` and contain a personal access token with push access to the repository, e.g. yours. You can create a new token under https://github.com/settings/tokens.
## 🇩🇪 HomeKit-Tiles für ioBroker-VIS
Homekit-Tiles ist ein Widget-Set, das an das Design von Apple HomeKit angelehnt ist.
Die Besonderheit der Widgets liegt darin, dass sie keine festen Style-Elemente enthalten, sondern alles per CSS formatiert wird. Demzufolge gibt es im VIS-Editor auch keine gesonderten Einstellungen für Position und/oder Größe der Icons, Beschriftungen, usw. Anpassungen des Designs erfolgen durch Ändern des CSS-Codes. Hierzu kann der CSS-Code aus der Datei `/widgets/homekittiles/css/style.css` als Vorlage genutzt werden. Der Code wird im VIS-Editor im CSS-Tab eingefügt und kann nach Belieben angepasst werden. Das Hinzufügen von eigenen CSS-Klassen über den VIS-Editor im Abschnitt "Generell" der Widgets ist ebenfalls möglich.

1. Head over to [widgets/vis-homekittiles.html](widgets/vis-homekittiles.html) and start programming!
Die Widgets sind für VIS 1.x konzipiert.

### Best Practices
We've collected some [best practices](https://github.com/ioBroker/ioBroker.repositories#development-and-coding-best-practices) regarding ioBroker development and coding in general. If you're new to ioBroker or Node.js, you should
check them out. If you're already experienced, you should also take a look at them - you might learn something new :)
**Hinweis:** Aus lizenzrechtlichen Gründen sind im Lieferumfang dieses Adapters keine Icons enthalten. Sehr gute Quellen für Icons sind:
* https://www.flaticon.com
* https://icons8.com

### Scripts in `package.json`
Several npm scripts are predefined for your convenience. You can run them using `npm run <scriptname>`
| Script name | Description |
|-------------|-------------|
| `test:package` | Ensures your `package.json` and `io-package.json` are valid. |
| `test` | Performs a minimal test run on package files. |
| `translate` | Translates texts in your adapter to all required languages, see [`@iobroker/adapter-dev`](https://github.com/ioBroker/adapter-dev#manage-translations) for more details. |
| `release` | Creates a new release, see [`@alcalzone/release-script`](https://github.com/AlCalzone/release-script#usage) for more details. |
[🇩🇪 Dokumentation](doc/homekittiles-de.md)

### Publishing the widget
Using GitHub Actions, you can enable automatic releases on npm whenever you push a new git tag that matches the form
`v<major>.<minor>.<patch>`. We **strongly recommend** that you do. The necessary steps are described in `.github/workflows/test-and-release.yml`.
## 🇺🇸 HomeKit-Tiles for ioBroker-VIS
Homekit Tiles is a widget set based on the design of Apple HomeKit.
The special feature of the widgets is that they do not contain any fixed style elements, but everything is formatted using CSS. As a result, there are no separate settings in the VIS editor for the position and/or size of the icons, labels, etc. The design is adjusted by changing the CSS code. For this purpose, the CSS code from the file `/widgets/homekittiles/css/style.css` can be used as a template. The code is inserted into the CSS tab in the VIS editor and can be customized as desired. It is also possible to add your own CSS classes via the VIS editor in the "General" section of the widgets.

Since you installed the release script, you can create a new
release simply by calling:
```bash
npm run release
```
Additional command line options for the release script are explained in the
[release-script documentation](https://github.com/AlCalzone/release-script#command-line).
The widgets are designed for VIS 1.x.

To get your widget released in ioBroker, please refer to the documentation
of [ioBroker.repositories](https://github.com/ioBroker/ioBroker.repositories#requirements-for-adapter-to-get-added-to-the-latest-repository).
**Note:** For licensing reasons, no icons are included with this adapter. Very good sources for icons are:
* https://www.flaticon.com
* https://icons8.com

### Test the adapter manually on a local ioBroker installation
In order to install the adapter locally without publishing, the following steps are recommended:
1. Create a tarball from your dev directory:
```bash
npm pack
```
1. Upload the resulting file to your ioBroker host
1. Install it locally (The paths are different on Windows):
```bash
cd /opt/iobroker
npm i /path/to/tarball.tgz
```
[🇺🇸 Documentation](doc/homekittiles-en.md)

For later updates, the above procedure is not necessary. Just do the following:
1. Overwrite the changed files in the adapter directory (`/opt/iobroker/node_modules/iobroker.vis-homekittiles`)
1. Execute `iobroker upload vis-homekittiles` on the ioBroker host
## Things to do
- Dialog-Kachel per Datenpunkt aktiv/inaktiv
- Mini-mediaplayer
- Thermostat
- Select
- Submenü-Button
- CSS: Farben für Dialogfenster verbessern
- CSS: Farben für Datepickerfenster verbessern

## Changelog
<!--
Expand All @@ -92,7 +56,7 @@ For later updates, the above procedure is not necessary. Just do the following:
## License
MIT License

Copyright (c) 2023 Standarduser <[email protected]>
Copyright (c) 2023 Standarduser

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Binary file modified admin/vis-homekittiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7573310

Please sign in to comment.