Closed william-sy closed 3 years ago
Would this be helpfull to make it work for heating+boiler unit? I currently use a different modified python script to retrieve some settings but your work looks like it could be nice to get working and Im not that good at scripting.
{
"homieServer": "tcp://127.0.0.1:1883",
"homieUser": "",
"homiePassword": "",
"homieDeviceName": "daikin-heatingunit",
"daikinIP": "192.168.2.26",
"daikinPort": 80,
"properties": [
{
"path": "0/DateTime",
"groupName": "Adapter",
"name": "Adapter/DateTime",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "0/Error",
"groupName": "Adapter",
"name": "Adapter/Error",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "0/UnitProfile",
"groupName": "Adapter",
"name": "Adapter/UnitProfile",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "0/UnitStatus/ErrorState",
"groupName": "Adapter",
"name": "Adapter/UnitStatus/ErrorState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "1/ChildLock/LockedState",
"groupName": "SpaceHeating",
"name": "SpaceHeating/ChildLock/LockedState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "NEVER",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "1/ChildLock/PinCode",
"groupName": "SpaceHeating",
"name": "SpaceHeating/ChildLock/PinCode",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "NEVER",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "1/Consumption",
"groupName": "SpaceHeating",
"name": "SpaceHeating/Consumption",
"settable": false,
"retained": true,
"unit": "kWh",
"format": "",
"pollInterval": "BI_HOURLY",
"dataType": "STRING",
"postProcessing": "CONSUMPTION"
},
{
"path": "1/Error",
"groupName": "SpaceHeating",
"name": "SpaceHeating/Error",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/Holiday/EndDate",
"groupName": "SpaceHeating",
"name": "SpaceHeating/Holiday/EndDate",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "DAILY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/Holiday/HolidayState",
"groupName": "SpaceHeating",
"name": "SpaceHeating/Holiday/HolidayState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "DAILY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "1/Holiday/StartDate",
"groupName": "SpaceHeating",
"name": "SpaceHeating/Holiday/StartDate",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "DAILY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/Operation/LeavingWaterTemperatureOffsetHeating",
"groupName": "SpaceHeating",
"name": "SpaceHeating/Operation/LeavingWaterTemperatureOffsetHeating",
"settable": false,
"retained": true,
"unit": "°C",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "FLOAT",
"postProcessing": "NONE"
},
{
"path": "1/Operation/OperationMode",
"groupName": "SpaceHeating",
"name": "SpaceHeating/Operation/OperationMode",
"settable": false,
"retained": true,
"unit": "",
"format": "heating",
"pollInterval": "MINUTELY",
"dataType": "ENUM",
"postProcessing": "NONE"
},
{
"path": "1/Operation/Power",
"groupName": "SpaceHeating",
"name": "SpaceHeating/Operation/Power",
"settable": false,
"retained": true,
"unit": "",
"format": "on,standby",
"pollInterval": "MINUTELY",
"dataType": "ENUM",
"postProcessing": "NONE"
},
{
"path": "1/Sensor/LeavingWaterTemperatureCurrent",
"groupName": "SpaceHeating",
"name": "SpaceHeating/Sensor/LeavingWaterTemperatureCurrent",
"settable": false,
"retained": true,
"unit": "°C",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "FLOAT",
"postProcessing": "NONE"
},
{
"path": "1/Sensor/OutdoorTemperature",
"groupName": "SpaceHeating",
"name": "SpaceHeating/Sensor/OutdoorTemperature",
"settable": false,
"retained": true,
"unit": "°C",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "FLOAT",
"postProcessing": "NONE"
},
{
"path": "1/UnitIdentifier/Icon",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitIdentifier/Icon",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "1/UnitIdentifier/Name",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitIdentifier/Name",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/UnitInfo/ModelNumber",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitInfo/ModelNumber",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/UnitInfo/UnitType",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitInfo/UnitType",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "1/UnitInfo/Version/IndoorSettings",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitInfo/Version/IndoorSettings",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/UnitInfo/Version/IndoorSoftware",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitInfo/Version/IndoorSoftware",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/UnitInfo/Version/OutdoorSoftware",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitInfo/Version/OutdoorSoftware",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/UnitInfo/Version/RemoconSettings",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitInfo/Version/RemoconSettings",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/UnitInfo/Version/RemoconSoftware",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitInfo/Version/RemoconSoftware",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/UnitProfile",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitProfile",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/UnitStatus/ActiveState",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitStatus/ActiveState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "1/UnitStatus/ControlModeState",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitStatus/ControlModeState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "1/UnitStatus/EmergencyState",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitStatus/EmergencyState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "1/UnitStatus/ErrorState",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitStatus/ErrorState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "1/UnitStatus/InstallerState",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitStatus/InstallerState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "1/UnitStatus/WarningState",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitStatus/WarningState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "1/UnitStatus/WeatherDependentState",
"groupName": "SpaceHeating",
"name": "SpaceHeating/UnitStatus/WeatherDependentState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/ChildLock/LockedState",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/ChildLock/LockedState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "NEVER",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/ChildLock/PinCode",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/ChildLock/PinCode",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "NEVER",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/Consumption",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Consumption",
"settable": false,
"retained": true,
"unit": "kWh",
"format": "",
"pollInterval": "BI_HOURLY",
"dataType": "STRING",
"postProcessing": "CONSUMPTION"
},
{
"path": "2/Error",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Error",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/Holiday/EndDate",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Holiday/EndDate",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "DAILY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/Holiday/HolidayState",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Holiday/HolidayState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "DAILY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/Holiday/StartDate",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Holiday/StartDate",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "DAILY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/Operation/DomesticHotWaterTemperatureHeating",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Operation/DomesticHotWaterTemperatureHeating",
"settable": false,
"retained": true,
"unit": "°C",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "FLOAT",
"postProcessing": "NONE"
},
{
"path": "2/Operation/OperationMode",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Operation/OperationMode",
"settable": false,
"retained": true,
"unit": "",
"format": "heating",
"pollInterval": "MINUTELY",
"dataType": "ENUM",
"postProcessing": "NONE"
},
{
"path": "2/Operation/Power",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Operation/Power",
"settable": false,
"retained": true,
"unit": "",
"format": "on,standby",
"pollInterval": "MINUTELY",
"dataType": "ENUM",
"postProcessing": "NONE"
},
{
"path": "2/Operation/Powerful",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Operation/Powerful",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/Operation/TargetTemperature",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Operation/TargetTemperature",
"settable": false,
"retained": true,
"unit": "°C",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "FLOAT",
"postProcessing": "NONE"
},
{
"path": "2/Schedule/Active",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Schedule/Active",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "HOURLY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/Schedule/List/Heating",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Schedule/List/Heating",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "DAILY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/Schedule/Next",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Schedule/Next",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "HOURLY",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/Sensor/TankTemperature",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/Sensor/TankTemperature",
"settable": false,
"retained": true,
"unit": "°C",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "FLOAT",
"postProcessing": "NONE"
},
{
"path": "2/UnitIdentifier/Icon",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitIdentifier/Icon",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/UnitIdentifier/Name",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitIdentifier/Name",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/UnitInfo/ModelNumber",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitInfo/ModelNumber",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/UnitInfo/UnitType",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitInfo/UnitType",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/UnitInfo/Version/IndoorSettings",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitInfo/Version/IndoorSettings",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/UnitInfo/Version/IndoorSoftware",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitInfo/Version/IndoorSoftware",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/UnitInfo/Version/OutdoorSoftware",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitInfo/Version/OutdoorSoftware",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/UnitInfo/Version/RemoconSettings",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitInfo/Version/RemoconSettings",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/UnitInfo/Version/RemoconSoftware",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitInfo/Version/RemoconSoftware",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/UnitProfile",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitProfile",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "ONCE",
"dataType": "STRING",
"postProcessing": "NONE"
},
{
"path": "2/UnitStatus/ActiveState",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitStatus/ActiveState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/UnitStatus/EmergencyState",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitStatus/EmergencyState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/UnitStatus/ErrorState",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitStatus/ErrorState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/UnitStatus/InstallerState",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitStatus/InstallerState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/UnitStatus/ReheatState",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitStatus/ReheatState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/UnitStatus/TargetTemperatureOverruledState",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitStatus/TargetTemperatureOverruledState",
"settable": false,
"retained": true,
"unit": "°C",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/UnitStatus/WarningState",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitStatus/WarningState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
},
{
"path": "2/UnitStatus/WeatherDependentState",
"groupName": "DomesticHotWaterTank",
"name": "DomesticHotWaterTank/UnitStatus/WeatherDependentState",
"settable": false,
"retained": true,
"unit": "",
"format": "",
"pollInterval": "MINUTELY",
"dataType": "INTEGER",
"postProcessing": "NONE"
}
],
"influxTable": "Daikin",
"influxQFN": "OpenHab.daikin.Heating"
}
python3 ./main.py -f ./files/config.ini -d
###################################################################################################
# Data last refreshed at:
2021-09-01 17:10
###################################################################################################
###################################################################################################
# Device and Software info:
###################################################################################################
Errors: None, Error State: 0, Installer State: 0, Warning State: 0 , Emergency State: 0
Device Function: function/SpaceHeating
Brand: Daikin Model: BRP069A62 Type: HVAC controller
Controller firmware: 17003908, Controller software: 436CC148000 Controller SerialNR: 204800423
HP indoor software: ID7402, HP outdoor software: IDE7C4, HP modelnumber: EHVH08S23DJ6V
HP unit indoor eprom: AS1707450-42, HP unit user eprom: --
###################################################################################################
# Heating and temperature info (thermostat):
###################################################################################################
User wanted different temperature than schedule: None
Note: over ruledstate might be broken since last firmware.
User given name to setup: $NULL, Sytem is set up to be: None
# At time of last recording:
System leaving water temperature: 29, wanted temperature: None
Indoor temperature: None, outdoor temperature: 20
The system was/is: standby, And operation mode is: heating
# Child lock:
Child lock state is currently: 0, With pincode 1234
# Holiday status:
Holiday state to start at: 2021-07-12, end at 2021-07-20, and is currently: 0
Note, This can be in the past
# Schedule Info:
Current active schedule: None, Next Schedule change at: None, To temperature: None, Day: None (array?)
# Schedules:
Traceback (most recent call last):
File "./main.py", line 148, in <module>
main()
File "./main.py", line 128, in main
DHP.showHPDetails(daikinIP, daikinDataBase, daikinUrlError, daikinUrlBase, daikingUrlDisc, daikinDevices)
File "/opt/src/Daikin-BRP069A62/DOHPC/showHP.py", line 66, in showHPDetails
S0 = ConvertPipe(row[rowNumberSchedule])
File "/opt/src/Daikin-BRP069A62/DOHPC/showHP.py", line 2, in ConvertPipe
li = list(string.split("|"))
AttributeError: 'NoneType' object has no attribute 'split'
An example of what I currently pull
/usr/bin/python3 /opt/scripts/altherma.py
Model: BRP069A62
Tank State: on
Heat State: standby
Tank State: On
Heat State: Off
Target: 59.0
Heat Power: {"Electrical":{"Heating":{"D":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null],"W":[0,0,0,0,0,0,0,0,0,null,null,null,null,null],"M":[null,null,null,null,null,null,null,48,2,21,130,241,223,96,44,5,0,0,0,0,null,null,null,null]}}}
Tank Power: {"Electrical":{"Heating":{"D":[0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,null,null,null],"W":[2,1,1,1,1,2,0,1,1,null,null,null,null,null],"M":[null,null,null,null,null,null,null,0,35,112,213,112,114,27,31,30,29,48,92,57,null,null,null,null]}}}
Profile0: {"SyncStatus":"reboot","UnitStatus":["ErrorState"],"DateTime":{"DateTimeAdjustable":false}}
Profile1: {"SyncStatus":"reboot","Sensor":["OutdoorTemperature","LeavingWaterTemperatureCurrent"],"UnitStatus":["ErrorState","InstallerState","WarningState","EmergencyState","TargetTemperatureOverruledState"],"Operation":{"Power":["on","standby"],"OperationMode":["heating"],"LeavingWaterTemperatureOffsetHeating":{"maxValue":10,"minValue":-10,"stepValue":1,"settable":true}},"Schedule":{},"Consumption":{"Electrical":{"unit":"kWh","Heating":{"Daily":{"contentCount":24,"resolution":2},"Weekly":{"contentCount":14,"resolution":1},"Monthly":{"contentCount":24,"resolution":1}}}}}
Profile2: {"SyncStatus":"reboot","Sensor":["TankTemperature"],"UnitStatus":["ErrorState","InstallerState","WeatherDependentState","WarningState","EmergencyState","TargetTemperatureOverruledState"],"Operation":{"Power":["on","standby"],"OperationMode":["heating"],"TargetTemperature":{"heating":{}},"DomesticHotWaterTemperatureHeating":{"maxValue":60.0000000000000000,"minValue":30.0000000000000000,"stepValue":1.0000000000000000,"settable":false},"powerful":["0","1"]},"Schedule":{"Base":"action","defaultScheduleAvailable":"false","NameAdjustable":"false","List":{"heating":[{"StartTime":{"stepValue":10.0000000000000000,"unit":"minute"},"TargetTemperature":{"heating":{"maxValue":60.0000000000000000,"minValue":30.0000000000000000,"stepValue":1.0000000000000000}},"Actions":["StartTime","TargetTemperature"],"maxActionsAllowed":4},["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]]}},"Consumption":{"Electrical":{"unit":"kWh","Heating":{"Daily":{"contentCount":24,"resolution":2},"Weekly":{"contentCount":14,"resolution":1},"Monthly":{"contentCount":24,"resolution":1}}}}}
Test: {"version":"v1.2.3"}
Yes, please would love Boiler support so I could throw away my old python-script running in AppDeamon. Need testers? I'm in!
A dedicated or at least more adapted Home Assistant integeration would be nice to and add it to HACS! :)
I would love to be able to see what’s going on in the heat pump as well as measuring the electricity and get the data in Home assistant. Unfortunately I can’t contribute as I am just a user.
Thanks,
Jos
From: Spitfire69 @.> Date: Wednesday, 15 September 2021 at 09:21 To: william-sy/Daikin-BRP069A62 @.> Cc: Subscribed @.***> Subject: Re: [william-sy/Daikin-BRP069A62] OOPing/improvements (#6)
Yes, please would love Boiler support so I could throw away my old python-script running in AppDeamon.
A dedicated or at least more Home Assistant integeration would be nice to and add it to HACS! :)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/william-sy/Daikin-BRP069A62/issues/6#issuecomment-919805395, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGL2HVHRAH2HPS6MGHQ3KE3UCBJPRANCNFSM45GMW4YQ.
Hi All,
Thank you for the JSON! Its valid and seems to contain all the data I need :)
"groupName": "DomesticHotWaterTank",
Seems to contain all the data for the tank. Ill see if I can get a auto detect on it.
@Trouble-51 Energy usage (the last time I checked) seems only to be available over the P1/p1 protocol to the Actual wall mounted thermostat.
There is a serial port on the heatpump but for now lets not go there :)
@toast1234
Can you get me a
/[0]/MNAE/2/UnitProfile/la
That should be one for the boiler
Number 1:
/[0]/MNAE/1/UnitProfile/la
Should give something like this: (perhaps good to double check if you have different options :) ?
{
"m2m:rsp": {
"rsc": 2000,
"rqi": "yjvlk",
"to": "/S",
"fr": "/[0]/MNAE/1/UnitProfile/la",
"pc": {
"m2m:cin": {
"rn": "00000002",
"ri": "0006_00000002",
"pi": "0006",
"ty": 4,
"ct": "20211009T151455Z",
"lt": "20211009T151455Z",
"st": 2,
"con": "{\"SyncStatus\":\"registration\",\"Sensor\":[\"IndoorTemperature\",\"OutdoorTemperature\",\"LeavingWaterTemperatureCurrent\"],\"UnitStatus\":[\"ErrorState\",\"InstallerState\",\"WarningState\",\"EmergencyState\",\"TargetTemperatureOverruledState\"],\"Operation\":{\"Power\":[\"on\",\"standby\"],\"OperationMode\":[\"heating\"],\"TargetTemperature\":{\"heating\":{\"maxValue\":30.0000000000000000,\"minValue\":12.0000000000000000,\"stepValue\":1.0000000000000000}},\"RoomTemperatureHeating\":{\"maxValue\":30.0000000000000000,\"minValue\":12.0000000000000000,\"stepValue\":1.0000000000000000,\"settable\":true},\"LeavingWaterTemperatureOffsetHeating\":{\"maxValue\":10,\"minValue\":-10,\"stepValue\":1,\"settable\":true}},\"Schedule\":{\"Base\":\"action\",\"defaultScheduleAvailable\":\"true\",\"NameAdjustable\":\"false\",\"List\":{\"heating\":[{\"StartTime\":{\"stepValue\":10.0000000000000000,\"unit\":\"minutes\"},\"TargetTemperature\":{\"heating\":{\"maxValue\":30.0000000000000000,\"minValue\":12.0000000000000000,\"stepValue\":1}},\"Actions\":[\"StartTime\",\"TargetTemperature\"],\"maxActionsAllowed\":6},[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"],[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"],[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"],[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"],[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"],[\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\",\"sunday\"],[]]}}}"
}
}
}
}
I don’t know if this will help you with the commands for the boiler but here is my script to read tank temperature, turn on the heater and turn on powerful mode. Note, part of it is also to set/read sensors directly in HA which might mess up understanding parts of it.
from websocket import create_connection
import json, datetime, time, urllib
import appdaemon.plugins.hass.hassapi as hass
class Daikin(hass.Hass):
def initialize(self):
time = datetime.time(0,0,0)
self.run_minutely(self.get_hotwater_temp, time)
self.run_minutely(self.get_powerful_hotwater_operation, time)
self.listen_state(self.set_powerful_hotwater_operation, "input_boolean.varmvatten_kraftfull")
self.run_minutely(self.get_hotwater_power, time)
self.listen_state(self.set_hotwater_power, "input_boolean.varmvatten_power")
def setValue(self, ws, item, value):
ws.send("{\"m2m:rqp\":{\"op\":1,\"to\":\"/[0]/MNAE/"+item+"\",\"fr\":\"/OpenHab\",\"rqi\":\""+"xyz"+"\",\"ty\":4,\"pc\":{\"m2m:cin\":{\"con\":"+value+",\"cnf\":\"text/plain:0\"}}}}")
result1 = json.loads(ws.recv())
print("Response was: %s" % result1)
value = result1["m2m:rsp"]["rsc"]
if (value==2001):
print("Success")
return value
def get_hotwater_temp(self, kwargs):
#replace with local LAN adapter IP
ws = create_connection("ws://192.168.1.148/mca")
# websocket command to read value
ws.send("{\"m2m:rqp\":{\"op\":2,\"to\":\"/[0]/MNAE/2/Sensor/TankTemperature/la\",\"fr\":\"/TarmoTest\",\"rqi\":\"xijub\"}}")
result1 = json.loads(ws.recv())
tankTemperature = result1["m2m:rsp"]["pc"]["m2m:cin"]["con"]
#self.log(tankTemperature)
self.set_state("sensor.varmvatten_temp", state = tankTemperature, attributes = {"friendly_name": "Varmvattentemperatur", "device_class": "temperature", "unit_of_measurement": "°C"})
ws.close()
def get_powerful_hotwater_operation(self, kwargs):
#replace with local LAN adapter IP
ws = create_connection("ws://192.168.1.148/mca")
# websocket command to read value
ws.send("{\"m2m:rqp\":{\"op\":2,\"to\":\"/[0]/MNAE/2/Operation/Powerful/la\",\"fr\":\"/TarmoTest\",\"rqi\":\"xijub\"}}")
result1 = json.loads(ws.recv())
hotWaterMode = result1["m2m:rsp"]["pc"]["m2m:cin"]["con"]
if (hotWaterMode == 1):
hwfmode = 'on'
else:
hwfmode = 'off'
self.log("Get Powerful Mode = " + hwfmode)
self.set_state("input_boolean.varmvatten_kraftfull", state = hwfmode, attributes = {"friendly_name": "Varmvatten Kraftfull", "icon": "mdi:fire"})
ws.close()
def set_powerful_hotwater_operation(self, entity, attribute, old, new, kwargs):
ws = create_connection("ws://192.168.1.148/mca")
mode = self.get_state("input_boolean.varmvatten_kraftfull")
if (mode == 'on'):
hwfmode = 1
else:
hwfmode = 0
self.log("Set Powerful Mode = " + str(hwfmode))
self.setValue(ws, "2/Operation/Powerful", str(hwfmode))
ws.close()
def get_hotwater_power(self, kwargs):
#replace with local LAN adapter IP
ws = create_connection("ws://192.168.1.148/mca")
# websocket command to read value
ws.send("{\"m2m:rqp\":{\"op\":2,\"to\":\"/[0]/MNAE/2/Operation/Power/la\",\"fr\":\"/TarmoTest\",\"rqi\":\"xijub\"}}")
result1 = json.loads(ws.recv())
hwmode = result1["m2m:rsp"]["pc"]["m2m:cin"]["con"]
if (hwmode == 'standby'):
hwmode = 'off'
self.log("Get Power Mode = " + hwmode)
self.set_state("input_boolean.varmvatten_power", state = hwmode, attributes = {"friendly_name": "Varmvatten Power", "icon": "mdi:power"})
ws.close()
def set_hotwater_power(self, entity, attribute, old, new, kwargs):
ws = create_connection("ws://192.168.1.148/mca")
hwmode = self.get_state("input_boolean.varmvatten_power")
self.log("Set Power Mode = " + hwmode)
if (hwmode == 'off'):
hwmode = "\"standby\""
else:
hwmode = "\"on\""
self.setValue(ws, "2/Operation/Power", hwmode)
ws.close()
If some one can just run this:
It is super ugly but you can see what I did there :) it is the same as the app, If you have more devices, you need to copy and paste some more!
After this I might get back here for more info
from websocket import create_connection
import json, datetime, time, string, random
import locale, calendar
locale.setlocale(locale.LC_ALL, '')
# Define a random string to send to the device
def randomString(stringLength=5):
"""Generate a random string of fixed length """
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(stringLength))
ip = "192.168.2.130"
ws = create_connection("ws://"+ip+"/mca")
# Lets init by scanning the ammount of connected devices.
response = 0
num = 0
devices = 0
while response == 0 or response == 2000:
# Build the JSON
request = {
"m2m:rqp": {
"op": 2,
"to": f"/[0]/MNAE/{num}",
"fr": "dohpc",
"rqi": randomString()
}
}
# Send the json
ws.send(json.dumps(request))
# Load the response in json
recieved = json.loads(ws.recv())
# See if we got a OK as response.
response = recieved["m2m:rsp"]["rsc"]
if response == 2000:
num = num + 1
elif response == 4004:
num = num - 1
# Discover functions:
while devices <= num:
print("-----")
# Build the JSON
request = {
"m2m:rqp": {
"op": 2,
"to": f"/[0]/MNAE/{devices}/UnitProfile/la",
"fr": "dohpc",
"rqi": randomString()
}
}
# Send the json
ws.send(json.dumps(request))
# Load the response in json
recieved = json.loads(ws.recv())
# See if we got a OK as response.
response = recieved["m2m:rsp"]["rsc"]
if response == 2000:
devices = devices + 1
functions = recieved["m2m:rsp"]["pc"]["m2m:cin"]["con"]
operations = json.loads(functions)
for k, v in operations.items():
if k == "Sensor":
print(F"Found sensors: {v}")
elif k == "UnitStatus":
print(F"Found status options: {v}")
elif k == "Operation":
print(F"Found operations: {v}")
should give you:
❯ python3 ./docs/files/scripts-old/discovery.py
-----
Found status options: ['ErrorState']
-----
Found sensors: ['IndoorTemperature', 'OutdoorTemperature', 'LeavingWaterTemperatureCurrent']
Found status options: ['ErrorState', 'InstallerState', 'WarningState', 'EmergencyState', 'TargetTemperatureOverruledState']
Found operations: {'Power': ['on', 'standby'], 'OperationMode': ['heating'], 'TargetTemperature': {'heating': {'maxValue': 30.0, 'minValue': 12.0, 'stepValue': 1.0}}, 'RoomTemperatureHeating': {'maxValue': 30.0, 'minValue': 12.0, 'stepValue': 1.0, 'settable': True}, 'LeavingWaterTemperatureOffsetHeating': {'maxValue': 10, 'minValue': -10, 'stepValue': 1, 'settable': True}}```bash
If you have a boiler it should give you one more,, let me know :) So i can play around some more with the auto discovery like the app does.
@Trouble-51 @Spitfire69 @toast1234
Please in branch v1.2-work
run python3 ./main-new.py
It should return 2 JSON blobs with information from UnitProfile
Its far from complete, it is almost a complete rewrite at this point in time :)
{"SyncStatus":"update","Sensor":["OutdoorTemperature","LeavingWaterTemperatureCurrent"],"UnitStatus":["ErrorState","InstallerState","WarningState","EmergencyState","TargetTemperatureOverruledState"],"Operation":{"Power":["on","standby"],"OperationMode":["heating"],"LeavingWaterTemperatureOffsetHeating":{"maxValue":10,"minValue":-10,"stepValue":1,"settable":true}},"Schedule":{},"Consumption":{"Electrical":{"unit":"kWh","Heating":{"Daily":{"contentCount":24,"resolution":2},"Weekly":{"contentCount":14,"resolution":1},"Monthly":{"contentCount":24,"resolution":1}}}}}
{"SyncStatus":"reboot","Sensor":["TankTemperature"],"UnitStatus":["ErrorState","InstallerState","WeatherDependentState","WarningState","EmergencyState","TargetTemperatureOverruledState"],"Operation":{"Power":["on","standby"],"OperationMode":["heating"],"TargetTemperature":{"heating":{}},"DomesticHotWaterTemperatureHeating":{"maxValue":60.0000000000000000,"minValue":30.0000000000000000,"stepValue":1.0000000000000000,"settable":false},"powerful":["0","1"]},"Schedule":{"Base":"action","defaultScheduleAvailable":"false","NameAdjustable":"false","List":{"heating":[{"StartTime":{"stepValue":10.0000000000000000,"unit":"minute"},"TargetTemperature":{"heating":{"maxValue":60.0000000000000000,"minValue":30.0000000000000000,"stepValue":1.0000000000000000}},"Actions":["StartTime","TargetTemperature"],"maxActionsAllowed":4},["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]]}},"Consumption":{"Electrical":{"unit":"kWh","Heating":{"Daily":{"contentCount":24,"resolution":2},"Weekly":{"contentCount":14,"resolution":1},"Monthly":{"contentCount":24,"resolution":1}}}}}```
Unfortunately I was not able to test it on my RPI4, for some reason the web based ssh terminal seems to have stoped working and I do not have any other way to test it for the moment.
update: used a standalone terminal but it seems like I miss something…
Traceback (most recent call last):
File "/config/custom_components/daikin/./main-new.py", line 1, in
@toast1234 Thanks! great help!
@Spitfire69 Yes, there are some dependencies you would need to install
python3 -m pip install websocket
fox example. I will have to update the requirements file when this is done
Hi @toast1234,
I have made a update, to the branch. In theory if you run it again you should get your kWh usage printed.
Also there should be a DomesticHotWaterTemperatureHeating
value in the dohpc.yml
for you as it should dynamically update that file.
Let me know!
If any one is interested you can fond me here to chat:
https://discord.gg/rpsqrFjh
The main, Now supports more features, Have a look in the file itself.
if __name__ == "__main__":
daikin_heat_pump = dohpc("./files/dohpc.yml")
#print(daikin_heat_pump.TankTemperature)
Setting temperatures and other settable settings are still WIP. Then adding back things like MQTT, and other cool plans
This is how it went for me:
# python3 --version
Python 3.7.3
# uname -a
Linux v-linux01 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux
I don't use mqtt
Something is not right with how variable ip_address is used. I have to replace it with actual address
# python3 ./main-new.py
Traceback (most recent call last):
File "./main-new.py", line 360, in <module>
daikin_heat_pump = dohpc("./files/dohpc.yml")
File "./main-new.py", line 47, in __init__
self.ws = create_connection("ws://"+ip_address+"/mca")
File "/usr/local/lib/python3.7/dist-packages/websocket/_core.py", line 595, in create_connection
websock.connect(url, **options)
File "/usr/local/lib/python3.7/dist-packages/websocket/_core.py", line 249, in connect
options.pop('socket', None))
File "/usr/local/lib/python3.7/dist-packages/websocket/_http.py", line 102, in connect
hostname, port, resource, is_secure = parse_url(url)
File "/usr/local/lib/python3.7/dist-packages/websocket/_url.py", line 54, in parse_url
raise ValueError("hostname is invalid")
ValueError: hostname is invalid
# python3 ./main-new.py
Traceback (most recent call last):
File "./main-new.py", line 360, in <module>
daikin_heat_pump = dohpc("./files/dohpc.yml")
File "./main-new.py", line 54, in __init__
self._update_data()
File "./main-new.py", line 262, in _update_data
self._write_device_to_yaml(key, "ScheduleData", scheduleRetunData["data"])
TypeError: 'int' object is not subscriptable
I have a schedule for tank but not heating.
Some data gets updated.
basics:
database: ./files/daikin.db
debug: false
scan_dev: true
search_ip: true
external_devices:
- name: bedroom
sensors:
- rad_in
- rad_out
- rad_offside
- room
lan_adapter:
boiler: false
ip: 192.168.2.130
serial_nr: 175000236
mqtt:
broker: 127.0.0.1
data_timeout: 6
exit_file: /home/user/exitmqtt
temp_timeout: 300
p1_p2_devices:
0:
DeviceTime: 20210830T235455Z
c_firmware: '17003908'
c_serialnr: '204800423'
c_software: 436CC148000
duty: HVAC controller
found: true
h_version: ''
manufacturer: Daikin
model: BRP069A62
1:
OperationData:
LeavingWaterTemperatureOffsetHeating: 0.0
OperationMode: heating
Power: standby
ScheduleData:
Day: 4
OperationMode: Heating
StartTime: 2100
TargetTemperature: 180
Sensor:
- IndoorTemperature
- OutdoorTemperature
- LeavingWaterTemperatureCurrent
childLockData:
ChildLockPin: '1234'
ChildLockState: 0
consumption:
Electrical:
Heating:
Daily:
contentCount: 24
resolution: 2
Monthly:
contentCount: 24
resolution: 1
Weekly:
contentCount: 14
resolution: 1
unit: kWh
found: true
name: $NULL
operation:
LeavingWaterTemperatureOffsetHeating:
maxValue: 10
minValue: -10
settable: true
stepValue: 1
OperationMode:
- heating
Power:
- 'on'
- standby
schedule: {}
sensor:
- OutdoorTemperature
- LeavingWaterTemperatureCurrent
sensorData:
LeavingWaterTemperatureCurrent: 30.0
OutdoorTemperature: 13.0
unitholidayend: '2021-07-20'
unitholidaystart: '2021-07-12'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
unitstatusData:
EmergencyState: 0
ErrorState: 0
InstallerState: 0
TargetTemperatureOverruledState: 0
WarningState: 0
2:
consumption:
Electrical:
Heating:
Daily:
contentCount: 24
resolution: 2
Monthly:
contentCount: 24
resolution: 1
Weekly:
contentCount: 14
resolution: 1
unit: kWh
found: true
name: ''
operation:
DomesticHotWaterTemperatureHeating:
maxValue: 60.0
minValue: 30.0
settable: false
stepValue: 1.0
OperationMode:
- heating
Power:
- 'on'
- standby
TargetTemperature:
heating: {}
powerful:
- '0'
- '1'
schedule:
Base: action
List:
heating:
- Actions:
- StartTime
- TargetTemperature
StartTime:
stepValue: 10.0
unit: minute
TargetTemperature:
heating:
maxValue: 60.0
minValue: 30.0
stepValue: 1.0
maxActionsAllowed: 4
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
NameAdjustable: 'false'
defaultScheduleAvailable: 'false'
sensor:
- TankTemperature
unitholidayend: '2021-07-20'
unitholidaystart: '2021-07-12'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WeatherDependentState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
3:
found: false
name: ''
4:
found: false
name:
Interesting, I did seem to have worked for you,
You do have
scan_dev: true
search_ip: true
So It should go and search your LAN for the device. I do spot
serial_nr: 175000236
Which is the same as my LAN adapter, so you might have a problem there that you are trying to find mine instead of yours.
So you either set the ip (search_ip: false
) in the yaml, or the serial number (search_ip: true
)
On to ScheduleData
That was a gamble on my part, I was expecting it to break at the child lock, but here we are.
if you could add a print(self.response)
on line 251 and a #
infront of 253 that would be awesome.
Let me know if the serial number change helped, and what the print tells.
@toast1234
I also spot
schedule: {}
in the results you gave, So it might be that the ScheduleData
just wont work, which is fine, just need to adapt a little
# Child Lock data
# Might give error.
c_data = {}
childlockStateData = f"MNAE/{key}/ChildLock/LockedState/la"
self._get_value(childlockStateData, self.commonReturnPath)
c_data['ChildLockState'] = self.response
print(self.response)
childlockPinData = f"MNAE/{key}/ChildLock/PinCode/la"
self._get_value(childlockPinData, self.commonReturnPath)
c_data['ChildLockPin'] = self.response
self._write_device_to_yaml(key, "childLockData", c_data)
# Schedules these are subject to change refresh is often needed:
scheduleData = f"MNAE/{key}/Schedule/Next/la"
self._get_value(scheduleData, self.commonReturnPath)
scheduleRetunData = json.loads(self.response)
print(self.response)
# self._write_device_to_yaml(key, "ScheduleData", scheduleRetunData["data"])
root@v-linux01:/opt/Daikin-BRP069A62# python3 ./main-new.py
0
1234
{"Electrical":{"Heating":{"D":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null,null,null,null,null,null],"W":[0,0,0,0,0,0,0,0,0,0,0,0,null,null],"M":[null,null,null,null,null,null,null,48,2,21,130,241,223,96,44,5,0,0,0,0,0,0,null,null]}}}
0
{"data":{"OperationMode":"Heating","StartTime":1600,"TargetTemperature":1,"Day":5}}
{"Electrical":{"Heating":{"D":[0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,null,null,null,null,null,null,null,null],"W":[1,1,1,2,1,1,1,1,3,1,1,1,null,null],"M":[null,null,null,null,null,null,null,0,35,112,213,112,114,27,31,30,29,48,92,57,38,18,null,null]}}}
root@v-linux01:/opt/Daikin-BRP069A62# cat files/dohpc.yml
basics:
database: ./files/daikin.db
debug: false
scan_dev: true
search_ip: false
external_devices:
- name: bedroom
sensors:
- rad_in
- rad_out
- rad_offside
- room
lan_adapter:
boiler: false
ip: 192.168.2.26
serial_nr: 204800423
mqtt:
broker: 127.0.0.1
data_timeout: 6
exit_file: /home/user/exitmqtt
temp_timeout: 300
p1_p2_devices:
0:
DeviceTime: 20210830T235455Z
c_firmware: '17003908'
c_serialnr: '204800423'
c_software: 436CC148000
duty: HVAC controller
found: true
h_version: ''
manufacturer: Daikin
model: BRP069A62
1:
OperationData:
LeavingWaterTemperatureOffsetHeating: 0.0
OperationMode: heating
Power: standby
ScheduleData:
Day: 4
OperationMode: Heating
StartTime: 2100
TargetTemperature: 180
Sensor:
- IndoorTemperature
- OutdoorTemperature
- LeavingWaterTemperatureCurrent
childLockData:
ChildLockPin: '1234'
ChildLockState: 0
consumption:
Electrical:
Heating:
Daily:
contentCount: 24
resolution: 2
Monthly:
contentCount: 24
resolution: 1
Weekly:
contentCount: 14
resolution: 1
unit: kWh
consumptionData: '{"Electrical":{"Heating":{"D":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null,null,null,null,null,null],"W":[0,0,0,0,0,0,0,0,0,0,0,0,null,null],"M":[null,null,null,null,null,null,null,48,2,21,130,241,223,96,44,5,0,0,0,0,0,0,null,null]}}}'
found: true
name: $NULL
operation:
LeavingWaterTemperatureOffsetHeating:
maxValue: 10
minValue: -10
settable: true
stepValue: 1
OperationMode:
- heating
Power:
- 'on'
- standby
schedule: {}
sensor:
- OutdoorTemperature
- LeavingWaterTemperatureCurrent
sensorData:
LeavingWaterTemperatureCurrent: 32.0
OutdoorTemperature: 11.0
unitholidayend: '2021-07-20'
unitholidaystart: '2021-07-12'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
unitstatusData:
EmergencyState: 0
ErrorState: 0
InstallerState: 0
TargetTemperatureOverruledState: 0
WarningState: 0
2:
OperationData:
DomesticHotWaterTemperatureHeating: 47.0
OperationMode: heating
Power: 'on'
TargetTemperature: 47.0
powerful: 47.0
childLockData:
ChildLockPin: '1234'
ChildLockState: 0
consumption:
Electrical:
Heating:
Daily:
contentCount: 24
resolution: 2
Monthly:
contentCount: 24
resolution: 1
Weekly:
contentCount: 14
resolution: 1
unit: kWh
consumptionData: '{"Electrical":{"Heating":{"D":[0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,null,null,null,null,null,null,null,null],"W":[1,1,1,2,1,1,1,1,3,1,1,1,null,null],"M":[null,null,null,null,null,null,null,0,35,112,213,112,114,27,31,30,29,48,92,57,38,18,null,null]}}}'
found: true
name: $NULL
operation:
DomesticHotWaterTemperatureHeating:
maxValue: 60.0
minValue: 30.0
settable: false
stepValue: 1.0
OperationMode:
- heating
Power:
- 'on'
- standby
TargetTemperature:
heating: {}
powerful:
- '0'
- '1'
schedule:
Base: action
List:
heating:
- Actions:
- StartTime
- TargetTemperature
StartTime:
stepValue: 10.0
unit: minute
TargetTemperature:
heating:
maxValue: 60.0
minValue: 30.0
stepValue: 1.0
maxActionsAllowed: 4
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
NameAdjustable: 'false'
defaultScheduleAvailable: 'false'
sensor:
- TankTemperature
sensorData:
TankTemperature: 54.0
unitholidayend: '2021-07-20'
unitholidaystart: '2021-07-12'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WeatherDependentState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
unitstatusData:
EmergencyState: 0
ErrorState: 0
InstallerState: 0
TargetTemperatureOverruledState: 0
WarningState: 0
WeatherDependentState: 0
3:
found: false
name: ''
4:
found: false
name: ''¨
@toast1234 Awesome!
Thank you very much, for your testing and time!
I have hopefully fixed that bug with the assumption your lan adapter always gives us a empty dict {}
Also fixed a bug for when you start with a fresh yml file :)
Let me know how it goes! once all the reading is working we can move onto writing data
root@v-linux01:/opt/Daikin-BRP069A62# python3 ./main-new.py
root@v-linux01:/opt/Daikin-BRP069A62# cat files/start.yml
basics:
database: ./files/daikin.db
debug: false
scan_dev: true
search_ip: false
lan_adapter:
boiler: true
ip: 192.168.2.26
serial_nr: 204800423
mqtt:
broker: 127.0.0.1
data_timeout: 6
exit_file: /home/user/exitmqtt
temp_timeout: 300
p1_p2_devices:
0:
DeviceTime: 20210830T235455Z
c_firmware: '17003908'
c_serialnr: '204800423'
c_software: 436CC148000
duty: HVAC controller
found: true
fucntion: ''
h_version: ''
manufacturer: Daikin
model: BRP069A62
name: ''
options: ''
1:
OperationData:
LeavingWaterTemperatureOffsetHeating: 0.0
OperationMode: heating
Power: standby
childLockData:
ChildLockPin: '1234'
ChildLockState: 0
consumption:
Electrical:
Heating:
Daily:
contentCount: 24
resolution: 2
Monthly:
contentCount: 24
resolution: 1
Weekly:
contentCount: 14
resolution: 1
unit: kWh
consumptionData:
Heating:
D:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
- null
- null
- null
- null
M:
- null
- null
- null
- null
- null
- null
- null
- 48
- 2
- 21
- 130
- 241
- 223
- 96
- 44
- 5
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
W:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
found: true
fucntion: ''
name: $NULL
operation:
LeavingWaterTemperatureOffsetHeating:
maxValue: 10
minValue: -10
settable: true
stepValue: 1
OperationMode:
- heating
Power:
- 'on'
- standby
options: ''
schedule: {}
sensor:
- OutdoorTemperature
- LeavingWaterTemperatureCurrent
sensorData:
LeavingWaterTemperatureCurrent: 30.0
OutdoorTemperature: 13.0
unitholidayend: '2021-07-20'
unitholidaystart: '2021-07-12'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
unitstatusData:
EmergencyState: 0
ErrorState: 0
InstallerState: 0
TargetTemperatureOverruledState: 0
WarningState: 0
2:
OperationData:
DomesticHotWaterTemperatureHeating: 47.0
OperationMode: heating
Power: 'on'
TargetTemperature: 47.0
powerful: 47.0
ScheduleData:
Day: 5
OperationMode: Heating
StartTime: 1600
TargetTemperature: 1
childLockData:
ChildLockPin: '1234'
ChildLockState: 0
consumption:
Electrical:
Heating:
Daily:
contentCount: 24
resolution: 2
Monthly:
contentCount: 24
resolution: 1
Weekly:
contentCount: 14
resolution: 1
unit: kWh
consumptionData:
Heating:
D:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
- null
- null
- null
- null
M:
- null
- null
- null
- null
- null
- null
- null
- 0
- 35
- 112
- 213
- 112
- 114
- 27
- 31
- 30
- 29
- 48
- 92
- 57
- 38
- 18
- null
- null
W:
- 1
- 1
- 1
- 2
- 1
- 1
- 1
- 1
- 3
- 1
- 1
- 1
- null
- null
found: true
fucntion: ''
name: $NULL
operation:
DomesticHotWaterTemperatureHeating:
maxValue: 60.0
minValue: 30.0
settable: false
stepValue: 1.0
OperationMode:
- heating
Power:
- 'on'
- standby
TargetTemperature:
heating: {}
powerful:
- '0'
- '1'
options: ''
schedule:
Base: action
List:
heating:
- Actions:
- StartTime
- TargetTemperature
StartTime:
stepValue: 10.0
unit: minute
TargetTemperature:
heating:
maxValue: 60.0
minValue: 30.0
stepValue: 1.0
maxActionsAllowed: 4
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
NameAdjustable: 'false'
defaultScheduleAvailable: 'false'
sensor:
- TankTemperature
sensorData:
TankTemperature: 54.0
unitholidayend: '2021-07-20'
unitholidaystart: '2021-07-12'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WeatherDependentState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
unitstatusData:
EmergencyState: 0
ErrorState: 0
InstallerState: 0
TargetTemperatureOverruledState: 0
WarningState: 0
WeatherDependentState: 0
3:
found: false
fucntion: ''
name: ''
options: ''
4:
found: false
fucntion: ''
name: ''
options: ''
@toast1234 Looks like a winner to me 👍
There is a line in the bottom: #print(daikin_heat_pump.powerConsumption)
for the power consumption, and some other lines such as:
#print(daikin_heat_pump.TankPowerFullState)
#print(daikin_heat_pump.TankTemperature)
Let see if you get some use full output from your adapter!
Also do you have a screen shot of the consumption in the app? There seem to be a lot of values! I am curious how they relate to what you can see in the app and how we can presens a use full output from the scripting from it.
consumptionData:
Heating:
D:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
- null
- null
- null
- null
M:
- null
- null
- null
- null
- null
- null
- null
- 48
- 2
- 21
- 130
- 241
- 223
- 96
- 44
- 5
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
W:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
At the start of a cycle all values are null. For example at midnight. Then between 00.00 and 02.00 the first field will be populated. Im not sure if is dynamically updated all the time during 00.00 and 01.59 or if it is updated at the end like 02.00. There are two sets so that you have boot current an the last day/week/month. I think that I figured out that the first set is the previous day/week/month. E.g. at the end of a cycle the 2nd set is rolled over to the first set and the 2nd set is set to null. At least that was my conclusion when I last looked at it but I might be wrong.
I guess Im missing someting with how the printing works
root@v-linux01:/opt/Daikin-BRP069A62# python3 ./main-new.py
None
None
None
None
None
None
None
None
None
None
None
None
@toast1234 thank you, Ill have a look to see what I can make of it.
Mean while I fixed (for me at-least) the output of the scripting:
None
19.0
43.0
15.0
0
0
0
0
0
None
None
None
For you the first None
and the last 3 should now have data
I added:
print(daikin_heat_pump.DomesticHotWaterTemperatureHeating)
As you have it in the yml
file in:
OperationData:
DomesticHotWaterTemperatureHeating: 47.0
Not sure if it will work but if it does not then I know the fix at least.
Some tinkering required when same attribute occurs more then once....
root@v-linux01:/opt/Daikin-BRP069A62# grep DomesticHotWaterTemperatureHeating ./files/start.yml
DomesticHotWaterTemperatureHeating: 59.0
DomesticHotWaterTemperatureHeating:
root@v-linux01:/opt/Daikin-BRP069A62# python3 ./main-new.py
None
None
29.0
15.0
0
0
0
0
None
None
None
None
None
root@v-linux01:/opt/Daikin-BRP069A62# cat ./files/start.yml
basics:
database: ./files/daikin.db
debug: false
scan_dev: true
search_ip: false
lan_adapter:
boiler: true
ip: 192.168.2.26
serial_nr: 204800423
mqtt:
broker: 127.0.0.1
data_timeout: 6
exit_file: /home/user/exitmqtt
temp_timeout: 300
p1_p2_devices:
0:
DeviceTime: 20210830T235455Z
c_firmware: '17003908'
c_serialnr: '204800423'
c_software: 436CC148000
duty: HVAC controller
found: true
fucntion: ''
h_version: ''
manufacturer: Daikin
model: BRP069A62
name: ''
options: ''
1:
OperationData:
LeavingWaterTemperatureOffsetHeating: 0.0
OperationMode: heating
Power: standby
childLockData:
ChildLockPin: '1234'
ChildLockState: 0
consumption:
Electrical:
Heating:
Daily:
contentCount: 24
resolution: 2
Monthly:
contentCount: 24
resolution: 1
Weekly:
contentCount: 14
resolution: 1
unit: kWh
consumptionData:
Heating:
D:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
- null
- null
M:
- null
- null
- null
- null
- null
- null
- null
- 48
- 2
- 21
- 130
- 241
- 223
- 96
- 44
- 5
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
W:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- null
found: true
fucntion: ''
name: $NULL
operation:
LeavingWaterTemperatureOffsetHeating:
maxValue: 10
minValue: -10
settable: true
stepValue: 1
OperationMode:
- heating
Power:
- 'on'
- standby
options: ''
schedule: {}
sensor:
- OutdoorTemperature
- LeavingWaterTemperatureCurrent
sensorData:
LeavingWaterTemperatureCurrent: 29.0
OutdoorTemperature: 15.0
unitholidayend: '2021-07-20'
unitholidaystart: '2021-07-12'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
unitstatusData:
EmergencyState: 0
ErrorState: 0
InstallerState: 0
TargetTemperatureOverruledState: 0
WarningState: 0
2:
OperationData:
DomesticHotWaterTemperatureHeating: 59.0
OperationMode: heating
Power: 'on'
TargetTemperature: 59.0
powerful: 59.0
ScheduleData:
Day: 6
OperationMode: Heating
StartTime: 1900
TargetTemperature: 2
childLockData:
ChildLockPin: '1234'
ChildLockState: 0
consumption:
Electrical:
Heating:
Daily:
contentCount: 24
resolution: 2
Monthly:
contentCount: 24
resolution: 1
Weekly:
contentCount: 14
resolution: 1
unit: kWh
consumptionData:
Heating:
D:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
- null
- null
M:
- null
- null
- null
- null
- null
- null
- null
- 0
- 35
- 112
- 213
- 112
- 114
- 27
- 31
- 30
- 29
- 48
- 92
- 57
- 38
- 18
- null
- null
W:
- 1
- 1
- 1
- 2
- 1
- 1
- 1
- 1
- 3
- 1
- 1
- 1
- 1
- null
found: true
fucntion: ''
name: $NULL
operation:
DomesticHotWaterTemperatureHeating:
maxValue: 60.0
minValue: 30.0
settable: false
stepValue: 1.0
OperationMode:
- heating
Power:
- 'on'
- standby
TargetTemperature:
heating: {}
powerful:
- '0'
- '1'
options: ''
schedule:
Base: action
List:
heating:
- Actions:
- StartTime
- TargetTemperature
StartTime:
stepValue: 10.0
unit: minute
TargetTemperature:
heating:
maxValue: 60.0
minValue: 30.0
stepValue: 1.0
maxActionsAllowed: 4
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
NameAdjustable: 'false'
defaultScheduleAvailable: 'false'
sensor:
- TankTemperature
sensorData:
TankTemperature: 59.0
unitholidayend: '2021-07-20'
unitholidaystart: '2021-07-12'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WeatherDependentState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
unitstatusData:
EmergencyState: 0
ErrorState: 0
InstallerState: 0
TargetTemperatureOverruledState: 0
WarningState: 0
WeatherDependentState: 0
3:
found: false
fucntion: ''
name: ''
options: ''
4:
found: false
fucntion: ''
name: ''
options: ''
I modified it somewhat to make it work with Appdaemon and for me it seems like it doesn’t like the consumption argument. Have I missed some change?
None
19.6
37.0
9.0
0
0
0
0
0
None
None
2021-10-17 19:27:42.564606 WARNING d: ------------------------------------------------------------
2021-10-17 19:27:42.566563 WARNING d: Unexpected error running initialize() for d
2021-10-17 19:27:42.568944 WARNING d: ------------------------------------------------------------
2021-10-17 19:27:42.574618 WARNING d: Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/appdaemon/app_management.py", line 165, in initialize_app
await utils.run_in_executor(self, init)
File "/usr/lib/python3.9/site-packages/appdaemon/utils.py", line 308, in run_in_executor
response = future.result()
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/appdaemon/apps/d.py", line 69, in initialize
print(daikin_heat_pump.powerConsumption)
File "/config/appdaemon/apps/d.py", line 373, in powerConsumption
return self._verify("consumption", "Consumption", "Consumption")
File "/config/appdaemon/apps/d.py", line 312, in _verify
ymlkey = device[key][subject]
KeyError: 'consumption'
Well, since I do not have any consumption in the file the above seems explained. This is my full output:
basics:
database: ./files/daikin.db
debug: false
scan_dev: true
search_ip: false
lan_adapter:
boiler: false
ip: 192.168.1.148
serial_nr: 175000236
mqtt:
broker: 127.0.0.1
data_timeout: 6
exit_file: /home/user/exitmqtt
temp_timeout: 300
p1_p2_devices:
0:
DeviceTime: 20211017T193540Z
c_firmware: '17003908'
c_serialnr: '190300160'
c_software: 436CC148000
duty: HVAC controller
found: true
fucntion: ''
h_version: ''
manufacturer: Daikin
model: BRP069A62
name: ''
options: ''
1:
OperationData:
LeavingWaterTemperatureOffsetHeating: 0.0
OperationMode: heating
Power: standby
RoomTemperatureHeating: 20.0
TargetTemperature: 20.0
ScheduleData: {}
childLockData:
ChildLockPin: '1234'
ChildLockState: 0
found: true
fucntion: ''
name: $NULL
operation:
LeavingWaterTemperatureOffsetHeating:
maxValue: 10
minValue: -10
settable: true
stepValue: 1
OperationMode:
- heating
Power:
- 'on'
- standby
RoomTemperatureHeating:
maxValue: 30.0
minValue: 16.0
settable: true
stepValue: 0.5
TargetTemperature:
heating:
maxValue: 30.0
minValue: 16.0
stepValue: 0.5
options: ''
schedule:
Base: action
List:
heating:
- Actions:
- StartTime
- TargetTemperature
StartTime:
stepValue: 10.0
unit: minutes
TargetTemperature:
heating:
maxValue: 30.0
minValue: 16.0
stepValue: 1
maxActionsAllowed: 6
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- []
NameAdjustable: 'false'
defaultScheduleAvailable: 'true'
sensor:
- IndoorTemperature
- OutdoorTemperature
- LeavingWaterTemperatureCurrent
sensorData:
IndoorTemperature: 19.6
LeavingWaterTemperatureCurrent: 37.0
OutdoorTemperature: 9.0
unitholidayend: '2019-02-09'
unitholidaystart: '2019-02-09'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
unitstatusData:
EmergencyState: 0
ErrorState: 0
InstallerState: 0
TargetTemperatureOverruledState: 0
WarningState: 0
2:
OperationData:
DomesticHotWaterTemperatureHeating: 51.0
OperationMode: heating
Power: standby
TargetTemperature: 51.0
powerful: 51.0
ScheduleData: {}
childLockData:
ChildLockPin: '1234'
ChildLockState: 0
found: true
fucntion: ''
name: $NULL
operation:
DomesticHotWaterTemperatureHeating:
maxValue: 60.0
minValue: 30.0
settable: false
stepValue: 1.0
OperationMode:
- heating
Power:
- 'on'
- standby
TargetTemperature:
heating: {}
powerful:
- '0'
- '1'
options: ''
schedule:
Base: action
List:
heating:
- Actions:
- StartTime
- TargetTemperature
StartTime:
stepValue: 10.0
unit: minute
TargetTemperature:
heating:
maxValue: 60.0
minValue: 30.0
stepValue: 1.0
maxActionsAllowed: 4
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
- []
NameAdjustable: 'false'
defaultScheduleAvailable: 'false'
sensor:
- TankTemperature
sensorData:
TankTemperature: 37.0
unitholidayend: '2019-02-09'
unitholidaystart: '2019-02-09'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WeatherDependentState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
unitstatusData:
EmergencyState: 0
ErrorState: 0
InstallerState: 0
TargetTemperatureOverruledState: 0
WarningState: 0
WeatherDependentState: 0
3:
found: false
fucntion: ''
name: ''
options: ''
4:
found: false
fucntion: ''
name: ''
options: ''
@Spitfire69 Are you sure you have pulled the branch? It should catch the consumption error, as I dont have it too
try:
ymlkey = device[key][subject]
except:
return
@toast1234
Thanks Again, It is interesting, as the print(daikin_heat_pump.TankTemperature)
get the data from the device not the yml
I shall have a look, you have more none
than I expected
I had to do some adjustments to the checked in file but apart from setting it up and printing the result it’s pretty intact (I think). I have the exception handling for consumption at 3 places in the code.
Maybe there’s something with the exception handling thats not quite the same in my RPI4 Hassio installation?
Hi, @toast1234 @Spitfire69
I made some changes, Now it will try to get the data regardless if you have the item or not. Which I would like to undo. But to verify its not my logic that is in the way I have removed it.
If you turn debug: true
on you should get:
MNAE/2
Sorry - 404 - Not Found
MNAE/3
Sorry - 404 - Not Found
MNAE/4
Sorry - 404 - Not Found
19.0
43.0
10.0
0
0
0
0
0
on
MNAE/1/Operation/Powerfull/la
Sorry - 404 - Not Found
4004
MNAE/1/Consumption/la
Sorry - 404 - Not Found
4004
MNAE/1/Operation/DomesticHotWaterTemperatureHeating/la
Sorry - 404 - Not Found
4004
MNAE/1/Sensor/TankTemperature/la
Sorry - 404 - Not Found
4004
Which is the URL
we tried, the human status code, and the daikin error code.
Let me know the results
@Spitfire69
Can you tell me what you have to change in order to get it to work for you, perhaps I can put it in somehow.
I made no changes that should be neccessary for you to include, they were all related to the Appdeamon environment.
root@v-linux01:/opt/Daikin-BRP069A62# python3 ./main-new.py
MNAE/3
Sorry - 404 - Not Found
MNAE/4
Sorry - 404 - Not Found
MNAE/1/UnitStatus/TargetTemperatureOverruledState/la
Sorry - 404 - Not Found
MNAE/2/Operation/powerful/la
Sorry - 404 - Not Found
MNAE/1/Sensor/IndoorTemperature/la
Sorry - 404 - Not Found
4004
29.0
18.0
0
0
0
0
MNAE/1/UnitStatus/TargetTemperatureOverruledState/la
Sorry - 404 - Not Found
4004
standby
MNAE/1/Operation/Powerful/la
Sorry - 404 - Not Found
4004
{"Electrical":{"Heating":{"D":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null,null],"W":[0,0,0,0,0,0,0,null,null,null,null,null,null,null],"M":[null,null,null,null,null,null,null,48,2,21,130,241,223,96,44,5,0,0,0,0,0,0,null,null]}}}
MNAE/1/Operation/DomesticHotWaterTemperatureHeating/la
Sorry - 404 - Not Found
4004
MNAE/1/Sensor/TankTemperature/la
Sorry - 404 - Not Found
4004
Hi @toast1234 Thanks again, and again a update !
MNAE/1/Operation/Powerful/la
Sorry - 404 - Not Found
4004
MNAE/1/Consumption/la
Sorry - 404 - Not Found
4004
MNAE/1/Operation/DomesticHotWaterTemperatureHeating
Sorry - 404 - Not Found
4004
MNAE/1/Sensor/TankTemperature
Sorry - 404 - Not Found
4004
For me these are as expected.
DomesticHotWaterTemperatureHeating
Will still be a wildcard. But the rest I removed /la
from the end of the URL.
Please feel free to try wit with or with out /la
I have seen this work somewhere else 2/Operation/Powerful/la
curious to see if it is super specific to each setup.
For example: MNAE/1/Sensor/TankTemperature should probably be MNAE/2/Sensor/TankTemperature/la as the hot water tank is unit 2 and the heating is unit 1
root@v-linux01:/opt/Daikin-BRP069A62# python3 ./main-new.py
MNAE/3
Sorry - 404 - Not Found
MNAE/4
Sorry - 404 - Not Found
MNAE/1/UnitStatus/TargetTemperatureOverruledState/la
Sorry - 404 - Not Found
MNAE/2/Operation/powerful/la
Sorry - 404 - Not Found
MNAE/1/Sensor/IndoorTemperature/la
Sorry - 404 - Not Found
4004
29.0
16.0
0
0
0
0
MNAE/1/UnitStatus/TargetTemperatureOverruledState/la
Sorry - 404 - Not Found
4004
standby
MNAE/1/Operation/Powerful/la
Sorry - 404 - Not Found
4004
{"Electrical":{"Heating":{"D":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null],"W":[0,0,0,0,0,0,0,null,null,null,null,null,null,null],"M":[null,null,null,null,null,null,null,48,2,21,130,241,223,96,44,5,0,0,0,0,0,0,null,null]}}}
MNAE/1/Operation/DomesticHotWaterTemperatureHeating
Sorry - 404 - Not Found
4004
MNAE/1/Sensor/TankTemperature
Sorry - 404 - Not Found
4004
Hi @toast1234,
Yes I am aware of device 1 and 2, I had written that logic, but for now it just does for 1 and 2 try URL
Aslong as that returns 404 status codes adding that logic back is not workable.
Somehow your output does not show 'MNAE/2/Sensor/TankTemperature' which is interesting as it should in theory loop over it
Ill have a look later on how to improve the loop
@toast1234
I had a look at your results, and compared them to the YML
These are correct as you dont have 3 / 4 devices.
root@v-linux01:/opt/Daikin-BRP069A62# python3 ./main-new.py
MNAE/3
Sorry - 404 - Not Found
MNAE/4
Sorry - 404 - Not Found
This is interesting, as it should return atleast a 0
as you have it in the yml
file
the URL in elsewhere is: unitData = f"MNAE/{key}/UnitStatus/{item}/la"
-> unitData = f"MNAE/1/UnitStatus/TargetTemperatureOverruledState/la"
So I am not sure what is going on here:
MNAE/1/UnitStatus/TargetTemperatureOverruledState/la
Sorry - 404 - Not Found
This one should be 404
for device one, not for device 2, comparing the URL again
elsewhere: operationData = f"MNAE/{key}/Operation/{item}/la"
-> `operationData = f"MNAE/2/Operation/powerful/la"
MNAE/2/Operation/powerful/la
Sorry - 404 - Not Found
So this one should again work,,,
You also have these:
29.0 > LeavingWaterTemperatureCurrent (sensor)
16.0 > OutdoorTemperature (sensor)
0 > ErrorState (unitstatus)
0 > InstallerState (unitstatus)
0 > WarningState( unitstatus)
0 >EmergencyState (unitstatus)
This becomes relevant because: MNAE/1/UnitStatus/TargetTemperatureOverruledState/la
is also unit status. for 1 and 2.
So I am scratching my head here a little..
This is also a option, But it would not be a specific request, it would update ALL the data and update the YML
not pretty.
@property
def UpdateValeus(self):
self._update_data()
def GetValue(self, key, subject, item):
device = self.config['p1_p2_devices']
return device[key][subject][item]
if __name__ == "__main__":
daikin_heat_pump = dohpc("./files/start.yml")
daikin_heat_pump.UpdateValeus
print(daikin_heat_pump.GetValue( 1, "unitstatusData", "TargetTemperatureOverruledState"))
It also removes the dynamic part a bit which is a shame,, because if you add a airco in your house, or something else, it might not be number 1 or 2 anymore.
For now I keep the YML data retrieval as an option. And will work on sending data for now, I gave the output some text to understand it better:
#- YML DATA
0
#- Live DATA
#- sensors
Indoor: 20.0
Water: 44.0
Outdoor: 18.0
Tank: None
#- unitstatus
Error: 0
installer: 0
Warning: 0
Emergency: 0
Toverrule: 0
#- operation
power: on
TankPower: None
PowerC: None
TankTemp: None
#- Send Data
For me this is how it looks:
root@v-linux01:/opt/Daikin-BRP069A62# python3 ./main-new.py
#- YML DATA
0
#- Live DATA
#- sensors
Indoor: None
Water: 29.0
Outdoor: 15.0
Tank: None
#- unitstatus
Error: 0
installer: 0
Warning: 0
Emergency: 0
Toverrule: None
#- operation
power: standby
TankPower: None
PowerC: {"Electrical":{"Heating":{"D":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null],"W":[0,0,0,0,0,0,0,0,null,null,null,null,null,null],"M":[null,null,null,null,null,null,null,48,2,21,130,241,223,96,44,5,0,0,0,0,0,0,null,null]}}}
TankTemp: None
#- Send Data
root@v-linux01:/opt/Daikin-BRP069A62# python3 ./main-new.py
MNAE/3
Sorry - 404 - Not Found
MNAE/4
Sorry - 404 - Not Found
MNAE/1/UnitStatus/TargetTemperatureOverruledState/la
Sorry - 404 - Not Found
MNAE/2/Operation/powerful/la
Sorry - 404 - Not Found
#- YML DATA
MNAE/1/UnitStatus/TargetTemperatureOverruledState/la
Sorry - 404 - Not Found
MNAE/2/Operation/powerful/la
Sorry - 404 - Not Found
0
#- Live DATA
#- sensors
MNAE/1/Sensor/IndoorTemperature/la
Sorry - 404 - Not Found
Indoor: 4004
Water: 29.0
Outdoor: 15.0
MNAE/1/Sensor/TankTemperature/la
Sorry - 404 - Not Found
Tank: 4004
#- unitstatus
Error: 0
installer: 0
Warning: 0
Emergency: 0
MNAE/1/UnitStatus/TargetTemperatureOverruledState/la
Sorry - 404 - Not Found
Toverrule: 4004
#- operation
power: standby
MNAE/1/Operation/Powerful/la
Sorry - 404 - Not Found
TankPower: 4004
PowerC: {"Electrical":{"Heating":{"D":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null],"W":[0,0,0,0,0,0,0,0,null,null,null,null,null,null],"M":[null,null,null,null,null,null,null,48,2,21,130,241,223,96,44,5,0,0,0,0,0,0,null,null]}}}
MNAE/1/Operation/DomesticHotWaterTemperatureHeating/la
Sorry - 404 - Not Found
TankTemp: 4004
#- Send Data
root@v-linux01:/opt/Daikin-BRP069A62# cat files/start.yml
basics:
database: ./files/daikin.db
debug: true
scan_dev: true
search_ip: false
lan_adapter:
ip: 192.168.2.26
serial_nr: null
mqtt:
broker: 127.0.0.1
data_timeout: 6
exit_file: /home/user/exitmqtt
temp_timeout: 300
p1_p2_devices:
0:
DeviceTime: 20210830T235455Z
c_firmware: '17003908'
c_serialnr: '204800423'
c_software: 436CC148000
duty: HVAC controller
found: true
fucntion: ''
h_version: ''
manufacturer: Daikin
model: BRP069A62
name: ''
options: ''
1:
OperationData:
LeavingWaterTemperatureOffsetHeating: 0.0
OperationMode: heating
Power: standby
childLockData:
ChildLockPin: '1234'
ChildLockState: 0
consumption:
Electrical:
Heating:
Daily:
contentCount: 24
resolution: 2
Monthly:
contentCount: 24
resolution: 1
Weekly:
contentCount: 14
resolution: 1
unit: kWh
consumptionData:
Heating:
D:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
- null
M:
- null
- null
- null
- null
- null
- null
- null
- 48
- 2
- 21
- 130
- 241
- 223
- 96
- 44
- 5
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
W:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- null
- null
- null
- null
- null
- null
found: true
fucntion: ''
name: $NULL
operation:
LeavingWaterTemperatureOffsetHeating:
maxValue: 10
minValue: -10
settable: true
stepValue: 1
OperationMode:
- heating
Power:
- 'on'
- standby
options: ''
schedule: {}
sensor:
- OutdoorTemperature
- LeavingWaterTemperatureCurrent
sensorData:
LeavingWaterTemperatureCurrent: 29.0
OutdoorTemperature: 15.0
unitholidayend: '2021-07-20'
unitholidaystart: '2021-07-12'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
unitstatusData:
EmergencyState: 0
ErrorState: 0
InstallerState: 0
TargetTemperatureOverruledState: 0
WarningState: 0
2:
OperationData:
DomesticHotWaterTemperatureHeating: 47.0
OperationMode: heating
Power: 'on'
TargetTemperature: 47.0
powerful: 47.0
ScheduleData:
Day: 2
OperationMode: Heating
StartTime: 600
TargetTemperature: 0
childLockData:
ChildLockPin: '1234'
ChildLockState: 0
consumption:
Electrical:
Heating:
Daily:
contentCount: 24
resolution: 2
Monthly:
contentCount: 24
resolution: 1
Weekly:
contentCount: 14
resolution: 1
unit: kWh
consumptionData:
Heating:
D:
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 2
- null
- null
- null
M:
- null
- null
- null
- null
- null
- null
- null
- 0
- 35
- 112
- 213
- 112
- 114
- 27
- 31
- 30
- 29
- 48
- 92
- 57
- 38
- 18
- null
- null
W:
- 1
- 3
- 1
- 1
- 1
- 1
- 1
- 2
- null
- null
- null
- null
- null
- null
found: true
fucntion: ''
name: $NULL
operation:
DomesticHotWaterTemperatureHeating:
maxValue: 60.0
minValue: 30.0
settable: false
stepValue: 1.0
OperationMode:
- heating
Power:
- 'on'
- standby
TargetTemperature:
heating: {}
powerful:
- '0'
- '1'
options: ''
schedule:
Base: action
List:
heating:
- Actions:
- StartTime
- TargetTemperature
StartTime:
stepValue: 10.0
unit: minute
TargetTemperature:
heating:
maxValue: 60.0
minValue: 30.0
stepValue: 1.0
maxActionsAllowed: 4
- - monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
NameAdjustable: 'false'
defaultScheduleAvailable: 'false'
sensor:
- TankTemperature
sensorData:
TankTemperature: 58.0
unitholidayend: '2021-07-20'
unitholidaystart: '2021-07-12'
unitholidaystate: 0
unitstatus:
- ErrorState
- InstallerState
- WeatherDependentState
- WarningState
- EmergencyState
- TargetTemperatureOverruledState
unitstatusData:
EmergencyState: 0
ErrorState: 0
InstallerState: 0
TargetTemperatureOverruledState: 0
WarningState: 0
WeatherDependentState: 0
3:
found: false
fucntion: ''
name: ''
options: ''
4:
found: false
fucntion: ''
name: ''
options: ''
@toast1234
The fact that this comes by MNAE/1/UnitStatus/TargetTemperatureOverruledState/la
3 times, is interesting.
This is the code that gets all the values.
def _verify(self, subject, url):
device = self.config['p1_p2_devices']
for key in device:
if key != 0:
if device[key]["found"] == True:
return self._get_value(f"MNAE/{key}/{url}", self.commonReturnPath)
Perhaps there is a better way of doing this,,
But I do get
0
1
Water: 44.0
So for me it does loop over device 0
and device 1
and not 2
/ 3
/ 4
as they are false
.
you could try this:
# add print here
print(key)
if device[key]["found"] == True:
return self._get_value(f"MNAE/{key}/{url}", self.commonReturnPath)
it should result in
0
1
2
Toverrule: 1
It is also interesting to try:
if device[key]["found"] == True:
print(f"MNAE/{key}/{url}", self.commonReturnPath)
that should return:
None
0
For device 1 and device 2.
I added the following functions in the mean time at the end of the file.
# Turn the system on / off
#daikin_heat_pump.TurnOnOff("1", "Power", "on")
#daikin_heat_pump.TurnOnOff("1", "Power", "standby")
# Turn Tank on / off (You might want need to change the key)
#daikin_heat_pump.TurnOnOff("2", "Powerful", "0")
#daikin_heat_pump.TurnOnOff("2", "Powerful", "1")
# Change the desired heat in the house:
#daikin_heat_pump.ChangeTemp("1", "TargetTemperature", 20)
I`ll be working on sending a new schedule next.
root@v-linux01:/opt/Daikin-BRP069A62# python3 ./main-new.py
scanning KEY: 0
scanning KEY: 1
scanning KEY: 2
scanning KEY: 3
scanning KEY: 4
update KEY: 0
update KEY: 1
update KEY: 2
update KEY: 3
update KEY: 4
#- YML DATA
update KEY: 0
update KEY: 1
update KEY: 2
update KEY: 3
update KEY: 4
0
#- Live DATA
#- sensors
verify KEY: 0
verify KEY: 1
MNAE/1/Sensor/IndoorTemperature/la m2m:rsp/pc/m2m:cin/con
Indoor: None
verify KEY: 0
verify KEY: 1
MNAE/1/Sensor/LeavingWaterTemperatureCurrent/la m2m:rsp/pc/m2m:cin/con
Water: 29.0
verify KEY: 0
verify KEY: 1
MNAE/1/Sensor/OutdoorTemperature/la m2m:rsp/pc/m2m:cin/con
Outdoor: 15.0
verify KEY: 0
verify KEY: 1
MNAE/1/Sensor/TankTemperature/la m2m:rsp/pc/m2m:cin/con
Tank: None
#- unitstatus
verify KEY: 0
verify KEY: 1
MNAE/1/UnitStatus/ErrorState/la m2m:rsp/pc/m2m:cin/con
Error: 0
verify KEY: 0
verify KEY: 1
MNAE/1/UnitStatus/InstallerState/la m2m:rsp/pc/m2m:cin/con
installer: 0
verify KEY: 0
verify KEY: 1
MNAE/1/UnitStatus/WarningState/la m2m:rsp/pc/m2m:cin/con
Warning: 0
verify KEY: 0
verify KEY: 1
MNAE/1/UnitStatus/EmergencyState/la m2m:rsp/pc/m2m:cin/con
Emergency: 0
verify KEY: 0
verify KEY: 1
MNAE/1/UnitStatus/TargetTemperatureOverruledState/la m2m:rsp/pc/m2m:cin/con
Toverrule: None
#- operation
verify KEY: 0
verify KEY: 1
MNAE/1/Operation/Power/la m2m:rsp/pc/m2m:cin/con
power: standby
verify KEY: 0
verify KEY: 1
MNAE/1/Operation/Powerful/la m2m:rsp/pc/m2m:cin/con
TankPower: None
verify KEY: 0
verify KEY: 1
MNAE/1/Consumption/la m2m:rsp/pc/m2m:cin/con
PowerC: {"Electrical":{"Heating":{"D":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null],"W":[0,0,0,0,0,0,0,0,null,null,null,null,null,null],"M":[null,null,null,null,null,null,null,48,2,21,130,241,223,96,44,5,0,0,0,0,0,0,null,null]}}}
verify KEY: 0
verify KEY: 1
MNAE/1/Operation/DomesticHotWaterTemperatureHeating/la m2m:rsp/pc/m2m:cin/con
TankTemp: None
#- Send Data
Hi @toast1234
Thanks,
This is interesting behaviour:
#- YML DATA
update KEY: 0
update KEY: 1
update KEY: 2
update KEY: 3
update KEY: 4
0
#- Live DATA
#- sensors
verify KEY: 0
verify KEY: 1
weird it does not go further than 1. I am contemplating to make it less dynamic at this point. Shame, but I guess at-least it should work ?
your yml
contains:
2:
found: true
So I would expect:
#- sensors
verify KEY: 0
verify KEY: 1
verify KEY: 2
Ill have a think about it tonight perhaps a better solution pops to mind
Maybe device is not parsed correctly in python, but it looks ok:
{0: {'DeviceTime': '20210830T235455Z', 'c_firmware': '17003908', 'c_serialnr': '204800423', 'c_software': '436CC148000', 'duty': 'HVAC controller', 'found': True, 'fucntion': '', 'h_version': '', 'manufacturer': 'Daikin', 'model': 'BRP069A62', 'name': '', 'options': ''}, 1: {'OperationData': {'LeavingWaterTemperatureOffsetHeating': 0.0, 'OperationMode': 'heating', 'Power': 'standby'}, 'childLockData': {'ChildLockPin': '1234', 'ChildLockState': 0}, 'consumption': {'Electrical': {'Heating': {'Daily': {'contentCount': 24, 'resolution': 2}, 'Monthly': {'contentCount': 24, 'resolution': 1}, 'Weekly': {'contentCount': 14, 'resolution': 1}}, 'unit': 'kWh'}}, 'consumptionData': {'Heating': {'D': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None], 'M': [None, None, None, None, None, None, None, 48, 2, 21, 130, 241, 223, 96, 44, 5, 0, 0, 0, 0, 0, 0, None, None], 'W': [0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None]}}, 'found': True, 'fucntion': '', 'name': '$NULL', 'operation': {'LeavingWaterTemperatureOffsetHeating': {'maxValue': 10, 'minValue': -10, 'settable': True, 'stepValue': 1}, 'OperationMode': ['heating'], 'Power': ['on', 'standby']}, 'options': '', 'schedule': {}, 'sensor': ['OutdoorTemperature', 'LeavingWaterTemperatureCurrent'], 'sensorData': {'LeavingWaterTemperatureCurrent': 29.0, 'OutdoorTemperature': 15.0}, 'unitholidayend': '2021-07-20', 'unitholidaystart': '2021-07-12', 'unitholidaystate': 0, 'unitstatus': ['ErrorState', 'InstallerState', 'WarningState', 'EmergencyState', 'TargetTemperatureOverruledState'], 'unitstatusData': {'EmergencyState': 0, 'ErrorState': 0, 'InstallerState': 0, 'TargetTemperatureOverruledState': 0, 'WarningState': 0}}, 2: {'OperationData': {'DomesticHotWaterTemperatureHeating': 47.0, 'OperationMode': 'heating', 'Power': 'on', 'TargetTemperature': 47.0, 'powerful': 47.0}, 'ScheduleData': {'Day': 2, 'OperationMode': 'Heating', 'StartTime': 600, 'TargetTemperature': 0}, 'childLockData': {'ChildLockPin': '1234', 'ChildLockState': 0}, 'consumption': {'Electrical': {'Heating': {'Daily': {'contentCount': 24, 'resolution': 2}, 'Monthly': {'contentCount': 24, 'resolution': 1}, 'Weekly': {'contentCount': 14, 'resolution': 1}}, 'unit': 'kWh'}}, 'consumptionData': {'Heating': {'D': [0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, None, None], 'M': [None, None, None, None, None, None, None, 0, 35, 112, 213, 112, 114, 27, 31, 30, 29, 48, 92, 57, 38, 18, None, None], 'W': [1, 3, 1, 1, 1, 1, 1, 2, None, None, None, None, None, None]}}, 'found': True, 'fucntion': '', 'name': '$NULL', 'operation': {'DomesticHotWaterTemperatureHeating': {'maxValue': 60.0, 'minValue': 30.0, 'settable': False, 'stepValue': 1.0}, 'OperationMode': ['heating'], 'Power': ['on', 'standby'], 'TargetTemperature': {'heating': {}}, 'powerful': ['0', '1']}, 'options': '', 'schedule': {'Base': 'action', 'List': {'heating': [{'Actions': ['StartTime', 'TargetTemperature'], 'StartTime': {'stepValue': 10.0, 'unit': 'minute'}, 'TargetTemperature': {'heating': {'maxValue': 60.0, 'minValue': 30.0, 'stepValue': 1.0}}, 'maxActionsAllowed': 4}, ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']]}, 'NameAdjustable': 'false', 'defaultScheduleAvailable': 'false'}, 'sensor': ['TankTemperature'], 'sensorData': {'TankTemperature': 58.0}, 'unitholidayend': '2021-07-20', 'unitholidaystart': '2021-07-12', 'unitholidaystate': 0, 'unitstatus': ['ErrorState', 'InstallerState', 'WeatherDependentState', 'WarningState', 'EmergencyState', 'TargetTemperatureOverruledState'], 'unitstatusData': {'EmergencyState': 0, 'ErrorState': 0, 'InstallerState': 0, 'TargetTemperatureOverruledState': 0, 'WarningState': 0, 'WeatherDependentState': 0}}, 3: {'found': False, 'fucntion': '', 'name': '', 'options': ''}, 4: {'found': False, 'fucntion': '', 'name': '', 'options': ''}}
Hi @toast1234, yes that looks 💯 !
You should be able to test 3 and 4 with
def _verify(self, subject, url):
device = self.config['p1_p2_devices']
for key in device:
if key != 0:
if device[key]["found"] == True:
return self._get_value(f"MNAE/{key}/{url}", self.commonReturnPath)
elif device[key]["found"] == False:
print(key)
else:
print("error")
This way all the keys should print alwasy
worth while improvements:
New features
Nice to haves: