Skip to content
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

Transition to Object Oriented Model + Therminator Unique Register Support #7

Merged
merged 17 commits into from
Oct 16, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,25 @@ This integration has been tested with Solarfocus eco<sup>manager-touch</sup> ver
| Biomassboiler (_Kessel_) | :white_check_mark: |

_Note: The number of supported Heating Circuits, Buffers, and Boilers could be extended in the future_

## Usage

```python
from pymodbus.client.sync import ModbusTcpClient as ModbusClient
LLukas22 marked this conversation as resolved.
Show resolved Hide resolved
from pysolarfocus import SolarfocusAPI
from pysolarfocus.const import PORT,Systems

# Create a Modbus client
client = ModbusClient(IP, port=PORT)
client.connect()

# Create the Solarfocus API client
api = SolarfocusAPI(client, Systems.Vampair)
LLukas22 marked this conversation as resolved.
Show resolved Hide resolved

# Fetch the values
solarfocus.update()

# Print the values
print(solarfocus.buffer)
print(solarfocus.heating_circuit)
```
3 changes: 1 addition & 2 deletions cli.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import argparse
import pysolarfocus as sf

import logging
from pymodbus.client.sync import ModbusTcpClient as ModbusClient

from pysolarfocus.const import PORT


Expand Down
Loading