Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Master keeps resetting to standard station
#1
Hi,

I've been trying to troubleshoot why my schedule isn't working at all after a Winter hiatus. I have been regularly updating even though it hasn't been in use. I've run a multi-meter across the master output while it should be running but get no output, however the selected station gives me ~ 24VAC. 

After investigating I found the Master was no longer set as a master so I changed that in the settings and saved it but it still fails, if I reset or reboot it reverts to being a standard station so I think this is a software issue rather than hardware. Any ideas anyone? Is there a config file I can edit directly to set it as a master?

Thank you
David
Reply
#2
The config file that holds the master setting is SIP/data/sd.json
the master setting is named "mas".

Can you try a different station as master?

What version of SIP are you running?
<p><br></p>
Reply
#3
(2024 Nov 28, 03:40 PM)dan Wrote: The config file that holds the master setting is SIP/data/sd.json
the master setting is named "mas".

Can you try a different station as master?

What version of SIP are you running?

Hi Dan,
I found sd.json last night and found that "mas" got set to 1 when I set it as master in the config and saved but if I "Run once" it sets it back and doesn't use it as a master, likewise if I reset or reboot SIP. 

I'm not at home to check the version but I updated it two days ago so it should be the latest.

I also did a "Run once" for station 1 and it definitely activates, I can hear the thump from it.

Thank you for looking into it.

Cheers
David
Reply
#4
(2024 Nov 28, 11:02 PM)DavidCNZ Wrote:
(2024 Nov 28, 03:40 PM)dan Wrote: The config file that holds the master setting is SIP/data/sd.json
the master setting is named "mas".

Can you try a different station as master?

What version of SIP are you running?

Hi Dan,
I found sd.json last night and found that "mas" got set to 1 when I set it as master in the config and saved but if I "Run once" it sets it back and doesn't use it as a master, likewise if I reset or reboot SIP. 

I'm not at home to check the version but I updated it two days ago so it should be the latest.

I also did a "Run once" for station 1 and it definitely activates, I can hear the thump from it.

Thank you for looking into it.

Cheers
David
Hmm, I finally got the setting to stick temporarily, and it worked but if I reset SIP it goes back to not configured and also all devices are set to not use master. Perhaps I need to save a copy of the data folder and do another rebuild.
Reply
#5
I did some testing with SIP version 5.1.80 (2024-11-20)  and did not see the master reset after a run-once or restart.

In fact the master did not appear on the run-once page.
<p><br></p>
Reply
#6
Yes, it's the same for me until I restart or reboot. After that no master is set and (of course) all the Activate Master settings are lost. This probably started happening several months ago towards the end of our Autumn. I'd assumed I had a cabling problem with the master but after confirming that was OK found this problem.

I know it definitely updates in sd.json, I set up the master yesterday and sd.json had a date\time of 29/11/2024 7:39:45 pm and scheduled runs have been working since, after the restart the master settings are gone and the file date\time is now showing as when I did the restart 20\11\24 10:45:10 am. Something is rewriting it during the restart process.

I think I might be best to take a copy of the settings and rebuild it.

I set the master etc. again and saved and can see the master set in sd.json after that. However the date\time hasn't updated on the file, it's still the same as the restart time.
Reply
#7
A rebuild would probably be best.

However there is come code in helpers.py that writes the sd.json file with default settings on first run.

starting at line 89:
Code:
try:
    with open("./data/sd.json", "r") as sdf:  # A config file
        sd_temp = json.load(sdf)
    for key in sd:  # If file loaded, replce default values in sd with values from file
        if key in sd_temp:
            sd[key] = sd_temp[key]
except IOError:  # If file does not exist, it will be created using defaults.
    with open("./data/sd.json", "w") as sdf:  # save file
        json.dump(sd, sdf, indent=4, sort_keys=True)
You could try commenting out lines 96 - 97 and adding pass after.

The defaults are listed starting at line 46.

If for some reason the sd.json file is not being read on reboot this could cause the problem you are seeing.
<p><br></p>
Reply
#8
A wild guess, could it be file permissions or running SIP on a account with insufficient privs?

--Gerard
Reply
#9
OK bear with me. @Dan I found those lines of code in gv.py and commented them out. SIP GUI refused to connect so I put them back again and instead changed the name of the file it would create and then restarted. The new file didn't get created but the Master settings were again lost.

I don't think it's permissions, everything looks normal. I decided to do a complete rebuild as I found "Manage Plugins" wasn't working either, I'd click on it and the page would refresh and leave me still on the home screen.

So I bit the bullet and set up the current installation with the Data folder moved to a flashdrive. Then I did a completely fresh install of Raspian lite on a new SD Card. Installed RPIGPO, PIP, Paho-MQTT etc. Installed SIP and set it to point to the flashdrive Data folder.

Everything looking good... except if I choose Reset or Reboot from the settings in the GUI then they are lost yet again. If I reboot from ssh then they aren't lost. It has to be something running from SIP, if I just pull the power and start it again nothing is lost.

Any other thoughts most welcome.
Reply
#10
I see it happen when restarting SIP from the settings page.

I will look for the cause.
<p><br></p>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)