[!IMPORTANT] This project is no longer being updated. I no longer own a LaCrosse View device and I have moved on to other projects. I will only do general fixes required by Home Assistant. If you would like to to take over this repo and maintain it, please let me know.
La Crosse View
A library for retrieving data from La Crosse View-connected sensors.
Disclaimer
This library is NOT for the Jeelink LaCrosse sensors. You can find that library here. There is also a Home Assistant integration for the Jeelink LaCrosse sensors.
Installation
Run this in your terminal:
pip install lacrosse_view
Usage
This example shows how to get the latest data from every sensor connected to the first location on your account.
from lacrosse_view import LaCrosse
import asyncio
from datetime import datetime, timedelta
import time
async def get_data():
api = LaCrosse()
# Log in to your LaCrosse View account
await api.login('username', 'password')
# Get the sensors from the first location on the account
locations = await api.get_locations()
startTime = datetime.now() - timedelta(minutes=1)
endTime = datetime.now()
startTimeUnix = time.mktime(startTime.timetuple())
endTimeUnix = time.mktime(endTime.timetuple())
sensors = await api.get_sensors(locations[0], tz="America/Vancouver", start=startTimeUnix, end=endTimeUnix)
for sensor in sensors:
for field in sensor.sensor_field_names:
# Each value is a dictionary with keys "s" and "u". "s" is the value and "u" is the Unix timestamp for it.
value = sensor.data[field]["values"][-1]["s"]
print(
f"{sensor.name} {field}: {value}"
)
await api.logout()
asyncio.run(get_data())
Questions?
If you have any questions, please, don't hesitate to open an issue.
Release files for lacrosse-view 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lacrosse_view-1.1.2.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lacrosse_view-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.5 kB
Release files / lacrosse_view-1.1.2.tar.gz
| Download URL | lacrosse_view-1.1.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b786508923afe7fe5bc78cfdcfc71a08b82f5fe59559d70f3b23b392ed9355c6
|
|
BLAKE2b-256 checksum How to use checksums |
dfb998eed0a516767d9e3186c880bd33e454abf97625c449aba25fc5104088fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / lacrosse_view-1.1.2-py3-none-any.whl
| Download URL | lacrosse_view-1.1.2-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ddede6dcbd1db70478cab4845f1692b1df3facfdf7fb6a9f7be802418a9d664
|
|
BLAKE2b-256 checksum How to use checksums |
4ac2dcd7863ef0357d0bf4d558340327a9df71521542596467015cc2aeb28090
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|