https://github.com/moralcode/lantrane
https://github.com/moralcode/lantrane
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/moralcode/lantrane
- Owner: MoralCode
- License: gpl-3.0
- Created: 2023-07-01T23:24:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-08T02:34:21.000Z (over 2 years ago)
- Last Synced: 2025-03-13T13:51:13.752Z (11 months ago)
- Language: Python
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Lantrane
A python library for interacting with Trane thermostats over the local network
## Usage Example
Your thermostat for communicating, variable speed heat pump systems might have a port open that emits data every time the compressor speed changes if you can find the right port via nmap and telnet (usually port 30,000 or so), this example will listen on that port and give you data. The port may change when the device is updated though.
```python
from lantrane import Trane
import asyncio
trane = Trane(args.ip, args.port)
def read(data):
print(data)
trane.on_data(read)
asyncio.run(trane.listen())
```
## Distribution
```
python3 setup.py bdist_wheel
python3 setup.py sdist
twine check dist/*
twine upload dist/*
```