Can I get/set a memory flag using the webservice API?

134 views
Skip to first unread message

Gert Stalpaert

unread,
Apr 30, 2023, 5:03:35 AM4/30/23
to Loxone English
Hi,

Using Home Assistant, I'm playing with the Node Red plugin node node-red-contrib-loxone.

Using the Webservice node in Node Red, I know on how to send a command or get the status from a virtual input/output, but I try to skip the step of having to create virtual inputs and outputs for each 'variable' (memory flag).

If that is not possible, what would be the best way to solve this problem? Can I use one virtual input / output to set different memory flags?

This is the problem I want to solve:
I have a bunch of Zigbee devices: sensors like fire alarms, door contacts, PIR sensors, but also devices like lights and TRVs that need 2-way bindings.
These can be easily linked in Home Assistant, and now I want to integrate these in Loxone by syncing their status between Loxone and Home Assistant.

Any ideas to do this in an easy fashion would be awesome! I'm thinking to handle events in bulk for all devices of the same type, but don't see a way to do this yet.

Thanks!
Gert

Jonathan Dixon

unread,
Apr 30, 2023, 6:20:31 AM4/30/23
to Gert Stalpaert, Loxone English
To ask the tangential question, why do you need memory flags for each device?
In similar situations I setup a virtual input per thing and use that directly with whatever logic block(s) what to use is as their input.
I find Memory flags can be useful for communication in the reverse direction (Loxone -> Home Assistant) although that has broken in the past.

I must give node-red a go, as generally I find Home Assistant a complete pain for writing and managing this simple kind of "sync value fro  X to device Y" automation.


--
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/bdc0f0fc-9ee5-4b3a-b081-fa1573e8fe67n%40googlegroups.com.

Gert Stalpaert

unread,
Apr 30, 2023, 8:05:17 AM4/30/23
to Jonathan Dixon, Loxone English
For sensors, you are right that a virtual input is probably all I need - thanks for that suggestion, Jonathan! ;-)
Then the next question is: how can I set up the flows?

I can create a flow for each sensor to listen for an event and update the corresponding Loxone Virtual Input (VI).
But there must be a way to listen for all ZHA events together, and send them to the right VI depending on the name of the ZHA sensor. 

Any ideas?

Jonathan Dixon

unread,
Apr 30, 2023, 8:12:23 AM4/30/23
to Gert Stalpaert, Loxone English
I don't know about in node-red but this sounds like what template actions can be used for in normal HA automations.

However caveat developer:  I find these a fiddle to setup and very brittle as there's no simple way to write automated test suites for automations, and updating HA or the pyLoxone binding is prone to randomly changing the device IDs when some dev decides to tweak naming conventions.

Rob_in

unread,
May 1, 2023, 1:33:34 AM5/1/23
to Loxone English
Funnily enough over a year ago I suggested to Loxone that one should be able to use any output as an input too. As if every output in the periphery becomes a pseudo memory flag. Sadly they don't see the value in this :(

Virtual Status could be another option to look at, although I don't see how they are any better than a memory flag TBH - maybe I missed something? IIRC one didn't used to be able to show memory flags in UI and guess there's why Virtual Status exists?

On Sunday, 30 April 2023 at 12:20:31 UTC+2 Joth wrote:
I must give node-red a go, as generally I find Home Assistant a complete pain for writing and managing this simple kind of "sync value fro  X to device Y" automation.

Give IOBroker a go too. I find it so much nicer than HA. Although naturally all these things are a matter of taste.

Robin
Reply all
Reply to author
Forward
0 new messages