From 7ff08a9587f9478650c18a839a3ac38cea1a9eff Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 22 Jan 2021 00:45:52 +0100 Subject: [PATCH 1/4] FIX: zigbee2mqtt /get calls require a property field specified on the message --- platypush/plugins/zigbee/mqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/plugins/zigbee/mqtt.py b/platypush/plugins/zigbee/mqtt.py index ea758f42e..422bfeca6 100644 --- a/platypush/plugins/zigbee/mqtt.py +++ b/platypush/plugins/zigbee/mqtt.py @@ -334,7 +334,7 @@ class ZigbeeMqttPlugin(MqttPlugin): :return: Key->value map of the device properties. """ properties = self.publish(topic=self._topic(device + '/get'), - reply_topic=self._topic(device), msg='', **self._mqtt_args(**kwargs)).output + reply_topic=self._topic(device), msg={'property': ''}, **self._mqtt_args(**kwargs)).output if property: assert property in properties, 'No such property: ' + property From 717ad5d88c6fd8afbe5c9e3d5577949b59ee724f Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 22 Jan 2021 16:13:18 +0100 Subject: [PATCH 2/4] Revert "FIX: zigbee2mqtt /get calls require a property field specified on the message" This reverts commit 7ff08a9587f9478650c18a839a3ac38cea1a9eff. --- platypush/plugins/zigbee/mqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/plugins/zigbee/mqtt.py b/platypush/plugins/zigbee/mqtt.py index 422bfeca6..ea758f42e 100644 --- a/platypush/plugins/zigbee/mqtt.py +++ b/platypush/plugins/zigbee/mqtt.py @@ -334,7 +334,7 @@ class ZigbeeMqttPlugin(MqttPlugin): :return: Key->value map of the device properties. """ properties = self.publish(topic=self._topic(device + '/get'), - reply_topic=self._topic(device), msg={'property': ''}, **self._mqtt_args(**kwargs)).output + reply_topic=self._topic(device), msg='', **self._mqtt_args(**kwargs)).output if property: assert property in properties, 'No such property: ' + property From 31b110a06c3f6d80db90956a29b8d524a42c093a Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 22 Jan 2021 16:24:43 +0100 Subject: [PATCH 3/4] FIX: zigbee2mqtt applies different logic to / and //get --- platypush/plugins/zigbee/mqtt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/zigbee/mqtt.py b/platypush/plugins/zigbee/mqtt.py index ea758f42e..e90a8ee74 100644 --- a/platypush/plugins/zigbee/mqtt.py +++ b/platypush/plugins/zigbee/mqtt.py @@ -333,8 +333,10 @@ class ZigbeeMqttPlugin(MqttPlugin): (default: query the default configured device). :return: Key->value map of the device properties. """ - properties = self.publish(topic=self._topic(device + '/get'), - reply_topic=self._topic(device), msg='', **self._mqtt_args(**kwargs)).output + properties = self.publish(topic=self._topic(device + ('/get' if property else '')), + reply_topic=self._topic(device), + msg={property: ''} if property else '', + **self._mqtt_args(**kwargs)).output if property: assert property in properties, 'No such property: ' + property From e2e7011e53a328267bfc53451c7b6b990706d508 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 23 Jan 2021 15:03:43 +0100 Subject: [PATCH 4/4] s/github.com/git.platypush.tech/g --- README.md | 12 ++++++------ bin/platyvenv | 2 +- docs/source/index.rst | 6 +++--- setup.py | 2 +- webext | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index eecd79e85..67735fc53 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,19 @@ Platypush [![Build Status](https://travis-ci.org/BlackLight/platypush.svg?branch=master)](https://travis-ci.org/BlackLight/platypush) [![Documentation Status](https://readthedocs.org/projects/platypush/badge/?version=latest)](https://platypush.readthedocs.io/en/latest/?badge=latest) [![pip version](https://img.shields.io/pypi/v/platypush.svg?style=flat)](https://pypi.python.org/pypi/platypush/) -[![License](https://img.shields.io/github/license/BlackLight/platypush.svg)](https://github.com/BlackLight/platypush/blob/master/LICENSE) -[![Last Commit](https://img.shields.io/github/last-commit/BlackLight/platypush.svg)](https://github.com/BlackLight/platypush/commits/master) -[![Contributions](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/BlackLight/platypush/issues) +[![License](https://img.shields.io/github/license/BlackLight/platypush.svg)](https://git.platypush.tech/platypush/platypush/-/blob/master/LICENSE.txt) +[![Last Commit](https://img.shields.io/github/last-commit/BlackLight/platypush.svg)](https://git.platypush.tech/platypush/platypush/-/commits/master/) +[![Contributions](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://git.platypush.tech/platypush/platypush/-/issues) - Advised read: [**Getting started with Platypush**](https://medium.com/@automationguru/automate-your-house-your-life-and-everything-else-around-with-platypush-dba1cd13e3f6) (Medium article). -- The [wiki](https://github.com/BlackLight/platypush/wiki) also contains many resources on getting started. +- The [wiki](https://git.platypush.tech/platypush/platypush/-/wikis/home) also contains many resources on getting started. - Extensive documentation for all the available integrations and messages is available on [ReadTheDocs](https://platypush.readthedocs.io/en/latest/). - Also check other [Medium stories](https://medium.com/tag/platypush/archive) to get more insights on what you can build with it and inspiration about possible usages. -- If you have issues/feature requests/enhancement ideas please post a [GitHub issue](https://github.com/BlackLight/platypush/issues). +- If you have issues/feature requests/enhancement ideas please [create an issue](https://git.platypush.tech/platypush/platypush/-/issues). A [Reddit channel](https://www.reddit.com/r/platypush) is also available for more general questions. --- @@ -75,7 +75,7 @@ Imagine the ability of running the application, with lots of those bundled featu To get started: -- [Wiki](https://github.com/BlackLight/platypush/wiki) for installation notes, quick start, examples and architecture reference +- [Wiki](https://git.platypush.tech/platypush/platypush/-/wikis/home) for installation notes, quick start, examples and architecture reference - [Read the docs](https://platypush.readthedocs.io/en/latest/) for a complete reference on the available plugins and backends - [Medium articles](https://medium.com/tag/platypush/archive) that describe hands-on applications of platypush diff --git a/bin/platyvenv b/bin/platyvenv index 60e14e29e..7b69abc8a 100755 --- a/bin/platyvenv +++ b/bin/platyvenv @@ -119,7 +119,7 @@ EOF pip install ${dep} done - pip install --upgrade git+https://github.com/BlackLight/platypush.git + pip install --upgrade git+https://git.platypush.tech/platypush/platypush.git echo "Platypush virtual environment prepared under $envdir" } diff --git a/docs/source/index.rst b/docs/source/index.rst index c41c540b6..f1600bb0f 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -5,12 +5,12 @@ Welcome to the Platypush reference of available plugins, backends and event type For more information on Platypush please check out: -* The `GitHub page`_ of the project +* The `Gitlab page`_ of the project * The `online wiki`_ for quickstart and examples * The `Medium stories`_ for inspiration about possible projects -.. _GitHub page: https://github.com/BlackLight/platypush -.. _online wiki: https://github.com/BlackLight/platypush/wiki +.. _GitHub page: https://git.platypush.tech/platypush/platypush +.. _online wiki: https://git.platypush.tech/platypush/platypush/-/wikis/home .. _Medium stories: https://medium.com/tag/platypush/archive .. toctree:: diff --git a/setup.py b/setup.py index 35305e9b6..c32a8fefb 100755 --- a/setup.py +++ b/setup.py @@ -124,7 +124,7 @@ setup( license="MIT", python_requires='>= 3.6', keywords="home-automation iot mqtt websockets redis dashboard notificaions", - url="https://github.com/BlackLight/platypush", + url="https://git.platypush.tech/platypush/platypush", packages=find_packages(), include_package_data=True, entry_points={ diff --git a/webext b/webext index 62a68f651..6f91a3c29 160000 --- a/webext +++ b/webext @@ -1 +1 @@ -Subproject commit 62a68f65158bad22b96397ef77af365c924d695c +Subproject commit 6f91a3c295f2aa5d54f302c6397c3a57f47cfb03