Execute HAAS command via MQTT
-
Is there an easy way to convert this kind of commands:
to an MQTT-based one?
I've tried with
reactor/mqtt/hass/remote_harmony_living_room/perform/x_hass/remote_send_command {'device':'75125041', 'command': 'PowerOff', 'num_repeats': '1', 'delay_secs': '0.4', 'hold_secs': '0'}
but it doesn't work. Thanks!
-
Well, the capability and action name aren't correct, or at least, don't agree with the screen shot. The screen shot shows the capability is
x_hass_remote
and the action name issend_command
, so the MQTT topic should bereactor/mqtt/hass/remote_harmony_living_room/perform/x_hass_remote/send_command
Look at the log. It probably exposed this, because the action
remote_send_command
doesn't exist in capabilityx_hass
. I would be very surprised if nothing is logged for that. -
Yep, wrong copy and past after a couple of tests.
Logs are showing this:[latest-21349]2021-12-17T15:44:07.606Z <MQTTController:NOTICE> topic reactor/mqtt/hass/remote_harmony_living_room/perform/x_hass_remote_send_command for entity hass>remote_harmony_living_room: entity does not support capability x_hass_remote_send_command
So I've added this to local_hass_devices.yaml with no luck:
"hass>remote_harmony_living_room": name: "Harmony Hub @Living Room" capabilities: - x_hass_remote_send_command
I've also tried remote.send_command with no luck.
-
x_hass_remote_send_command
Still not right. It's
x_hass_remote
SLASHsend_command
in the topic. -
No need. If it has the capability on the entity, setting it in local config is redundant.
If I had a dollar for every thing I've stared at for an hour and not found the typo, I wouldn't be tapping out this message right now.
-
Yeah, I know that feeling.
So, right now I'm on week 2 and I've completely removed every plug-in from my Vera and moved most of them to HomeAssistant (or my own code). MQTT is doing great, and now I'm sending my TV commands via HA bridge, then to a wrapper aggregating them for MQTT and pushed via MSR to HA. It seems complicated, but it's pretty fast. Bonus point, I have a nicely formatted MQTT message from MSR when Harmony Activities are changed.
Next week I'll work on my solar integrations (my installer was slow due to bad weather, so we will switch the system on next week), but I've already pushed a couple of things via MQTT.
I will eventually move other things to HA and use the MQTT trick to execute services from other part of my logic. Thanks for the work!
-
T toggledbits locked this topic on