• 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
Time to handle configuration edits properly
#1
I have been wondering why doesn't pilight handle configuration editing and problems properly
Instead of removing the config file contents, wouldn't it be better to notify user or maybe move the invalid config to config.json.old or something similar

Also, why won't pilight keep edits that are made while it's running after a restart, does it store running config in memory and write it to file again and again?
 
Reply
#2
(03-19-2017, 01:58 PM)amahlaka Wrote: Instead of removing the config file contents
When does this happen??

(03-19-2017, 01:58 PM)amahlaka Wrote: Also, why won't pilight keep edits that are made while it's running after a restart, does it store running config in memory and write it to file again and again?
The pilight daemon keeps the current config in memory after restart, where it is updated with new values over time. When the daemon is stopped, the changes are written back to disk - there is only one write. This will obviously override all changes made to the file in the meantime.
 
Reply
#3
(03-19-2017, 02:40 PM)pilino1234 Wrote: When does this happen??

When there is typo on config and I start pilight the file gets erased
 
Reply
#4
(03-19-2017, 01:58 PM)amahlaka Wrote: Also, why won't pilight keep edits that are made while it's running after a restart, does it store running config in memory and write it to file again and again?
If you do this it does damage the SD card after a while, as you exceed the number of write cycles.
I know that there are methods available to circumpass this bottleneck, but that is the way it is currently implemented.
 
Reply
#5
(03-19-2017, 03:46 PM)amahlaka Wrote:
(03-19-2017, 02:40 PM)pilino1234 Wrote: When does this happen??

When there is typo on config and I start pilight the file gets erased
Which pilight version are you using? This shouldn't happen, pilight should just show the offending error in the config in the debug output and exit. The file should never be erased.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  MQTT external Broker (not local) configuration nicky 3 219 06-02-2020, 05:00 PM
Last Post: curlymo
  pilight 8.1 and switch with date and time not working Pikeman 7 1,751 06-30-2018, 11:28 PM
Last Post: curlymo
  Configuration example with program and ACTION to control MPD tomk 0 807 09-12-2017, 07:02 PM
Last Post: tomk
  Daylight saving time troccolo 59 25,039 09-09-2017, 08:44 PM
Last Post: curlymo
  Sun up and down when changing to and from daylight saving time hansrijn2 0 650 03-26-2017, 11:53 PM
Last Post: hansrijn2
Bug I need help with the time rules muscat 3 1,634 12-29-2016, 07:38 PM
Last Post: muscat
  Nexa doorbell (arctech) device configuration m0rph13 2 1,634 06-09-2016, 07:05 AM
Last Post: m0rph13
  Send and receiver at same time impossible geerttttt 5 2,144 06-03-2016, 11:58 AM
Last Post: wo_rasp
  [solved] GUI time 1 hour behind the real time OrTiN 1 1,318 03-23-2016, 11:32 AM
Last Post: OrTiN
  configuration of pilight v7 noxx 28 11,287 07-07-2015, 08:43 PM
Last Post: diman87

Forum Jump:


Browsing: 1 Guest(s)