idealclima 0.1.0__py3-none-any.whl
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.
- idealclima/__init__.py +18 -0
- idealclima/base.py +85 -0
- idealclima/enums.py +43 -0
- idealclima/ikaro.py +39 -0
- idealclima/py.typed +1 -0
- idealclima/skudo.py +161 -0
- idealclima-0.1.0.dist-info/METADATA +71 -0
- idealclima-0.1.0.dist-info/RECORD +10 -0
- idealclima-0.1.0.dist-info/WHEEL +4 -0
- idealclima-0.1.0.dist-info/licenses/LICENSE +21 -0
idealclima/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Async Modbus library for Idealclima fan coil units."""
|
|
2
|
+
|
|
3
|
+
from .enums import FanSpeed, IkaroMode, SkudoMode, TemperatureUnit
|
|
4
|
+
from .ikaro import IkaroHW, IkaroReadings, IkaroSettings
|
|
5
|
+
from .skudo import SkudoDCInverter, SkudoReadings, SkudoSettings
|
|
6
|
+
|
|
7
|
+
__all__ = [
|
|
8
|
+
"FanSpeed",
|
|
9
|
+
"IkaroHW",
|
|
10
|
+
"IkaroMode",
|
|
11
|
+
"IkaroReadings",
|
|
12
|
+
"IkaroSettings",
|
|
13
|
+
"SkudoDCInverter",
|
|
14
|
+
"SkudoMode",
|
|
15
|
+
"SkudoReadings",
|
|
16
|
+
"SkudoSettings",
|
|
17
|
+
"TemperatureUnit",
|
|
18
|
+
]
|
idealclima/base.py
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""Shared base components and device logic for Idealclima units."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from modbus_connection import ModbusUnit
|
|
6
|
+
from modbus_connection.model import (
|
|
7
|
+
Component,
|
|
8
|
+
Device,
|
|
9
|
+
UpdateReport,
|
|
10
|
+
boolean,
|
|
11
|
+
enum,
|
|
12
|
+
gauge,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
from .enums import FanSpeed
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class BaseIdealclimaReadings(Component):
|
|
19
|
+
"""Common input registers shared by Idealclima fan coil units."""
|
|
20
|
+
|
|
21
|
+
register_space = "input"
|
|
22
|
+
|
|
23
|
+
ambient_temperature = gauge(46801, 0.1, signed=True, unit="°C")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class BaseIdealclimaSettings(Component):
|
|
27
|
+
"""Common holding registers shared by Idealclima fan coil units."""
|
|
28
|
+
|
|
29
|
+
register_space = "holding"
|
|
30
|
+
max_gap = 0
|
|
31
|
+
|
|
32
|
+
power = boolean(28301, writable=True, force_fc16=True)
|
|
33
|
+
fan_speed = enum(28303, FanSpeed, signed=True, writable=True, force_fc16=True)
|
|
34
|
+
target_temp_cool = gauge(
|
|
35
|
+
28310, 0.1, signed=True, writable=True, unit="°C", force_fc16=True
|
|
36
|
+
)
|
|
37
|
+
target_temp_heat = gauge(
|
|
38
|
+
28311, 0.1, signed=True, writable=True, unit="°C", force_fc16=True
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class BaseIdealclimaDevice[
|
|
43
|
+
R: BaseIdealclimaReadings,
|
|
44
|
+
S: BaseIdealclimaSettings,
|
|
45
|
+
](Device):
|
|
46
|
+
"""Base device wrapping readings and settings components."""
|
|
47
|
+
|
|
48
|
+
readings: R
|
|
49
|
+
settings: S
|
|
50
|
+
|
|
51
|
+
def __init__(self, unit: ModbusUnit, readings: R, settings: S) -> None:
|
|
52
|
+
"""Initialize the device with a shared Modbus unit and its components."""
|
|
53
|
+
super().__init__(unit)
|
|
54
|
+
self.readings = readings
|
|
55
|
+
self.settings = settings
|
|
56
|
+
|
|
57
|
+
async def async_update_readings(self) -> UpdateReport:
|
|
58
|
+
"""Poll input registers (live sensor readings)."""
|
|
59
|
+
return await self.async_poll(("readings",))
|
|
60
|
+
|
|
61
|
+
async def async_update_settings(self) -> UpdateReport:
|
|
62
|
+
"""Poll holding registers (configuration and setpoints)."""
|
|
63
|
+
return await self.async_poll(("settings",))
|
|
64
|
+
|
|
65
|
+
async def async_update(self) -> UpdateReport:
|
|
66
|
+
"""Poll both readings and settings."""
|
|
67
|
+
return await self.async_poll(("readings", "settings"))
|
|
68
|
+
|
|
69
|
+
async def _async_set_power(self, enabled: bool, *, stop_fan: bool) -> None:
|
|
70
|
+
"""Set unit power and optionally stop the fan when turning off."""
|
|
71
|
+
await self.settings.write("power", enabled)
|
|
72
|
+
if not enabled and stop_fan:
|
|
73
|
+
await self.settings.write("fan_speed", FanSpeed.OFF)
|
|
74
|
+
|
|
75
|
+
async def async_set_fan_speed(self, speed: FanSpeed) -> None:
|
|
76
|
+
"""Set the target fan speed (register 28303)."""
|
|
77
|
+
await self.settings.write("fan_speed", speed)
|
|
78
|
+
|
|
79
|
+
async def async_set_target_temp_cool(self, temperature: float) -> None:
|
|
80
|
+
"""Set the cooling target temperature in °C (register 28310)."""
|
|
81
|
+
await self.settings.write("target_temp_cool", temperature)
|
|
82
|
+
|
|
83
|
+
async def async_set_target_temp_heat(self, temperature: float) -> None:
|
|
84
|
+
"""Set the heating target temperature in °C (register 28311)."""
|
|
85
|
+
await self.settings.write("target_temp_heat", temperature)
|
idealclima/enums.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Enumerations for Idealclima Modbus fan coil units."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from enum import IntEnum
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FanSpeed(IntEnum):
|
|
9
|
+
"""Fan speed values for holding register 28303."""
|
|
10
|
+
|
|
11
|
+
OFF = 0
|
|
12
|
+
SUPER_SILENCE = 1
|
|
13
|
+
LOW = 2
|
|
14
|
+
MEDIUM = 3
|
|
15
|
+
HIGH = 4
|
|
16
|
+
AUTO = 6
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class IkaroMode(IntEnum):
|
|
20
|
+
"""Operating mode values for Comfosplit IKARO HW (register 28302)."""
|
|
21
|
+
|
|
22
|
+
OFF = 0
|
|
23
|
+
COOL = 1
|
|
24
|
+
DRY = 2
|
|
25
|
+
FAN_ONLY = 3
|
|
26
|
+
HEAT = 4
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class SkudoMode(IntEnum):
|
|
30
|
+
"""Operating mode values for Radiantore SKUDO DC Inverter (register 28302)."""
|
|
31
|
+
|
|
32
|
+
AUTO = 0
|
|
33
|
+
COOL = 1
|
|
34
|
+
DRY = 2
|
|
35
|
+
FAN_ONLY = 3
|
|
36
|
+
HEAT = 4
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class TemperatureUnit(IntEnum):
|
|
40
|
+
"""Display temperature unit for SKUDO DC Inverter (register 28319)."""
|
|
41
|
+
|
|
42
|
+
CELSIUS = 0
|
|
43
|
+
FAHRENHEIT = 1
|
idealclima/ikaro.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Comfosplit IKARO HW Modbus device model."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from modbus_connection import ModbusUnit
|
|
6
|
+
from modbus_connection.model import enum
|
|
7
|
+
|
|
8
|
+
from .base import (
|
|
9
|
+
BaseIdealclimaDevice,
|
|
10
|
+
BaseIdealclimaReadings,
|
|
11
|
+
BaseIdealclimaSettings,
|
|
12
|
+
)
|
|
13
|
+
from .enums import IkaroMode
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class IkaroReadings(BaseIdealclimaReadings):
|
|
17
|
+
"""Input registers for Comfosplit IKARO HW."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class IkaroSettings(BaseIdealclimaSettings):
|
|
21
|
+
"""Holding registers for Comfosplit IKARO HW."""
|
|
22
|
+
|
|
23
|
+
mode = enum(28302, IkaroMode, signed=True, writable=True, force_fc16=True)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class IkaroHW(BaseIdealclimaDevice[IkaroReadings, IkaroSettings]):
|
|
27
|
+
"""Comfosplit IKARO HW fan coil unit."""
|
|
28
|
+
|
|
29
|
+
def __init__(self, unit: ModbusUnit) -> None:
|
|
30
|
+
"""Initialize an IKARO HW device bound to a ModbusUnit."""
|
|
31
|
+
super().__init__(unit, IkaroReadings(unit), IkaroSettings(unit))
|
|
32
|
+
|
|
33
|
+
async def async_set_power(self, enabled: bool, *, stop_fan: bool = True) -> None:
|
|
34
|
+
"""Turn the unit on or off; stops the fan by default when turning off."""
|
|
35
|
+
await self._async_set_power(enabled, stop_fan=stop_fan)
|
|
36
|
+
|
|
37
|
+
async def async_set_mode(self, mode: IkaroMode) -> None:
|
|
38
|
+
"""Set the operating mode (register 28302)."""
|
|
39
|
+
await self.settings.write("mode", mode)
|
idealclima/py.typed
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
idealclima/skudo.py
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"""Radiantore SKUDO DC Inverter Modbus device model."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from modbus_connection import ModbusUnit
|
|
6
|
+
from modbus_connection.model import boolean, enum, gauge, integer
|
|
7
|
+
|
|
8
|
+
from .base import (
|
|
9
|
+
BaseIdealclimaDevice,
|
|
10
|
+
BaseIdealclimaReadings,
|
|
11
|
+
BaseIdealclimaSettings,
|
|
12
|
+
)
|
|
13
|
+
from .enums import SkudoMode, TemperatureUnit
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _validate_timer_hours(value: int) -> int:
|
|
17
|
+
"""Validate SKUDO timer hours (0 = disabled, 1-11 hours)."""
|
|
18
|
+
if not 0 <= value <= 11:
|
|
19
|
+
raise ValueError(f"Timer hours must be between 0 and 11, got {value}")
|
|
20
|
+
return value
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class SkudoReadings(BaseIdealclimaReadings):
|
|
24
|
+
"""Input registers for Radiantore SKUDO DC Inverter (46801-46810).
|
|
25
|
+
|
|
26
|
+
Uses ``max_gap = 1`` so 46801-46810 are polled in a single 0x04 request
|
|
27
|
+
while skipping 46803 and 46807.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
max_gap = 1
|
|
31
|
+
|
|
32
|
+
coil_temperature = gauge(46802, 0.1, signed=True, unit="°C")
|
|
33
|
+
fan_rpm = integer(46804, signed=True, unit="rpm")
|
|
34
|
+
valve_command = boolean(46805)
|
|
35
|
+
power_state = boolean(46806)
|
|
36
|
+
motor_alarm = boolean(46808)
|
|
37
|
+
ambient_sensor_alarm = boolean(46809)
|
|
38
|
+
coil_sensor_alarm = boolean(46810)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class SkudoSettings(BaseIdealclimaSettings):
|
|
42
|
+
"""Holding registers for Radiantore SKUDO DC Inverter (28301-28327)."""
|
|
43
|
+
|
|
44
|
+
mode = enum(28302, SkudoMode, signed=True, writable=True, force_fc16=True)
|
|
45
|
+
key_lock = boolean(28304, writable=True, force_fc16=True)
|
|
46
|
+
sleep = boolean(28305, writable=True, force_fc16=True)
|
|
47
|
+
timer_off_hours = integer(
|
|
48
|
+
28306, signed=True, writable=_validate_timer_hours, force_fc16=True
|
|
49
|
+
)
|
|
50
|
+
timer_on_hours = integer(
|
|
51
|
+
28307, signed=True, writable=_validate_timer_hours, force_fc16=True
|
|
52
|
+
)
|
|
53
|
+
max_target_temp = gauge(
|
|
54
|
+
28308, 0.1, signed=True, writable=True, unit="°C", force_fc16=True
|
|
55
|
+
)
|
|
56
|
+
min_target_temp = gauge(
|
|
57
|
+
28309, 0.1, signed=True, writable=True, unit="°C", force_fc16=True
|
|
58
|
+
)
|
|
59
|
+
target_temp_auto_cool = gauge(
|
|
60
|
+
28312, 0.1, signed=True, writable=True, unit="°C", force_fc16=True
|
|
61
|
+
)
|
|
62
|
+
target_temp_auto_heat = gauge(
|
|
63
|
+
28313, 0.1, signed=True, writable=True, unit="°C", force_fc16=True
|
|
64
|
+
)
|
|
65
|
+
anti_draft_threshold = gauge(
|
|
66
|
+
28314, 0.1, signed=True, writable=True, unit="°C", force_fc16=True
|
|
67
|
+
)
|
|
68
|
+
anti_draft_enabled = boolean(28315, writable=True, force_fc16=True)
|
|
69
|
+
super_silence_enabled = boolean(28316, writable=True, force_fc16=True)
|
|
70
|
+
valve_present = boolean(28317, writable=True, force_fc16=True)
|
|
71
|
+
temperature_unit = enum(
|
|
72
|
+
28319, TemperatureUnit, signed=True, writable=True, force_fc16=True
|
|
73
|
+
)
|
|
74
|
+
key_lock_enabled = boolean(28322, writable=True, force_fc16=True)
|
|
75
|
+
remote_enabled_with_key_lock = boolean(28323, writable=True, force_fc16=True)
|
|
76
|
+
password_enabled = boolean(28324, writable=True, force_fc16=True)
|
|
77
|
+
fan_intermittent = boolean(28327, writable=True, force_fc16=True)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class SkudoDCInverter(BaseIdealclimaDevice[SkudoReadings, SkudoSettings]):
|
|
81
|
+
"""Radiantore SKUDO DC Inverter fan coil unit."""
|
|
82
|
+
|
|
83
|
+
def __init__(self, unit: ModbusUnit) -> None:
|
|
84
|
+
"""Initialize a SKUDO DC Inverter device bound to a ModbusUnit."""
|
|
85
|
+
super().__init__(unit, SkudoReadings(unit), SkudoSettings(unit))
|
|
86
|
+
|
|
87
|
+
async def async_set_power(self, enabled: bool, *, stop_fan: bool = False) -> None:
|
|
88
|
+
"""Turn the unit on or off."""
|
|
89
|
+
await self._async_set_power(enabled, stop_fan=stop_fan)
|
|
90
|
+
|
|
91
|
+
async def async_set_mode(self, mode: SkudoMode) -> None:
|
|
92
|
+
"""Set the operating mode (register 28302)."""
|
|
93
|
+
await self.settings.write("mode", mode)
|
|
94
|
+
|
|
95
|
+
async def async_set_key_lock(self, locked: bool) -> None:
|
|
96
|
+
"""Lock or unlock the onboard panel keys (register 28304)."""
|
|
97
|
+
await self.settings.write("key_lock", locked)
|
|
98
|
+
|
|
99
|
+
async def async_set_sleep(self, enabled: bool) -> None:
|
|
100
|
+
"""Enable or disable sleep mode (register 28305)."""
|
|
101
|
+
await self.settings.write("sleep", enabled)
|
|
102
|
+
|
|
103
|
+
async def async_set_timer_off_hours(self, hours: int) -> None:
|
|
104
|
+
"""Set auto-off timer in hours, 0 to disable or 1-11 (register 28306)."""
|
|
105
|
+
await self.settings.write("timer_off_hours", hours)
|
|
106
|
+
|
|
107
|
+
async def async_set_timer_on_hours(self, hours: int) -> None:
|
|
108
|
+
"""Set auto-on timer in hours, 0 to disable or 1-11 (register 28307)."""
|
|
109
|
+
await self.settings.write("timer_on_hours", hours)
|
|
110
|
+
|
|
111
|
+
async def async_set_max_target_temp(self, temperature: float) -> None:
|
|
112
|
+
"""Set maximum allowed target temperature in °C (register 28308)."""
|
|
113
|
+
await self.settings.write("max_target_temp", temperature)
|
|
114
|
+
|
|
115
|
+
async def async_set_min_target_temp(self, temperature: float) -> None:
|
|
116
|
+
"""Set minimum allowed target temperature in °C (register 28309)."""
|
|
117
|
+
await self.settings.write("min_target_temp", temperature)
|
|
118
|
+
|
|
119
|
+
async def async_set_target_temp_auto_cool(self, temperature: float) -> None:
|
|
120
|
+
"""Set cooling target temperature in auto mode in °C (register 28312)."""
|
|
121
|
+
await self.settings.write("target_temp_auto_cool", temperature)
|
|
122
|
+
|
|
123
|
+
async def async_set_target_temp_auto_heat(self, temperature: float) -> None:
|
|
124
|
+
"""Set heating target temperature in auto mode in °C (register 28313)."""
|
|
125
|
+
await self.settings.write("target_temp_auto_heat", temperature)
|
|
126
|
+
|
|
127
|
+
async def async_set_anti_draft_threshold(self, temperature: float) -> None:
|
|
128
|
+
"""Set coil anti-draft threshold temperature in °C (register 28314)."""
|
|
129
|
+
await self.settings.write("anti_draft_threshold", temperature)
|
|
130
|
+
|
|
131
|
+
async def async_set_anti_draft_enabled(self, enabled: bool) -> None:
|
|
132
|
+
"""Enable or disable the anti-draft function (register 28315)."""
|
|
133
|
+
await self.settings.write("anti_draft_enabled", enabled)
|
|
134
|
+
|
|
135
|
+
async def async_set_super_silence_enabled(self, enabled: bool) -> None:
|
|
136
|
+
"""Enable or disable super silence speed availability (register 28316)."""
|
|
137
|
+
await self.settings.write("super_silence_enabled", enabled)
|
|
138
|
+
|
|
139
|
+
async def async_set_valve_present(self, present: bool) -> None:
|
|
140
|
+
"""Configure whether a water valve actuator is present (register 28317)."""
|
|
141
|
+
await self.settings.write("valve_present", present)
|
|
142
|
+
|
|
143
|
+
async def async_set_temperature_unit(self, unit: TemperatureUnit) -> None:
|
|
144
|
+
"""Set display temperature unit (register 28319)."""
|
|
145
|
+
await self.settings.write("temperature_unit", unit)
|
|
146
|
+
|
|
147
|
+
async def async_set_key_lock_enabled(self, enabled: bool) -> None:
|
|
148
|
+
"""Enable or disable the key lock feature (register 28322)."""
|
|
149
|
+
await self.settings.write("key_lock_enabled", enabled)
|
|
150
|
+
|
|
151
|
+
async def async_set_remote_enabled_with_key_lock(self, enabled: bool) -> None:
|
|
152
|
+
"""Allow or block IR remote control when key lock is active (register 28323)."""
|
|
153
|
+
await self.settings.write("remote_enabled_with_key_lock", enabled)
|
|
154
|
+
|
|
155
|
+
async def async_set_password_enabled(self, enabled: bool) -> None:
|
|
156
|
+
"""Enable or disable onboard terminal password protection (register 28324)."""
|
|
157
|
+
await self.settings.write("password_enabled", enabled)
|
|
158
|
+
|
|
159
|
+
async def async_set_fan_intermittent(self, enabled: bool) -> None:
|
|
160
|
+
"""Enable or disable intermittent fan at target temperature (register 28327)."""
|
|
161
|
+
await self.settings.write("fan_intermittent", enabled)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: idealclima
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Async Modbus library for Idealclima fan coil units (Comfosplit IKARO HW and Radiantore SKUDO DC Inverter)
|
|
5
|
+
Project-URL: Homepage, https://github.com/crug80/idealclima
|
|
6
|
+
Project-URL: Issues, https://github.com/crug80/idealclima/issues
|
|
7
|
+
Author-email: crug80 <claudio@cr-tech.it>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: home-assistant,hvac,idealclima,ikaro,modbus,skudo
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Topic :: Home Automation
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.13
|
|
20
|
+
Requires-Dist: modbus-connection>=4.12.7
|
|
21
|
+
Provides-Extra: tmodbus
|
|
22
|
+
Requires-Dist: modbus-connection[tmodbus]>=4.12.7; extra == 'tmodbus'
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# idealclima
|
|
26
|
+
|
|
27
|
+
Async Python library for controlling Idealclima Modbus fan coil units ([**Comfosplit IKARO HW**](https://www.idealclima.eu/it/radiantori/terminali-idronici/ikaro) and [**Radiantore SKUDO DC Inverter**](https://www.idealclima.eu/it/radiantori/terminali-idronici/radiantore-skudo-dc-inverter)), built on [`modbus-connection`](https://github.com/home-assistant-libs/modbus-connection) for Home Assistant Core integrations and standalone use.
|
|
28
|
+
|
|
29
|
+
## Requirements & Notes
|
|
30
|
+
|
|
31
|
+
- **Modbus Unit Address**: Units ship with default Modbus address `15`, which only allows changing the address. **You must assign a unique address** (`1–32`) to each unit before using this library.
|
|
32
|
+
- **Serial Settings**: `9600 bps`, `8N1`.
|
|
33
|
+
- **Write Function**: Both models only support Modbus function `0x10` (Write Multiple Registers), which is enforced automatically via `force_fc16=True`.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
For Home Assistant or when providing your own `ModbusUnit`:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install idealclima
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
For standalone usage with `tmodbus`:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install "idealclima[tmodbus]"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import asyncio
|
|
53
|
+
from modbus_connection import ModbusSerialParams
|
|
54
|
+
from modbus_connection.tmodbus import ModbusConnection
|
|
55
|
+
from idealclima import FanSpeed, IkaroHW, IkaroMode
|
|
56
|
+
|
|
57
|
+
async def main() -> None:
|
|
58
|
+
conn = ModbusConnection(
|
|
59
|
+
ModbusSerialParams(device="/dev/ttyUSB0", baudrate=9600)
|
|
60
|
+
)
|
|
61
|
+
async with conn:
|
|
62
|
+
unit = conn.for_unit(20)
|
|
63
|
+
ikaro = IkaroHW(unit)
|
|
64
|
+
await ikaro.async_update()
|
|
65
|
+
print(ikaro.readings.ambient_temperature)
|
|
66
|
+
await ikaro.async_set_mode(IkaroMode.COOL)
|
|
67
|
+
await ikaro.async_set_fan_speed(FanSpeed.LOW)
|
|
68
|
+
await ikaro.async_set_power(True)
|
|
69
|
+
|
|
70
|
+
asyncio.run(main())
|
|
71
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
idealclima/__init__.py,sha256=tFDCuGAdcP2UKj0-psm5FRGlBf8f_LnpyZHMAlI8MfI,458
|
|
2
|
+
idealclima/base.py,sha256=487vkHEWi0kfmHVbPUVIE5bXh2PIduKcDdOPMKRLSEM,2930
|
|
3
|
+
idealclima/enums.py,sha256=zUGQQ8z3H4DXWyf7bhsHMR2Uv-1a_YqT8AN2X99qmq4,784
|
|
4
|
+
idealclima/ikaro.py,sha256=zliH-DuGfC4DaEodcdgFyQzwOBGnqKOMwBrP_bYPmEY,1281
|
|
5
|
+
idealclima/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
6
|
+
idealclima/skudo.py,sha256=3c4irI71coumuWFW4dNPc-B9MZkd2L9LU-di8hqzEPs,7252
|
|
7
|
+
idealclima-0.1.0.dist-info/METADATA,sha256=xq7va_v8rD-GWzfxVlouBpQaWYtqtDeJN1eFYTijDwY,2729
|
|
8
|
+
idealclima-0.1.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
9
|
+
idealclima-0.1.0.dist-info/licenses/LICENSE,sha256=WF-SvnZSYa4oYEy6mMcwVLiVaJ6Nv9oa8uL4J_-VNR0,1082
|
|
10
|
+
idealclima-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Claudio Ruggeri - CR-Tech
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|