-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove HEMS an EEBus devices and change TCU handling to gateway (#…
…364) * change E3_TCU autodetect-handler to gateway * remove hems and eebus devices and fix tcu handling * remove empty lines * add TCU300 from VX3 with Ethernet response * remove unnecessary if statement * add test * fix comment * add AutoDetect test * remove empty line * fix pylint error
- Loading branch information
Showing
6 changed files
with
142 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"feature": "gateway.devices", | ||
"gatewayId": "################", | ||
"timestamp": "2024-03-17T18:55:46.182Z", | ||
"isEnabled": true, | ||
"isReady": true, | ||
"apiVersion": 1, | ||
"uri": "https://api.viessmann.com/iot/v1/features/installations/252756/gateways/################/features/gateway.devices", | ||
"properties": { | ||
"devices": { | ||
"type": "DeviceList", | ||
"value": [ | ||
{ | ||
"id": "gateway", | ||
"fingerprint": "####", | ||
"modelId": "E3_TCU10_x07", | ||
"modelVersion": "####", | ||
"name": "TCU", | ||
"type": "tcu", | ||
"roles": [ | ||
"capability:hems", | ||
"capability:zigbeeCoordinator", | ||
"type:E3", | ||
"type:gateway;TCU300" | ||
], | ||
"status": "online" | ||
}, | ||
{ | ||
"id": "HEMS", | ||
"fingerprint": "###", | ||
"modelId": "E3_HEMS", | ||
"modelVersion": "###", | ||
"name": "Home Energy Management System", | ||
"type": "hems", | ||
"roles": [ | ||
"type:E3", | ||
"type:virtual;hems" | ||
], | ||
"status": "online" | ||
}, | ||
{ | ||
"id": "RoomControl-1", | ||
"fingerprint": "###", | ||
"modelId": "E3_RoomControl_One_525", | ||
"modelVersion": "####", | ||
"name": "E3_RoomControl_One_525", | ||
"type": "roomControl", | ||
"roles": [ | ||
"capability:monetization;FTDC", | ||
"capability:monetization;OWD", | ||
"capability:zigbeeCoordinator", | ||
"type:E3", | ||
"type:virtual;smartRoomControl" | ||
], | ||
"status": "online" | ||
}, | ||
{ | ||
"id": "EEBUS", | ||
"fingerprint": "#####", | ||
"modelId": "E3_EEBus", | ||
"modelVersion": "#####", | ||
"name": "accessories", | ||
"type": "EEBus", | ||
"roles": [ | ||
"type:E3", | ||
"type:accessory;eeBus" | ||
], | ||
"status": "online" | ||
}, | ||
{ | ||
"id": "0", | ||
"fingerprint": "ecu;#####", | ||
"modelId": "E3_VitoCharge_03", | ||
"modelVersion": "####", | ||
"name": "E3 device", | ||
"type": "electricityStorage", | ||
"roles": [ | ||
"capability:hems", | ||
"type:E3", | ||
"type:ess", | ||
"type:photovoltaic;Internal", | ||
"type:product;Vitocharge" | ||
], | ||
"status": "online" | ||
}, | ||
{ | ||
"id": "eebus-1", | ||
"fingerprint": "eebus:wallbox;########", | ||
"modelId": "E3_HEMS_VCS", | ||
"modelVersion": "####", | ||
"name": "Home Energy Management System", | ||
"type": "vehicleChargingStation", | ||
"roles": [ | ||
"type:E3", | ||
"type:accessory;vehicleChargingStation" | ||
], | ||
"status": "online" | ||
} | ||
] | ||
} | ||
}, | ||
"commands": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import unittest | ||
|
||
from PyViCare.PyViCareGateway import Gateway | ||
from PyViCare.PyViCareUtils import PyViCareNotSupportedFeatureError | ||
from tests.ViCareServiceMock import ViCareServiceMock | ||
|
||
|
||
class TCU300_ethernet(unittest.TestCase): | ||
def setUp(self): | ||
self.service = ViCareServiceMock('response/TCU300_ethernet.json') | ||
self.device = Gateway(self.service) | ||
|
||
def test_getSerial(self): | ||
self.assertEqual( | ||
self.device.getSerial(), "################") | ||
|
||
def test_getWifiSignalStrength(self): | ||
with self.assertRaises(PyViCareNotSupportedFeatureError): | ||
self.device.getWifiSignalStrength() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters