Skip to content

Commit

Permalink
Merge branch 'develop' into husky2_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Morg42 authored Oct 11, 2024
2 parents 26506e8 + ac4a7a8 commit 288faeb
Show file tree
Hide file tree
Showing 338 changed files with 16,959 additions and 16,400 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
name: Python ${{ matrix.python-version }}
steps:
- name: Setup OS (Ubuntu)
Expand Down
2 changes: 1 addition & 1 deletion alexa/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugin:
support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1021150-amazon-alexa-plugin

version: 1.3.1 # Plugin version
sh_minversion: 1.3 # minimum shNG version to use this plugin
sh_minversion: '1.3' # 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
restartable: unknown
Expand Down
2 changes: 1 addition & 1 deletion alexa4p3/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugin:
#documentation: https://www.smarthomeng.de/user/plugins/alexa4p3/user_doc.html # url of documentation
support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1021150-amazon-alexa-plugin
version: 1.0.2 # Plugin version
sh_minversion: 1.5.2 # minimum shNG version to use this plugin
sh_minversion: '1.5.2' # minimum shNG version to use this plugin
multi_instance: False # plugin supports multi instance
classname: Alexa4P3 # class containing the plugin
state: ready # State of the Plugin
Expand Down
2 changes: 1 addition & 1 deletion alexarc4shng/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugin:
tester: henfri, juergen, psilo
#documentation: https://www.smarthomeng.de/user/plugins/alexarc4shng/user_doc.html # url of documentation
version: 1.0.4 # Plugin version
sh_minversion: 1.5.2 # minimum shNG version to use this plugin
sh_minversion: '1.5.2' # minimum shNG version to use this plugin
multi_instance: False # plugin supports multi instance
classname: AlexaRc4shNG # class containing the plugin
keywords: Alexa Amazon Remote Control
Expand Down
2 changes: 1 addition & 1 deletion apcups/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugin:
#support: https://knx-user-forum.de/forum/supportforen/smarthome-py

version: 1.4.0 # Plugin version
sh_minversion: 1.9 # minimum shNG version to use this plugin
sh_minversion: '1.9' # minimum shNG version to use this plugin
#sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
multi_instance: True # plugin supports multi instance
restartable: unknown
Expand Down
2 changes: 1 addition & 1 deletion appletv/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugin:
support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1223483-plugin-apple-tv

version: 1.6.2 # Plugin version
sh_minversion: 1.6 # minimum shNG version to use this plugin
sh_minversion: '1.6' # minimum shNG version to use this plugin
multi_instance: True # plugin supports multi instance
restartable: unknown
classname: AppleTV # class containing the plugin
Expand Down
2 changes: 1 addition & 1 deletion artnet/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugin:
# documentation: https://github.com/smarthomeNG/plugins/blob/develop/mqtt/README.md # url of documentation (wiki) page

version: 1.6.1 # Plugin version
sh_minversion: 1.5.1 # minimum shNG version to use this plugin
sh_minversion: '1.5.1' # minimum shNG version to use this plugin
# sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
multi_instance: True
restartable: True # Plugin can be restarted safely, however, the data is not re-applied from items to the DMX-Values
Expand Down
2 changes: 1 addition & 1 deletion asterisk/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugin:
documentation: https://www.smarthomeng.de/user/plugins/asterisk/README.html
support: https://knx-user-forum.de/forum/supportforen/smarthome-py/
version: 1.4.2 # Plugin version
sh_minversion: 1.9.0 # minimum shNG version to use this plugin
sh_minversion: '1.9.0' # minimum shNG version to use this plugin
# sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
# py_minversion: 3.6 # minimum Python version to use for this plugin
# py_maxversion: # maximum Python version to use for this plugin (leave empty if latest)
Expand Down
2 changes: 1 addition & 1 deletion avdevice/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ plugin:
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
sh_minversion: 1.6 # minimum shNG version to use this plugin
sh_minversion: '1.6' # minimum shNG version to use this plugin
# sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
multi_instance: True # plugin supports multi instance
restartable: unknown
Expand Down
2 changes: 1 addition & 1 deletion avm/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugin:
support: https://knx-user-forum.de/forum/supportforen/smarthome-py/934835-avm-plugin

version: 2.2.2 # Plugin version (must match the version specified in __init__.py)
sh_minversion: 1.8 # minimum shNG version to use this plugin
sh_minversion: '1.8' # minimum shNG version to use this plugin
# sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
# py_minversion: 3.6 # minimum Python version to use for this plugin
# py_maxversion: # maximum Python version to use for this plugin (leave empty if latest)
Expand Down
2 changes: 1 addition & 1 deletion avm_smarthome/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugin:
# support: https://knx-user-forum.de/forum/supportforen/smarthome-py

version: 1.0.A # Plugin version (must match the version specified in __init__.py)
sh_minversion: 1.8 # minimum shNG version to use this plugin
sh_minversion: '1.8' # minimum shNG version to use this plugin
# sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
multi_instance: True # plugin supports multi instance
restartable: unknown
Expand Down
76 changes: 40 additions & 36 deletions beolink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class BeoNetlink(SmartPlugin):
the update functions for the items
"""

PLUGIN_VERSION = '0.8.0'
PLUGIN_VERSION = '0.8.1'

def __init__(self, sh):
"""
Expand Down Expand Up @@ -267,51 +267,55 @@ def poll_device(self):
item = self.beo_items[beo_itemkey]
beo_id = item.conf['beo_id']
beo_status = item.conf['beo_status']
if beo_status:
if beo_status and beo_id != '':
# set items according to beo_status
#if beo_status == 'beoname':
# deviceinfo = self.beodevices.beodeviceinfo[beo_id].get('FriendlyName', None)
#elif beo_status == 'beotype':
# deviceinfo = self.beodevices.beodeviceinfo[beo_id].get('productType', None)
#else:
# deviceinfo = self.beodevices.beodeviceinfo[beo_id].get(beo_status, None)
if beo_status == 'audiomode':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('audiomode'[1], False)
elif beo_status == 'videomode':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('videomode'[1], False)
elif beo_status == 'powerstate':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('powerstate', False)
elif beo_status == 'stand':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('stand'[1], False)
elif beo_status == 'source':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['source'].get('source', '-')
elif beo_status == 'volume':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['volume'].get('level', 0)
elif beo_status == 'muted':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['volume'].get('muted', False)
elif beo_status == 'FriendlyName':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('FriendlyName', False)
elif beo_status == 'productType':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('productType', False)

beo_device = self.beodevices.beodeviceinfo.get(beo_id, None)
if beo_device is None:
self.logger.warning(f"poll_device: No deviceinfo found for device-id '{beo_id}'")
else:
deviceinfo = self.beodevices.beodeviceinfo[beo_id].get(beo_status, None)
#self.logger.info(f"poll_device: item={item.property.path}, beo_id={beo_id}, beo_status={beo_status}, self.beodevices.beodeviceinfo[beo_id]={self.beodevices.beodeviceinfo[beo_id]}")
#self.logger.info(f"poll_device: item={item.property.path}, deviceinfo={deviceinfo}")
if isinstance(deviceinfo, tuple):
if item._type == 'num':
beo_value = deviceinfo[1]
if beo_status == 'audiomode':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('audiomode'[1], False)
elif beo_status == 'videomode':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('videomode'[1], False)
elif beo_status == 'powerstate':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('powerstate', False)
elif beo_status == 'stand':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('stand'[1], False)
elif beo_status == 'source':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['source'].get('source', '-')
elif beo_status == 'volume':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['volume'].get('level', 0)
elif beo_status == 'muted':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['volume'].get('muted', False)
elif beo_status == 'FriendlyName':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('FriendlyName', False)
elif beo_status == 'productType':
deviceinfo = self.beodevices.beodeviceinfo[beo_id]['device'].get('productType', False)

else:
beo_value = deviceinfo[0]
else:
beo_value = deviceinfo
deviceinfo = self.beodevices.beodeviceinfo[beo_id].get(beo_status, None)
#self.logger.info(f"poll_device: item={item.property.path}, beo_id={beo_id}, beo_status={beo_status}, self.beodevices.beodeviceinfo[beo_id]={self.beodevices.beodeviceinfo[beo_id]}")
#self.logger.info(f"poll_device: item={item.property.path}, deviceinfo={deviceinfo}")
if isinstance(deviceinfo, tuple):
if item._type == 'num':
beo_value = deviceinfo[1]
else:
beo_value = deviceinfo[0]
else:
beo_value = deviceinfo

if item() == beo_value:
self.logger.debug("update_deviceinfo: Updated item {} with beo-{} {}".format(item.property.path, beo_status, beo_value))
else:
self.logger.info("update_deviceinfo: Changed item {} with beo-{} {}".format(item.property.path, beo_status, beo_value))
item(beo_value, self.get_shortname())
self._update_item_values(item, beo_value)
if item() == beo_value:
self.logger.debug("update_deviceinfo: Updated item {} with beo-{} {}".format(item.property.path, beo_status, beo_value))
else:
self.logger.info("update_deviceinfo: Changed item {} with beo-{} {}".format(item.property.path, beo_status, beo_value))
item(beo_value, self.get_shortname())
self._update_item_values(item, beo_value)
else:
self.logger.info(f"poll_device: No beo_status")
return
Expand Down
24 changes: 13 additions & 11 deletions beolink/beodevices.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,20 +234,22 @@ def update_deviceinfo(self, beo_id):
self.beodeviceinfo[beo_id]['device']['audiomode'] = ['-', -1]
self.beodeviceinfo[beo_id]['device']['stand'] = ['-', -1]
else:
self.beodeviceinfo[beo_id]['source']['source'] = self.get_beo_api(ip, '/BeoZone/Zone/ActiveSources', ['primaryExperience','source','friendlyName'])

# get picture-mode of the B&O device
self.beodeviceinfo[beo_id]['device']['videomode'] = list(self.read_list_value(ip, '/Picture/Mode', 'mode'))
self.logger.debug("update_deviceinfo: ip: {} videomode-friendly = {}".format(ip, self.beodeviceinfo[beo_id]['device']['videomode']))
try:
self.beodeviceinfo[beo_id]['source']['source'] = self.get_beo_api(ip, '/BeoZone/Zone/ActiveSources', ['primaryExperience','source','friendlyName'])

# get sound-mode of the B&O device
self.beodeviceinfo[beo_id]['device']['audiomode'] = list(self.read_list_value(ip, '/Sound/Mode', 'mode'))
self.logger.debug("update_deviceinfo: ip: {} audiomode-friendly = {}".format(ip, self.beodeviceinfo[beo_id]['device']['audiomode']))
# get picture-mode of the B&O device
self.beodeviceinfo[beo_id]['device']['videomode'] = list(self.read_list_value(ip, '/Picture/Mode', 'mode'))
self.logger.debug("update_deviceinfo: ip: {} videomode-friendly = {}".format(ip, self.beodeviceinfo[beo_id]['device']['videomode']))

# get stand position of the B&O device
self.beodeviceinfo[beo_id]['device']['stand'] = list(self.read_list_value(ip, '/Stand', 'stand'))
self.logger.debug("update_deviceinfo: ip: {} stand-friendly = {}".format(ip, self.beodeviceinfo[beo_id]['device']['stand']))
# get sound-mode of the B&O device
self.beodeviceinfo[beo_id]['device']['audiomode'] = list(self.read_list_value(ip, '/Sound/Mode', 'mode'))
self.logger.debug("update_deviceinfo: ip: {} audiomode-friendly = {}".format(ip, self.beodeviceinfo[beo_id]['device']['audiomode']))

# get stand position of the B&O device
self.beodeviceinfo[beo_id]['device']['stand'] = list(self.read_list_value(ip, '/Stand', 'stand'))
self.logger.debug("update_deviceinfo: ip: {} stand-friendly = {}".format(ip, self.beodeviceinfo[beo_id]['device']['stand']))
except Exception as ex:
self.logger.warning(f"beodevices/update_deviceinfo: {beo_id} - Exception '{ex}'")
# get possible sources of the B&O device
#raw_sources = self.get_beo_api(ip, '/BeoZone/Zone/Sources', [])
#self.beodeviceinfo[beo_id]['sources'] = []
Expand Down
4 changes: 2 additions & 2 deletions beolink/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ plugin:
# 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: 0.8.0 # Plugin version
sh_minversion: 1.9 # minimum shNG version to use this plugin
version: 0.8.1 # Plugin version
sh_minversion: '1.9' # 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
restartable: unknown
Expand Down
2 changes: 1 addition & 1 deletion blockly/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugin:
# support: https://knx-user-forum.de/forum/supportforen/smarthome-py/959964-support-thread-für-das-backend-plugin

version: 1.5.0 # Plugin version
sh_minversion: 1.4 # minimum shNG version to use this plugin
sh_minversion: '1.4' # 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
restartable: unknown
Expand Down
2 changes: 1 addition & 1 deletion bose_soundtouch/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugin:
support: https://knx-user-forum.de/forum/supportforen/smarthome-py

version: 1.0.1 # Plugin version
sh_minversion: 1.6 # minimum shNG version to use this plugin
sh_minversion: '1.6' # minimum shNG version to use this plugin
multi_instance: False # plugin supports multi instance
restartable: True
classname: BoseSoundtouch # class containing the plugin
Expand Down
4 changes: 2 additions & 2 deletions bsblan/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ plugin:
support:

version: 1.0.2 # Plugin version
sh_minversion: 1.8 # minimum shNG version to use this plugin
sh_minversion: '1.8' # minimum shNG version to use this plugin
# sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
py_minversion: 3.7 # minimum Python version to use this plugin
py_minversion: '3.7' # minimum Python version to use this plugin
# py_maxversion: # maximum Python version to use this plugin (leave empty if latest)
multi_instance: False # plugin supports multi instance
restartable: unknown
Expand Down
2 changes: 1 addition & 1 deletion buderus/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugin:
# support: https://knx-user-forum.de/forum/supportforen/smarthome-py

version: 1.0.2 # Plugin version
sh_minversion: 1.1 # minimum shNG version to use this plugin
sh_minversion: '1.1' # minimum shNG version to use this plugin
#sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
restartable: True
multi_instance: False # plugin supports multi instance
Expand Down
Loading

0 comments on commit 288faeb

Please sign in to comment.