Trouble Refreshing Variables
Trouble Refreshing Variables
I'm a novice with MQTT but I did manage to get it working using MQTT Connector to pass device and variable data to Home Assistant. I had to make a small change to the template but I can't get the messages to be sent out with the new template. When a variable changes, it works but it's impractical to change them all. Is there anyway to reset the plugin so it sends out new messages for all the variables? Reloading the plugin and restarting the server didn't help at all. Thanks!
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Trouble Refreshing Variables
Why use MQTT for that? I would think it would be easier to use the Home Assistant Agent to send the updates to HA. There are "Set Number" and "Set Text" actions for passing info to HA.
I'll have to think about how to force the MQTT updates if you're using that method.
I'll have to think about how to force the MQTT updates if you're using that method.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Trouble Refreshing Variables
Hi Joe,
Actually I am using Home Assistant Agent to pull data from HA and it works great, but it doesn't go the other way AFAIK. I was going to try the newly working beta of HASSBridge to go the other way but it seems to only handle Indigo native devices and it's very hard to maintain the publication list.
OTOH, MQTT Connector works great! It's easy to set up and has the flexibility to publish to HA in the right syntax. Entities in HA from Indigo devices and variables are created automatically and update very quickly. This is the only problem I encountered and I've solved it for now by going through the variables one by one, changing their values and changing them back. Kind of a pain but it worked. Some way to clear out its publications cache would be much better.
Thanks for the quick reply.
--Dave
Actually I am using Home Assistant Agent to pull data from HA and it works great, but it doesn't go the other way AFAIK. I was going to try the newly working beta of HASSBridge to go the other way but it seems to only handle Indigo native devices and it's very hard to maintain the publication list.
OTOH, MQTT Connector works great! It's easy to set up and has the flexibility to publish to HA in the right syntax. Entities in HA from Indigo devices and variables are created automatically and update very quickly. This is the only problem I encountered and I've solved it for now by going through the variables one by one, changing their values and changing them back. Kind of a pain but it worked. Some way to clear out its publications cache would be much better.
Thanks for the quick reply.
--Dave
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Trouble Refreshing Variables
There are actions for pushing data to HA, but it's not as "automatic" as the MQTT mechanism. It requires triggers for each variable or device state you want to push, and the creation of a Number or String entity in HA to receive the data. The HA Agent plugin was not designed for pushing device data from Indigo to HA. If you're doing a lot of pushes, then MQTT is probably better.
As for the mass update, the MQTT connector doesn't cache anything, and only publishes an update message when it gets a change notification from Indigo. So what you did was the only option.
As for the mass update, the MQTT connector doesn't cache anything, and only publishes an update message when it gets a change notification from Indigo. So what you did was the only option.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Trouble Refreshing Variables
OK, thanks for looking at it Joe. If it happens again, especially as I pass more variables to HA, I could probably create an action to go through the list of variables, clearing the value and putting it back in. This would mimic what I did manually.
I wonder if there is any mechanism in Indigo to "touch" all the variables and trigger a change. A challenge for another day.
I wonder if there is any mechanism in Indigo to "touch" all the variables and trigger a change. A challenge for another day.