So it looks like I got MQTT running, and using the web interface can publish test packets and see packets pushed by OwnTracks. Great.
I installed MQTT mostly for OwnTracks. I set up OwnTracks with the following code:
device_tracker:
- platform: owntracks
max_gps_accuracy: 200
waypoints: true
mqtt_topic: "owntracks/#"
But when I restart, I get the following errors in the HA log:
Timer got out of sync. Resetting
2:39 PM core.py (ERROR)
Error setting up platform owntracks
2:39 PM components/mqtt/__init__.py (ERROR)
Unable to load /config/known_devices.yaml: Config file not found: /config/known_devices.yaml
2:39 PM components/device_tracker/__init__.py (ERROR)
Expanding the middle one shows:
Error setting up platform owntracks
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 180, in async_setup_platform
hass, p_config, tracker.async_see, disc_info)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/owntracks.py", line 93, in async_setup_scanner
hass, context.mqtt_topic, async_handle_mqtt_message, 1)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/mqtt/__init__.py", line 280, in async_subscribe
topic, msg_callback, qos, encoding)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/mqtt/__init__.py", line 662, in async_subscribe
await self._async_perform_subscription(topic, qos)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/mqtt/__init__.py", line 697, in _async_perform_subscription
_raise_on_error(result)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/mqtt/__init__.py", line 782, in _raise_on_error
'Error talking to MQTT: {}'.format(mqtt.error_string(result_code)))
homeassistant.exceptions.HomeAssistantError: Error talking to MQTT: The client is not currently connected.
I’m wondering if this is a timing issue. When I restart MQTT (using the plugin controls), it takes quite a while for it to come all the way up - on the order of minutes. Could it be that HA is expecting MQTT to be up before it is ready?
Any advice appreciated.