asantaga / wiserHomeAssistantPlatform

Platform and related climate/sensors to support the Drayton Wiser Home Heating System
MIT License
240 stars 44 forks source link

Errors with HeatHub with no hot water control #8

Closed scousepi closed 5 years ago

scousepi commented 5 years ago

Hi - the code to connect to the HeatHub is great thank-you! I have an issue with lots of errors in the Home Assistant logs though as my HeatHub is a model with no hot water control, just heating. Is it possible to disable the checking of the hot water status? Error message is as follows...

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 232, in async_update_ha_state state = self.state File "/config/custom_components/sensor/wiser.py", line 188, in state return self.handler.getHubData().getHotwaterRelayStatus() File "/config/custom_components/wiserAPI/wiserHub.py", line 124, in getHotwaterRelayStatus return self.wiserHubData.get("HotWater")[0].get("WaterHeatingState") TypeError: 'NoneType' object is not subscriptable

Heathub details are...

vendor Drayton Wiser product type Controller model identifier WT714R1S0902 device lock enabled false displayed signal strength VeryGood firmware 2.26.16

Thanks!

asantaga commented 5 years ago

Hi there, Sorry been super busy and I didn't see this issue till today.. Yes I can make this change , i might make it a config option :-)

Give me a couple of days and I'll send u something to test

Does it work otherwise? Any chance you can send me a JSON dump?

scousepi commented 5 years ago

Thanks! It seems to display all the information correctly with no other errors apart from the setpoint being reported as -20C as you've already mentioned on these pages (but only when the heating isn't running).

I'll happily send a JSON dump, but you will need to give me some advice on how to generate it if you don't mind.

asantaga commented 5 years ago

hey I dont think I need a JSON dump.. If i do I'll let u know..

Currently my HA instance is down due to house renovations.. I'll get to this fix asap though., just thought Id update the issue so you know Im not ignoring you :-)

asantaga commented 5 years ago

havent forgotten about this, just busy with xmas, the little kid etc etc etc.. but I'll try and get to it this weekend/early next week...

From what I know its not urgent/breaking right?

asantaga commented 5 years ago

hey , Im starting to look at this, can you post me a JSON dump from your WiserHub.. I want to see what the difference is so I can detect the differences between the two..

For windows you can use the following commands , just replace the yoursecret and yourIPAddress with your secret


$data=Invoke-RestMethod -Method Get -UseBasicParsing -headers @{"SECRET"="<yoursecret>"} -Uri http://<yourIPAddress>/data/v2/domain/  -ContentType 'application/json'
ConvertTo-Json($data)

I dont believe the JSON payload contains anything "personal" but feel free to obvuscate any data you feel with 'XXXXXXX' or similar

scousepi commented 5 years ago

This what you need?

{ "System": { "PairingStatus": "Paired", "TimeZoneOffset": 0, "AutomaticDaylightSaving": true, "SystemMode": "Heat", "Version": 6, "FotaEnabled": true, "ValveProtectionEnabled": false, "EcoModeEnabled": true, "AwayModeAffectsHotWater": true, "AwayModeSetPointLimit": 160, "BoilerSettings": { "ControlType": "HeatSourceType_RelayControlled", "FuelType": "Gas", "CycleRate": "CPH_6", "OnOffHysteresis": 5 }, "ZigbeeSettings": { "SuppressApsAcks": true }, "CoolingModeDefaultSetpoint": 210, "CoolingAwayModeSetpointLimit": 240, "ComfortModeEnabled": false, "PreheatTimeLimit": 10800, "DegradedModeSetpointThreshold": 180, "UnixTime": 1546774080, "ActiveSystemVersion": "2.26.16-6340f5b", "CloudConnectionStatus": "Connected", "ZigbeeModuleVersion": "R311 B030517", "ZigbeeEui": "000B57FFFEAA0DC6", "LocalDateAndTime": { "Year": 2019, "Month": "January", "Date": 6, "Day": "Sunday", "Time": 1128 }, "HeatingButtonOverrideState": "Off", "HotWaterButtonOverrideState": "Off" }, "Cloud": { "Environment": "Prod", "DetailedPublishing": false, "WiserApiHost": "api-nl.wiserair.com", "BootStrapApiHost": "bootstrap.gl.struxurewarecloud.com" }, "HeatingChannel": [ { "id": 1, "Name": "Channel-1", "RoomIds": "1 2 3 4 5 6", "PercentageDemand": 100, "DemandOnOffOutput": "On", "HeatingRelayState": "On", "IsSmartValvePreventingDemand": false } ], "Room": [ { "id": 1, "ScheduleId": 1, "HeatingRate": 1200, "RoomStatId": 55767, "Name": "Dining Room", "Mode": "Auto", "DemandType": "Modulating", "ControlSequenceOfOperation": "HeatingOnly", "HeatingType": "HydronicRadiator", "CalculatedTemperature": 201, "CurrentSetPoint": 180, "PercentageDemand": 0, "ControlOutputState": "Off", "SetPointOrigin": "FromSchedule", "DisplayedSetPoint": 180, "ScheduledSetPoint": 180, "AwayModeSuppressed": false, "RoundedAlexaTemperature": 200 }, { "id": 2, "ScheduleId": 2, "HeatingRate": 1200, "SmartValveIds": "2931", "Name": "Robert Bedroom", "Mode": "Auto", "DemandType": "Modulating", "WindowDetectionActive": false, "ControlSequenceOfOperation": "HeatingOnly", "HeatingType": "HydronicRadiator", "CalculatedTemperature": 182, "CurrentSetPoint": 180, "PercentageDemand": 0, "ControlOutputState": "Off", "WindowState": "Closed", "SetPointOrigin": "FromSchedule", "DisplayedSetPoint": 180, "ScheduledSetPoint": 180, "AwayModeSuppressed": false, "RoundedAlexaTemperature": 180 }, { "id": 3, "ScheduleId": 3, "HeatingRate": 1200, "SmartValveIds": "54096", "Name": "Back Bedroom", "Mode": "Auto", "DemandType": "Modulating", "WindowDetectionActive": false, "ControlSequenceOfOperation": "HeatingOnly", "HeatingType": "HydronicRadiator", "CalculatedTemperature": 194, "CurrentSetPoint": 180, "PercentageDemand": 0, "ControlOutputState": "Off", "WindowState": "Closed", "SetPointOrigin": "FromSchedule", "DisplayedSetPoint": 180, "ScheduledSetPoint": 180, "AwayModeSuppressed": false, "RoundedAlexaTemperature": 195 }, { "id": 4, "ScheduleId": 4, "HeatingRate": 1200, "SmartValveIds": "37856", "Name": "Front Room", "Mode": "Auto", "DemandType": "Modulating", "WindowDetectionActive": false, "ControlSequenceOfOperation": "HeatingOnly", "HeatingType": "HydronicRadiator", "CalculatedTemperature": 186, "CurrentSetPoint": 200, "PercentageDemand": 100, "ControlOutputState": "On", "WindowState": "Closed", "SetPointOrigin": "FromSchedule", "DisplayedSetPoint": 200, "ScheduledSetPoint": 200, "AwayModeSuppressed": false, "RoundedAlexaTemperature": 185 }, { "id": 5, "ScheduleId": 5, "HeatingRate": 1200, "SmartValveIds": "55517", "Name": "Hallway", "Mode": "Auto", "DemandType": "Modulating", "WindowDetectionActive": false, "ControlSequenceOfOperation": "HeatingOnly", "HeatingType": "HydronicRadiator", "CalculatedTemperature": 185, "CurrentSetPoint": 190, "PercentageDemand": 45, "ControlOutputState": "On", "WindowState": "Closed", "SetPointOrigin": "FromSchedule", "DisplayedSetPoint": 190, "ScheduledSetPoint": 190, "AwayModeSuppressed": false, "RoundedAlexaTemperature": 185 }, { "id": 6, "ScheduleId": 6, "HeatingRate": 1200, "SmartValveIds": "36335", "Name": "Small Bedroom", "Mode": "Auto", "DemandType": "Modulating", "WindowDetectionActive": false, "ControlSequenceOfOperation": "HeatingOnly", "HeatingType": "HydronicRadiator", "CalculatedTemperature": 188, "CurrentSetPoint": 180, "PercentageDemand": 0, "ControlOutputState": "Off", "WindowState": "Closed", "SetPointOrigin": "FromSchedule", "DisplayedSetPoint": 180, "ScheduledSetPoint": 180, "AwayModeSuppressed": false, "RoundedAlexaTemperature": 190 } ], "Device": [ { "id": 0, "NodeId": 0, "ProductType": "Controller", "ProductIdentifier": "Controller", "ActiveFirmwareVersion": "2.26.16", "ModelIdentifier": "WT714R1S0902", "DeviceLockEnabled": false, "DisplayedSignalStrength": "VeryGood", "ReceptionOfController": "@{Rssi=-58}", "ReceptionOfDevice": "@{Rssi=0; Lqi=255}" }, { "id": 55767, "NodeId": 55767, "ProductType": "RoomStat", "ProductIdentifier": "RoomStat", "ActiveFirmwareVersion": "04E1000900010012", "ModelIdentifier": "Thermostat", "HardwareVersion": "0", "SerialNumber": "000B57FFFEC8AB3F", "ProductModel": "Thermostat", "OtaImageQueryCount": 1, "LastOtaImageQueryCount": 1, "ParentNodeId": 0, "DeviceLockEnabled": false, "DisplayedSignalStrength": "VeryGood", "BatteryVoltage": 27, "BatteryLevel": "Normal", "ReceptionOfController": "@{Rssi=-57; Lqi=172}", "ReceptionOfDevice": "@{Rssi=-60; Lqi=160}" }, { "id": 2931, "NodeId": 2931, "ProductType": "iTRV", "ProductIdentifier": "iTRV", "ActiveFirmwareVersion": "0201000000010012", "ModelIdentifier": "iTRV", "HardwareVersion": "0", "SerialNumber": "000B57FFFEAA1776", "ProductModel": "iTRV", "OtaImageQueryCount": 0, "LastOtaImageQueryCount": 1, "ParentNodeId": 65534, "DeviceLockEnabled": false, "DisplayedSignalStrength": "Medium", "BatteryVoltage": 30, "BatteryLevel": "Normal", "ReceptionOfController": "@{Rssi=-71; Lqi=116}", "ReceptionOfDevice": "@{Rssi=-71; Lqi=116}", "PendingZigbeeMessageMask": 0 }, { "id": 54096, "NodeId": 8303, "ProductType": "iTRV", "ProductIdentifier": "iTRV", "ActiveFirmwareVersion": "0201000000010012", "ModelIdentifier": "iTRV", "HardwareVersion": "0", "SerialNumber": "000B57FFFEAA0FE2", "ProductModel": "iTRV", "OtaImageQueryCount": 0, "LastOtaImageQueryCount": 1, "ParentNodeId": 65534, "DeviceLockEnabled": false, "DisplayedSignalStrength": "VeryGood", "BatteryVoltage": 30, "BatteryLevel": "Normal", "ReceptionOfController": "@{Rssi=-47; Lqi=212}", "ReceptionOfDevice": "@{Rssi=-51; Lqi=196}", "PendingZigbeeMessageMask": 0 }, { "id": 37856, "NodeId": 37856, "ProductType": "iTRV", "ProductIdentifier": "iTRV", "ActiveFirmwareVersion": "0201000000010012", "ModelIdentifier": "iTRV", "HardwareVersion": "0", "SerialNumber": "90FD9FFFFEAA4F85", "ProductModel": "iTRV", "OtaImageQueryCount": 0, "LastOtaImageQueryCount": 1, "ParentNodeId": 65534, "DeviceLockEnabled": false, "DisplayedSignalStrength": "VeryGood", "BatteryVoltage": 24, "BatteryLevel": "Critical", "ReceptionOfController": "@{Rssi=-57; Lqi=172}", "ReceptionOfDevice": "@{Rssi=-61; Lqi=156}", "PendingZigbeeMessageMask": 0 }, { "id": 55517, "NodeId": 55517, "ProductType": "iTRV", "ProductIdentifier": "iTRV", "ActiveFirmwareVersion": "0201000000010012", "ModelIdentifier": "iTRV", "HardwareVersion": "0", "SerialNumber": "90FD9FFFFEAA5E65", "ProductModel": "iTRV", "OtaImageQueryCount": 0, "LastOtaImageQueryCount": 1, "ParentNodeId": 65534, "DeviceLockEnabled": false, "DisplayedSignalStrength": "VeryGood", "BatteryVoltage": 27, "BatteryLevel": "OneThird", "ReceptionOfController": "@{Rssi=-58; Lqi=168}", "ReceptionOfDevice": "@{Rssi=-61; Lqi=156}", "PendingZigbeeMessageMask": 0 }, { "id": 36335, "NodeId": 36335, "ProductType": "iTRV", "ProductIdentifier": "iTRV", "ActiveFirmwareVersion": "0201000000010012", "ModelIdentifier": "iTRV", "HardwareVersion": "0", "SerialNumber": "90FD9FFFFEAA543B", "ProductModel": "iTRV", "OtaImageQueryCount": 0, "LastOtaImageQueryCount": 1, "ParentNodeId": 65534, "DeviceLockEnabled": false, "DisplayedSignalStrength": "VeryGood", "BatteryVoltage": 27, "BatteryLevel": "OneThird", "ReceptionOfController": "@{Rssi=-60; Lqi=160}", "ReceptionOfDevice": "@{Rssi=-65; Lqi=140}", "PendingZigbeeMessageMask": 0 } ], "UpgradeInfo": [ { "id": 8, "FirmwareFilename": "0A00000000010012FOTA.BIN" }, { "id": 7, "FirmwareFilename": "05E1000900000021FOTA.BIN" }, { "id": 6, "FirmwareFilename": "04E1000900010012FOTA.BIN" }, { "id": 5, "FirmwareFilename": "0441010100010005FOTA.BIN" }, { "id": 4, "FirmwareFilename": "0441000000010005FOTA.BIN" }, { "id": 3, "FirmwareFilename": "0401010100010005FOTA.BIN" }, { "id": 2, "FirmwareFilename": "0401000000010005FOTA.BIN" }, { "id": 1, "FirmwareFilename": "0201000000010012FOTA.BIN" } ], "SmartValve": [ { "id": 2931, "MountingOrientation": "Vertical", "SetPoint": 180, "MeasuredTemperature": 182, "PercentageDemand": 0, "WindowState": "Closed" }, { "id": 54096, "MountingOrientation": "Vertical", "SetPoint": 180, "MeasuredTemperature": 194, "PercentageDemand": 0, "WindowState": "Closed" }, { "id": 37856, "MountingOrientation": "Vertical", "SetPoint": 200, "MeasuredTemperature": 186, "PercentageDemand": 0, "WindowState": "Closed" }, { "id": 55517, "MountingOrientation": "Vertical", "SetPoint": 190, "MeasuredTemperature": 185, "PercentageDemand": 44, "WindowState": "Closed" }, { "id": 36335, "MountingOrientation": "Vertical", "SetPoint": 180, "MeasuredTemperature": 188, "PercentageDemand": 0, "WindowState": "Closed" } ], "RoomStat": [ { "id": 55767, "SetPoint": 180, "MeasuredTemperature": 201, "MeasuredHumidity": 57 } ], "DeviceCapabilityMatrix": { "Roomstat": true, "ITRV": true, "SmartPlug": true, "UFH": false, "UFHFloorTempSensor": false, "UFHDewSensor": false, "HACT": false, "LACT": false } }

asantaga commented 5 years ago

Yup thanks.will probably fix the code tonight

asantaga commented 5 years ago

@scousepi I think Ive fixed this, can you replace /sensor/wiser.py with this file https://raw.githubusercontent.com/asantaga/wiserHomeAssistantPlatform/FixNoHotWaterWiser/sensor/wiser.py and let me know if this quietens down the sensor?

scousepi commented 5 years ago

Thanks - I'll do that and get back to you...

scousepi commented 5 years ago

Sorry - getting this error message...

Error during setup of component wiser Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 148, in _async_setup_component component.setup, hass, processed_config) # type: ignore AttributeError: module 'custom_components.wiser' has no attribute 'setup'

asantaga commented 5 years ago

thats weird....

did u copy the file into the right place?

the file should have been copied into the custom_components/sensor/wiser.py , its the only file which needs to be copied....

On Wed, 9 Jan 2019 at 01:15, Dave Brooks notifications@github.com wrote:

Sorry - getting this error message...

Error during setup of component wiser Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 148, in _async_setup_component component.setup, hass, processed_config) # type: ignore AttributeError: module 'custom_components.wiser' has no attribute 'setup'

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/asantaga/wiserHomeAssistantPlatform/issues/8#issuecomment-452522424, or mute the thread https://github.com/notifications/unsubscribe-auth/ACzdQBKcbfmTA4dGRNQQ4MQuh5Z4osp5ks5vBUKVgaJpZM4ZQnpC .

--

Angelo

scousepi commented 5 years ago

Sorry - it was my mistake. I've corrected that and it's working again - I can see all the sensor temperatures and heating statuses. No error messages in the log so far - thanks for you work on this!

v966732 commented 5 years ago

I've updated the component as well and the hot water errors have stopped but all of the wiser sensors have disappeared. I have the climate. entries but there are now no sensors so I am unable to monitor battery or signal strength. There is nothing showing in the logs.

asantaga commented 5 years ago

Hi guys,

@scousepi : can i just confirm all is working for you? @v966732 : Sounds like somethings gone wrong in the sensor/wiser.py file.. Can u check that you've copied the right files into your custom components directory? What you could do is clone the entire branch into your custom_components directory issue cd custom_components git clone https://github.com/asantaga/wiserHomeAssistantPlatform/tree/FixNoHotWaterWiser This will clone everything into the custom_components directory overwriting anything which isnt quite right..

let me know how this goes

scousepi commented 5 years ago

Hi, It's all working for me. I can see sensors with battery voltage etc. for the TRVs on my system. Heathub status and climate data all looks good too. I do get this error every 5 minutes when all my rooms have sensors (as far as I know) "Room doesnt contain any smart valves, maybe an error/corruption??"

scousepi commented 5 years ago

Example sensor data

vendor: Drayton Wiser product_type: iTRV model_identifier: iTRV device_lock_enabled: false displayed_signal_strength: VeryGood firmware: 0201000000010012 device_reception_RSSI: -57 device_reception_LQI: 180 controller_reception_RSSI: -55 battery_voltage: 27 battery_level: OneThird serial_number: XXXX friendly_name: Wiser iTRV-Hallway icon: mdi:wifi-strength-4

v966732 commented 5 years ago

Hi guys,

@scousepi : can i just confirm all is working for you? @v966732 : Sounds like somethings gone wrong in the sensor/wiser.py file.. Can u check that you've copied the right files into your custom components directory? What you could do is clone the entire branch into your custom_components directory issue cd custom_components git clone https://github.com/asantaga/wiserHomeAssistantPlatform/tree/FixNoHotWaterWiser This will clone everything into the custom_components directory overwriting anything which isnt quite right..

let me know how this goes

I was unable to git clone that branch as it said it didn't exist!! not sure what it was failing on.

Anyway, I did find the issue with my install, it was my previous attempt to try and fix the hotwater error, I had commented out the hotwater elements in the WiserHub.py in the WiserAPI folder. ( I got distracted and forgot to roll back my changes).
The hotwater errors have now stopped and it all looks good, thank-you.

I've got another feature I'd like to see if possible Percentage Boiler Demand....I'll raise a new issue to track it.

asantaga commented 5 years ago

Issue fixed