Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New combine_stations plugin
#1
A new plugin named combine_stations has been added.

It allows multiple stations to be combined and run at the same time (concurrently) while SIP is in sequential mode.
<p><br></p>
Reply
#2
(2020 May 30, 08:47 PM)dan Wrote: A new plugin named combine_stations has been added.

It allows multiple stations to be combined and run at the same time (concurrently) while SIP is in sequential mode.


Works perfect for me.  Thanks a bunch for implementing this change.  Makes my programs MUCH more simplistic being able to easily combine zones.
Reply
#3
Hi Dan,

I tried out the combine_stations plugin today. 

It works.  Also the activated stations are correctly displayed on SSD1306. Nice. 

[Image: aQy1DBhBoz7aIuyOMAByKPFGHEvTsPl3eEYO7iq9...8gTFSlU=s0]
[Image: 2BPlNfANGr49Fv5efyGBucV0SFUjwkp7gIv-1EZr...ewlnIal=s0]

I also want to report an inconsistency.

My system contains 16 stations and two virtual stations, one of which (V17) is switched on here.

V17 combines stations 1, 3, and 5.

When V17 is switched on, stations 1, 3 and 5 are correctly switched on, as can be seen in the OLED display SSD1306 and also through the three green LED's in the attached.

However, in the SIP web UI, the program schedule shows, in addition to the above three stations, another three stations are also active: 9, 11, and 13.

These latter three stations (9,11,13) are at a constant offset (+8) to the former three stations (1,3,5).

I looked at the plugin code in combine_stations.py.

In line numbers 71-77, the program_schedule variable (gv.ps) and the run_schedule variable (gv.rs) employ different bitwise in-place operators: 
"|=" for the program_schedule, and 
"&=" for the run_schedule.

Why should the program_schedule and the run_schedule employ different logic?

Regards,

Paul
Reply
#4
Hi Paul,

What you described is definitely a bug. Thanks for reporting it.

I have done some testing and it looks like the problem is a display issue in the HTML template. looking at gv.sbits and gv.ps when a program is running shows them to be correct but the display on the home page is not correct.

I will dig into it and post here as soon is a fix is available.

Dan
<p><br></p>
Reply
#5
I pushed an update to the plugins repo.
Re-install the plugin and let me know if it is working properly for you.

Dan
<p><br></p>
Reply
#6
Hi Dan,

It is now working properly. Thanks for the quick fix.

Paul
Reply
#7
Hi Dan,

I might have spoken too fast.

The HTML display issue is fixed.

But there is a new problem with the virtual station.  The combined stations (S1, S3, S5 in my case) switched on momentarily and then went off after about a second. 

Before the plugin re-installation, the member stations would remain on until I switched off the virtual station (V17).

In the attached picture, the left column shows when I switched on V17.  Right column captures the state about 1 second later:
The three LED’s went off;
The member stations disappear from the Oled display;
HTML display remains unchanged.

In contrast, the regular stations (S1-S16) work fine.  They stay on.

Paul.


Attached Files Thumbnail(s)
       
Reply
#8
Hi Dan,

I tried the following and it seems to fix the problem.

I commented out the "if" clause on line 71 of "SIP/plugins/combine_stations.py", and adjusted the indentations of the subsequent two lines:


#                if not gv.sd[u'mm']: #  If under program control
                gv.ps[sidx][1] = gv.rs[vid][2]                
                gv.rs[sidx] =  gv.rs[vid]


At first I tried toggling the condition in line 71 (by removing "not"), the program would then work fine in manual mode ('mm') but would not work expected in auto mode.

Paul
Reply
#9
Hi Paul,

I didn't see the problem at first because it only affected manual mode.
I found another rather obscure bug that prevented the same program from working twice in a row.

Both are fixed now and the update has been pushed to the plugins repo.

Dan
<p><br></p>
Reply
#10
(2021 Aug 27, 05:29 PM)dan Wrote: Hi Paul,

What you described is definitely a bug. Thanks for reporting it.

I have done some testing and it looks like the problem is a display issue in the HTML template. looking at gv.sbits and gv.ps when a program is running shows them to be correct but the display on the home page is not correct.

I will dig into it and post here as soon is a fix is available.

Dan

Hi dan,

What is the best way to observe gv.sbits while the program is running?  

I just inserted "print" statements in the code.  Then I have to manually stop sip3 service and manually run sip.py:
sudo systemctl stop sip3
sudo python3 sip.py

I was wondering if there might be an easier way.

Paul
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)