It turns out the “mqtt_” prefix was removed in late October. Removing that, it immediately connected.
appdaemon:
threads: 10
plugins:
MQTT:
type: mqtt
namespace: appdaemon-mqtt
verbose: True
client_host: '192.168.7.155'
client_port: 1883
client_user: !secret mqtt_user
client_password: !secret mqtt_password
Everything appears to be functioning properly now. But, I am getting a warning about an MQTT KeyError. Not sure if that’s a problem or not. (I changed the mac addresses of known devices to 0’s for security)
2018-12-15 23:23:11.006830 INFO AppDaemon Version 3.0.2 starting,
2018-12-15 23:23:11.007116 INFO Configuration read from: /conf/appdaemon.yaml,
2018-12-15 23:23:11.008079 INFO AppDaemon: Starting Apps,
2018-12-15 23:23:11.009370 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin,
2018-12-15 23:23:11.037039 INFO AppDaemon: HASS: HASS Plugin Initializing,
2018-12-15 23:23:11.037406 INFO AppDaemon: HASS: HASS Plugin initialization complete,
2018-12-15 23:23:11.037550 INFO AppDaemon: Loading Plugin MQTT using class MqttPlugin from module mqttplugin,
2018-12-15 23:23:11.039335 INFO AppDaemon: MQTT: MQTT Plugin Initializing,
2018-12-15 23:23:11.039453 INFO AppDaemon: MQTT: Using 'mqtt client status' as Will Topic,
2018-12-15 23:23:11.039539 INFO AppDaemon: MQTT: Using 'mqtt client status' as Birth Topic,
2018-12-15 23:23:11.039624 INFO AppDaemon: MQTT: Using 'appdaemon_mqtt_client' as Client ID,
2018-12-15 23:23:11.039890 INFO Starting Dashboards,
2018-12-15 23:23:11.042057 INFO API is disabled,
2018-12-15 23:23:11.148860 INFO AppDaemon: HASS: Connected to Home Assistant 0.84.2,
2018-12-15 23:23:11.151470 INFO AppDaemon: MQTT: Connected to Broker at URL 192.168.7.155:1883,
2018-12-15 23:23:11.151604 INFO AppDaemon: MQTT: Subscribing to Topic: #,
2018-12-15 23:23:11.151730 INFO AppDaemon: MQTT: Subscription to Topic # Sucessful,
2018-12-15 23:23:11.154864 INFO AppDaemon: MQTT: *** Sending Complete State: {'mqtt.none': {'state': 'None', 'attributes': {}}} ***,
2018-12-15 23:23:11.155012 INFO AppDaemon: Got initial state from namespace appdaemon-mqtt,
2018-12-15 23:23:11.155102 INFO AppDaemon: MQTT: MQTT Plugin initialization complete,
2018-12-15 23:23:11.187100 INFO AppDaemon: Got initial state from namespace appdaemon-hass,
2018-12-15 23:23:12.626077 INFO AppDaemon: MQTT: Message Received: Topic = location/first floor/00:00:00:00:00:00, Payload = b'{"id":"00:00:00:00:00:00", "retained":"false", "version":"0.1.675", "confidence":"0","name":"Crescentwood Mac mini [mk]","timestamp":"Sat Dec 15 2018 23:23:10 GMT+0000 (UTC)","manufacturer":"Apple, Inc.","type":"GENERIC_BEACON","rssi":""}',
2018-12-15 23:23:13.169937 INFO AppDaemon: Reading config,
2018-12-15 23:23:13.172372 INFO AppDaemon: /conf/apps/apps.yaml added or modified,
2018-12-15 23:23:13.172488 INFO AppDaemon: /conf/apps/apps.yaml added or modified,
2018-12-15 23:23:13.172575 INFO AppDaemon: App 'home_presence_app' added,
2018-12-15 23:23:13.172689 INFO AppDaemon: Adding /conf/apps to module import path,
2018-12-15 23:23:13.172846 INFO AppDaemon: Loading App Module: /conf/apps/home_presence_app.py,
2018-12-15 23:23:13.175856 INFO AppDaemon: Initializing app home_presence_app using class HomePresenceApp from module home_presence_app,
2018-12-15 23:23:13.176096 WARNING AppDaemon: home_presence_app: Entity presence.monitor_state not found in AppDaemon,
2018-12-15 23:23:13.176261 WARNING AppDaemon: ------------------------------------------------------------,
2018-12-15 23:23:13.176556 WARNING AppDaemon: Unexpected error running initialize() for home_presence_app,
2018-12-15 23:23:13.176701 WARNING AppDaemon: ------------------------------------------------------------,
2018-12-15 23:23:13.177660 WARNING AppDaemon: Traceback (most recent call last):,
File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 1581, in init_object,
init(),
File "/conf/apps/home_presence_app.py", line 31, in initialize,
self.set_app_state(self.monitor_entity, state = 'idle', attributes = {'location': []}) #set it to idle initially,
File "/usr/local/lib/python3.6/site-packages/appdaemon/plugins/mqtt/mqttapi.py", line 94, in set_app_state,
if entity_id in self.get_state(namespace = namespace):,
File "/usr/local/lib/python3.6/site-packages/appdaemon/plugins/mqtt/mqttapi.py", line 82, in get_state,
return super(Mqtt, self).get_state(namespace, entity, **kwargs),
File "/usr/local/lib/python3.6/site-packages/appdaemon/appapi.py", line 228, in get_state,
return self.AD.get_state(namespace, device, entity, attribute),
File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 701, in get_state,
return deepcopy(self.state[namespace]),
KeyError: 'mqtt',
,
2018-12-15 23:23:13.177828 WARNING AppDaemon: ------------------------------------------------------------,
2018-12-15 23:23:13.178077 INFO AppDaemon: App initialization complete,
2018-12-15 23:23:15.948833 INFO AppDaemon: MQTT: Message Received: Topic = location/first floor/00:00:00:00:00:00, Payload = b'{"id":"00:00:00:00:00:00", "retained":"false", "version":"0.1.675", "confidence":"90","name":"Matthew\'s Apple Watch","timestamp":"Sat Dec 15 2018 23:23:15 GMT+0000 (UTC)","manufacturer":"Apple, Inc.","type":"KNOWN_MAC","rssi":""}',
2018-12-15 23:23:19.160255 INFO AppDaemon: MQTT: Message Received: Topic = location/first floor/00:00:00:00:00:00, Payload = b'{"id":"00:00:00:00:00:00", "retained":"false", "version":"0.1.675", "confidence":"100","name":"Undiscoverable Device Name","timestamp":"Sat Dec 15 2018 23:23:18 GMT+0000 (UTC)","manufacturer":"Texas Instruments","type":"GENERIC_BEACON","rssi":"-82","rssi":"-82","adv_data":"04 3E 0C 02 01 04 00 75 8C 26 3E 31 5C 00 AE"}',
2018-12-15 23:23:24.417595 INFO AppDaemon: MQTT: Message Received: Topic = location/first floor/00:00:00:00:00:00, Payload = b'{"id":"00:00:00:00:00:00", "retained":"false", "version":"0.1.675", "confidence":"100","name":"Matthew\'s Apple Watch","timestamp":"Sat Dec 15 2018 23:23:24 GMT+0000 (UTC)","manufacturer":"Apple, Inc.","type":"KNOWN_MAC","rssi":""}',
2018-12-15 23:23:38.923626 INFO AppDaemon: MQTT: Message Received: Topic = location/first floor/00:00:00:00:00:00, Payload = b'{"id":"00:00:00:00:00:00", "retained":"false", "version":"0.1.675", "confidence":"27","name":"Matthew\'s MacBook Pro","timestamp":"Sat Dec 15 2018 23:23:38 GMT+0000 (UTC)","manufacturer":"Apple, Inc.\nApple, Inc.","type":"GENERIC_BEACON","rssi":"-78","rssi":"-78"}',