mqqt restful api vs http api

Posted on
Fri Feb 16, 2024 12:27 am
wamartei offline
Posts: 13
Joined: May 29, 2019

mqqt restful api vs http api

Hi,

I use mqqt to link Home Assistant with Indigo. Here is a typical automation entry that was working for me in the past. It keeps "living_room_fan" in sync between indigo and HASS. HASS is still able to receive commands from Indigo, but Indigo is no longer able to receive commands from HASS. That is, the line "indigo/devices/508358889/command/set'" is no longer being understood by Indigo even though it is being published to the mqqt server. This used to work until quite recently. Any help would be appreciated.


- alias: 'automation.living_room_fan'
trigger:
platform: state
entity_id: switch.living_room_fan
action:
- service: mqtt.publish
data:
topic: indigo/devices/508358889/command/set
payload_template: >
{% if is_state('switch.living_room_fan', 'on') %}
on
{% else %}
off
{% endif %}

- alias: 'mqtt.living_room_fan'
trigger:
platform: mqtt
topic: home-assistant-4m/mqtt.living_room_fan
action:
service_template: >
{% if (trigger.payload == 'true' or trigger.payload == 'True' ) %}
switch.turn_on
{% elif (trigger.payload == 'false' or trigger.payload == 'False' ) %}
switch.turn_off
{% endif %}
data:
entity_id:
- switch.living_room_fan

Posted on
Fri Feb 16, 2024 1:27 am
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: mqqt restful api vs http api

Hi, there is a specific plugin for Home Assistant to Indigo and it works great for me. Have you tried Home Assistant Agent?

Posted on
Fri Feb 16, 2024 7:02 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: mqqt restful api vs http api

What's changed on the Indigo side since this last worked?

Please confirm you have device control enabled in the MQTT Connector device configuration. Then you would need to enable debug logging in the Connector plugin.

However, as @Colly points out, it's much easier to use the (newish) Home Assistant Agent plugin rather than using the much more complicated MQTT method.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Feb 16, 2024 1:54 pm
wamartei offline
Posts: 13
Joined: May 29, 2019

Re: mqqt restful api vs http api

Thanks guys

I did not realize "Home Assistant Agent" was so easy to use. I've gotten it up and running super quickly and will replace my MQQT stuff. Thanks!

Posted on
Fri Feb 16, 2024 1:56 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: mqqt restful api vs http api

wamartei wrote:
Thanks guys

I did not realize "Home Assistant Agent" was so easy to use. I've gotten it up and running super quickly and will replace my MQQT stuff. Thanks!


Yeah, I put a lot of work into making setup really simple. It's limited in the device types it supports, but actual setup is easy.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests