Posts: 13
Threads: 1
Joined: Oct 2019
Reputation:
0
Hi all,
After updating to 4.1.10, I get an Internal Server Error when clicking on the Programs tab. When I look at the programs.json page, I get the following.
Code: [
[
0,
84,
0,
240,
282,
42,
300,
147,
123,
[
180,
180,
0,
0,
180,
0,
0,
Am I looking in the right place? Any guidance would be appreciated.
Posts: 652
Threads: 18
Joined: Aug 2015
Reputation:
22
SIP version 4 uses a new format for the json file that stores the irrigation programs.
There is a conversion utility in the SIP directory that should have converted your old programs.json to the new format in a new file named programData.json in the SIP/data directory.
The program data you posted looks like the old format.
You can try running the conversion manually from the SIP directory by running
Code: python convert_progs.py
or
python3 convert_progs.py
It should leave the old file intact and create the new one that SIP 4 can use.
<p><br></p>
Posts: 13
Threads: 1
Joined: Oct 2019
Reputation:
0
(2020 Dec 05, 03:31 AM)dan Wrote: SIP version 4 uses a new format for the json file that stores the irrigation programs.
There is a conversion utility in the SIP directory that should have converted your old programs.json to the new format in a new file named programData.json in the SIP/data directory.
The program data you posted looks like the old format.
You can try running the conversion manually from the SIP directory by running
Code: python convert_progs.py
or
python3 convert_progs.py
It should leave the old file intact and create the new one that SIP 4 can use.
Thanks for the reply! Here's what I got in the new file. Same result.
Code: [
{
"cycle_min": 0,
"day_mask": 84,
"duration_sec": [
180,
180,
0,
0,
180,
0,
0,
300,
300,
240,
0,
300,
240,
300,
300,
0
],
"enabled": 0,
"interval_base_day": 0,
"name": "Unnamed",
"start_min": 240,
"station_mask": [
147
],
"stop_min": 282,
"type": "alldays"
},
{
"cycle_min": 0,
"day_mask": 127,
"duration_sec": [
0,
240,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"enabled": 1,
"interval_base_day": 0,
"name": "Unnamed",
"start_min": 360,
"station_mask": [
2
],
"stop_min": 364,
"type": "alldays"
},
{
"cycle_min": 0,
"day_mask": 45,
"duration_sec": [
420,
120,
0,
0,
120,
0,
0,
480,
480,
420,
0,
720,
300,
720,
0,
0
],
"enabled": 1,
"interval_base_day": 0,
"name": "Unnamed",
"start_min": 180,
"station_mask": [
147
],
"stop_min": 243,
"type": "alldays"
},
{
"cycle_min": 0,
"day_mask": 127,
"duration_sec": [
0,
0,
0,
0,
0,
0,
60,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"enabled": 1,
"interval_base_day": 0,
"name": "Unnamed",
"start_min": 600,
"station_mask": [
64
],
"stop_min": 601,
"type": "alldays"
}
]
Posts: 652
Threads: 18
Joined: Aug 2015
Reputation:
22
2020 Dec 05, 03:42 PM
(This post was last modified: 2020 Dec 05, 03:46 PM by dan.)
I tested your program file here in a freshly cloned copy of SIP.
Everything seems to be working properly.
Some users have had to clear the cache in the browser they use with SIP.
It that doesn't fix the problem, you could rename the SIP folder to something like SIP-old and clone a fresh copy.
from the pi directory:
Code: git clone https://github.com/Dan-in-CA/SIP.git
Then copy the data folder from the old copy to the new one.
<p><br></p>
Posts: 13
Threads: 1
Joined: Oct 2019
Reputation:
0
I'm at a loss. I cleared the browser cache and even loaded it in a different browser. Still the same. I went ahead and renamed the folder and cloned a new copy. Moved the programData.json over, still the same error.
I appreciate your help. The programs are still running, but, I can't get back to that page.
Posts: 652
Threads: 18
Joined: Aug 2015
Reputation:
22
(2020 Dec 05, 04:49 PM)tvwebguy Wrote: I'm at a loss. I cleared the browser cache and even loaded it in a different browser. Still the same. I went ahead and renamed the folder and cloned a new copy. Moved the programData.json over, still the same error.
I appreciate your help. The programs are still running, but, I can't get back to that page.
We may be able to get a clue about the problem if you open the developer tab in the browser (F12).
Then try accessing the Programs page and see if any errors appear.
<p><br></p>
Posts: 13
Threads: 1
Joined: Oct 2019
Reputation:
0
2020 Dec 05, 05:23 PM
static/scripts/behaviors.js:47 GET http://192.168.254.145:8081/vp 500 (Internal Server Error)
Posts: 652
Threads: 18
Joined: Aug 2015
Reputation:
22
The other way to diagnose the problem is to start SIP manually from the command line (Pi directory):
Code: sudo systemctl stop sip
cd SIP
python sip.py
This should show any Python errors.
<p><br></p>
Posts: 13
Threads: 1
Joined: Oct 2019
Reputation:
0
2020 Dec 05, 05:24 PM
(This post was last modified: 2020 Dec 05, 05:31 PM by tvwebguy.)
// Set up a live clock based on device time
function dateString(d) {
var dateString = dayList [d.getDay()]; // Moved translatable text to base.html, dk
dateString += " " + d.getDate() + " ";
dateString += monthList [d.getMonth()]; // Moved translatable text to base.html, dk
return dateString;
}
function updateClock() { // Controls time and date clock.
// Do our best to match this clock with the device clock (instead of the client device clock)
var now = new Date(Date.now() + cliTzOffset - devTzOffset);
/*
Uncomment to test styling - sets a random time
now.setHours(Math.floor(Math.random()*24));
now.setMinutes(Math.floor(Math.random()*60));
*/
if (timeFormat) {
jQuery("#deviceTime span.time").html((now.getHours() < 10 ? "0" : "") + now.getHours() + "<span class='sep'>:</span>" + (now.getMinutes() < 10 ? "0" : "") + now.getMinutes());
jQuery("#deviceTime span.ampm").html("");
} else {
jQuery("#deviceTime span.time").html((now.getHours()%12 == 0 ? "12" : now.getHours() % 12) + "<span class='sep'>:</span>" + (now.getMinutes() < 10 ? "0" : "") + now.getMinutes());
jQuery("#deviceTime span.ampm").html((now.getHours() >= 12 ? "pm" : "am"));
}
jQuery("#deviceTime span.second").text(":" + (now.getSeconds() < 10 ? "0" : "") + now.getSeconds());
jQuery("#deviceDate").text(dateString(now));
}
// Initialize standard behaviors
jQuery(document).ready(function(){
jQuery("button#bHome").click(function(){
window.location = "/";
});
jQuery("button#bOptions").click(function(){
window.location = "/vo";
});
jQuery("button#bStations").click(function(){
window.location = "/vs";
});
jQuery("button#bPrograms").click(function(){
window.location = "/vp";
});
jQuery("button#bRunOnce").click(function(){
window.location = "/vr";
});
jQuery("button#bLog").click(function(){
window.location = "/vl";
});
jQuery("button#bLogout").click(function(){
window.location = "/logout";
});
jQuery("button#bHelp").click(function(){
window.open("https://github.com/Dan-in-CA/SIP/wiki", "_blank");
});
// start the clock now, and update every second
updateClock();
setInterval(updateClock, 1000);
});
vp:1 GET http://192.168.254.145:8081/vp 500 (Internal Server Error)
So far, the " python sip.py" has shown no errors.
Posts: 652
Threads: 18
Joined: Aug 2015
Reputation:
22
(2020 Dec 05, 05:23 PM)tvwebguy Wrote: static/scripts/behaviors.js:47 GET http://192.168.254.145:8081/vp 500 (Internal Server Error)
That shows where the error is occurring but not what the error is.
<p><br></p>
|