Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyMySQL Package missing for MariaDB Database Connection #1328

Closed
Veldkornet opened this issue Oct 13, 2019 · 3 comments
Closed

PyMySQL Package missing for MariaDB Database Connection #1328

Veldkornet opened this issue Oct 13, 2019 · 3 comments

Comments

@Veldkornet
Copy link

Veldkornet commented Oct 13, 2019

Home Assistant release with the issue:

0.100.2

Operating environment (HassOS/Generic):

Hass.io 64-bit on a RaspberryPi 3

Supervisor logs:

19-10-13 09:57:46 INFO (MainThread) [hassio.updater] Fetch update data from https://version.home-assistant.io/stable.json
19-10-13 10:24:41 INFO (MainThread) [hassio.homeassistant] Update Home Assistant to version 0.100.2
19-10-13 10:24:41 INFO (SyncWorker_5) [hassio.docker.interface] Update image homeassistant/raspberrypi3-64-homeassistant:0.100.1 to homeassistant/raspberrypi3-64-homeassistant:0.100.2
19-10-13 10:24:41 INFO (SyncWorker_5) [hassio.docker.interface] Pull image homeassistant/raspberrypi3-64-homeassistant tag 0.100.2.
19-10-13 10:27:48 INFO (SyncWorker_5) [hassio.docker.interface] Stop homeassistant application
19-10-13 10:28:49 INFO (SyncWorker_5) [hassio.docker.interface] Clean homeassistant application
19-10-13 10:28:50 INFO (SyncWorker_8) [hassio.docker.homeassistant] Start homeassistant homeassistant/raspberrypi3-64-homeassistant with version 0.100.2
19-10-13 10:29:51 INFO (MainThread) [hassio.homeassistant] Home Assistant pip installation in progress
19-10-13 10:32:41 INFO (MainThread) [hassio.homeassistant] Home Assistant pip installation done
19-10-13 10:32:51 INFO (MainThread) [hassio.homeassistant] Home Assistant pip installation in progress
19-10-13 10:34:27 INFO (MainThread) [hassio.homeassistant] Home Assistant pip installation done
19-10-13 10:34:32 INFO (MainThread) [hassio.homeassistant] Home Assistant pip installation in progress
19-10-13 10:35:32 INFO (MainThread) [hassio.homeassistant] Home Assistant pip installation done
19-10-13 10:35:42 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance
19-10-13 10:35:42 INFO (MainThread) [hassio.homeassistant] Successful run Home Assistant 0.100.2
19-10-13 10:35:42 INFO (SyncWorker_6) [hassio.docker.interface] Cleanup images: ['homeassistant/raspberrypi3-64-homeassistant:0.100.1']
19-10-13 10:37:46 INFO (MainThread) [hassio.host.info] Update local host information
19-10-13 10:37:46 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
19-10-13 10:37:46 INFO (MainThread) [hassio.host.services] Update service information
19-10-13 10:37:46 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
19-10-13 10:37:47 INFO (MainThread) [hassio.host.network] Update local network DNS information
19-10-13 10:37:47 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/NetworkManager/DnsManager
19-10-13 10:37:56 INFO (SyncWorker_5) [hassio.docker.interface] Restart homeassistant/raspberrypi3-64-homeassistant
19-10-13 10:39:15 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance

Description of problem:
When setting up the recorder to use an external MariaDB database as per documentation with the below connection url:
mysql+pymysql://user:password@SERVER_IP:PORT/DB_NAME?charset=utf8

Home Assistant fails to connect to the database because it cannot initiate pymysql.

When checking for the package with the below command, it’s noted that the package is already installed:
pip3 install pymysql

However, if you install the package PyMySQL, the integration works correctly:
pip3 install PyMySQL

Problem is that because the package is not included in the image, I need to install it each time HomeAssistant has an update.

@pvizeli
Copy link
Member

pvizeli commented Oct 17, 2019

We use the C implementation. Look into documentation of the add-on

@pvizeli pvizeli closed this as completed Oct 17, 2019
@Veldkornet
Copy link
Author

I was following the HomeAssistant documentation.
So if the documentation is incorrect, then fine, but then that should be fixed.

@omegacore
Copy link

Similar issue. Not sure where to turn. Documentation doesn't say anything about setting up the Recorder component to use MariaDB on an external server with hassio. Assumes you have access to the same python env as homeassistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants