Action House Mode in workflow state

I noticed that there is no action for setting the house mode for openluup in a workflow state. Can this be added? I can set it with lua code, but shouldn?t it just be there as a basic feature? Or am I missing something?

Let me know.

@akbooer
I found another bug in the house mode functionality. When I set the variable of openLuup with this line:

luup.attr_set (“Mode”, 2)

Then the house mode does change, but the variable on the openluup device doesn’t change with it.

I haven’t tried this on Vera, but I don’t think you should use attr_set to change modes, that’s why there’s an action to do it.

I may be wrong, in which case I’ll change this to work as you expect.

[quote=“akbooer, post:3, topic:198596”]I haven’t tried this on Vera, but I don’t think you should use attr_set to change modes, that’s why there’s an action to do it.

I may be wrong, in which case I’ll change this to work as you expect.[/quote]

I’m not doing this on Vera, but in AltUI on openLuup. I’m setting the house mode in a workflow state. That’s the problem, there is no predefined action here. So, I use lua.

I realise you’re using openLuup, but was just trying to compare with Vera’s native behaviour.

There is an action for this, see
http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions#HomeAutomationGateway1

SetHouseMode

[quote=“akbooer, post:5, topic:198596”]I realise you’re using openLuup, but was just trying to compare with Vera’s native behaviour.

There is an action for this, see
http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions#HomeAutomationGateway1

SetHouseMode[/quote]

Ah, no sorry. I’m not setting the house mode of Vera, but that of openLuup.

Sorry, I’m not being clear.

In the spirit of trying to emulate Vera, if luup.attr_set() actually changes mode correctly on Vera, then then same should be so on openLuup. As it is, there is an action which works correctly in both cases, so I think I’m simply saying that you shouldn’t normally want use luup.attr_set() for this.

I know how to make it work, but I don’t know if I should do that. I will test when I can on Vera.

Ok, I will try the lua action command for the openluup device.

But the question remains. Can you make the action available in a workflow state? That way lua would?t be needed.

Or maybe it should be a house mode ALTUI action. I don?t know how the icons of AltUI relate to the variable of openluup. Just want to set the house mode of AltUI via a workflow state.

The house mode in not AltUI’s, but Vera’s or openLuup’s. The action IS already defined, but for device #0.

I’m not familiar with workflows, but I imagine that device #0 is not a selectable option. I could give the openLuup plugin an action to do this, if that helps.

[quote=“akbooer, post:10, topic:198596”]The house mode in not AltUI’s, but Vera’s or openLuup’s. The action IS already defined, but for device #0.

I’m not familiar with workflows, but I imagine that device #0 is not a selectable option. I could give the openLuup plugin an action to do this, if that helps.[/quote]

Yes that is Indeed the problem. I did not expose device 0. I need to check if that s possible. But personally I use the House mode plugin.why do not you use it ? It exposes conditions and actions for it

[quote=“amg0, post:11, topic:198596”][quote=“akbooer, post:10, topic:198596”]The house mode in not AltUI’s, but Vera’s or openLuup’s. The action IS already defined, but for device #0.

I’m not familiar with workflows, but I imagine that device #0 is not a selectable option. I could give the openLuup plugin an action to do this, if that helps.[/quote]

Yes that is Indeed the problem. I did not expose device 0. I need to check if that s possible. But personally I use the House mode plugin.why do not you use it ? It exposes conditions and actions for it[/quote]

That?s because I want Vera to follow openLuup with the house modes, openLuup should be the primary.

[quote=“RHCPNG, post:12, topic:198596”][quote=“amg0, post:11, topic:198596”][quote=“akbooer, post:10, topic:198596”]The house mode in not AltUI’s, but Vera’s or openLuup’s. The action IS already defined, but for device #0.

I’m not familiar with workflows, but I imagine that device #0 is not a selectable option. I could give the openLuup plugin an action to do this, if that helps.[/quote]

Yes that is Indeed the problem. I did not expose device 0. I need to check if that s possible. But personally I use the House mode plugin.why do not you use it ? It exposes conditions and actions for it[/quote]

That?s because I want Vera to follow openLuup with the house modes, openLuup should be the primary.[/quote]
What about an open Luup based house mode plugin and one on Vera mirrored by Vera bridge and setting house mode on both in your state actions ?

I think this would be the ideal solution in this case. And probably the easiest?

What would the luup action command be for openluup? I’ve tried these two, but they won’t work:

luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”,“SetHouseMode”, {Mode = 3}, 0)
luup.call_action(“openLuup”,“SetHouseMode”, {Mode = 3}, 2)

UPDDATE
Nevermind, forgot the quotation:

luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “SetHouseMode”, { Mode=“1” }, 0)

An action in the workflows would still be a very nice feature.

The latest development branch 2018.02.15 has added the following action to the openLuup device (#2):

[ul][li]serviceId = “openLuup” (note that this does not use urn: syntax)[/li]
[li]action = “SetHouseMode”[/li]
[li]parameter = “Mode”[/li][/ul]

hence:

luup.call_action("openLuup","SetHouseMode", {Mode = 3}, 2)

will change mode, in addition to the device #0 one you mentioned.

However, this also appears in the available Actions of the openLuup device, so, AFAIK, this should be usable from workflows (and, indeed, scenes.)

[quote=“akbooer”]The latest development branch 2018.02.15 has added the following action to the openLuup device (#2):

[ul][li]serviceId = “openLuup” (note that this does not use urn: syntax)[/li]
[li]action = “SetHouseMode”[/li]
[li]parameter = “Mode”[/li][/ul]

hence:

luup.call_action("openLuup","SetHouseMode", {Mode = 3}, 2)

will change mode, in addition to the device #0 one you mentioned.

However, this also appears in the available Actions of the openLuup device, so, AFAIK, this should be usable from workflows (and, indeed, scenes.)[/quote]Very cool, thank you! I can confirm that the action is available in the workflows.

Sent from my SM-G930F using Tapatalk

AK, sorry to resurrect an old topic… I have my house mode variable set to 2 on my two vera bridges, meaning that I want my veras to follow house mode changes that occur in openLuup. I am trying to remotely trigger a house mode change in openLuup using the following syntax:

http://10.17.2.12:3480/data_request?id=lu_action&serviceId=openLuup&action=SetHouseMode,%20{Mode%20=%202} where 10.17.2.12:3480 is my openLuup box.

But I receive an error message “ERROR: Invalid Service” when trying to do so. Is the request syntax wrong?? The error occurs both in a browser and in curl.

Well, yes, the syntax is invalid. Where did you get it from?

You have:

http://10.17.2.12:3480/data_request?id=lu_action&serviceId=openLuup&action=SetHouseMode,%20{Mode%20=%202}

But it should, (from memory) be:

http://10.17.2.12:3480/data_request?id=lu_action&serviceId=openLuup&action=SetHouseMode&Mode=2&DeviceNum=2

I’m not near a system at the moment, to verify.

OK, that works.

I culled the URL from multiple forum posts as I couldn’t find any documentation. Vera needs to clean-up/remove its scattered documents and create a centralized Wiki. It’s a bit absurd to have to intuit what a command should be…