Description of the weather system

Weather System is a weather notification system with customizable filtering rules.


The main function

According to the given geographical information, the time zone of the target address, the target duration and a matcher, it automatically queries the weather information to find the matching time.
Among them, the accuracy of the weather interval is 3 hours.

When the system finds a matching time, or the previously matched time is invalid or changed due to weather changes, the system will try to notify the user by email.
Email notifications will be sent according to the mailbox and the notification time provided by the user in the contact information service.

⚠️
By default, the system will not use the user's login email address as the reserved email address.

For matching rules, users can choose to use the automatic editor. The automatic editor can help users quickly select the required weather attributes. When multiple matchers are selected, the system finds when ALL matchers match.
Matching rules can also be configured directly through Json. Its grammatical rules are similar to Lisp, except that all verbs are placed on the key "action" in Json.
Users can use up to 20 matchers at the same time.


Example of use

Take me in Chengdu and want to match the weather in the United States as an example.
I want to find: In Washington, sunny or few cloudy, between 10am and 6pm local, and it must be Saturday or Sunday, and I want the volume of rain to be less than 1mm. I only need 3 hours, which is fine, because I just want to hang out a little bit.
(That is to say, I want to find at least 3 hours between 10 o'clock and 6 o'clock, which meets the requirements of date, precipitation, weather, etc.)

First click the map button, and select the address I want in the pop-up map. (The browser will read your location by default, so it will ask the user for permission)

Then select the time zone where the target region is located. This time zone will be applied to the time matcher.
At this point, I can choose -5 time zone, so that the following time matcher can directly fill in 10:00 to 18:00.
But I can also choose +8 time zone, so that the later time matcher needs to be converted by myself, filling in 23:00 to 7:00. (Hope I got the conversion right)
The time can span 0:00, 23:00 to 7:00 may match to 3:00 am, but not to 10:00 am.

Then select the minimum duration that needs to be matched, here you can choose 3 hours.

So, before entering the matcher, it should look like this:

Finally, the input matcher:
If you use the UI editor, select sunny and few clouds (you can also disable this, directly enter the percentage of cloud cover), select the time interval and Saturday and Sunday, and only allow rainfall between 0-1mm.

If using Json editor:

{
    "action": "and",
    "matchers": [
        {
            "action": "ids",
            "ids": [
                800,
                801
            ]
        },
        {
            "action": "dayHour",
            "from": 23,
            "to": 7,
            "timeZone": 8
        },
        {
            "action": "weekDay",
            "days": [
                7,
                6
            ]
        },
        {
            "action": "rain",
            "from": 0,
            "to": 1
        }
    ]
}

Finally click the submit button.


Other functions

View matches on the web

At the bottom of each query, the weather for 5 days can be viewed. If there is a match among them, it will be marked as found.

Once entered, matching slots will be marked with a green background.

Registration Contact

Enter the sidebar, select the contact service, enter the email address, and select the time interval you expect to receive the notification.


Known issues

Chinese localization

Haven't had time to Chinese localization the weather system yet. Only the main interface has been finished.

Weird UI

I do feel that the experience of this UI is a bit awkward. But I don't know how to change it to be more comfortable. After all, my previous interaction with this thing was directly based on API interaction...

Especially for some error reports, the current situation is that various verifications fail, etc., and there is no hint of what is wrong. These are hard work and can only be made up slowly.

Style of notification email

Because it was just to check the weather at first, the email didn't even indicate which place it was referring to, and the email was also in plain text. Bear with it, it is estimated that it will be changed within half a year.

API callback

Generally speaking, API callback is better than email notification. But... I didn't have time to do it.

Forced login

After all, it is an integrated Keycloak, so I want to be simpler, log in first, and be simpler.


History background

At first, I just wanted to help find a good day to do laundry and see if there will be sunny days in the next few days. I just made an API, and then called my ready-made email notification system.

Then my automated tools have a tradition: allowing users to upload scripts to customize the logic of some functions. I used to go directly to Lisp, and I even had a special service to verify what the script did. However, considering that I want to increase the ease of use, I created a json to package Lisp.

Later, because I also disliked it at 2-3 in the morning, an email came to me saying: The weather the day after tomorrow is good, so I added some user-defined configuration services.

At last. In order to try some showy operations such as Keycloak and Iframe, I quickly set up a UI for this thing, and then it became what it is now.

DigitalOcean Referral Badge 蜀ICP备19018968号