Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
46cfd5b
add Vitoconnect Opto 2 / Heatbox2 as gateway
Nibot1 Mar 30, 2024
798adcf
add AutoDetect test
Nibot1 Mar 30, 2024
ee12f31
update tests
Nibot1 Mar 30, 2024
2c3bad7
Merge branch 'master' into feat/vitoconnect_opto2_gateway
Nibot1 Apr 2, 2024
6e77c87
Update PyViCareService.py remove empty lines
Nibot1 Apr 2, 2024
86e8255
Fix Pylint issue with docstring
Nibot1 Apr 2, 2024
edc3359
chore(ci): create release drafter workflow (#3)
CFenner Aug 13, 2024
47fc07c
chore(ci): create release-drafter config (#4)
CFenner Aug 14, 2024
5542182
chore: use poetry (#6)
CFenner Aug 14, 2024
385d75a
chore(ci): modify release to use poetry (#5)
CFenner Aug 14, 2024
1246b57
chore(ci): fix pypi project (#7)
CFenner Aug 14, 2024
f3d4ccd
chore: fix project name (#8)
CFenner Aug 14, 2024
d6c407d
chore: delete unused files (#11)
CFenner Aug 14, 2024
58c0cb2
fix: correct unit getter for heating.gas.consumption.summary.dhw (#9)
CFenner Aug 14, 2024
2fec096
chore: Configure Renovate (#12)
renovate[bot] Aug 14, 2024
9f00cc1
chore(ci): add mypy config & workflow (#13)
CFenner Aug 15, 2024
0371e8e
feat(deprecation): remove usage of deprecated data points (#16)
CFenner Aug 15, 2024
9e97af2
chore(testdata): update test data for Vitocal250A (#17)
CFenner Aug 15, 2024
c535483
chore(renovate): add default label (#21)
CFenner Aug 16, 2024
38faf2e
chore(deps): update dependency ruff to ^0.6.0 (#20)
renovate[bot] Aug 16, 2024
08fa6cd
feat: expose hysteresis value data points (#19)
CFenner Aug 16, 2024
e2cbe19
chore(deps): update dependency ruff to v0.6.1 (#22)
renovate[bot] Aug 17, 2024
b962436
fix: downgrade dependency to be in line with HA (#23)
CFenner Aug 17, 2024
f81942a
remove .pylintrc file
Nibot1 Aug 17, 2024
77158e5
Merge branch 'main' into feat/vitoconnect_opto2_gateway
Nibot1 Aug 17, 2024
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
3 changes: 2 additions & 1 deletion PyViCare/PyViCareDeviceConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ def asAutoDetectDevice(self):
(self.asElectricalEnergySystem, r"E3_EEBus", ["type:eebus"]),
(self.asElectricalEnergySystem, r"E3_VitoCharge_03", ["type:energy_storage"]),
(self.asVentilation, r"E3_ViAir", ["type:ventilation"]),
(self.asGateway, r"Heatbox1", ["type:gateway;VitoconnectOpto1"])
(self.asGateway, r"Heatbox1", ["type:gateway;VitoconnectOpto1"]),
(self.asGateway, r"Heatbox2", ["type:gateway;VitoconnectOpto2/OT2"])
]

for (creator_method, type_name, roles) in device_types:
Expand Down
2 changes: 1 addition & 1 deletion PyViCare/PyViCareService.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def hasRoles(self, requested_roles) -> bool:
return hasRoles(requested_roles, self.roles)

def _isGateway(self) -> bool:
return self.hasRoles(["type:gateway;VitoconnectOpto1"])
return self.hasRoles(["type:gateway;VitoconnectOpto1"]) or self.hasRoles(["type:gateway;VitoconnectOpto2/OT2"])

def setProperty(self, property_name: str, action: str, data: Any) -> Any:
url = buildSetPropertyUrl(
Expand Down
97 changes: 97 additions & 0 deletions tests/response/VitoconnectOpto2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"data": [
{
"feature": "gateway.devices",
"gatewayId": "##############",
"timestamp": "2024-03-28T05:06:02.633Z",
"isEnabled": true,
"isReady": true,
"apiVersion": 1,
"uri": "https://api.viessmann.com/iot/v1/features/installations/######/gateways/##############/features/gateway.devices",
"properties": {
"devices": {
"type": "DeviceList",
"value": [
{
"id": "gateway",
"fingerprint": "###",
"modelId": "Heatbox2_SRC",
"modelVersion": "###",
"name": "Heatbox 2 SRC, Vitoconnect",
"type": "vitoconnect",
"roles": [
"type:gateway;VitoconnectOpto2/OT2",
"type:hb2",
"type:legacy"
],
"status": "online"
},
{
"id": "0",
"fingerprint": "###",
"modelId": "VPlusHO1_40",
"modelVersion": "###",
"name": "VT 200 (HO1A / HO1B)",
"type": "heating",
"roles": [
"type:boiler",
"type:legacy",
"type:product;VPlusHO1"
],
"status": "online"
},
{
"id": "RoomControl-1",
"fingerprint": "###",
"modelId": "Smart_RoomControl",
"modelVersion": "###",
"name": "Smart_RoomControl_49",
"type": "roomControl",
"roles": [
"capability:monetization;FTDC",
"capability:monetization;OWD",
"capability:zigbeeCoordinator",
"type:legacy",
"type:virtual;smartRoomControl"
],
"status": "online"
},
{
"id": "zigbee-#####",
"fingerprint": "###",
"modelId": "Smart_Device_eTRV_generic_50",
"modelVersion": "ac746d50a111d3eb8fa54146c05971aa2bc5b5cc",
"name": "Smart_Device_eTRV_generic_50",
"type": "zigbee",
"roles": [
"type:actuator",
"type:legacy",
"type:radiator",
"type:smartRoomDevice"
],
"status": "online"
}
]
}
},
"commands": {}
},
{
"feature": "gateway.wifi",
"gatewayId": "##############",
"timestamp": "2024-03-30T17:31:57.758Z",
"isEnabled": true,
"isReady": true,
"apiVersion": 1,
"uri": "https://api.viessmann.com/iot/v1/features/installations/######/gateways/##############/features/gateway.wifi",
"properties": {
"strength": {
"type": "number",
"value": -41,
"unit": ""
}
},
"commands": {}
}
]
}
18 changes: 18 additions & 0 deletions tests/test_VitoconnectOpto2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import unittest

from PyViCare.PyViCareGateway import Gateway
from tests.ViCareServiceMock import ViCareServiceMock


class VitoconnectOpto2(unittest.TestCase):
def setUp(self):
self.service = ViCareServiceMock('response/VitoconnectOpto2.json')
self.device = Gateway(self.service)

def test_getSerial(self):
self.assertEqual(
self.device.getSerial(), "##############")

def test_getWifiSignalStrength(self):
self.assertEqual(
self.device.getWifiSignalStrength(), -41)