Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
msinn committed Apr 13, 2020
2 parents f280093 + e5660b0 commit cf2f7d8
Show file tree
Hide file tree
Showing 27 changed files with 545 additions and 165 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ Thumbs.db
/doc/developer/build
/doc/developer/source/plugins_doc

# Don't check in plugins to core reository
/plugins

# don't check in Requirements for actual configured plugins
requirements/conf_all.txt

# don't check in directories under /var beside listed exeptions
/var
!/var/backup
!/var/cache
!/var/db
!/var/log
!/var/rrd
!/var/run

# Pycharm settings
/.idea
/custom_plugins
Expand Down
41 changes: 22 additions & 19 deletions bin/shngversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,34 @@
import plugins.__init__ as plugin_vers


# Update auf 1.3d wg. neuer item features on_update, on_change
# Update auf 1.3e wg. neuer logic features for visu_websocket
# Update auf 1.3f wg. Vorbereitung Release Candidate
# Update auf 1.3d wg. neuer item features on_update, on_change
# Update auf 1.3e wg. neuer logic features for visu_websocket
# Update auf 1.3f wg. Vorbereitung Release Candidate

# Update auf 1.4a wg. Kennzeichnung des Stands als "nach dem v1.4 Release"
# Update auf 1.4b wg. Kennzeichnung des Stands als "nach dem v1.4.1 Release"
# Update auf 1.4a wg. Kennzeichnung des Stands als "nach dem v1.4 Release"
# Update auf 1.4b wg. Kennzeichnung des Stands als "nach dem v1.4.1 Release"
# Update auf 1.4.2
# Update auf 1.4c wg. Kennzeichnung des Stands als "nach dem v1.4.2 Release"
# Update auf 1.4d wg. SmartPlugin Anpassung (get_configname())"
# Update auf 1.4e wg. lib.item Anpassung (trigger_condition)"
# Update auf 1.5 wg. Release"
# Update auf 1.4c wg. Kennzeichnung des Stands als "nach dem v1.4.2 Release"
# Update auf 1.4d wg. SmartPlugin Anpassung (get_configname())"
# Update auf 1.4e wg. lib.item Anpassung (trigger_condition)"
# Update auf 1.5 wg. Release"
# Update auf 1.5.1 wg. Hotfix Release
# Update auf 1.5a wg. Changes in lib.shtime
# Update auf 1.5b wg. Einführung von lib.shpypi
# Update auf 1.5c wg. Einführung von bin.shngversion.get_shng_branch()
# Update auf 1.5d wg. Einführung von Item Strukturen
# Update auf 1.5e wg. Einführung von Item Property 'attributes'
# Update auf 1.5a wg. Changes in lib.shtime
# Update auf 1.5b wg. Einführung von lib.shpypi
# Update auf 1.5c wg. Einführung von bin.shngversion.get_shng_branch()
# Update auf 1.5d wg. Einführung von Item Strukturen
# Update auf 1.5e wg. Einführung von Item Property 'attributes'

# Update auf 1.6 wg. Release
# Update auf 1.6a wg. Kennzeichnung des Stands als "nach dem v1.6 Release"
# Update auf 1.6B wg. ÄNnderung bei RelativsPath Auflösung & Doku Änderungen
# Update auf 1.6 wg. Release
# Update auf 1.6a wg. Kennzeichnung des Stands als "nach dem v1.6 Release"
# Update auf 1.6b wg. ÄNnderung bei RelativsPath Auflösung & Doku Änderungen

# Update auf 1.7 wg. Release
# Update auf 1.7 wg. Release
# Update auf 1.7a wg. Kennzeichnung des Stands als "nach dem v1.6 Release"

shNG_version = '1.7'
# Update auf 1.7.1 wg. Release

shNG_version = '1.7.1'
shNG_branch = 'master'

# ---------------------------------------------------------------------------------
Expand Down
11 changes: 7 additions & 4 deletions bin/smarthome.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,21 +326,24 @@ def __init__(self, extern_conf_dir=_base_dir):
if self.shpypi is None:
self.shpypi = Shpypi(self)

base_reqs = self.shpypi.test_base_requirements()
base_reqs = self.shpypi.test_base_requirements(self)
if base_reqs == 0:
self.restart('SmastHomeNG (Python package installation)')
self.restart('SmartHomeNG (Python package installation)')
exit(0)
elif base_reqs == -1:
self._logger.critical("Python package requirements for modules are not met and unable to install base requirements")
self._logger.critical("Do you have multiple Python3 Versions installed? Maybe PIP3 looks into a wrong Python environment. Try to configure pip_command in etc/smarthome.yaml")
self._logger.critical("Aborting")
exit(1)

plugin_reqs = self.shpypi.test_conf_plugins_requirements(self._plugin_conf_basename, self._plugins_dir)
if plugin_reqs == 0:
self.restart('SmastHomeNG (Python package installation)')
self.restart('SmartHomeNG (Python package installation)')
exit(0)
elif plugin_reqs == -1:
self._logger.critical("Python package requirements for configured plugins are not met and unable to install base requirements")
self._logger.critical("Python package requirements for configured plugins are not met and unable to install those requirements")
self._logger.critical("Do you have multiple Python3 Versions installed? Maybe PIP3 looks into a wrong Python environment. Try to configure pip_command in etc/smarthome.yaml")

self._logger.critical("Aborting")
exit(1)

Expand Down
3 changes: 2 additions & 1 deletion dev/sample_plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class SamplePlugin(SmartPlugin):
the update functions for the items
"""

PLUGIN_VERSION = '1.7.0'
# Use VERSION = '1.0.0' for your initial plugin Release
PLUGIN_VERSION = '1.7.1' # (must match the version specified in plugin.yaml)

def __init__(self, sh):
"""
Expand Down
30 changes: 28 additions & 2 deletions dev/sample_plugin/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ plugin:
description:
de: 'Beispiel Plugin für SmartHomeNG v1.5 und höher'
en: 'Sample plugin for SmartHomeNG v1.5 and up'
maintainer: msinn
maintainer: <autor>
# tester: # Who tests this plugin?
state: develop # change to ready when done with development
# keywords: iot xyz
# documentation: https://github.com/smarthomeNG/smarthome/wiki/CLI-Plugin # url of documentation (wiki) page
# support: https://knx-user-forum.de/forum/supportforen/smarthome-py

version: 1.6.0 # Plugin version
version: 1.7.1 # Plugin version (must match the version specified in __init__.py)
sh_minversion: 1.5 # minimum shNG version to use this plugin
# sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
multi_instance: False # plugin supports multi instance
Expand All @@ -21,6 +21,32 @@ plugin:

parameters:
# Definition of parameters to be configured in etc/plugin.yaml (enter 'parameters: NONE', if section should be empty)
param1:
type: str
description:
de: 'Demo Parameter'
en: 'Parameter for demonstration purposes'

param2:
type: str
default: 'value2'
valid_list:
- 'value1'
- 'value2'
- 'value3'
- 'value4'
- 'value5'
description:
de: 'Demo Parameter mit Gültigkeitsliste und Standardwert'
en: 'Demonstration parameter with valid-list and default value'

param3:
type: str
# If 'mandatory' is specified, a 'default' attribute must not be specified
mandatory: True
description:
de: 'Demo Parameter der angegeben werden muss'
en: 'Demonstration parameter which has to be specified'

item_attributes:
# Definition of item attributes defined by this plugin (enter 'item_attributes: NONE', if section should be empty)
Expand Down
9 changes: 9 additions & 0 deletions doc/developer/source/release/1_7_1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
================================
Release 1.7.1 - April 14th, 2020
================================

There are some bugfixes and new features for the core of SmartHomeNG and the plugins.

The detailed release notes can be found in the user documentation under
`https://www.smarthomeNG.de/user/release <../../user/release/1_7_1.html>`_.

1 change: 1 addition & 0 deletions doc/developer/source/release/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Release notes for SmartHomeNG:
:maxdepth: 1
:titlesonly:

1_7_1
1_7
1_6_1
1_6
Expand Down
Loading

0 comments on commit cf2f7d8

Please sign in to comment.