blueman2 Posted June 25, 2019 Share Posted June 25, 2019 I know we can do polling of ISY variables using rest GET commands, like rana outlined in his post: But is there a way to have the ISY send variable changes to HA only when needed? It seems like a waste of comms traffic to constantly poll the ISY for changes to variables when often rarely change. I am new to Home Assistant, so was not sure how to accomplish this. I have tried the ISY994 addon, but that does not seem to include variables, and all I really want to track on HA are my ISY variables. Blueman2 Link to comment
larryllix Posted June 26, 2019 Share Posted June 26, 2019 The Node Servers do it by hooking into the pushed data stream so it is possible with the right code. PolyGlot should be open to view the pthon3 code/technique. Link to comment
rccoleman Posted June 26, 2019 Share Posted June 26, 2019 The challenge is that Home Assistant doesn’t support general variables like the ISY and instead offers a few alternatives that are subtly or significantly different (input_select, input_boolean, template sensors, etc). As mentioned in the other thread, they could be exposed as sensors, but it doesn’t look like that’s been implemented in the isy994 component. It would be a nice feature.An alternative is to write an ISY program that monitors a variable and calls a web hook in Home Assistant when the value changes. See the Webhook section here and specifically the part about trigger.data and trigger.json:https://www.home-assistant.io/docs/automation/trigger/You could write an automaton that uses the value(s) you pass for whatever you want. There’s also a variable component from a couple of years ago that may be helpful: https://community.home-assistant.io/t/custom-component-to-declare-set-variables/25218 Link to comment
Michel Kohanim Posted June 26, 2019 Share Posted June 26, 2019 @rccoleman, Don't really understand why it's a good feature to expose "variables" (a well understood term globally) as something specific to HASS or Alexa (which we had to do in the Portal). An ideal situation would be for HA to subscribe to ISY and thus have access, in real time, to everything ISY has. All other solutions are one-offs and bound to be unreliable or make things overly complicated. With kind regards, Michel Link to comment
rccoleman Posted June 26, 2019 Share Posted June 26, 2019 Just now, Michel Kohanim said: @rccoleman, Don't really understand why it's a good feature to expose "variables" (a well understood term globally) as something specific to HASS or Alexa (which we had to do in the Portal). An ideal situation would be for HA to subscribe to ISY and thus have access, in real time, to everything ISY has. All other solutions are one-offs and bound to be unreliable or make things overly complicated. With kind regards, Michel It already does subscribe to the ISY, and that was the recommendation in the other thread that I mentioned above: It looks like @shbatm already added support (thanks!). Link to comment
shbatm Posted June 29, 2019 Share Posted June 29, 2019 On 6/26/2019 at 11:53 AM, rccoleman said: It looks like @shbatm already added support (thanks!). I just realized there were two topics discussing this. Just for convenience I'll leave this here too: I've updated the code to allow you to use ISY Variables as sensors, binary_sensors, or switches in Home Assistant. Details can be found over on the Home Assistant Forum here: https://community.home-assistant.io/t/isy994-variables-as-sensors/123574 After some time testing I'll get the PR done to include this in Home Assistant. Just to comment on the discussion above in this thread: Home Assistant picks up everything from the ISY's event stream and sends commands back via REST through the PyISY python module, which is a great module, but not everything has been implemented fully yet across both PyISY and Home Assistant. Notable gaps still include thermostats (code is finished, just pending PRs), calling network resources and programs (as Hass services) and full Z-Wave sensor support. The framework is there, just like for variables, it's just not done yet. I still think the ultimate prize would be if PyISY (and therefore Hass) could represent itself as a NodeServer back to the ISY (or via Polyglot) to be able to also selectively add Hass devices as nodes on the ISY... It would mean ANY 3rd party integrations that Hass has, but ISY doesn't, could still be controlled from within the ISY. From looking at both python code bases, I know it's possible, but out of my wheelhouse... Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.