Okay, so i’ve tried to get this working for a couple of days.
I’ve read the documentation several times, upside down even.
I see the ESP’s in my ARP in the router, I see it in the unifi controller aswell.
They get IP and sends packets…
I got this in my hassio MQTT Broker addon:
1573655959: New client connected from 192.168.1.xx as esp32_2 (p2, c1, k60, u'username').
1573655962: New connection from 192.168.1.xx on port 1883.
1573655962: Client esp32_2 already connected, closing old connection.
1573655962: New client connected from 192.168.1.xx as esp32_2 (p2, c1, k60, u'username').
1573655985: New connection from 192.168.1.xx on port 1883.
1573655985: New client connected from 192.168.1.xx as nvr2112 (p1, c1, k60, u'username').
1573655985: Client nvr2112 disconnected.
1573655996: New connection from 192.168.1.xx on port 1883.
1573655996: New client connected from 192.168.1.xx as nvr2125 (p1, c1, k60, u'username').
1573655996: Client nvr2125 disconnected.
1573656098: New connection from 192.168.1.xx on port 1883.
1573656098: Client esp32_1 already connected, closing old connection.
1573656098: New client connected from 192.168.1.xx as esp32_1 (p2, c1, k60, u'username').
1573656130: New connection from 192.168.1.xx on port 1883.
[INFO] found username on local database
1573656130: Client esp32_1 already connected, closing old connection.
1573656130: New client connected from 192.168.1.xx as esp32_1 (p2, c1, k60, u'username').
1573656137: New connection from 192.168.1.xx on port 1883.
1573656137: Client esp32_2 already connected, closing old connection.
1573656137: New client connected from 192.168.1.xx as esp32_2 (p2, c1, k60, u'username').
1573656173: New connection from 192.168.1.xx on port 1883.
1573656173: Client esp32_1 already connected, closing old connection.
1573656173: New client connected from 192.168.1.xx as esp32_1 (p2, c1, k60, u'username').
1573656180: New connection from 192.168.1.xx on port 1883.
1573656180: Client esp32_1 already connected, closing old connection.
1573656180: New client connected from 192.168.1.xx as esp32_1 (p2, c1, k60, u'username').
1573656212: New connection from 192.168.1.xx on port 1883.
1573656212: Client esp32_3 already connected, closing old connection.
1573656212: New client connected from 192.168.1.xx as esp32_3 (p2, c1, k60, u'username').
The binary sensor is disconnected. Why? In Atom it says:
devices_discovered: 14
devices_reported: 2
Telemetry sent
Scanning...
More from Atom serial monitor:
Connecting to WiFi...
[WiFi-event] event: 0
Wifi Ready
restarted
[WiFi-event] event: 2
STA Start
WiFi Time remaining: 1999
[WiFi-event] event: 4
[WiFi-event] event: 7
IP address: 192.168.1.xx
Hostname: esp32_3
Connecting to MQTT
Stopping wifi reconnect timer
Scanning... Connected to MQTT.
Success sending message to topic: presence_nodes/Sovrummet
Telemetry sent
Scan done! Devices found: 11
binary_sensor.yaml
platform: mqtt
name: ESP32 3
state_topic: "presence_nodes/esp32_3"
json_attributes_topic: "presence_nodes/esp32_3/tele"
payload_on: "CONNECTED"
payload_off: "DISCONNECTED"
device_class: connectivity
sensor.yaml
platform: mqtt_room
device_id: "2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6-1-0"
name: 'Oskars_bt_mqtt'
state_topic: 'room_presence'
timeout: 10
away_timeout: 15