• 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
[Solved] config.json not updated
#1
With the development version

Code:
pilight-daemon version b3b0941

after stopping the pilight service the config file does not reflect any of the status changes. I can see that the file is rewritten (modification timestamp is equal to the time of stopping the service), but the values it contains are those when the service was started.

In addition: the internal config as shown by <pilight url and port>/config are always correct (ie showing all values that have changed)
 
Reply
#2
Good catch. Also solved.
 
Reply
#3
Which version has implemented the fix of not updating the config.json?
In version v8.0.4 which I‘m using the behavior of not saving state changes to the config file on service stopping is still there.
 
Reply
#4
Is should be in stable:
https://github.com/pilight/pilight/blob/...2602-L2613

Can you describe your actions triggering the issue?
 
Reply
#5
I did a quick test by looking at the state setting of one device in config.json via terminal.
The initial device state was OFF.
Then following these steps:
  1. Trigger the device to set the real state to ON
  2. Stop pilight service
  3. Checking config.json via terminal: Device state has not changed to ON
  4. Start pilight service
  5. Checking webgui: All devices are in the initial state and do not reflecting the real changed states
  6. Again trigger a device
  7. Checking webgui: State change is being reflected correctly
  8. Stop pilight service
  9. Checking config.json via terminal: Device state has not changed to the last webgui state
  10. Start pilight service
  11. Checking webgui: All states are again in their initial states not showing the latest changes
So as far as I understand this, the config.json is not being written back with actual device states on stopping the service.
 
Reply
#6
I will investigate this again.
 
Reply
#7
Confirmed. Should be fixed with this commit:
https://github.com/pilight/pilight/commi...6acddd47ea

I will port to stable as soon as the mail bugs have been squashed.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [SOLVED] Triggering generic_switch leads to segfault Ulrich.Arnold 19 4,449 10-23-2019, 09:03 AM
Last Post: Ulrich.Arnold
  ][solved]Segfault when retrieving big chunked http message Niek 21 7,765 11-29-2018, 03:17 PM
Last Post: curlymo
  [Solved] callback not executing when dns lookup fails Niek 1 1,070 10-08-2017, 11:44 AM
Last Post: curlymo
  [Solved] Rules switching state based on another device state not working apartmedia 6 3,193 09-27-2017, 01:41 PM
Last Post: apartmedia
  [Solved] connection to main pilight daemon lost TopdRob 20 6,233 09-17-2017, 04:30 PM
Last Post: curlymo
  [Solved] dimmer protocol kaku_dimmer does not react on dimmervalue apartmedia 25 6,245 09-16-2017, 10:29 PM
Last Post: apartmedia
  [Solved] Webgui not working in IE Ulrich.Arnold 7 2,626 09-12-2017, 05:22 PM
Last Post: Ulrich.Arnold
  [Solved] Sunriseset v7 fails after update and gives negative values PPacman 7 2,372 09-06-2017, 06:25 PM
Last Post: curlymo
  [Solved] Illegal Instruction? PekkaLahtela 50 16,281 09-06-2017, 01:18 PM
Last Post: apartmedia
  [Solved] Nightly segfaults joe99 7 2,103 09-05-2017, 07:35 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)