We have moved at community.getvera.com

Author Topic: Action House Mode in workflow state  (Read 1090 times)

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Action House Mode in workflow state
« on: February 14, 2018, 12:59:28 pm »
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.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Action House Mode in workflow state
« Reply #1 on: February 15, 2018, 03:31:53 am »
@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.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Action House Mode in workflow state
« Reply #2 on: February 15, 2018, 03:55:31 am »
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.

3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Action House Mode in workflow state
« Reply #3 on: February 15, 2018, 04:03:14 am »
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.



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.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Action House Mode in workflow state
« Reply #4 on: February 15, 2018, 05:25:54 am »
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
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Action House Mode in workflow state
« Reply #5 on: February 15, 2018, 05:30:13 am »
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


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

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Action House Mode in workflow state
« Reply #6 on: February 15, 2018, 05:40:51 am »
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.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Action House Mode in workflow state
« Reply #7 on: February 15, 2018, 11:15:23 am »
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.

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Action House Mode in workflow state
« Reply #8 on: February 15, 2018, 11:30:31 am »
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.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Action House Mode in workflow state
« Reply #9 on: February 15, 2018, 11:44:09 am »
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.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Action House Mode in workflow state
« Reply #10 on: February 15, 2018, 11:47:04 am »
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.

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

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Action House Mode in workflow state
« Reply #11 on: February 15, 2018, 11:56:55 am »
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.

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

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

Offline amg0

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3174
  • Karma: +210/-8
Re: Action House Mode in workflow state
« Reply #12 on: February 15, 2018, 12:32:54 pm »
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.

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

That?s because I want Vera to follow openLuup with the house modes, openLuup should be the primary.
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 ?

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Action House Mode in workflow state
« Reply #13 on: February 15, 2018, 12:41:42 pm »
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.


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

Offline RHCPNG

  • Full Member
  • ***
  • Posts: 191
  • Karma: +6/-0
Re: Action House Mode in workflow state
« Reply #14 on: February 16, 2018, 03:16:49 am »
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.
« Last Edit: February 16, 2018, 03:52:26 am by RHCPNG »