Author Topic: Timed scenes triggering more than once?  (Read 3752 times)

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6384
  • Karma: +290/-70
  • "Less is more"
Re: Timed scenes triggering more than once?
« Reply #45 on: May 28, 2017, 05:27:03 pm »
last time you suggest me to use io.popen instead of os.execute,  is it because io.popen is asynchronous ?

I think it can be.  You do need to remember to close the connection, since you're not reading any output from it.  I don't think this kills the child.

Code: [Select]
local h = io.popen "your command goes here"
h: close ()

Or, you could create another detached process and force no hang up...

Code: [Select]
local h = io.popen "nohup 'your command goes here' &"
h: close ()

You could, in fact, try the same with os.execute().
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 akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6384
  • Karma: +290/-70
  • "Less is more"
Re: Timed scenes triggering more than once?
« Reply #46 on: June 15, 2017, 08:27:11 am »
Looks like the latest testing branch update works fine... will test it this week to make sure I don't have again the scene triggered more than once..

...any further feedback on this?  The testing branch has been through several further iterations for a number of other improvements and I'm keen to merge back into the development branch.  Thanks.
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 DesT

  • Sr. Member
  • ****
  • Posts: 364
  • Karma: +5/-1
Re: Timed scenes triggering more than once?
« Reply #47 on: June 15, 2017, 08:28:31 am »
Looks like working fine since a while and I upgrade to the latest testing branch often!
Vera Edge-UI7/Plus-UI7 (2), DSC Partition (5 ) + Zones Sensors(31), Nest thermostat (1) & Protect Fire/CO (3), GE Sw (8 ), GE Dimr (14), FGMS-001 (2), ZW100 (2), RZCS4 (1), AL-DSC11 (1), Aeon HEM 2nd Edition (1), Aeon SSE (5), YRD220-ZW (1), SONOS (6), MyQ Chamberlain (1)
PINE64/openLuup/ALTUI/Rules

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6384
  • Karma: +290/-70
  • "Less is more"
Re: Timed scenes triggering more than once?
« Reply #48 on: June 15, 2017, 09:04:29 am »
That's great!  I'll consolidate the recent changes, then.  Thanks.
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 DesT

  • Sr. Member
  • ****
  • Posts: 364
  • Karma: +5/-1
Re: Timed scenes triggering more than once?
« Reply #49 on: June 15, 2017, 09:44:27 am »
That's great!  I'll consolidate the recent changes, then.  Thanks.

So we can, now, reupdate using development instead of testing ?
Vera Edge-UI7/Plus-UI7 (2), DSC Partition (5 ) + Zones Sensors(31), Nest thermostat (1) & Protect Fire/CO (3), GE Sw (8 ), GE Dimr (14), FGMS-001 (2), ZW100 (2), RZCS4 (1), AL-DSC11 (1), Aeon HEM 2nd Edition (1), Aeon SSE (5), YRD220-ZW (1), SONOS (6), MyQ Chamberlain (1)
PINE64/openLuup/ALTUI/Rules

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6384
  • Karma: +290/-70
  • "Less is more"
Re: Timed scenes triggering more than once?
« Reply #50 on: June 15, 2017, 10:37:08 am »
So we can, now, reupdate using development instead of testing ?

Yes... as of this moment, the development version is now 17.06.15.

I'll be documenting all the rolled-up changes and make a new master release soon.



Note to @amg0 in particular: this latest version has a startup option to switch between URL and Header-based authorization for luup.inet.wget().  The default is "URL", but if you include the following in the Lua Startup you can switch it to the header variety:

Code: [Select]
luup.attr_set ("openLuup.Server.WgetAuthorization", "Header")
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.