Jambola77
(Jambola77)
October 19, 2023, 7:05am
1
Hello,
I am running homeassistant on a raspberry 4 (bare metal installation) and some tasmota devices were already discovered.
Now I have new values availabe at my mqtt broker (e.g. cerbo/temp), but there is no discovery of the new values. I have also not found out how to install them manually. I have searched for a configuration.yaml file, but found only an old one without config entries in /home/homeassistant/.homeassistant.
How can I add mqtt values to my system?
setup:
mqtt integration with mosquitto on the same server (works fine)
hass version is 2022.12.8
raspberry 4 with python 3.9 (latest available version)
tom_l
October 19, 2023, 8:33am
2
That would depend on what sort of entities they are. Covers, switches, sensors?
All are here: https://www.home-assistant.io/integrations/#search/mqtt
Jambola77
(Jambola77)
October 19, 2023, 10:17am
3
The values come from a solar inverter, sensor maybe suitable.
tom_l
October 19, 2023, 10:31am
4
Yes, that would be the one you want.
1 Like
Jambola77
(Jambola77)
October 19, 2023, 10:37am
5
Yes, it is.
Now, I only have to find my configuration file.
Nothing in /home/homeassistant/.homeassistant oder /srv/homeassistant.
Great thanks for your support!
tom_l
October 19, 2023, 11:03am
6
The config file locations are listed about halfway down the page.
If you use Home Assistant Container, you can find configuration.yaml
in the config folder that you mounted in your container.
If you use Home Assistant Operating System, you can find configuration.yaml
in the /config
folder of the installation.
If you use Home Assistant Core, you can find configuration.yaml
in the config folder passed to the hass
command (default is ~/.homeassistant
).
Jambola77
(Jambola77)
October 19, 2023, 11:11am
7
I have now made these entries to the yaml file:
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
mqtt:
- sensor:
state_topic: "cerbo/SoC"
Which leads to these error messages:
Oct 19 13:10:17 raspi4 hass[23236]: 2023-10-19 13:10:17.738 ERROR (MainThread) [homeassistant.config] Invalid config for [mqtt]: expected dictionary for dictionary value @ data['mqtt']. Got [OrderedDict([('sensor', OrderedDict([('state_topic', 'cerbo/SoC')]))])]. (See /home/homeassistant/.homeassistant/configuration>
Oct 19 13:10:17 raspi4 hass[23236]: 2023-10-19 13:10:17.744 ERROR (MainThread) [homeassistant.setup] Setup failed for mqtt: Invalid config.
Oct 19 13:10:17 raspi4 hass[23236]: 2023-10-19 13:10:17.814 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of tasmota. Setup failed for dependencies: mqtt
Oct 19 13:10:17 raspi4 hass[23236]: 2023-10-19 13:10:17.815 ERROR (MainThread) [homeassistant.setup] Setup failed for tasmota: (DependencyError(...), 'Could not setup dependencies: mqtt')
Jambola77
(Jambola77)
October 19, 2023, 11:28am
8
I have now changed configuration.yaml to include a separate mqqt.yaml file. And this works!
mqtt: !include mqtt.yaml
mqtt.yaml:
sensor:
- name: Battery
state_topic: "cerbo/SoC"
unit_of_measurement: '%'
icon: mdi:battery-80