HueBLE 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,169 @@
1
+ Metadata-Version: 2.1
2
+ Name: HueBLE
3
+ Version: 1.0.0
4
+ Summary: Python module for controlling and monitoring Bluetooth Philips Hue bulbs
5
+ Author-email: Harvey Lelliott <harveylelliott@duck.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024 Harvey Lelliott
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+ Project-URL: Homepage, https://github.com/flip-dots/HueBLE
28
+ Project-URL: Documentation, https://hueble.readthedocs.io/en/latest/
29
+ Project-URL: Repository, https://github.com/flip-dots/HueBLE
30
+ Project-URL: Issues, https://github.com/flip-dots/HueBLE/issues
31
+ Project-URL: Changelog, https://github.com/flip-dots/HueBLE/CHANGELOG.rst
32
+ Keywords: Philips Hue,BLE,Home Assistant
33
+ Classifier: Development Status :: 3 - Alpha
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: Topic :: Home Automation
36
+ Classifier: License :: OSI Approved :: MIT License
37
+ Classifier: Framework :: AsyncIO
38
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 10
39
+ Classifier: Operating System :: POSIX :: Linux
40
+ Classifier: Operating System :: MacOS :: MacOS X
41
+ Classifier: Programming Language :: Python :: 3.10
42
+ Requires-Python: >=3.10
43
+ Description-Content-Type: text/markdown
44
+ License-File: LICENSE.txt
45
+ Requires-Dist: bleak>=0.19.0
46
+ Requires-Dist: bleak-retry-connector
47
+
48
+ # HueBLE
49
+
50
+ ![HueBLE logo](/hue_ble.png)
51
+
52
+
53
+ Python module for controlling Bluetooth Philips Hue lights.
54
+ - 👌 Free software: MIT license
55
+ - 🖨️ Documentation: https://hueble.readthedocs.io/en/latest/
56
+ - 📦 PIP: https://pypi.org/project/HueBLE/
57
+
58
+
59
+ This Python module enables you to control Philips Hue Bluetooth lights directly
60
+ from your computer, without the need for a Hue bridge or ZigBee dongle.
61
+ It leverages the Bleak library to interact with Bluetooth Philips Hue lights.
62
+
63
+
64
+ ## Features
65
+
66
+ - 💡 On/Off control
67
+ - 🌗 Brightness control
68
+ - 🌡️ Colour temp control
69
+ - 🌈 XY colour control
70
+ - ❔ Light state (power/brightness/temp/colour)
71
+ - ⚙️ Light configuration (name)
72
+ - 📊 Light metadata (manufacturer/model/zigbee address)
73
+ - 🤜 Supports push & polling models
74
+ - 🔂 Simple structure
75
+ - 📜 Mediocre documentation
76
+ - ✔️ More emojis than strictly necessary
77
+
78
+
79
+ ## Requirements
80
+
81
+ - 🐍 Python 3.10+
82
+ - 📶 Bleak 0.19.0+
83
+ - 📶 bleak-retry-connector
84
+
85
+
86
+ ## Supported Operating Systems
87
+
88
+ - 🐧 Linux (BlueZ)
89
+ - Ubuntu Desktop
90
+ - Arch (HomeAssistant OS)
91
+ - 🏢 Windows
92
+ - Windows 10
93
+ - 💾 Mac OSX
94
+ - Maybe?
95
+
96
+
97
+ ## Documentation
98
+
99
+ https://hueble.readthedocs.io/en/latest/
100
+
101
+
102
+ ## Installation
103
+
104
+
105
+ ### PIP
106
+
107
+ ```
108
+ pip install HueBLE
109
+ ```
110
+
111
+
112
+ ### Manual
113
+
114
+ HueBLE consists of a single file (HueBLE.py) which you can simply put in the
115
+ same directory as your program. If you are using manual installation make sure
116
+ the dependencies are installed as well.
117
+
118
+ ```
119
+ pip install bleak bleak-retry-connector
120
+ ```
121
+
122
+
123
+ ## Examples
124
+
125
+
126
+ ### Quick start example
127
+
128
+ Example code from example.py
129
+
130
+ ```python
131
+ import asyncio
132
+ from bleak import BleakScanner
133
+ import HueBLE
134
+
135
+
136
+ async def main():
137
+
138
+ # Address of light to connect to
139
+ address = "F6:9B:48:A4:D2:D8"
140
+
141
+ # Obtain the BLEDevice from bleak
142
+ device = await BleakScanner.find_device_by_address(address)
143
+
144
+ # Initialize the light object
145
+ light = HueBLE.HueBleLight(device)
146
+
147
+ # Optionally we could call connect but it will be called automatically
148
+ # on the first request to the light. You might want to call this if
149
+ # you want to subscribe to state changes without changing the lights state.
150
+ # await light.connect()
151
+
152
+ # Will automatically connect to the light and turn it off
153
+ await light.set_power(False)
154
+
155
+ # Wait
156
+ await asyncio.sleep(5)
157
+
158
+ # Turn the light back on again
159
+ await light.set_power(True)
160
+
161
+ if __name__ == "__main__":
162
+ asyncio.run(main())
163
+
164
+ ```
165
+
166
+
167
+ ### Demo program
168
+
169
+ A more fully featured demo program can be found in ``` examples/demo.py ``` which demonstrates all of the implemented features.
@@ -0,0 +1,9 @@
1
+ HueBLE.py
2
+ LICENSE.txt
3
+ README.md
4
+ pyproject.toml
5
+ HueBLE.egg-info/PKG-INFO
6
+ HueBLE.egg-info/SOURCES.txt
7
+ HueBLE.egg-info/dependency_links.txt
8
+ HueBLE.egg-info/requires.txt
9
+ HueBLE.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ bleak>=0.19.0
2
+ bleak-retry-connector
@@ -0,0 +1 @@
1
+ HueBLE