-
-
Notifications
You must be signed in to change notification settings - Fork 599
Implement push notifications for gateway #1459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rytilahti
merged 21 commits into
rytilahti:master
from
starkillerOG:gateway_push_server
Jul 17, 2022
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
baeffca
gateway push server
starkillerOG 7c5c9d6
Add docs to implement a gateway zigbee device
starkillerOG 7714ca4
Update miio/gateway/devices/subdevice.py
starkillerOG b519214
Update miio/gateway/devices/subdevice.py
starkillerOG 23c2ba4
Update docs/push_server.rst
starkillerOG 3522cb4
Update docs/push_server.rst
starkillerOG ccfe107
Update miio/gateway/gateway.py
starkillerOG 49d8b69
Update miio/gateway/gateway.py
starkillerOG 3d54641
Update docs/push_server.rst
starkillerOG 595ffff
Update miio/gateway/alarm.py
starkillerOG 7dc8697
Update miio/gateway/devices/subdevice.py
starkillerOG fe11e87
Add callback type hints
starkillerOG 96c1a53
use typing instead of collections.abc
starkillerOG 0e0b993
add type hints
starkillerOG e112589
Create gateway.rts
starkillerOG a5cc0f5
move gateway docs
starkillerOG c41e34b
add enter
starkillerOG 975a963
raise Exception when no push server
starkillerOG bb02a6f
Merge branch 'gateway_push_server' of https://github.com/starkillerOG…
starkillerOG 4e11f5b
fix flake8
starkillerOG 1450c1e
Fix documentation
rytilahti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| Gateway | ||
| ======= | ||
|
|
||
| Adding support for new Zigbee devices | ||
| ------------------------------------- | ||
|
|
||
| Once the event information is obtained as :ref:`described in the push server docs<obtain_event_info>`, | ||
| a new event for a Zigbee device connected to a gateway can be implemented as follows: | ||
|
|
||
| 1. Open `miio/gateway/devices/subdevices.yaml` file and search for the target device for the new event. | ||
| 2. Add an entry for the new event: | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| properties: | ||
| - property: is_open # the new property of this device (optional) | ||
| default: False # default value of the property when the device is initialized (optional) | ||
| push_properties: | ||
| open: # the event you added, see the decoded packet capture `\"key\":\"event.lumi.sensor_magnet.aq2.open\"` take this equal to everything after the model | ||
| property: is_open # the property as listed above that this event will link to (optional) | ||
| value: True # the value the property as listed above will be set to if this event is received (optional) | ||
| extra: "[1,6,1,0,[0,1],2,0]" # the identification of this event, see the decoded packet capture `\"extra\":\"[1,6,1,0,[0,1],2,0]\"` | ||
| close: | ||
| property: is_open | ||
| value: False | ||
| extra: "[1,6,1,0,[0,0],2,0]" | ||
|
|
||
| 3. Create a pull request to get the event added to this library. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.