Ill try to be brief. Im attempting to setup a master/slave type scenario. I have a raspberry pi located in a very central location of the house setup with wyzesense to act as a hub for that. I then wish to get all those events to my main home assistant install.
wyzesense raspberry pi config (slave/publisher):
mqtt:
broker: !secret mqtt_broker_address
port: !secret mqtt_broker_port
username: !secret mqtt_username
password: !secret mqtt_password
tls_version: '1.2'
certificate: '/home/ubuntu/.homeassistant/le-ca-cert.crt'
discovery: false
mqtt_statestream:
base_topic: secpi
publish_attributes: true
publish_timestamps: true
include:
domains:
- binary_sensor
master/subscriber config:
mqtt:
broker: !secret mqtt_broker_address
port: !secret mqtt_broker_port
username: !secret mqtt_username
password: !secret mqtt_password
tls_version: '1.2'
certificate: '/home/ubuntu/.homeassistant/le-ca-cert.crt'
discovery: true
discovery_prefix: secpi
Everything works as expected. I see the secondary pi publish to mqtt and can subscribe to those messages. I see the main pi can access them as well because in the logs I see:
2020-06-04 10:43:21 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on secpi/binary_sensor/wyzesense_712ab3069/state: b'off'
2020-06-04 10:43:22 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on secpi/binary_sensor/wyzesense_712ab3069/last_updated: b'2020-06-04T15:43:21.659974+00:00'
2020-06-04 10:43:22 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on secpi/binary_sensor/wyzesense_712ab3069/last_changed: b'2020-06-04T15:43:21.659974+00:00'
2020-06-04 10:43:22 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on secpi/binary_sensor/wyzesense_712ab3069/mac: b'"712ab3069"'
2020-06-04 10:43:22 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on secpi/binary_sensor/wyzesense_712ab3069/device_class: b'"motion"'
2020-06-04 10:43:22 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on secpi/binary_sensor/wyzesense_712ab3069/timestamp: b'"2020-06-04T10:42:53.858000"'
2020-06-04 10:43:22 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on secpi/binary_sensor/wyzesense_712ab3069/rssi: b'-68'
2020-06-04 10:43:22 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on secpi/binary_sensor/wyzesense_712ab3069/battery_level: b'99'
2020-06-04 10:43:22 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on secpi/binary_sensor/wyzesense_712ab3069/friendly_name: b'"Office Motion"'
Within lovelace, however, I do not see any device with either name wyzesense_712ab3069 nor Office Motion. If i manually add that device then it will show up in lovelace, but never gets updated; meanwhile the log shows each time the topic gets a message it is picked up my the main HA instance.
binary_sensor:
- platform: mqtt
state_topic: "secpi/binary_sensor/wyzesense_712ab3069"
name: "Office Motion"
device_class: motion
at a bit of a loss to figure out how to get home assistant to properly pick these up, any help would be appreciated.
john