Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
msinn committed Mar 14, 2023
2 parents 30b6e46 + a00e20f commit c4ec71e
Show file tree
Hide file tree
Showing 466 changed files with 49,923 additions and 53,472 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/builddevdoc.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ '3.8' ]
python-version: [ '3.9' ]
name: Python ${{ matrix.python-version }}
steps:
- name: update OS (Ubuntu)
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/pr_unittests.yml
@@ -0,0 +1,67 @@
name: "Unittests Plugins"
#on: [workflow_dispatch, push]
on:
workflow_dispatch:
pull_request:
branches:
- 'develop'

jobs:
build:
runs-on: ubuntu-20.04 #latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
name: Python ${{ matrix.python-version }}
steps:
- name: Setup OS (Ubuntu)
run: |
sudo apt-get update
sudo apt-get install libudev-dev
sudo apt-get install librrd-dev libpython3-dev
sudo apt-get install gcc --only-upgrade
- name: Get branch name
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo ${GITHUB_REF#refs/heads/}
id: extract_branch

- name: Checkout core from develop branch
uses: actions/checkout@v3
with:
repository: smarthomeNG/smarthome
ref: develop

- name: Checkout plugins from ${{steps.extract_branch.outputs.branch}} branch
uses: actions/checkout@v3
with:
repository: smarthomeNG/plugins
ref: ${{steps.extract_branch.outputs.branch}}
path: plugins

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: python3 -m pip install --upgrade pip

- name: Install requirements for unit testing
run: pip install -r tests/requirements.txt
- name: Build Requirements for SmartHomeNG
run: python3 tools/build_requirements.py
- name: Install SmartHomeNG base requirements
# base requirements are needed for pytest to run
run: pip install -r requirements/base.txt

# --- up to here, the workflow is identical for CORE and PLUGINS ---

- name: Install SmartHomeNG all requirements
# all requirements are needed for pytest to run plugin tests
run: pip install -r requirements/all.txt

- name: '>>> Run Python Unittests for PLUGINS <<<'
working-directory: ./plugins
run: pytest
2 changes: 1 addition & 1 deletion .github/workflows/unittests.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
name: Python ${{ matrix.python-version }}
steps:
- name: Setup OS (Ubuntu)
Expand Down
2 changes: 1 addition & 1 deletion __init__.py
@@ -1,5 +1,5 @@
def plugin_release():
return '1.9.3'
return '1.9.4'

def plugin_branch():
return 'master'
Expand Down
27 changes: 21 additions & 6 deletions alexa4p3/plugin.yaml
Expand Up @@ -143,9 +143,24 @@ item_attributes:
description:
de: 'URL für das Standbild einer Kamera'
en: 'URL for the preview picture of the camera'
# alexa_alias:
# type: str
# mandatory: False
# description:
# de: 'nur für Payload-V2 benötigt'
# en: 'only for Payload V2 needed'

alexa_alias:
type: str
mandatory: False
description:
de: 'Alternative Alexa-Gerätenamen, um das Gerät anzusprechen'
en: 'alternative Alexa device names to access the device'

alexa_range_delta:
type: str
mandatory: False
description:
de: ''
en: ''

alexa_color_temp_delta:
type: str
mandatory: False
description:
de: ''
en: ''
1 change: 0 additions & 1 deletion avdevice/__init__.py
Expand Up @@ -122,7 +122,6 @@ def __init__(self, smarthome):
rs232_timeout = self.get_parameter_value('rs232_timeout')
update_exclude = self.get_parameter_value('update_exclude')
statusquery = self.get_parameter_value('statusquery')
self.webif_pagelength = self.get_parameter_value('webif_pagelength')

# Initializing all variables
self.logger.debug("Initializing {}: Resendwait: {}. Seconds to keep: {}.".format(self._name, self._resend_wait,
Expand Down
30 changes: 4 additions & 26 deletions avdevice/plugin.yaml
Expand Up @@ -3,17 +3,17 @@ plugin:
# Global plugin attributes
type: interface # plugin type (gateway, interface, protocol, system, web)
description:
de: 'Steuerung von diversen AV Geräten über TCP/IP und RS232 Schnittstelle'
en: 'Controlling AV devices via TCP/IP and RS232'
de: 'Steuerung eines AV Gerätes über TCP/IP oder RS232 Schnittstelle'
en: 'Controlling AV devices via TCP/IP or RS232'
description_long:
de: 'Steuerung von diversen AV Geräten über TCP/IP und RS232 Schnittstelle.
de: 'Steuerung eines AV Gerätes über TCP/IP oder RS232 Schnittstelle.
Das Plugin unterstützt eine Vielzahl von AV-Geräten und wurde mit folgenden Geräten getestet:
- Pioneer AV Receiver < 2016
- Denon AV Receiver > 2016
- Epson Projektor < 2010
- Oppo UHD Player
'
en: 'Controlling AV devices via TCP/IP and RS232
en: 'Controlling AV devices via TCP/IP or RS232
The plugin supports a variety of AV devices and was tested with the following models:
- Pioneer AV Receiver < 2016
- Denon AV Receiver > 2016
Expand All @@ -28,7 +28,6 @@ plugin:
state: ready

keywords: av denon pioneer epson oppo player amp receiver projector rs232 telnet tcpip remote control
# documentation: https://github.com/smarthomeNG/smarthome/wiki/CLI-Plugin # url of documentation (wiki) page
support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1097870-neues-plugin-av-device-f%C3%BCr-yamaha-pioneer-denon-etc

version: 1.6.4 # Plugin version
Expand Down Expand Up @@ -269,27 +268,6 @@ parameters:
de: "Verbindet sich das Plugin, werden die Werte automatisch abgefragt, auch wenn kein Depend=Init im Item angegeben ist. Sollen nur Items abgefragt werden, bei denen das depend-Attribut auf init gesetzt ist, sollte dieser Wert auf False gestellt werden."
en: "As soon as the plugin connects to the device the values get queried automatically even if the Depend=Init is not set in the items. If you want to query only those items that are set explicitly change this value to False."

webif_pagelength:
type: int
default: 0
valid_list:
- -1
- 0
- 25
- 50
- 100
description:
de: 'Anzahl an Items, die standardmäßig in einer Web Interface Tabelle pro Seite angezeigt werden.
0 = automatisch, -1 = alle'
en: 'Amount of items being listed in a web interface table per page by default.
0 = automatic, -1 = all'
description_long:
de: 'Anzahl an Items, die standardmäßig in einer Web Interface Tabelle pro Seite angezeigt werden.\n
Bei 0 wird die Tabelle automatisch an die Höhe des Browserfensters angepasst.\n
Bei -1 werden alle Tabelleneinträge auf einer Seite angezeigt.'
en: 'Amount of items being listed in a web interface table per page by default.\n
0 adjusts the table height automatically based on the height of the browser windows.\n
-1 shows all table entries on one page.'

item_attributes:

Expand Down
30 changes: 25 additions & 5 deletions avdevice/user_doc.rst
@@ -1,15 +1,35 @@
.. index:: Plugins; avdevice
.. index:: avdevice

========
avdevice
########
========

.. image:: webif/static/img/plugin_logo.png
:alt: plugin logo
:width: 300px
:height: 300px
:scale: 50 %
:align: left

Steuerung eines AV Gerätes über TCP/IP oder RS232 Schnittstelle.

Das Plugin unterstützt eine Vielzahl von AV-Geräten und wurde mit folgenden Geräten getestet:
- Pioneer AV Receiver < 2016
- Denon AV Receiver > 2016
- Epson Projektor < 2010
- Oppo UHD Player


Konfiguration
=============

.. important::
Diese Plugin Parameter und die Informationen zur Item-spezifischen Konfiguration des Plugins sind
unter :doc:`/plugins_doc/config/avdevice` beschrieben.


Die Informationen zur Konfiguration des Plugins sind unter :doc:`/plugins_doc/config/avdevice` beschrieben.
plugin.yaml
-----------

.. code-block:: yaml
Expand Down Expand Up @@ -428,8 +448,8 @@ die richtige Zuordnung eine Rolle spielt (außer bei der Angabe von {str}).
Dieses Feature befindet sich immer noch in der Entwicklung. Erfahrungen bitte im Support Thread
im KNX-Forum teilen.

Webinterface
============
Web Interface
=============

Das Webinterface kann genutzt werden, um die Items und deren Werte auf einen Blick zu sehen,
die dem Plugin zugeordner sind. Außerdem können Historien von Kommandos und Abfragen
Expand Down
5 changes: 1 addition & 4 deletions avdevice/webif/__init__.py
Expand Up @@ -95,10 +95,7 @@ def index(self, action=None, item_id=None, item_path=None, reload=None):
keep_cleared = True

tmpl = self.tplenv.get_template('index.html')
try:
pagelength = self.plugin.webif_pagelength
except Exception:
pagelength = 100
pagelength = self.plugin.get_parameter_value('webif_pagelength')
# add values to be passed to the Jinja2 template eg: tmpl.render(p=self.plugin, interface=interface, ...)
return tmpl.render(p=self.plugin,
config_reloaded=config_reloaded, query_cleared=query_cleared,
Expand Down

0 comments on commit c4ec71e

Please sign in to comment.