• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
action: file
#11
(06-08-2016, 06:36 PM)curlymo Wrote: A write action would be nice. Could be extended to other writeable location like sockets.

Or for fun things like...
Code:
IF ... THEN write TEXT 1 TO /sys/class/gpio/gpio17/value MODE overwrite

@Niek the main idea was to define the default action if omitted, that could be "overwrite". Then you could only add the "trigger", like:
Code:
IF ... THEN write TEXT This would be an overwrite TO /var/log/mylog
IF ... THEN write TEXT This is an append TO /var/log/mylog APPEND

... but that are only my 2 cents ... Big Grin
 
Reply
#12
I would not make overwrite default, because if you omit the MODE by mistake, your existing file will be lost.
 
Reply
#13
(06-09-2016, 08:14 AM)Niek Wrote: I would not make overwrite default, because if you omit the MODE by mistake, your existing file will be lost.

OK. Point to you. I'm silent now. Big Grin
 
Reply
#14
It would ne great to write to the temporary file system and only once in a while to the sd card
send from tapatalk
 
Reply
#15
Well, personally I prefer writing to disk (SD) immediately, so no records will get lost if pilight crashes or is killed before they have been written to disk.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  _VARSTORE_ set action fourty2 1 931 05-19-2019, 09:07 PM
Last Post: curlymo
  skipping overridden action switch do1eh 2 600 01-19-2019, 05:25 PM
Last Post: do1eh
  http action Niek 21 4,001 08-12-2018, 11:44 AM
Last Post: rorie
  action: Pushbullet bazb 24 11,391 01-04-2018, 08:38 PM
Last Post: curlymo
  action: pushover Niek 36 17,526 12-03-2017, 11:13 AM
Last Post: Alex
  action: switch Niek 54 19,941 03-31-2016, 06:24 PM
Last Post: jjj
  action: program bazb 16 7,845 03-31-2016, 09:14 AM
Last Post: Niek
  action: toggle Niek 1 2,465 02-19-2016, 03:04 PM
Last Post: Joeks
  action: dim terrar 10 5,904 08-13-2015, 05:13 PM
Last Post: terrar
  Event action sipcal to make a voip phonecall pieterd 7 4,232 05-15-2015, 05:47 PM
Last Post: koos147

Forum Jump:


Browsing: 1 Guest(s)