Upgrade has broken Broadlink switches

Hi, just upgraded to 0.38.2 from 0.37.1 on my Mac. First time I’ve ever upgraded but all appeared to go OK… stopped service, ran upgrade, started service, didn’t see any errors.

I only use HA with an RM Pro and the front end loads fine but I have no switches and an Invalid config warning stating…

The following components and platforms could not be set up:
• switch.broadlink
Please check your config

…along with the following errors…

17-02-13 12:05:33 ERROR (Thread-10) [homeassistant.bootstrap] Not initializing switch.broadlink because could not install dependency broadlink==0.3
17-02-13 12:05:35 ERROR (Thread-9) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘PRAGMA table_info(“events”)’] (retrying in 10 seconds)
17-02-13 12:05:40 ERROR (Thread-13) [netdisco.ssdp] Found malformed XML at http://192.168.1.108:49153/description3.xml:
17-02-13 12:05:40 ERROR (Thread-13) [netdisco.ssdp] Found malformed XML at http://192.168.1.108:49153/description1.xml:
17-02-13 12:05:40 ERROR (Thread-13) [netdisco.ssdp] Found malformed XML at http://192.168.1.108:49153/description0.xml:
17-02-13 12:05:45 ERROR (Thread-9) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘PRAGMA table_info(“events”)’] (retrying in 10 seconds)
17-02-13 12:05:55 ERROR (Thread-9) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘PRAGMA table_info(“events”)’] (retrying in 10 seconds)

The Broadlink folders appear to have vanished from my ‘deps’ folder which I assume is the problem, I know the Broadlink component was updated for this version but didn’t think I’d have to do anything myself? I couldn’t see anything on the component page that I needed to change in my config?

Any help gratefully accepted, thanks.

Try to manually install broadlink.
pip install broadlink==0.3

2 Likes

Thanks Daniel, after installing pip that worked. Is pip necessary for the updater to work correctly?

I’m still getting the errors below, any ideas?

17-02-13 14:21:09 ERROR (Thread-9) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘PRAGMA table_info(“events”)’] (retrying in 10 seconds)
17-02-13 14:21:14 ERROR (Thread-13) [netdisco.ssdp] Found malformed XML at http://192.168.1.108:49153/description1.xml:
17-02-13 14:21:14 ERROR (Thread-13) [netdisco.ssdp] Found malformed XML at http://192.168.1.108:49153/description0.xml:
17-02-13 14:21:14 ERROR (Thread-13) [netdisco.ssdp] Found malformed XML at http://192.168.1.108:49153/description3.xml:
17-02-13 14:21:19 ERROR (Thread-9) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘PRAGMA table_info(“events”)’] (retrying in 10 seconds)
17-02-13 14:21:29 ERROR (Thread-9) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘PRAGMA table_info(“events”)’] (retrying in 10 seconds)
17-02-13 14:21:39 ERROR (Thread-9) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘PRAGMA table_info(“events”)’] (retrying in 10 seconds)
17-02-13 14:21:49 ERROR (Thread-9) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘PRAGMA table_info(“events”)’] (retrying in 10 seconds)
17-02-13 14:21:59 ERROR (Thread-9) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘PRAGMA table_info(“events”)’] (retrying in 10 seconds)
17-02-13 14:22:09 ERROR (Thread-9) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: ‘PRAGMA table_info(“events”)’] (retrying in 10 seconds)

It should not be necessary to do pip install.

The error message is unrelated to the broadlink, and seams to be related to the recorder component. You can try to remove (or rename) the database file.

1 Like

Before installing pip I was getting… -bash: pip: command not found …when running the broadlink install.

Renamed the database and it instantly created a new one which seems to have stopped the errors, thanks again.

Hi, how did you do that ? I mean i’m new in all this i just get the broadlink A1, i install a bad update and it was broken, i don’t know how to connect it to my pc ? Is there any tutorial for that please ?