mqqt restful api vs http api

wamartei
Posts: 14
Joined: Wed May 29, 2019 11:25 pm

mqqt restful api vs http api

Post by wamartei »

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
Colly
Posts: 550
Joined: Sat Jan 16, 2016 10:19 am
Location: Ireland

Re: mqqt restful api vs http api

Post by Colly »

Hi, there is a specific plugin for Home Assistant to Indigo and it works great for me. Have you tried Home Assistant Agent?
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: mqqt restful api vs http api

Post by FlyingDiver »

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
wamartei
Posts: 14
Joined: Wed May 29, 2019 11:25 pm

Re: mqqt restful api vs http api

Post by wamartei »

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!
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: mqqt restful api vs http api

Post by FlyingDiver »

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
Post Reply

Return to “MQTT”