Remote database with SSL

Hey guys,

I’ve read all the different topics about remote databases.

What i’d like to do is host a local Mysql server and use SSL, now all the guides only use non SSL.
Also the recorder config options dont mention the use of SSL.

Any advise?

Kind regards,
Ezra

By the looks of it SSL isn’t supported:

Compare it to the MQTT component for example and you’ll see options for SSL certificates, etc.

It may be worth asking for it in feature requests, it would be nice to have some extra security IMO :slight_smile:

If you have setup your database and database user to use SSL simply add ;ssl=true to the db_url line in your configuration.yaml:

recorder:
  commit_interval: 10
  db_url: mysql://mydb_name:mydb_PW@mydb_server.com/mydb_name?charset=utf8;ssl=true 
  exclude:
    domains:
      - automation
      - updater
    entities:
      - sun.sun # Don't record sun data
      - sensor.last_boot # Comes from 'systemmonitor' sensor platform
      - sensor.date

Yonz

Thanks man! Btw commit interval is in seconds or minutes?

See https://www.home-assistant.io/integrations/recorder/

Seconds.