I am having continuing issues trying to get MQTT to work with both my vacuum and room assistant. Hoping someone can shed some light on what I am doing wrong. I am fairly new to HA and despite the nice gui, everything seems to require manual configuration.
I have installed Mosquitto as an add on. Set up the user for mqtt to use. I can go to dev tools and publish a packet while listening and I see the message. I can also use MQTT Explorer to connect and publish. So I am fairly certain that MQTT is working and packets are getting to HA my RPi.
Task #1 was to get my Roborock S5 connected up. It is running Valetudo. Works fine via the web page but HA integration would be cool. I have enabled MQTT on the vac. The config.json has:
"mqtt": {
"enabled": true,
"identifier": "rockrobo",
"topicPrefix": "valetudo",
"autoconfPrefix": "homeassistant",
"broker_url": "mqtt://USER:[email protected]:1883",
"provideMapData": true,
"caPath": "",
"qos": 0
},
In my config.yaml for HA I have this based on a post I found here. I changed the topics from vacuum/XXXX to valetudo/XXX because that was the topic prefix in the vacuum config. Am I reading this incorrectly?? Still fuzzy on the mqtt functions. Under entities I have roborock with ID of vacuum.roborock and Vacuum as Integration. Clicking in there I have vacuum commands, however running any of those will produce a message in mqtt but the vac does nothing. Tailing the log on the vac, I see nothing.
vacuum:
- platform: mqtt
name: "roborock"
supported_features:
- turn_on
- turn_off
- pause
- stop
- return_home
- battery
- status
- locate
- clean_spot
- fan_speed
- send_command
command_topic: "valetudo/command"
battery_level_topic: "valetudo/state"
battery_level_template: "{{ value_json.battery_level }}"
charging_topic: "valetudo/state"
charging_template: "{{ value_json.charging }}"
cleaning_topic: "valetudo/state"
cleaning_template: "{{ value_json.cleaning }}"
docked_topic: "valetudo/state"
docked_template: "{{ value_json.docked }}"
Example Command:
Message 0 received on valetudo/command at 9:43 AM:
turn_on
Task #2 was to set up room assistant which I did using this guide. Aside from the locale issues on install all seems to be ok. However when I start room assistant I don’t see any MQTT connection being made. I do see an error connecting to local host or the correct port. Log and config below. The intent was to watch for my phone on BT. Per instructions I am supposed to get a new integration? I have nothing there.
7/3/2020, 9:31:36 AM - info - IntegrationsModule: Loading integrations: home-assistant, bluetooth-classic
7/3/2020, 9:31:39 AM - info - NestFactory: Starting Nest application...
7/3/2020, 9:31:41 AM - info - InstanceLoader: AppModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: ConfigModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: NestEmitterModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: IntegrationsModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: HttpModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: DiscoveryModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: HomeAssistantModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: ClusterModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: TerminusModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: ScheduleModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: EntitiesModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: BluetoothClassicModule dependencies initialized
7/3/2020, 9:31:41 AM - info - InstanceLoader: StatusModule dependencies initialized
7/3/2020, 9:31:44 AM - info - RoutesResolver: EntitiesController {/entities}:
7/3/2020, 9:31:44 AM - info - RouterExplorer: Mapped {/entities, GET} route
7/3/2020, 9:31:44 AM - info - RoutesResolver: StatusController {/status}:
7/3/2020, 9:31:44 AM - info - RouterExplorer: Mapped {/status, GET} route
7/3/2020, 9:31:45 AM - error - HomeAssistantService: Error: connect ECONNREFUSED 127.0.0.1:1883
7/3/2020, 9:31:46 AM - info - ConfigService: Loading configuration from /opt/nodejs/lib/node_modules/room-assistant/dist/config/definitions/default.js, config/local.yml
7/3/2020, 9:31:46 AM - info - ClusterService: Starting mDNS advertisements and discovery
Room Assistant Config.
global:
integrations:
- homeAssistant
- bluetoothClassic
homeAssistant:
mqttUrl: 'mqtt://XX.XX.XX.XX:1883'
mqttOptions:
username: USER
password: PW
bluetoothClassic:
addresses:
- XX:XX:XX:XX:X:XX
So what am I doing incorrectly in my config?? Sorry for the long post, been a few days of troubleshooting. Thanks for the help.