Home Bell Schedule on Doorbell w/Raspberry Pi W

I hooked a Raspberry Pi Zero W to my doorbell to enable an automated bell schedule during COVID home schooling. It snapped together in two hours using these parts:

  • Raspberry Pi Zero W (Adafruit $10)
  • Relay module with a 5v coil, optoisolated (Amazon $14 for a 10 pack)
  • Mini USB power adapter (junk box)

After I booted up the headless RPi on the home network, (per https://levelup.gitconnected.com/headless-installation-of-raspberry-pi-using-noobs-and-make-it-ready-for-ssh-ad9a94babd85) I made sure I had cron and at: sudo apt install cron apt and then wrote a script to ring the bell:

 import gpiozero
 import time
 import argparse
 parser = argparse.ArgumentParser()
 parser.add_argument("--pulses",help="pulses to send", default=1, type=int)
 parser.add_argument("--gpio",help="gpio pin", default=14, type=int)
 parser.add_argument("--on",help="on time (ms)", default=250, type=int)
 parser.add_argument("--delay",help="delay time (ms)", default=250, type=int)
 args = parser.parse_args()
 bell = gpiozero.Buzzer(args.gpio)
  for pulse in range(args.pulses):

After the script seemed to function, I wired up the relay to the RPi Zero, with the GPIO14 delivering the IN to the relay module, and jumpering the +5 and GND from the board:

I tested the script a bit to watch the light on the relay operate, feel the click of the relay, and to use a DMM on the output terminals to make sure I wasn’t accidently using some inverse logic.

Then I sarted witing it up to the bell.

Fortunately, the bell for the doorbell was conveniently connected with a 4-conductor cable with two unused leads, so I co-opted the unused green wire for the connection from the transformer in my pantry to the “REAR” connection on the bell:

Then I tested things with the script and found a 25ms would bong the bell just fine:

2021/twiddle.py --pulses 6 --on 25 --delay 100

After a while, I used crontab -e to set up a schedule:


 # m h  dom mon dow   command 
 # test, 3x/minute:
 # * * * * * 2021/twiddle.py --pulses 3 --on 25 --delay 100 
 # YMS Davy
 30  9 * * 1-5 2021/twiddle.py --pulses 3 --on 25 --delay 100#
 37  9 * * 1-5 2021/twiddle.py --pulses 3 --on 25 --delay 100
 07 11 * * 1-5 2021/twiddle.py --pulses 3 --on 25 --delay 100
 14 11 * * 1-5 2021/twiddle.py --pulses 3 --on 25 --delay 100
 13 13 * * 1-5 2021/twiddle.py --pulses 3 --on 25 --delay 100
 20 13 * * 1-5 2021/twiddle.py --pulses 3 --on 25 --delay 100
 50 14 * * 1-5 2021/twiddle.py --pulses 3 --on 25 --delay 100

 # YHS Liz
 20 07 * * 1-5 2021/twiddle.py --pulses 2 --on 25 --delay 100
 55 08 * * 1-5 2021/twiddle.py --pulses 2 --on 25 --delay 100
 03 09 * * 1-5 2021/twiddle.py --pulses 2 --on 25 --delay 100
 53 09 * * 1-5 2021/twiddle.py --pulses 2 --on 25 --delay 100
 21 10 * * 1-5 2021/twiddle.py --pulses 2 --on 25 --delay 100
 21 12 * * 1-5 2021/twiddle.py --pulses 2 --on 25 --delay 100
 29 12 * * 1-5 2021/twiddle.py --pulses 2 --on 25 --delay 100
 05 14 * * 1-5 2021/twiddle.py --pulses 2 --on 25 --delay 100  

It works great.

Compass Line Game

We did this game at the CVC IOLS training:

As the text says, “This is an excellent game for almost any outdoor occasion and may be used by small or large groups.”

The game works by giving each player a card with three routes on it. They navigate each the route to score +100 points, but take off a point for each foot of error in reaching their destination.

There are lots of references for this game out on the web, with printable cards, instructions and answer keys.

I was curious about the routes and how they worked so I put them into QGIS https://www.qgis.org/ and stored them in GitHub at https://github.com/drf5n/compass_game

If you want a CSV file with the starting points and directions, try https://github.com/drf5n/compass_game/blob/main/CompassLineGame.csv

A GIS layer of the paths is also available.

For PDFs of how to run the game, check the links above.

Frigidaire washing machine FWS800FHS0 pressure switch tube 5300771996

My Frigidaire FWS800FHS0 washing machine overflowed due to a hole in the pressure switch hose. The tricky part was that the hole was small so the problem was intermittent. I fixed it by cutting out the damaged portion and inserting an air-hose union. The OEM repair would be replacing it with a $50 piece of tubing #5300771996.

The problem was ultimately caused by where the plastic positioning clip built into the top of the tub wore through the hose after 10 years of use. The small hole didn’t leak enough air in quick testing to underestimate the amount of water in the tub, but if the water is high for an extended period of time, the air leaks out of the hose and the water leaks in, and the pressure switch will underestimate the amount of water in the tub and turn the fill valve on until the switch triggers (never), causing an overflow.

$50 for a piece of tubing seems excessive, but the hose is thicker and more resilient than a piece of vinyl tubing. It is held on by press-fits at both the pressure switch and the tub, where vinyl might require hose clamps. I think the tubing is food-grade 1/8″ ID x 3/8″ OD silicone tubing, which you can find online for $13 for 10 feet.

Coronavirus Info

I like these Financial Times graphs from FT Peak Charts   The log scale makes it easy to measure the %change between peak and recovery, and the slopes are %change/day because linear differences on a log chart are multiplicative changes.

The Johns Hopkins map is good.  I like switching the lower right graph to daily cases.

The Virginia Department of Health Coronavirus info site has several ways to drill down into local data near me.  Top level, I like the “Key Measures”  graphics that separate out the NOVA outbreak and recovery from the rest of the state.  The big takeaway is that excluding NOVA, the rest of the state just only ‘ben/t the curve’ to a temporary stalemate, and then gave up.  I like putting the Cases, Hospitalizations, Deaths and %positive graphs together into a tweet like this.  I like the ‘by date reported’ graphs over the ‘by symptom onset’ graphs, since the latter are right censored and are biased downwards until the new data stops trickling in.

I also like https://covid19-projections.com/us because it does that looks like a reasonable projection of what we’re headed for–the error band increases as it looks further into the future, and it distinguishes between active infections and total infections.

Somewhat related is rt.live, that tracks the Rt for the states as it changes through time.



test map here

York County FY2020 Budget

The York County VA  school district and BOS are working on the budget.

The YCSD has two pages with interesting links: https://yorkcountyschools.org/aboutUs/budget/default.aspx and https://yorkcountyschools.org/aboutUs/budget/FY20_Budget/default.aspx

The BOS has this https://www.yorkcounty.gov/558/Budget  

I still think the YCSD/BOS is planning for overcrowded, substandard facilities.  Overcrowded based on the current and future enrollment predictions in last year’s Facilities Master Plan and this year’s enrollment in the Budget Outlook Presentation, the capacity changes in the proposed YCSD CIP and the 85-90% of instructional capacity goal explained by Dr. James in this video: YCSD Dr. James on 85-90%  The substandard facilities come from the overcrowding stressing the sites.


Going forward, YCSD’s FY2020-2025 Facilities master plan https://yorkcountyschools.org/aboutUs/budget/docs/FMP_FY20-25.pdf projects enrollments forward to 2025.  I highlighted the elementary, middle and high school enrollments at the 100% and 90% thresholds:




The elementary plan looks grim.  There are plans to add 6 classrooms at Seaford Elementary and another elementary school at Marquis Center, but the 150+500=650 additional seats doesn’t cover the anticipated 760 seat shortfall, leaving the system at 101% in FY2025.  To cover the anticipated 6657 students at the 85-90% level, you’d need 1500-1934 seats of additional capacity, or 850-1284 more than York County is planning for.

Two areas where school facilities are clearly overstressed are the usable site sizes and the play areas as compared to the enrollments.  The VDOE requires usable site sizes of 4 acres + 1 acre per 100 kids for elementary schools, where useable means the buildable areas within the building line setbacks not the total lot area.  These are further constrained by shared use, such as sharing fields with the parks department, or other programs, like head start, pre-K, boys & girls club, or other schools.  If the lot size is constrained, like at Yorktown Elementary School, adding modular buildings on the paved areas to handle increased attendance can interfere with the VDOE standard of having two hard surface play areas at elementary schools with more than 400 kids.  See if you can find the hard surface play areas at YES dulnn2qxcaaksqj

If you combine the Facilities Master Plan, the current enrollments, the projections in the Facilities Master Plan and the capacity improvements in the proposed CIP you get two important measures of overcrowding.  Current elementary K-5 enrollment is 5717 as compared to 5852 seats of instructional capacity.  That is 5717/5852=97.69% of instructional capacity, or 451 students higher than the 85-90% range that YCSD says is their goal.  In the CIP they plan to add a 500 seat school at Marquis, and 6 more classrooms at Seaford in the next few years to make 6502 seats by 2025,  but as the years progress, YCSD also projects more growth and additional students.  Last year’s FMP plan underestimated FY2019 enrollments by 5717-5675=42 students and projects 6241 students in FY2024.  The current FMP takes extrapolates to at 6657 students in FY2025.  Comparing that to the capacity gives 6657/6547=101.7% of instructional capacity.  Aiming for the 85% to allow for future growth would require 6657/.85=7831 seats of capacity, or 7831-6547=1284 additional seats of instructional capacity.  That would mean building out the Marquis school to 700 and building another 1084 seats worth of elementary school.

The enrollment of 98% of instructional capacity means that you can’t use redistricting to redistribute students around to schools to achieve levels in the ideal range.  Even if you had perfect bussing, fairly distributing the students would make all the schools overcrowded above the 90% threshold.

I had a meeting with Dr. James and Mr. Bowen of YCSD this morning to discuss these issues.  At the end of the process, I still think the York County needs to change their plans to meet overcrowding and state standards by the end of their planning horizon.  To do that, they need to add another 30M$ school to be completed in FY2025, and plan to build out about 30% more capacity at Marquis.  Fixing the inadequate site sizes at the existing schools is a harder problem.






York County YCSD twitter post

York County and its school division have twitter, and I like posting links to this set of tweets that shows of the poor planning that got the York County School Division into the place where we’ve got overcrowded elementary schools and substandard facilities:

If you follow that link, you’ll see links to the documents and to Dr. James talking about the consequences of crowding above 90% of instructional capacity.

Their main twitter pages:

Tracfone default zipcode

It would have saved days and hours if any of the many tech support people involved knew this fact about doing a port-out of TracFone and port-in H2OWireless:


We have checked on the account. In porting a number out, you need to provide the default ZIP code which is 33178.”

Initially, we got an incomplete transfer from TracFone with an “Invalid zipcode” rejection, then neither the current address nor previous address, nor permutations of the addresses and zip codes, not cut and pasted, no nothing, worked.  Then, on the 8th day, the little tidbit above cleared it up 30 minutes into a multi-way tech support chat.

33178 is TracFone’s corporate address: https://www.tracfone.com/contactus

Redistricting won’t solve overcrowding letter & Letter opposing Lightfoot development

There are two letters here — one regarding the YCSD attendence zone rebalancing and one regarding the BOS approval of the Lightfoot development.


Letter to Chad Green and Mark Medford after Redistricting committee meeting:

Dear Sirs,

I attended the attendance zone meeting last night as a non-participating member and was surprised at the updated enrollment projections.  Page 4 of the Oct 4 handout shows attendance levels that appear to put the enrollments about 2 years ahead of the December 2016 YCSD facilities master plan.

Additionally, the redistricting consultant work appears to focus on the building sizes rather than the instructional sizes, and also is still unclear as to the goals.   For instance, specification number one in the redistricting process is “Realign school attendance zone areas so the distribution of students matches the instructional capacity or the building capacity”  — you folks spent a lot of time and effort over the last year or so explaining the need to use instructional capacity rather than the misleading building capacity.  To consider reverting to building capacities for the redistricting decisions confuses the issue and uses the inferior metric you spent the last year disparaging.

That the elementary system is already at 93% of instructional capacity guarantees that even if redistricting boundaries and transportation was not a constraint, any redistricting plan will certainly overcrowd schools above the ideal of 85-90% capacity. (If you are thinking that the goal should be 100% of instructional capacity, as implied by the tables in the FMP and consultants presentation, consider that you can’t move surplus 4th graders into under-enrolled kintergarden and 5th grade classes, and that the middle and high school systems are at about 75% instructional capacity.)

The touchstones that I’d test the redistricting plans against is how well it distributes the overcrowding above 90% instructional capacity relative to the facilities, and how the solutions impact the facilities compliance with state standards.  This process of rehashing building capacity vs instructional capacity, and K-5 vs pre-K-5 enrollments vs building capacity and instructional capacity looks like rearranging the deck chairs on the Titanic.

From what I saw last night, you are being overly optimistic that future enrollment will be lower than expected and that the Marquis school will be an adequate solution to overcrowding over your 6 year planning period.

The fact that YES has substandard facilities, temporary trailers, and overcrowding at the 111% level after the 8+ years of planning for the new elementary school shows that the county has done a poor job of oversight.  The fact that the current plans are inadequate to bring the system-wide elementary enrollments to less than 90% of instructional capacity indicates a poor job of planning for the future.

Please, show me I’m wrong.


Letter to BOS Chad Green regarding the Lightfoot development on 2017 Oct. 17 BOS meeting:
Dear Mr. Green,

The Lightfoot development plan on the BOS agenda tonight adds 248 additional housing units to an elementary school system already overcrowded above 93% of instructional capacity.   The YCSD facilities master plan expects overcrowding in the elementary schools above 90% for the foreseeable future, showing that York County does not have sufficient elementary school resources to approve additional housing units.

I ask that you defer approval of this development until after the county can produce a master plan which will eliminate the overcrowding.

Note that the metrics and goals used for the current attendance zone rebalancing process hide the extent of the overcrowding problem by shifting from instructional capacity to building capacity, and by aiming for 100% building capacity.   While looking at the enrollment plans, please compare the over/under 100% building capacity over/under red fonts in the rebalancing plans to Dr. James’ ideal of 85-90% of instructional capacity, and also to the 75% of instructional capacity for the middle and high school systems.

Approving the Lightfoot development plan is inconsistent with the six-year YCSD Facilities Master Plan, will make the overcrowding worse, and will make the school facilities more sub-standard than they already are.

Please oppose this development.

YCSD Redistricting doesn’t solve overcrowding in its elementary schools

The proposed redistricting plans do not solve the overcrowding problems at Yorktown Elementary and other schools in York County.

York County posted some modification plans of the attendance zones for the elementary schools for the 2017 April 17 special meeting which seems to show that moving the zones will solve the overcrowding problem.  However, in the analysis they present, they revert to using the building capacity numbers rather than the instructional capacity numbers the School Division put forward last year.

Using the 2016 instructional capacities with the proposed redistricting plans gives the results below.

Screen Shot 2017-04-17 at 12.33.22 PM

(Excel spreadsheet:YCSD_redistricting)

I’ve highlighted the overcrowded elementary schools with enrollments above the level of 85-90% of instructional capacity that Dr. James spoke of as the ideal range of instructional capacity utilization. Note that the WMES numbers include the in-process addition.

Looking at the numbers for the proposed plans, several of the schools currently in or below the ideal 85-90% range will be pushed up to nearly 100% of utilization of instructional capacity.

See these resources:

2017 April 17 Exec Summary of Attendence Zone Changes

2016 May 9 Instructional Capacity Presentation