Skip to content

Commit

Permalink
0.0.3 (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel authored Jun 29, 2023
2 parents 44003a9 + 02f0341 commit 7257efa
Show file tree
Hide file tree
Showing 13 changed files with 188 additions and 222 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/build_tests.yml

This file was deleted.

37 changes: 4 additions & 33 deletions .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,9 @@ name: Run License Tests
on:
push:
workflow_dispatch:

pull_request:
branches:
- master
jobs:
license_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev portaudio19-dev
- name: Install core repo
run: |
pip install .
- name: Get explicit and transitive dependencies
run: |
pip freeze > requirements-all.txt
- name: Check python
id: license_check_report
uses: pilosus/action-pip-license-checker@v0.5.0
with:
requirements: 'requirements-all.txt'
fail: 'Copyleft,Other,Error'
fails-only: true
exclude: '^(tqdm|ovos-PHAL-plugin-homeassistant).*'
exclude-license: '^(Mozilla).*$'
- name: Print report
if: ${{ always() }}
run: echo "${{ steps.license_check_report.outputs.report }}"
uses: neongeckocom/.github/.github/workflows/license_tests.yml@master
46 changes: 8 additions & 38 deletions .github/workflows/publish_alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
paths-ignore:
- 'ovos_PHAL_plugin_homeassistant/version.py'
- 'test/**'
- 'examples/**'
- '.github/**'
- '.gitignore'
- 'LICENSE'
Expand All @@ -19,44 +18,15 @@ on:
workflow_dispatch:

jobs:
update_version:
uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@master
publish_alpha_release:
uses: neongeckocom/.github/.github/workflows/publish_alpha_release.yml@master
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
with:
release_type: "alpha"
version_file: ovos_PHAL_plugin_homeassistant/version.py
version_file: "ovos_PHAL_plugin_homeassistant/version.py"
publish_prerelease: true
update_changelog: true
alpha_var: VERSION_ALPHA
build_var: VERSION_BUILD
minor_var: VERSION_MINOR
major_var: VERSION_MAJOR
update_changelog: True
branch: dev
build_and_publish:
runs-on: ubuntu-latest
needs: update_version
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: V${{ needs.update_version.outputs.version }}
release_name: Release ${{ needs.update_version.outputs.version }}
body: |
Changes in this Release
${{ needs.update_version.outputs.changelog }}
draft: false
prerelease: true
commitish: dev
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: dev
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Build Distribution Packages
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{secrets.PYPI_TOKEN}}
major_var: VERSION_MAJOR
44 changes: 7 additions & 37 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,13 @@
name: Publish Release
# This workflow will generate a release distribution and upload it to PyPI

name: Publish Build and GitHub Release
on:
push:
branches:
- master

jobs:
github_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: version
run: echo "::set-output name=version::$(python setup.py --version)"
id: version
- name: "Generate release changelog"
uses: heinrichreimer/github-changelog-generator-action@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: changelog
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: V${{ steps.version.outputs.version }}
release_name: Release ${{ steps.version.outputs.version }}
body: |
Changes in this Release
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
commitish: master
- name: Build Distribution Packages
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{secrets.PYPI_TOKEN}}
build_and_publish_pypi_and_release:
uses: neongeckocom/.github/.github/workflows/publish_stable_release.yml@master
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
18 changes: 6 additions & 12 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: Run Unit Tests
name: Unit Tests
on:
pull_request: {}
push:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
pip install pytest
pip install .
- name: Run tests
run: pytest
py_build_tests:
uses: neongeckocom/.github/.github/workflows/python_build_tests.yml@master
with:
python_version: "3.8"
49 changes: 19 additions & 30 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,47 @@
# Changelog

## [V0.0.2a6](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/tree/V0.0.2a6) (2023-06-06)
## [0.0.3a4](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/tree/0.0.3a4) (2023-06-23)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/compare/V0.0.2a5...V0.0.2a6)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/compare/0.0.3a3...0.0.3a4)

**Merged pull requests:**

- Update dependencies [\#25](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/pull/25) ([NeonDaniel](https://github.com/NeonDaniel))
- Update GitHub release automation [\#24](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/pull/24) ([NeonDaniel](https://github.com/NeonDaniel))
- setup.py fixes and updates [\#35](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/pull/35) ([NeonDaniel](https://github.com/NeonDaniel))

## [V0.0.2a5](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/tree/V0.0.2a5) (2023-05-31)
## [0.0.3a3](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/tree/0.0.3a3) (2023-06-23)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/compare/V0.0.2a4...V0.0.2a5)

**Implemented enhancements:**

- Support passing requests to Assist [\#12](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/issues/12)
- Support Scenes and Automations [\#11](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/issues/11)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/compare/V0.0.3a2...0.0.3a3)

**Merged pull requests:**

- Add support for key navigation for plasma bigscreen [\#7](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/pull/7) ([AIIX](https://github.com/AIIX))
- feat: adjustable search confidence threshold [\#34](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/pull/34) ([mikejgray](https://github.com/mikejgray))
- Update automation to shared actions [\#33](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/pull/33) ([NeonDaniel](https://github.com/NeonDaniel))

## [V0.0.2a4](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/tree/V0.0.2a4) (2023-05-30)
## [V0.0.3a2](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/tree/V0.0.3a2) (2023-06-20)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/compare/V0.0.2a3...V0.0.2a4)

**Merged pull requests:**
[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/compare/V0.0.3a1...V0.0.3a2)

- refactor: move all logic from VUI to PHAL [\#20](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/pull/20) ([mikejgray](https://github.com/mikejgray))

## [V0.0.2a3](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/tree/V0.0.2a3) (2023-05-16)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/compare/V0.0.2a2...V0.0.2a3)

## [V0.0.2a2](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/tree/V0.0.2a2) (2023-05-12)
**Implemented enhancements:**

[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/compare/V0.0.2a1...V0.0.2a2)
- Configurable default brightness increment [\#21](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/issues/21)

**Closed issues:**
**Fixed bugs:**

- Add PyPI Automation [\#4](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/issues/4)
- \[BUG\] Normalize user-inputted URL for HomeAssistant [\#30](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/issues/30)
- \[BUG\] Fuzzy match doesn't handle underscores well [\#28](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/issues/28)
- Connection error [\#14](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/issues/14)

**Merged pull requests:**

- Fix: disable empty qr code page [\#13](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/pull/13) ([AIIX](https://github.com/AIIX))
- V0.0.3 alpha improvements [\#32](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/pull/32) ([mikejgray](https://github.com/mikejgray))

## [V0.0.2a1](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/tree/V0.0.2a1) (2023-03-14)
## [V0.0.3a1](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/tree/V0.0.3a1) (2023-06-10)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/compare/V0.0.1...V0.0.2a1)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/compare/V0.0.2...V0.0.3a1)

**Merged pull requests:**

- fix: repo URL in readme was AIIX's original [\#10](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/pull/10) ([ChanceNCounter](https://github.com/ChanceNCounter))
- Pass configuration to GUIInterface [\#27](https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant/pull/27) ([NeonDaniel](https://github.com/NeonDaniel))



Expand Down
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ The PHAL Plugin provides GUI interfaces and API for Home Assistant Instants.
NOTE: this plugin is roadmapped for merging with https://github.com/OpenVoiceOS/ovos-PHAL-plugin-commonIOT for ovos-core release 0.0.9, the UI will become IOT framework agnostic

# Demo GIF

![HomeAssistant PHAL Demo](demo/demo.gif)

### Installation

Plugin Support Two Installation Methods:

1. Install from Github URL

Note: PIP install from URL will not install the .desktop file and icon if installing to a venv or virtual environment, so you need to manually install them to the system or user directory.
Expand All @@ -21,6 +23,7 @@ pip install git+https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant
```

2. Manual Install from Git Clone

```bash
git clone https://github.com/OpenVoiceOS/ovos-PHAL-plugin-homeassistant
cd ovos-PHAL-plugin-homeassistant
Expand All @@ -32,13 +35,15 @@ pip install .
### Configuration (Instance Setup)

Plugin Supports Two Configuration Methods:

1. Using the GUI

- Install the plugin
- Open the application from the homescreen menu
- Click the "Connect Instance" button
- Enter the URL of the Home Assistant Instance
- Enter the Long-Lived Access Token (API KEY)
- Press the "Confirm" button
- Press the "Confirm" button

2. Manually Editing the Config File
- Add the following to the config file:
Expand All @@ -51,31 +56,55 @@ Plugin Supports Two Configuration Methods:
}
```

The config also takes some optional properties:

`brightness_increment` - the amount to increment/decrement the brightness of a light when the brightness up/down commands are sent. The default value is 10 and represents a percentage, e.g. 10%.
`search_confidence_threshold` - the confidence threshold for the search skill to use when searching for devices. The default value is 0.5, or 50%. Must be a value between 0 and 1.

Sample config:

```json
"PHAL": {
"ovos-PHAL-plugin-homeassistant": {
"host": "https://someurl.toinstance",
"api_key": "api key from the instance",
"brightness_increment": 5,
"search_confidence_threshold": 0.6
}
}
```

### Usage

The plugin provides a GUI interface for Home Assistant Instances. It also provides an API for other plugins or skills to user.

The plugin is in early development, so there are some features that are not yet implemented. It currently supports the following entities:

- Media Player
- Light
- Vacuum
- Binary Sensor
- Sensor

---------------------------------------
---

#### BUS API (For Other Plugins / GUIs) - WIP / TODO Documentation

#### EXPANDING DEVICE / ENTITY SUPPORT - WIP / TODO Documentation
---------------------------------------

---

## Technical Documentation

### Python Controller Class Specification:

Depending on how the controller communicates with the host instance, the minimum required connector initialization properties are:

- **host** (type: string): Address to host instance
- **api_key** (type: string): Access key for host instance authentication

### Python Device Class Specification:

All devices are required to support the below minimal properties for device initialization.

- **controller** (type: string): An instance of the controller class that handles all communications with the API the device talks to for example HomeAssistantConnector, All devices will use the controller class for any kind of communication.
Expand Down
Loading

0 comments on commit 7257efa

Please sign in to comment.