📜 ⬆️ ⬇️

Musical programmable school bell "Schoolboy-4"



annotation


On Habré, more than once did the description of working with the TL-MR3020 router in terms of expanding its capabilities based on openwrt firmware. I want to show another version of the finalization of the router, in which he can become a full-fledged participant in the school learning process. The article provides a description of the device and the procedure for working with the “Schoolboy-4” music programmable school bell.

Module "Schoolboy-4"


For those who can't wait to try it at work, I suggest immediately flashing your router with an alternative CyberWrt firmware and choosing this module in the Modules / test menu, then clicking Install and after a while you will be able to experiment on your own. For full-fledged work, a usb sound card is needed, which is inserted in the photo directly into the router case.


')

Introduction


In Russia and the world there are several dozens of different implementations of automated bell systems. The first such systems appeared in the USSR, and in some places they still worked. Many of them simply automate the delivery of traditional loud battle calls. Some part allows instead of the usual calls to use the wired broadcasting system, which is usually included in the notification system at school.

The variant described below is the 4th school bell under the straightforward name “Schoolboy”. The first two versions were performed by my friend, Zhenya Penner, who implemented them on the AVR. I picked up the baton and the third option was based on a mobile phone as a Java2ME application. All of them worked for many years faithfully and in some schools in the Urals and in Siberia.

If we look at the sources , we see that the next call is a set of shell and javascript scripts. Calling is controlled by shell scripts using the crond service. The web interface is written in javascript using the jQuery library. The router is connected via audio card to the amplifier of the wired broadcasting system. Access to the management can be organized both via a local wired network and via WiFi.

At the moment, prototypes of the Shkolnik-4 call have been installed in two schools and have been in trial operation for several months.

Interface


The general view and interface description are presented below.

Settings

There are not many settings:

An automatic machine is a mode in which at 1 minute of the first every day an automatic change of schedule occurs according to the annual plan. If the automatic mode is turned off, the schedule will be constant (see below).

Schedule - select the schedule for the manual switching mode.

Preview - the time in minutes for which preliminary calls are made, if they are enabled (see the Schedules tab).

Melody - melody for a preliminary call. All melodies due to space restrictions in the router are limited to a set of five.

The Sync button sets the time on the router from the browser. The fact is that the TL-MR3020 is synchronized via the network, but if it is not there, then the epoch of unix is ​​set. RTC chips on board there. This is one of the drawbacks of this router for this application.

The Stop button stops the crond service, and Restart restarts.

Button Test tests the sound path, playing a short sound file.



Plan

This is just a children's coloring. “Dunk” the brush in the schedule and we need what we need for the current year. Do not forget to save your creativity by clicking on the Save button. This plan is needed for automatic mode change schedule.


Schedules

You cannot add or remove schedules in the current version, but you can edit them. We select the schedule from the list, a set of calls for it appears below. Add / remove lines, change the melody, include or exclude a call from the crond task assignment, enable or exclude an additional preliminary call. Everything is intuitive. You can also play the current melody, but it will be played in the browser, and not through the audio card.
The Apply button is needed if several schedules change at once. First you need to Apply current changes to go to the next schedule, and then click Save . After that, all changes will be saved.


The System Log and Debug tabs contain specific information for setting up a call. CyberWrt module "Schoolboy-4" immediately ready for use after installation. If the crond service is not running, then instead of the WORKING inscription, it will be STOPPED. No calls will be made.

Operating procedure


1. Install the module or build it yourself for your system.
2. Edit schedules, save.
3. Make an annual plan, save.
4. Turn on the automatic mode, save.
5. Button Restart.

Note If the router is not connected to the local network or for another reason cannot be synchronized via the network to set the time, then this operation must be performed manually (the Synchronize button). Unfortunately, the time zone also needs to be changed manually in the configuration file, which requires special knowledge.

Benefits


- replacement of the person, always exact giving of calls;
- more pleasant psychological atmosphere in school;
- the ability to customize control via a local network or WiFi ( qualification required );
- call setup is carried out through the browser of a smartphone, tablet, laptop or PC;
- work in manual mode (selected schedule) or automatic - according to the annual plan.

disadvantages


- a wired broadcasting system is required (the bell is connected to the free input of the amplifier);
- 5 melodies are pre-installed (usually no longer required), there is no possibility to upload yours via the interface yet;
- the router on which the call is based does not have the ability to save time when the power is turned off, but it can synchronize over the network if it is configured to work on a network where there is Internet access. Therefore, when turned on, you need to perform a synchronization operation through the interface.
- 4 arbitrary schedules are available for changing (in the future it will be possible to add an arbitrary number, although this is usually not required);

Files


action.cgi - a handler for post requests from the page;
index.cgi - required as part of the CyberWrt module;
json.cgi - JSON parser on the shell script;
scheduler.cgi - create tasks for crond;

main.html - main page;
style.css - tab styles;

jquery-1.11.0.min.js - jQuery library;
main.js - contains classes for working with objects on the page: schedules, settings, plan, etc.
webtoolkit.base64.js - Base64 codec;

* .json - configuration files;
* .mp3 - melodies;

log.txt is a message log, cyclically overwritten.

Other


The source code is free, free and at your own risk, as they say. As a sound card fit simple Chinese for 150 p. (it is depicted in the photo above, screwed with a clip). If you want to establish such a call in your school, then go to arrange directly at the reception to the school principal, in private. I don’t need any implementation bonuses, it would be nice to know if such a device would work somewhere. The only thing I would accept as a gift for the collection are old Soviet calls like "Electronics".

Links


1. Sources on github .
2. Schoolboy-3. User Guide (pdf).
3. CyberWrt module "Schoolboy-4" (forum thread).
4. Musical programmable school bell "Schoolboy-3 . "

Source: https://habr.com/ru/post/228479/


All Articles