Metadata-Version: 2.4
Name: pysensorlinx
Version: 0.1.8
Summary: Python library for accessing SensorLinx Device Data
Author-email: Stefan Slivinski <sslivins@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/sslivins/pysensorlinx
Project-URL: Bug Tracker, https://github.com/sslivins/pysensorlinx/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.11.12
Requires-Dist: glom
Provides-Extra: tests
Requires-Dist: pytest>=8.3.4; extra == "tests"
Requires-Dist: pytest-asyncio>=0.25.3; extra == "tests"
Requires-Dist: aioresponses>=0.7.8; extra == "tests"
Requires-Dist: python-dotenv>=1.0.1; extra == "tests"
Dynamic: license-file

# pysensorlinx

pysensorlinx is a Python library for accessing Sensor Linx sensor data directly from their webservice. It supports logging into the service, retrieving sites list, and setting and getting device data used to control devices such as heat pumps, etc.

## Features

- Login to sensor linx account
- retrieve the user profile
- get the list of buildings
- get the list of devices
- get and set device parameters for a specific device

## Install this repo

Clone the repository and install in editable mode:

```bash
git clone https://github.com/your_username/pysensorlinx.git
cd pysensorlinx
```

### Create and activate a virtual environment

**On Windows:**
```bash
python -m venv .venv
.venv\Scripts\activate
```

**On macOS/Linux:**
```bash
python3 -m venv .venv
source .venv/bin/activate
```

Once the virtual environment is activated, install the package in editable mode:

```bash
pip install -e .
```

## Install from pypi.org

```bash
pip install pysensorlinx
```

## Usage

```python
from pysensorlinx import Omnisense

async def main():
    sensorlinx = Sensorlinx()
    # Login with your credentials
    await sensorlinx.login("your_username", "your_password")
    

    
    # When done, close the session
    await sensorlinx.close()

import asyncio
asyncio.run(main())
```

Replace `"your_username"` and `"your_password"` with your actual Sensorlinx credentials. For more details, refer to the documentation or explore the source code.

## Testing
Tests are written using pytest and pytest-asyncio. You can run tests as follows:

```bash
pip install -e .[tests]

pytest
