william-sy / Daikin-BRP069A62

Creating a daikin interface other than the apps
GNU General Public License v3.0
32 stars 2 forks source link

Error on heatpump that is off #4

Closed william-sy closed 3 years ago

william-sy commented 3 years ago

when reading data, database is not populated:

Traceback (most recent call last):
  File "/Users/wvanbeek/presonal/daikin/Daikin-BRP069A62/./main.py", line 148, in <module>
    main()
  File "/Users/wvanbeek/presonal/daikin/Daikin-BRP069A62/./main.py", line 124, in main
    RH.readHPDetails(daikinIP, daikinDataBase, daikinUrlError, daikinUrlBase, daikingUrlDisc, daikinDevices)
  File "/Users/wvanbeek/presonal/daikin/Daikin-BRP069A62/DOHPC/readHP.py", line 81, in readHPDetails
    daikinDataFilter(daikinSocketResponse, daikinSocketResponseName, dbFileName, row[4], row[5], row[6], row[10], today, con)
  File "/Users/wvanbeek/presonal/daikin/Daikin-BRP069A62/DOHPC/readHP.py", line 137, in daikinDataFilter
    extractNestedData = nestedData["data"][daikinKey3]
KeyError: 'StartTime'

Need to escape this so that new data is not written to the database and last row will be always valid.

william-sy commented 3 years ago

Fixed in code