MQTT comunication between Indigo and Home assistant
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: MQTT comunication between Indigo and Home assistant
What's the command you're sending from MQTT Explorer (that works)?
And what does your configuration.yaml entry for the switch look like?
And what does your configuration.yaml entry for the switch look like?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: MQTT comunication between Indigo and Home assistant
If I subscribe to
And I publish just indigo/devices/1752710570/command/on
without any payload the light goes on and off.
My switch config looks like this:
The state is working, so I get the correct updated state in HA
Code: Select all
indigo/devices/1752710570/command/on
indigo/devices/1752710570/command/offwithout any payload the light goes on and off.
My switch config looks like this:
Code: Select all
- platform: mqtt
name: "Office desk switch"
state_topic: "indigo/devices/1752710570/update"
command_topic: "indigo/devices/1752710570/command"
payload_on: "on"
payload_off: "off"
state_on: "True"
state_off: "False"
optimistic: false
value_template: '{{value_json.states.onOffState}}'
qos: 0
retain: true- Attachments
-
- Skjermbilde 2020-03-29 kl. 18.47.44.png (18.39 KiB) Viewed 2933 times
Håvard
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: MQTT comunication between Indigo and Home assistant
Change:
to
Per the available commands listed here: viewtopic.php?f=316&t=23764
Code: Select all
command_topic: "indigo/devices/1752710570/command"
Code: Select all
command_topic: "indigo/devices/1752710570/command/set"
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: MQTT comunication between Indigo and Home assistant
And don't subscribe to individual topics like that, it's really inefficient. Just use:haavarda wrote:If I subscribe toCode: Select all
indigo/devices/1752710570/command/on indigo/devices/1752710570/command/off
Code: Select all
indigo/devices/#joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: MQTT comunication between Indigo and Home assistant
Will do
After changing the subscription to
and changing the command topic as you suggested I was able to get it to work.
And it seams that all devices now are available, and not only the ones that I publish the states to. But I assume that is the way it is supposed to be
Thanks a lot for your support. Now it is on to try to get the dimmer to work.
After changing the subscription to
Code: Select all
indigo/devices/#And it seams that all devices now are available, and not only the ones that I publish the states to. But I assume that is the way it is supposed to be
Thanks a lot for your support. Now it is on to try to get the dimmer to work.
Håvard
Re: MQTT comunication between Indigo and Home assistant
I am realy struggeling to get my head around getting the dimmer to work. Since I am not that in to programming, I have spent a lot of time with trail and error... But no luck so far.
I am trying to get a dimmable light to be controlled by HA and get the correct states. As of now, I am able to control the light, but I am not able to pull the correct on/off or brightness state.
In basic I am using this info to configure my device:
https://www.home-assistant.io/integrati ... e_template
My dimmable light is sending this information over mqtt:
And my attempt at config is as follows:
Any idea on how to fix it?
I am trying to get a dimmable light to be controlled by HA and get the correct states. As of now, I am able to control the light, but I am not able to pull the correct on/off or brightness state.
In basic I am using this info to configure my device:
https://www.home-assistant.io/integrati ... e_template
My dimmable light is sending this information over mqtt:
Code: Select all
{
"name": "Light - Desk - Office",
"deviceId": "1752710570",
"model": "Ambiance Lights",
"address": "192.168.2.41 (ID 15)",
"states": {
"alertMode": "none",
"alertMode.ui": "none",
"brightnessLevel": "100",
"brightnessLevel.ui": "100",
"colorMode": "ct",
"colorMode.ui": "ct",
"colorTemp": "2959",
"colorTemp.ui": "2959",
"effect": "none",
"effect.ui": "none",
"onOffState": "True",
"online": "True",
"online.ui": "True",
"whiteLevel": "100.0",
"whiteLevel.ui": "100",
"whiteTemperature": "2959.0",
"whiteTemperature.ui": "2959"
}
}Code: Select all
- platform: mqtt
name: "Office desk light"
state_topic: "indigo/devices/1752710570/update"
command_topic: "indigo/devices/1752710570/command/set"
brightness_state_topic: "indigo/devices/1752710570/update"
brightness_command_topic: "indigo/devices/1752710570/command/brightness"
state_value_template: "{{value_json.states.onOffState}}"
brightness_value_template: "{{value_json.states.brightnessLevel}}"
qos: 0
payload_on: "on"
payload_off: "off"
optimistic: false
brightness_scale: 100
#on_command_type: brightnessHåvard
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: MQTT comunication between Indigo and Home assistant
Did you say you have this working for a switch (relay type device)? If so, post the published message (and topic) and the config entry. I have an idea of what the problem is.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: MQTT comunication between Indigo and Home assistant
After even more trail and error I found that this setting is sort of working:
I have commented out some commands, and now I think it is working. It is some strange behaviour related to on. As the device goes to 100 when I send on from HA.
Code: Select all
- platform: mqtt
name: "Office desk light"
#state_topic: "indigo/devices/1752710570/update"
command_topic: "indigo/devices/1752710570/command/set"
brightness_state_topic: "indigo/devices/1752710570/update"
brightness_command_topic: "indigo/devices/1752710570/command/brightness"
#state_value_template: "{{value_json.states.onOffState}}"
brightness_value_template: "{{value_json.states.brightnessLevel}}"
#value_template: "{{value_json.states.brightnessLevel}}" #Temp
qos: 0
payload_on: "on"
payload_off: "off"
optimistic: false
brightness_scale: 100
on_command_type: brightnessHåvard
Re: MQTT comunication between Indigo and Home assistant
I now see that when I introduce this line:
It stops working.
Code: Select all
#state_topic: "indigo/devices/1752710570/update"Håvard
Re: MQTT comunication between Indigo and Home assistant
After a lot of google I have been able to figure part of the dimming issue out.
The following config is working:
The only thing that is a bit strange now is that if I set the light to 50%, turn it off, then toggle it on, it will go to 100%. Not sure where this behaviour is configured? But I have tried with and without
https://www.home-assistant.io/integrati ... mmand_type
Could this be related to how data is processed when received on the Indigo side? I can observe that when I set the light to 50%, then off, and then toggle, it will only be transmitted a mqtt on, not an updated brightness.
The following config is working:
Code: Select all
- platform: mqtt
name: "Office desk light"
state_topic: "indigo/devices/1752710570/update"
command_topic: "indigo/devices/1752710570/command/set"
brightness_state_topic: "indigo/devices/1752710570/update"
brightness_command_topic: "indigo/devices/1752710570/command/brightness"
state_value_template: '{{ "on" if value_json.states.onOffState == "True" else "off" }}'
brightness_value_template: "{{value_json.states.brightnessLevel}}"
#on_command_type: brightness
qos: 0
payload_on: "on"
payload_off: "off"
optimistic: false
brightness_scale: 100Code: Select all
on_command_type: brightnessCould this be related to how data is processed when received on the Indigo side? I can observe that when I set the light to 50%, then off, and then toggle, it will only be transmitted a mqtt on, not an updated brightness.
- Attachments
-
- Skjermbilde 2020-03-30 kl. 16.02.34.png (71.51 KiB) Viewed 2836 times
Håvard
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: MQTT comunication between Indigo and Home assistant
If you toggle it on and off using the Indigo controls (not MQTT from HA), does it behave correctly?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: MQTT comunication between Indigo and Home assistant
Yes, it does.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Håvard
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: MQTT comunication between Indigo and Home assistant
I'll need to see the Indigo log for both methods of controlling the light. Basically, I need to see what commands are being sent to the plugin controlling that light, using both control methods. You might need to put the light's plugin in debug logging mode.
What kind of light is it, anyway?
What kind of light is it, anyway?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: MQTT comunication between Indigo and Home assistant
This is when I operate a z-wave device.
1 Set it to 66%
2 Turn off
3 Turn on --> Turns on to 66%
1 Set it to 66%
2 Turn off
3 Turn on --> Turns on to 66%
Last edited by haavarda on Mon Mar 30, 2020 10:54 am, edited 1 time in total.
Håvard
Re: MQTT comunication between Indigo and Home assistant
And from HA UI
1 Light is at 66&
2 Turn off
3 Turn on --> Turnes on to 100%
1 Light is at 66&
2 Turn off
3 Turn on --> Turnes on to 100%
Last edited by haavarda on Mon Mar 30, 2020 10:54 am, edited 1 time in total.
Håvard