160
160
add Label to Layout
161
161
create UptimeLabel text `0`
162
162
add UptimeLabel to Layout
163
- create Label text `sec`
164
- add Label to Layout
165
163
add stretch to Layout
166
164
167
165
create Layout type QHBoxLayout
@@ -896,7 +894,8 @@ PopulateSystemInfo:
896
894
create MessageBox on Window
897
895
style question
898
896
title `Move system`
899
- message `Shall I move the system to the current host (` cat HostSSID cat `)?`
897
+ message `Shall I move system ` cat SystemName cat ` to the current host (` cat HostSSID cat `)?` cat newline
898
+ cat `(If 'No' I will attempt to connect to ` cat SystemHostSSID cat `)`
900
899
show MessageBox giving Value
901
900
if Value is `Yes`
902
901
begin
@@ -1407,7 +1406,12 @@ CheckDevice:
1407
1406
1408
1407
CheckDevice2:
1409
1408
put the position of ` ` in Uptime into P
1410
- if P is greater than 0 put left P of Uptime into Uptime
1409
+ if P is greater than 0
1410
+ begin
1411
+ put left P of Uptime into Uptime
1412
+ put Uptime cat ` sec` into Uptime
1413
+ end
1414
+ else put `Unknown` into Uptime
1411
1415
log Name cat ` uptime: ` cat Uptime
1412
1416
set the text of UptimeLabel to Uptime
1413
1417
go to OK
@@ -1427,6 +1431,7 @@ RelayOffClick:
1427
1431
end
1428
1432
begin
1429
1433
put from 3 of Response into Uptime
1434
+ put Uptime cat ` sec` into Uptime
1430
1435
set the text of RelayStateLabel to `OFF`
1431
1436
end
1432
1437
gosub to CheckDevice2
@@ -1448,6 +1453,7 @@ RelayOnClick:
1448
1453
else
1449
1454
begin
1450
1455
put from 3 of Response into Uptime
1456
+ put Uptime cat ` sec` into Uptime
1451
1457
set the text of RelayStateLabel to `ON`
1452
1458
end
1453
1459
gosub to CheckDevice2
@@ -1496,6 +1502,7 @@ SendMessageToDevice:
1496
1502
put Path into MAC
1497
1503
end
1498
1504
end
1505
+ put empty into Response
1499
1506
put `http://` cat MasterIPAddr cat `/?mac=` cat MAC cat `&msg=` cat Message2 into URL
1500
1507
! log URL
1501
1508
get Response from url URL
@@ -1508,7 +1515,6 @@ SendMessageToDevice:
1508
1515
set property `path` of Device to empty
1509
1516
go to SendMessageToDevice
1510
1517
end
1511
- put empty into Response
1512
1518
return
1513
1519
end
1514
1520
! log URL cat ` - ` cat Response
@@ -1559,13 +1565,23 @@ UpdateConfig:
1559
1565
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1560
1566
! Pause the system controller
1561
1567
PauseSystemController:
1562
- if SystemIPAddr is not empty get Response from url `http://` cat SystemIPAddr cat `:17348/cgi-bin/pause.py`
1568
+ if SystemIPAddr is not empty
1569
+ get Response from url `http://` cat SystemIPAddr cat `:17348/cgi-bin/pause.py`
1570
+ or begin
1571
+ put `Unable to contact server at ` cat IPAddr into StatusMessage
1572
+ goto Working
1573
+ end
1563
1574
return
1564
1575
1565
1576
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1566
- ! PaResumeuse the system controller
1577
+ ! Resume the system controller
1567
1578
ResumeSystemController:
1568
- if SystemIPAddr is not empty get Response from url `http://` cat SystemIPAddr cat `:17348/cgi-bin/resume.py`
1579
+ if SystemIPAddr is not empty
1580
+ get Response from url `http://` cat SystemIPAddr cat `:17348/cgi-bin/resume.py`
1581
+ or begin
1582
+ put `Unable to contact server at ` cat IPAddr into StatusMessage
1583
+ goto Working
1584
+ end
1569
1585
return
1570
1586
1571
1587
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0 commit comments