No logbook or history to view please help

hi all,

I’ve got a problem with a switch turning on an off randomly so I went to my logs to see what was happening, but nothing loaded, so I went to the history… nothing loaded… i went to developer tools --> Logs… and I i can see things loading but not automations triggering or switches triggering…

I have deleted the log file and the db file and done a restart… no change…

is there something that I should have in or should take out of my config file to enable logging?

I’m using a Raspi 3+ b running Hass.io with a 3a power supply

here is my config:

# Configure a default setup of Home Assistant (frontend, api, etc)

default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.

# http:

#   base_url: example.duckdns.org:8123

automation: !include automations.yaml

anniversaries: !include anniversaries.yaml

binary_sensor: !include binarysensor.yaml

group: !include groups.yaml

light: !include lights.yaml

media_player: !include media_player.yaml

script: !include scripts.yaml

sensor: !include sensor.yaml

switch: !include switch.yaml

zone: !include zones.yaml

# Alexa media player set up

alexa_media:

  accounts:

    - email: !secret amazon_user

      password: !secret amazon_password

      url: "amazon.co.uk"

breaking_changes:

# Cloud

cloud:

  google_actions:

    filter:

      exclude_domains:

        - automation

        - binary_sensor

        - device_tracker

        - group

        - light

        - media_player

        - person

        - script

        - sensor

        - sun

        - switch

        - weather

        - zone

      include_entities:

        - light.bedside_1

        - light.bedside_2

        - light.main_lounge_lights

        - light.fan_lamp

        - switch.air_freshner

        - switch.christmas_tree

        - switch.corner_lamp

        - switch.tall_lamp

        - switch.guest_lamp

        - switch.subwoofer

        - switch.treadmill

        - media_player.skyq_bedroom

        - media_player.skyq_lounge

        - media_player.sony_av_unit

        - script.beach

        - script.fish

        - script.log_fire

        - script.trees

  alexa:

    filter:

      exclude_domains:

        - automation

        - binary_sensor

        - device_tracker

        - group

        - light

        - media_player

        - person

        - script

        - sensor

        - sun

        - switch

        - weather

        - zone

      include_entities:

        - light.bedside_1

        - light.bedside_2

        - light.main_lounge_lights

        - light.fan_lamp

        - switch.air_freshner

        - switch.christmas_tree

        - switch.corner_lamp

        - switch.tall_lamp

        - switch.guest_lamp

        - switch.subwoofer

        - switch.treadmill

        - media_player.skyq_bedroom

        - media_player.skyq_lounge

        - media_player.sony_av_unit

        - script.beach

        - script.fish

        - script.log_fire

        - script.trees

# Enables configuration UI

config:

# # Allows you to issue voice commands from the frontend in enabled browsers

# conversation:

# Discover some devices automatically

discovery:

# Enables the frontend and themes folder

frontend:

  themes: !include_dir_merge_named themes

# enable HACS 

hacs:

  token: !secret hacs_token

  appdaemon: true

#  python_script: true

#  theme: true

#history:

# # Uncomment this if you are using SSL/TLS, running in Docker container, etc.

# #http:

# # base_url: https://rdoull.duckdns.org:8123

# #  ssl_certificate: /ssl/fullchain.pem

# #  ssl_key: /ssl/privkey.pem

# # Show links to resources in log and frontend

# #introduction:

  

logbook:

logger:

  default: info

  logs:

    pydeconz: debug

    homeassistant.components.deconz: debug

# media_extractor

media_extractor:

# #momentary:

      

# #panel_iframe:

# #  configurator:

# #    title: Configurator

# #    icon: mdi:wrench

# #    url: https://rdoull.duckdns.org:3218

python_script:

#recorder:

# Sensor places 

sensor places_robin:

  - platform: places

    name: Robin D

    devicetracker_id:  device_tracker.robin

    options: zone,place, street_number, street, city 

    map_provider: google

    map_zoom: 18

    home_zone: zone.home

    api_key: !secret life360-robin-un

sensor places_elsbeth:

  - platform: places

    name: Elsbeth D

    devicetracker_id:  device_tracker.elsbeth

    options: zone,place, street_number, street, city 

    map_provider: google

    map_zoom: 18

    home_zone: zone.home

    api_key: !secret life360-elsbeth-un

# # Track the sun

# sun:

system_health:

# Text to speech

tts:

  - platform: google_translate

    service_name: google_say

# # Checks for available updates

# # Note: This component will send some information about your system to

# # the developers to assist with development of Home Assistant.

# # For more information, please see:

# # https://home-assistant.io/blog/2016/10/25/explaining-the-updater/

updater:

#   # Optional, allows Home Assistant developers to focus on popular components.

#   # include_used_components: true

  

# # Example Dark Sky configuration.yaml entry

# #weather:

# #  - platform: darksky

# #    api_key: !secret weather_api_key

got it sorted,

deleted the log and db files again, unpluged the raspi and left it for about an hour, then plugged it back in, just checked it again now and I have a log and history as normal.