Hi,
I’m very sorry if its just me being to dumb to understand, but I just can’t figure out a way to connect my nodeMCU to my Home Assistant. The Assistant is running on a VM in a PVE and the mosquitto Add-on is my Broker. The Node has a config on it, is working correctly, is in the same WiFi, can actually connect and send data to the Broker, but it’s listed nowhere in my Assistant. My sensor in the configuration.yaml: (It’s a dht22)
Where do I have to look to find scanned devices? I can see in the mosquitto log that the authentication was successful, but no entitiy is shown. The sent topics are exactly how I tried the “state_topic” in the config.
My indentation is off? What do you mean?
This isn’t the actual code, I wrote it on kate, so I could copy it in here.
The original only uses Space, no tab
What you have there is not based on MQTT discovery. So you should not expect anything to be “automatic” until there is a published message on either of those channels AFAIK.
You are using MQTT Sensor which is a manual integration.
It doesn’t matter on what operating system or text editor you wrote it in, if you ask for configuration help you really should be copying and pasting, as indentation issues (and human error) will break your sensors/configs!
Sorry, VIM won’t let me cut it, and ssh somehow fails, even if the Add on is installed, I don’t know what i am doing wrong, but this is the format in the config:
[INFO] found mqtt on Home Assistant
1600956243: New client connected from 172.24.109.72 as client_serverroom51 (p2, c1, k15, u'mqtt').
1600956266: Client client_serverroom51 has exceeded timeout, disconnecting.
1600956317: New connection from 172.24.109.72 on port 1883.
1600956317: New client connected from 172.24.109.72 as client_serverroom51 (p2, c1, k15, u'mqtt').
1600956339: Client client_serverroom51 has exceeded timeout, disconnecting.
1600956390: New connection from 172.24.109.72 on port 1883.
1600956390: New client connected from 172.24.109.72 as client_serverroom51 (p2, c1, k15, u'mqtt').
1600956412: Client client_serverroom51 has exceeded timeout, disconnecting.
1600956463: New connection from 172.24.109.72 on port 1883.
1600956463: New client connected from 172.24.109.72 as client_serverroom51 (p2, c1, k15, u'mqtt').
1600956486: Client client_serverroom51 has exceeded timeout, disconnecting.
1600956537: New connection from 172.24.109.72 on port 1883.
1600956537: New client connected from 172.24.109.72 as client_serverroom51 (p2, c1, k15, u'mqtt').
1600956559: Client client_serverroom51 has exceeded timeout, disconnecting.
1600956610: New connection from 172.24.109.72 on port 1883.
[INFO] found mqtt on Home Assistant
1600956611: New client connected from 172.24.109.72 as client_serverroom51 (p2, c1, k15, u'mqtt').
1600956633: Client client_serverroom51 has exceeded timeout, disconnecting.
1600956684: New connection from 172.24.109.72 on port 1883.
1600956684: New client connected from 172.24.109.72 as client_serverroom51 (p2, c1, k15, u'mqtt').
1600956707: Client client_serverroom51 has exceeded timeout, disconnecting.
The HA log:
[13:32:58] INFO: Start local supervisor watchdog...
20-09-24 13:32:59 INFO (MainThread) [__main__] Initialize Supervisor setup
20-09-24 13:32:59 INFO (MainThread) [supervisor.bootstrap] Initialize Supervisor Sentry
20-09-24 13:32:59 INFO (MainThread) [supervisor.bootstrap] Setup coresys for machine: qemux86-64
20-09-24 13:32:59 INFO (SyncWorker_0) [supervisor.docker.supervisor] Attach to Supervisor homeassistant/amd64-hassio-supervisor with version 245
20-09-24 13:32:59 INFO (MainThread) [__main__] Setup Supervisor
20-09-24 13:32:59 INFO (MainThread) [supervisor.host.info] Update local host information
20-09-24 13:32:59 INFO (MainThread) [supervisor.host.services] Update service information
20-09-24 13:32:59 INFO (MainThread) [supervisor.host.network] Update local network information
20-09-24 13:32:59 INFO (MainThread) [supervisor.host.sound] Update PulseAudio information
20-09-24 13:32:59 INFO (MainThread) [supervisor.host.apparmor] Load AppArmor Profiles: {'hassio-supervisor'}
20-09-24 13:32:59 INFO (MainThread) [supervisor.host.services] Reload local service hassos-apparmor.service
20-09-24 13:32:59 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/amd64-hassio-dns with version 9
20-09-24 13:32:59 WARNING (MainThread) [supervisor.plugins.dns] Ignore invalid DNS Server: dns://fe80::6238:e0ff:fed7:5a67
20-09-24 13:32:59 INFO (MainThread) [supervisor.plugins.dns] Start CoreDNS plugin
20-09-24 13:33:01 INFO (SyncWorker_0) [supervisor.docker.dns] Start DNS homeassistant/amd64-hassio-dns with version 9 - 172.30.32.3
20-09-24 13:33:01 INFO (MainThread) [supervisor.plugins.dns] Updated /etc/resolv.conf
20-09-24 13:33:01 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/amd64-hassio-audio with version 17
20-09-24 13:33:01 INFO (MainThread) [supervisor.plugins.audio] Start Audio plugin
20-09-24 13:33:03 INFO (SyncWorker_0) [supervisor.docker.audio] Start Audio homeassistant/amd64-hassio-audio with version 17 - 172.30.32.4
20-09-24 13:33:03 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/amd64-hassio-cli with version 26
20-09-24 13:33:03 INFO (MainThread) [supervisor.plugins.cli] Start cli plugin
20-09-24 13:33:05 INFO (SyncWorker_0) [supervisor.docker.cli] Start CLI homeassistant/amd64-hassio-cli with version 26 - 172.30.32.5
20-09-24 13:33:05 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/amd64-hassio-observer with version 3
20-09-24 13:33:05 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/amd64-hassio-multicast with version 3
20-09-24 13:33:05 INFO (MainThread) [supervisor.plugins.multicast] Start Multicast plugin
20-09-24 13:33:06 INFO (SyncWorker_0) [supervisor.docker.multicast] Start Multicast homeassistant/amd64-hassio-multicast with version 3 - Host
20-09-24 13:33:06 INFO (MainThread) [supervisor.updater] Fetch update data from https://version.home-assistant.io/stable.json
20-09-24 13:33:06 INFO (MainThread) [supervisor.homeassistant.secrets] Load Home Assistant secrets: 1
20-09-24 13:33:06 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/qemux86-64-homeassistant with version 0.115.2
20-09-24 13:33:06 INFO (MainThread) [supervisor.hassos] Detect HassOS 4.13 / BootSlot A
20-09-24 13:33:06 INFO (MainThread) [supervisor.store.git] Load add-on /data/addons/core repository
20-09-24 13:33:06 INFO (MainThread) [supervisor.store.git] Load add-on /data/addons/git/a0d7b954 repository
20-09-24 13:33:06 INFO (MainThread) [supervisor.store] Load add-ons from store: 66 all - 66 new - 0 remove
20-09-24 13:33:06 INFO (MainThread) [supervisor.addons] Found 4 installed add-ons
20-09-24 13:33:06 INFO (SyncWorker_1) [supervisor.docker.interface] Attach to esphome/esphome-hassio-amd64 with version 1.15.2
20-09-24 13:33:06 INFO (SyncWorker_2) [supervisor.docker.interface] Attach to homeassistant/amd64-addon-configurator with version 5.1.0
20-09-24 13:33:06 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/amd64-addon-ssh with version 8.9.1
20-09-24 13:33:06 INFO (SyncWorker_3) [supervisor.docker.interface] Attach to homeassistant/amd64-addon-mosquitto with version 5.1
20-09-24 13:33:06 INFO (MainThread) [supervisor.snapshots] Found 0 snapshot files
20-09-24 13:33:06 INFO (MainThread) [supervisor.discovery] Load 1 messages
20-09-24 13:33:06 INFO (MainThread) [supervisor.ingress] Load 8 ingress session
20-09-24 13:33:06 INFO (MainThread) [__main__] Run Supervisor
20-09-24 13:33:06 INFO (MainThread) [supervisor.api] Start API on 172.30.32.2
20-09-24 13:33:06 INFO (MainThread) [supervisor.hassos] Rauc: A - marked slot kernel.0 as good
20-09-24 13:33:06 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.INITIALIZE' start 0 add-ons
20-09-24 13:33:06 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SYSTEM' start 1 add-ons
20-09-24 13:33:08 INFO (SyncWorker_0) [supervisor.docker.addon] Start Docker add-on homeassistant/amd64-addon-mosquitto with version 5.1
20-09-24 13:33:09 INFO (MainThread) [supervisor.services.modules.mqtt] Set core_mosquitto as service provider for mqtt
20-09-24 13:33:13 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SERVICES' start 1 add-ons
20-09-24 13:33:15 INFO (SyncWorker_1) [supervisor.docker.addon] Start Docker add-on homeassistant/amd64-addon-ssh with version 8.9.1
20-09-24 13:33:20 INFO (SyncWorker_0) [supervisor.docker.interface] Start homeassistant
20-09-24 13:33:21 INFO (MainThread) [supervisor.homeassistant.core] Wait until Home Assistant is ready
20-09-24 13:33:25 INFO (MainThread) [supervisor.auth] Auth request from core_mosquitto for mqtt
20-09-24 13:33:25 INFO (MainThread) [supervisor.auth] Home Assistant not running, check cache
20-09-24 13:33:25 INFO (MainThread) [supervisor.auth] Cache hit for mqtt
20-09-24 13:33:26 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
20-09-24 13:33:26 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance
20-09-24 13:33:26 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.APPLICATION' start 2 add-ons
20-09-24 13:33:29 INFO (SyncWorker_2) [supervisor.docker.addon] Start Docker add-on homeassistant/amd64-addon-configurator with version 5.1.0
20-09-24 13:33:30 INFO (SyncWorker_3) [supervisor.docker.addon] Start Docker add-on esphome/esphome-hassio-amd64 with version 1.15.2
20-09-24 13:33:31 INFO (MainThread) [supervisor.api.security] /host/info access from a0d7b954_esphome
20-09-24 13:33:35 INFO (MainThread) [supervisor.misc.tasks] All core tasks are scheduled
20-09-24 13:33:35 INFO (MainThread) [supervisor.misc.hwmon] Started Supervisor hardware monitor
20-09-24 13:33:35 INFO (MainThread) [supervisor.core] Supervisor is up and running
20-09-24 13:33:35 INFO (MainThread) [supervisor.host.info] Update local host information
20-09-24 13:33:35 INFO (MainThread) [supervisor.host.services] Update service information
20-09-24 13:33:35 INFO (MainThread) [supervisor.host.network] Update local network information
20-09-24 13:33:35 INFO (MainThread) [supervisor.host.sound] Update PulseAudio information
20-09-24 13:39:32 INFO (MainThread) [supervisor.auth] Auth request from core_mosquitto for mqtt
20-09-24 13:39:32 INFO (MainThread) [supervisor.auth] Success login from mqtt
20-09-24 13:45:40 INFO (MainThread) [supervisor.auth] Auth request from core_mosquitto for mqtt
20-09-24 13:45:40 INFO (MainThread) [supervisor.auth] Success login from mqtt
20-09-24 13:51:47 INFO (MainThread) [supervisor.auth] Auth request from core_mosquitto for mqtt
20-09-24 13:51:48 INFO (MainThread) [supervisor.auth] Success login from mqtt
20-09-24 13:57:55 INFO (MainThread) [supervisor.auth] Auth request from core_mosquitto for mqtt
20-09-24 13:57:55 INFO (MainThread) [supervisor.auth] Success login from mqtt
20-09-24 14:04:03 INFO (MainThread) [supervisor.auth] Auth request from core_mosquitto for mqtt
20-09-24 14:04:03 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
20-09-24 14:04:03 INFO (MainThread) [supervisor.auth] Success login from mqtt
20-09-24 14:10:10 INFO (MainThread) [supervisor.auth] Auth request from core_mosquitto for mqtt
20-09-24 14:10:11 INFO (MainThread) [supervisor.auth] Success login from mqtt
That’ what it gets.
And here (Sorry, like I said, don’t have a real terminal, only the Web Add on and can’t copy from that) is my config. But it should be okay, “Check config” said it’s valid