william-sy / Daikin-BRP069A62

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

sqlite3.OperationalError: near "R_U_S_TTOS": syntax error #14

Closed AlbrechtL closed 2 years ago

AlbrechtL commented 2 years ago

Really great project ! Thanks!

Unfortunately, I run into a python issue.

./main.py -f files/config.ini -r
Traceback (most recent call last):
  File "/home/albrecht/src/Daikin-BRP069A62/./main.py", line 148, in <module>
    main()
  File "/home/albrecht/src/Daikin-BRP069A62/./main.py", line 124, in main
    RH.readHPDetails(daikinIP, daikinDataBase, daikinUrlError, daikinUrlBase, daikingUrlDisc, daikinDevices)
  File "/home/albrecht/src/Daikin-BRP069A62/DOHPC/readHP.py", line 81, in readHPDetails
    daikinDataFilter(daikinSocketResponse, daikinSocketResponseName, dbFileName, row[4], row[5], row[6], row[10], today, con)
  File "/home/albrecht/src/Daikin-BRP069A62/DOHPC/readHP.py", line 187, in daikinDataFilter
    con.execute(f"UPDATE rw_url SET type = 'Z' WHERE name {rowName}")
sqlite3.OperationalError: near "R_U_S_TTOS": syntax error

I have Ubuntu 22.05 and Python 3.10.4.

AlbrechtL commented 2 years ago

I just figured out that my EHBX08DA9W doesn't support a few settings. By commenting out the respective database entries in createDB.py a was able to read out my Lan adapter BRP069A61.

bausi2k commented 1 year ago

Could you tell, how you found out, which fields are supported? Debug logging?

thx

having the same issue Traceback (most recent call last): File "/Users/klausgruber/Downloads/Daikin-BRP069A62/main.py", line 148, in <module> main() File "/Users/klausgruber/Downloads/Daikin-BRP069A62/main.py", line 124, in main RH.readHPDetails(daikinIP, daikinDataBase, daikinUrlError, daikinUrlBase, daikingUrlDisc, daikinDevices) File "/Users/klausgruber/Downloads/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/klausgruber/Downloads/Daikin-BRP069A62/DOHPC/readHP.py", line 187, in daikinDataFilter con.execute(f"UPDATE rw_url SET type = 'Z' WHERE name {rowName}") sqlite3.OperationalError: near "R_U_S_TTOS": syntax error

Meatballs1 commented 1 year ago

https://github.com/william-sy/Daikin-BRP069A62/blob/c65577626039547e85a00b70a2b551a1dbded2b2/DOHPC/readHP.py#L187

Looks like the query is missing an = and maybe some '

where name = '{rowName}'

bausi2k commented 1 year ago

thx @Meatballs1 that helped a bit, no I get a database lock error.

 con.execute(f"UPDATE rw_url SET type = 'Z' WHERE name = '{rowName}'")
sqlite3.OperationalError: database is locked
Meatballs1 commented 1 year ago

Guess the connect on line 186 isn't needed?