Compare commits

..
40 Commits
Author SHA1 Message Date
gitea-blackout-bot d8b2263089 chore(state): update outage notification state [skip ci] 2026-12-05 09:00:12 +00:00
gitea-blackout-bot ab83e7950d chore(state): update outage notification state [skip ci] 2026-11-30 10:00:54 +00:00
gitea-blackout-bot 496f074ba2 chore(state): update outage notification state [skip ci] 2026-11-28 11:56:21 +00:00
gitea-blackout-bot 6a2a766094 chore(state): update outage notification state [skip ci] 2026-11-26 14:39:32 +00:00
gitea-blackout-bot 51d83c29cb chore(state): update outage notification state [skip ci] 2026-11-26 11:00:51 +00:00
gitea-blackout-bot e2c688a1a6 chore(state): update outage notification state [skip ci] 2026-11-25 13:00:34 +00:00
gitea-blackout-bot 46c2f74d49 chore(state): update outage notification state [skip ci] 2026-11-23 21:00:25 +00:00
gitea-blackout-bot da10fab99b chore(state): update outage notification state [skip ci] 2026-11-23 09:00:25 +00:00
gitea-blackout-bot 2f07d038d5 chore(state): update outage notification state [skip ci] 2026-11-21 16:00:58 +00:00
gitea-blackout-bot edd20dc63c chore(state): update outage notification state [skip ci] 2026-11-02 09:01:35 +00:00
gitea-blackout-bot 63b783f9a3 chore(state): update outage notification state [skip ci] 2026-11-01 19:01:47 +00:00
gitea-blackout-bot 87a1534015 chore(state): update outage notification state [skip ci] 2026-10-31 17:01:38 +00:00
gitea-blackout-bot 5a4015cca4 chore(state): update outage notification state [skip ci] 2026-10-30 11:02:05 +00:00
gitea-blackout-bot 7d402bdef1 chore(state): update outage notification state [skip ci] 2026-10-29 17:01:54 +00:00
gitea-blackout-bot 3dbe2a9aa8 chore(state): update outage notification state [skip ci] 2026-10-28 21:01:12 +00:00
gitea-blackout-bot 336929abd3 chore(state): update outage notification state [skip ci] 2026-10-27 09:01:21 +00:00
gitea-blackout-bot d0037434d0 chore(state): update outage notification state [skip ci] 2026-10-26 15:01:05 +00:00
gitea-blackout-bot c30ac1aee7 chore(state): update outage notification state [skip ci] 2026-10-24 17:01:19 +00:00
gitea-blackout-bot 8e28352d69 chore(state): update outage notification state [skip ci] 2026-10-23 11:01:52 +00:00
gitea-blackout-bot d816756f46 chore(state): update outage notification state [skip ci] 2026-10-22 15:01:12 +00:00
gitea-blackout-bot edcbfddae7 chore(state): update outage notification state [skip ci] 2026-10-21 21:01:21 +00:00
gitea-blackout-bot 69e95e2d8c chore(state): update outage notification state [skip ci] 2026-10-20 09:01:23 +00:00
gitea-blackout-bot 39de5e384a chore(state): update outage notification state [skip ci] 2026-10-19 15:01:38 +00:00
gitea-blackout-bot 6a128089c0 chore(state): update outage notification state [skip ci] 2026-10-18 19:02:03 +00:00
gitea-blackout-bot 01c67ed100 chore(state): update outage notification state [skip ci] 2026-10-17 17:01:18 +00:00
gitea-blackout-bot faf8bca154 chore(state): update outage notification state [skip ci] 2026-10-16 11:01:18 +00:00
gitea-blackout-bot 2713f2d014 chore(state): update outage notification state [skip ci] 2026-10-15 17:01:27 +00:00
gitea-blackout-bot 5c656ac0ee chore(state): update outage notification state [skip ci] 2026-10-14 21:01:16 +00:00
gitea-blackout-bot f407b27bce chore(state): update outage notification state [skip ci] 2026-10-13 17:06:46 +00:00
gitea-blackout-bot 114ea53777 chore(state): update outage notification state [skip ci] 2026-10-13 09:00:25 +00:00
gitea-blackout-bot 9d732ea29d chore(state): update outage notification state [skip ci] 2026-10-12 21:01:52 +00:00
gitea-blackout-bot e5af6449e6 chore(state): update outage notification state [skip ci] 2026-10-12 15:01:52 +00:00
gitea-blackout-bot 1d91c948a9 chore(state): update outage notification state [skip ci] 2026-10-11 19:01:19 +00:00
gitea-blackout-bot 4c37fbc216 chore(state): update outage notification state [skip ci] 2026-10-10 17:02:03 +00:00
gitea-blackout-bot 2a04f7ebd4 chore(state): update outage notification state [skip ci] 2026-10-10 15:02:02 +00:00
gitea-blackout-bot e6d5086aa1 chore(state): update outage notification state [skip ci] 2026-10-10 06:57:24 +00:00
gitea-blackout-bot aa1da45c0e chore(state): update outage notification state [skip ci] 2026-10-07 21:00:09 +00:00
gitea-blackout-bot 38e181d521 chore(state): update outage notification state [skip ci] 2026-10-07 09:01:37 +00:00
MeghdadFadaee 22b0697734 add Standalone clock
Test blackout notifier / test (push) Successful in 5s
2026-10-07 09:40:38 +03:30
MeghdadFadaee d597602c8a create AGENTS.md 2026-10-07 09:37:57 +03:30
4 changed files with 580 additions and 475 deletions

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
# Repository Guidelines
## Project Structure & Module Organization
`src/blackout_notifier/` contains the Python notifier: `clients.py` handles SAAPA/EitaaYar requests, `service.py` coordinates notifications, `state.py` persists deduplication state, and `config.py`, `models.py`, `messages.py`, and `cli.py` provide supporting logic. `main.sh` is a standalone, read-only outage dashboard. Python tests and Bash dashboard tests live in `tests/`. `.gitea/workflows/` defines testing, hourly checks, and runner-image publishing. `state/outages.json` is live notification state; `archive/blackouts-1404.json` is historical reference. `avatar.png` is a repository image asset.
## Build, Test, and Development Commands
Use Python 3.11 or newer:
```sh
python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[test]'
cp .env.example .env
```
After configuring `.env`, use `python -m blackout_notifier check --dry-run` to preview notifications without sending messages or changing state. `python -m blackout_notifier check` performs a live check. Run `./main.sh --bill-id 7356609804429` for the dashboard; it requires Bash 4.3+, curl, jq, and GNU date.
Run the CI checks locally:
```sh
ruff check .
ruff format --check .
pytest
bash -n main.sh tests/test_main.sh
bash tests/test_main.sh
```
## Coding Style & Naming Conventions
Use four-space indentation in Python, type annotations, `snake_case` functions and variables, and `PascalCase` classes. Ruff targets Python 3.11 with a 100-character line limit; use `ruff format .` to format changes. Follow the existing two-space Bash indentation, quote expansions, and preserve strict shell error handling.
## Testing Guidelines
Use pytest files named `tests/test_<module>.py` and functions named `test_<behavior>`. Shared fixtures belong in `tests/conftest.py`. Mock external services and use temporary state files. Cover notification retries, updates, cancellation, malformed responses, and Tehran-time boundaries when relevant. Dashboard tests use Bash assertions in `tests/test_main.sh`. No numeric coverage threshold is configured.
## Commit & Pull Request Guidelines
Recent commits use prefixes such as `feat(cli):`, `fix(cli):`, `chore(ci):`, and `style:`. Write concise, imperative subjects. Keep automated `chore(state): ... [skip ci]` commits separate from code changes. Pull requests should explain behavior changes, link relevant issues, and report validation; include terminal screenshots for dashboard layout changes.
## Security & Configuration Tips
Keep tokens in ignored `.env` files or Gitea Actions secrets. Never commit credentials. Avoid editing live state during development: use temporary `STATE_FILE` paths. Update `requirements.lock` when changing runner dependencies and document configuration changes in `README.md`.
+21
View File
@@ -247,3 +247,24 @@ NO_COLOR=1 COLUMNS=80 LINES=24 ./main.sh
When `pyfiglet` or `figlet` provides the `univers` font, the countdown uses it
automatically. Otherwise the bundled matching glyphs are used, keeping the same
appearance without making Figlet a dependency.
## Standalone clock
Run `./clock.sh` for a live clock using the dashboard's large digits and cyan
dividers. It shows Gregorian and Jalali dates, a greeting for the time of day,
and a progress bar counting toward midnight. On smaller terminals, the large
display shows hours and minutes with the precise time below it.
The clock digits turn red during the last ten minutes of each hour (`:50`–`:59`).
```sh
./clock.sh
./clock.sh --once # Print a single snapshot
./clock.sh --utc # Use UTC
TZ=Europe/London ./clock.sh # Choose another timezone
```
The clock defaults to Tehran time and needs only Bash 4.3+ and GNU `date`.
It works independently of `main.sh` and needs no network connection. Press `q`
or `Ctrl+C` to exit; the original terminal screen and cursor are restored.
Piped output prints one snapshot automatically. `NO_COLOR`, `COLUMNS`, and
`LINES` work as they do for the outage dashboard.
Executable
+460
View File
@@ -0,0 +1,460 @@
#!/usr/bin/env bash
set -euo pipefail
# macOS ships Bash 3.2 and BSD date. Prefer Homebrew's compatible runtime when
# it is installed, even when this script was started explicitly with /bin/bash.
for coreutils_path in \
/opt/homebrew/opt/coreutils/libexec/gnubin \
/usr/local/opt/coreutils/libexec/gnubin; do
if [[ -d "$coreutils_path" ]]; then
PATH="$coreutils_path:$PATH"
export PATH
break
fi
done
unset coreutils_path
if ((BASH_VERSINFO[0] < 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 3))); then
for modern_bash in /opt/homebrew/bin/bash /usr/local/bin/bash; do
if [[ -x "$modern_bash" ]]; then
exec "$modern_bash" "$0" "$@"
fi
done
printf 'Error: Bash 4.3 or newer is required (found %s).\n' "$BASH_VERSION" >&2
printf 'On macOS, install it with: brew install bash coreutils\n' >&2
exit 2
fi
unset modern_bash
# The standalone font and banner renderer match main.sh.
center_line() {
local text="$1"
local columns="$2"
local padding=0
if ((${#text} < columns)); then
padding=$(((columns - ${#text}) / 2))
fi
printf '%*s%s\n' "$padding" '' "$text"
}
repeat_character() {
local character="$1"
local count="$2"
local output=""
printf -v output '%*s' "$count" ''
printf '%s' "${output// /$character}"
}
large_glyph() {
case "$1" in
0)
cat <<'EOF'
,a8888a,
,8P"' `"Y8,
,8P Y8,
88 88
88 88
`8b d8'
`8ba, ,ad8'
"Y8888P"
EOF
;;
1)
cat <<'EOF'
88
,d88
888888
88
88
88
88
88
EOF
;;
2)
cat <<'EOF'
ad888888b,
d8" "88
a8P
,d8P"
a8P"
a8P'
d8"
88888888888
EOF
;;
3)
cat <<'EOF'
ad888888b,
d8" "88
a8P
aad8"
""Y8,
"8b
Y8, a88
"Y888888P'
EOF
;;
4)
cat <<'EOF'
,d8
,d888
,d8" 88
,d8" 88
,d8" 88
8888888888888
88
88
EOF
;;
5)
cat <<'EOF'
8888888888
88
88 ____
88a8PPPP8b,
PP" `8b
d8
Y8a a8P
"Y88888P"
EOF
;;
6)
cat <<'EOF'
ad8888ba,
8P' "Y8
d8
88,dd888bb,
88P' `8b
88 d8
88a a8P
"Y88888P"
EOF
;;
7)
cat <<'EOF'
888888888888
,8P'
d8"
,8P'
d8"
,8P'
d8"
8P'
EOF
;;
8)
cat <<'EOF'
ad88888ba
d8" "8b
Y8a a8P
"Y8aaa8P"
,d8"""8b,
d8" "8b
Y8a a8P
"Y88888P"
EOF
;;
9)
cat <<'EOF'
ad88888ba
d8" "88
8P 88
Y8, ,d88
"PPPPPP"88
8P
8b, a8P
`"Y8888P'
EOF
;;
D)
cat <<'EOF'
88888888ba
88 "8b
88 8b
88 88
88 88
88 8P
88 a8P
88888888P"
EOF
;;
H)
cat <<'EOF'
88 88
88 88
88 88
8888888888
88 88
88 88
88 88
88 88
EOF
;;
M)
cat <<'EOF'
88b d88
888b d888
88`8b d8'88
88 `8b d8' 88
88 `8b d8' 88
88 `8b d8' 88
88 `888' 88
88 `8' 88
EOF
;;
:)
printf '%s\n' ' ' '888' '888' ' ' ' ' '888' '888' ' '
;;
' ')
printf '%s\n' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
;;
*)
printf '%s\n' '???' '???' '???' '???' '???' '???' '???' '???'
;;
esac
}
print_large_countdown() {
local text="$1"
local columns="$2"
local character glyph_line glyph_width index row rendered_width=0 block_padding=0
local -a glyph_lines rows=('' '' '' '' '' '' '' '')
for ((index = 0; index < ${#text}; index++)); do
character="${text:index:1}"
mapfile -t glyph_lines < <(large_glyph "$character")
glyph_width=0
for row in {0..7}; do
if ((${#glyph_lines[row]} > glyph_width)); then
glyph_width="${#glyph_lines[row]}"
fi
done
for row in {0..7}; do
printf -v glyph_line '%-*s' "$glyph_width" "${glyph_lines[row]:-}"
rows[row]+="$glyph_line "
done
done
for row in {0..7}; do
while [[ "${rows[row]}" == *' ' ]]; do
rows[row]="${rows[row]% }"
done
if ((${#rows[row]} > rendered_width)); then
rendered_width="${#rows[row]}"
fi
done
if ((rendered_width > columns)); then
center_line "$text" "$columns"
return
fi
block_padding=$(((columns - rendered_width) / 2))
for row in {0..7}; do
printf '%*s%s\n' "$block_padding" '' "${rows[row]}"
done
}
TERMINAL_ACTIVE=0
clock_cleanup() {
if ((TERMINAL_ACTIVE)); then
printf '\033[0m\033[?25h\033[?1049l'
fi
}
clock_usage() {
cat <<'EOF'
Usage: ./clock.sh [--once] [--utc]
A live clock with Gregorian and Jalali dates and a daily progress bar.
Press q or Ctrl+C to quit. Piped output prints one snapshot.
--once Print one snapshot without taking over the terminal
--utc Display UTC instead of the default Tehran time
-h, --help Show this help
Environment: TZ overrides Tehran time; NO_COLOR disables colors;
COLUMNS and LINES override terminal dimensions.
Requires Bash 4.3+ and GNU date (macOS: brew install bash coreutils).
EOF
}
clock_size() {
local rows=24 columns=80 detected_rows detected_columns
if [[ -t 1 ]]; then
read -r detected_rows detected_columns < <(stty size <&1 2>/dev/null || true)
rows="${detected_rows:-24}"
columns="${detected_columns:-80}"
fi
rows="${LINES:-$rows}"
columns="${COLUMNS:-$columns}"
[[ "$rows" =~ ^[1-9][0-9]{0,3}$ ]] || rows=24
[[ "$columns" =~ ^[1-9][0-9]{0,3}$ ]] || columns=80
printf '%s %s\n' "$rows" "$columns"
}
# Arithmetic inverse of the modern Jalali conversion used by main.sh.
clock_jalali() {
local gy="$1" gm="$2" gd="$3" gy2 days jy jm jd
local -a offsets=(0 31 59 90 120 151 181 212 243 273 304 334)
gy2=$gy
((gm > 2)) && gy2=$((gy + 1))
days=$((355666 + 365 * gy + (gy2 + 3) / 4 - (gy2 + 99) / 100
+ (gy2 + 399) / 400 + gd + offsets[gm - 1]))
jy=$((-1595 + 33 * (days / 12053)))
days=$((days % 12053))
jy=$((jy + 4 * (days / 1461)))
days=$((days % 1461))
if ((days > 365)); then
jy=$((jy + (days - 1) / 365))
days=$(((days - 1) % 365))
fi
if ((days < 186)); then
jm=$((1 + days / 31))
jd=$((1 + days % 31))
else
jm=$((7 + (days - 186) / 30))
jd=$((1 + (days - 186) % 30))
fi
printf '%04d/%02d/%02d\n' "$jy" "$jm" "$jd"
}
clock_center() {
local text="$1" columns="$2" color="${3:-}"
if ((${#text} > columns)); then
text="${text:0:columns}"
fi
printf '%s' "$color"
center_line "$text" "$columns"
printf '%s' "$RESET"
}
clock_render() {
local epoch="$1" rows="$2" columns="$3"
local year month day hour minute second weekday month_name offset day_number
local time date_text jalali period rule banner banner_rows seconds_today clock_color detail_color
local bar_width filled percent remaining progress
read -r year month day hour minute second weekday month_name offset day_number < <(
LC_ALL=C date -d "@$epoch" '+%Y %m %d %H %M %S %A %B %z %j'
)
time="$hour : $minute : $second"
clock_color="$YELLOW"
detail_color="$DIM"
if ((10#$minute >= 50)); then
clock_color="$RED"
detail_color="$RED"
fi
jalali="$(clock_jalali "$((10#$year))" "$((10#$month))" "$((10#$day))")"
date_text="$weekday, $month_name $((10#$day)), $year"
case "$hour" in
0[0-4]|2[1-3]) period="QUIET HOURS" ;;
0[5-9]|1[01]) period="GOOD MORNING" ;;
1[2-6]) period="GOOD AFTERNOON" ;;
*) period="GOOD EVENING" ;;
esac
rule="$(repeat_character '=' "$columns")"
clock_center "$rule" "$columns" "$CYAN"
clock_center "$period / ${TZ} (UTC${offset:0:3}:${offset:3:2})" "$columns" "$DIM"
banner="$(print_large_countdown "$time" "$columns")"
# Keep the big hours and minutes when all six digits would not fit.
if [[ "$banner" != *$'\n'* ]]; then
banner="$(print_large_countdown "$hour:$minute" "$columns")"
fi
banner_rows=1
[[ "$banner" == *$'\n'* ]] && banner_rows=8
if ((banner_rows == 1 || rows < banner_rows + 9)); then
banner="$(center_line "$time" "$columns")"
fi
printf '%s%s%s\n' "$clock_color" "$banner" "$RESET"
clock_center "$hour:$minute:$second" "$columns" "$detail_color"
clock_center "$rule" "$columns" "$CYAN"
clock_center "$date_text" "$columns" "$BOLD"
clock_center "JALALI $jalali" "$columns" "$CYAN"
if ((rows >= 10 && columns >= 24)); then
seconds_today=$((10#$hour * 3600 + 10#$minute * 60 + 10#$second))
percent=$((seconds_today * 100 / 86400))
bar_width=$((columns - 20))
((bar_width > 40)) && bar_width=40
filled=$((seconds_today * bar_width / 86400))
progress="[$(repeat_character '#' "$filled")$(repeat_character '.' "$((bar_width - filled))")]"
clock_center "DAY $progress $percent%" "$columns" "$GREEN"
remaining=$((1440 - seconds_today / 60))
clock_center "DAY $((10#$day_number)) / $((remaining / 60))h $((remaining % 60))m to midnight" "$columns" "$DIM"
fi
if ((rows >= 11)); then
clock_center "ONE SECOND AT A TIME / q to quit" "$columns" "$DIM"
fi
clock_center "$rule" "$columns" "$CYAN"
}
clock_main() {
local once=0 input_fd=0 epoch last_epoch=-1 rows columns frame key
export TZ="${TZ:-Asia/Tehran}"
while (($#)); do
case "$1" in
--once) once=1 ;;
--utc) export TZ=UTC ;;
-h|--help) clock_usage; return 0 ;;
*) printf 'Error: unknown option: %s\n' "$1" >&2; return 2 ;;
esac
shift
done
if ! date -d '@0' +%s >/dev/null 2>&1; then
printf 'Error: GNU date is required (macOS: brew install coreutils).\n' >&2
return 1
fi
RESET="" BOLD="" DIM="" CYAN="" YELLOW="" GREEN="" RED=""
trap clock_cleanup EXIT
trap 'exit 130' INT
trap 'exit 143' TERM
if [[ ! -t 1 ]]; then
once=1
fi
if ((!once)); then
if [[ -t 0 ]]; then
input_fd=0
elif [[ -r /dev/tty ]]; then
exec {input_fd}</dev/tty
fi
TERMINAL_ACTIVE=1
printf '\033[?1049h\033[?25l\033[H'
fi
if [[ -t 1 && -z "${NO_COLOR+x}" ]]; then
RESET=$'\033[0m' BOLD=$'\033[1m' DIM=$'\033[2m'
CYAN=$'\033[36m' YELLOW=$'\033[33m' GREEN=$'\033[32m'
RED=$'\033[31m'
fi
while true; do
epoch="$(date +%s)"
if [[ "$epoch" != "$last_epoch" ]]; then
read -r rows columns < <(clock_size)
frame="$(clock_render "$epoch" "$rows" "$columns")"
if ((TERMINAL_ACTIVE)); then
printf '\033[H%s\033[K\033[J' "${frame//$'\n'/$'\033[K\n'}"
else
printf '%s\n' "$frame"
fi
last_epoch="$epoch"
fi
((once)) && break
key=""
if [[ -t "$input_fd" ]]; then
if read -u "$input_fd" -rsn 1 -t 0.1 key && [[ "$key" == [qQ] ]]; then
break
fi
else
sleep 0.1
fi
done
}
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
clock_main "$@"
fi
+55 -475
View File
@@ -2,519 +2,99 @@
"bills": {
"7356609804429": {
"events": {
"169409": {
"last_seen_at": "2026-09-07T11:30:14.755698+03:30",
"176238": {
"last_seen_at": "2026-11-21T19:30:57.021805+03:30",
"missing_checks": 0,
"notified_at": "2026-09-06T12:09:17.256943+03:30",
"notified_hash": "5fec66b15ba890f7efa5ca96c47d24dd398ff4ddbd900bd4fcc41fa728527a9d",
"notified_at": "2026-11-21T19:30:57.021805+03:30",
"notified_hash": "9cbf6aa2034031fa8f84454daf7e1e614bd896bc72fd2758d593137aa70945ee",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/16",
"outage_number": "169409",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "22:00",
"stop_time": "00:00"
"outage_date": "1405/09/01",
"outage_number": "176238",
"reason": "محدودیت تامین سوخت نیروگاهی",
"start_time": "09:00",
"stop_time": "11:00"
},
"status": "active"
},
"169723": {
"last_seen_at": "2026-09-07T11:30:14.755698+03:30",
"176436": {
"last_seen_at": "2026-11-24T00:30:24.191760+03:30",
"missing_checks": 0,
"notified_at": "2026-09-07T09:30:14.426188+03:30",
"notified_hash": "048dcdd07e59ce8fedbe3c080768a7f49224551986e0918c9d598e3edc32fb3b",
"notified_at": "2026-11-24T00:30:24.191760+03:30",
"notified_hash": "84aa32a1020c75c1c98b1aa9ebc9f3bb248ed6fdefe1bba56cde4251a10dfe9f",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/17",
"outage_number": "169723",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "18:00",
"stop_time": "20:00"
"outage_date": "1405/09/03",
"outage_number": "176436",
"reason": "کمبود تخصیص سوخت نیروگاهی",
"start_time": "11:00",
"stop_time": "13:00"
},
"status": "active"
},
"169824": {
"last_seen_at": "2026-09-08T10:30:15.002238+03:30",
"176753": {
"last_seen_at": "2026-11-26T18:09:31.986738+03:30",
"missing_checks": 0,
"notified_at": "2026-09-08T10:30:15.002238+03:30",
"notified_hash": "045d71eacf014b3bd7148de580d3e132f70bde2b30ea2824d45041b2df23a8d2",
"notified_at": "2026-11-25T16:30:33.097821+03:30",
"notified_hash": "dbf469c6e2f0e8dc40e74b237a66bf04bd6703b636b17094c1b95d77c02a65d1",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/18",
"outage_number": "169824",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "12:00",
"stop_time": "14:00"
"outage_date": "1405/09/06",
"outage_number": "176753",
"reason": "کمبود تخصیص سوخت نیروگاهی",
"start_time": "09:00",
"stop_time": "11:00"
},
"status": "active"
},
"170127": {
"last_seen_at": "2026-09-09T18:30:36.030279+03:30",
"177013": {
"last_seen_at": "2026-11-28T15:26:21.489059+03:30",
"missing_checks": 0,
"notified_at": "2026-09-09T10:30:13.981287+03:30",
"notified_hash": "ed216acf25203c0079f2c3c5ed13adffe2dddff0292377a69074c59beeabfd5a",
"notified_at": "2026-11-28T15:26:21.489059+03:30",
"notified_hash": "bd28f12ac7e0b48daecd2661764a19dc2442f674ff2cc4b3a10dfbf11cf97c6c",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/19",
"outage_number": "170127",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "18:00",
"stop_time": "20:00"
"outage_date": "1405/09/08",
"outage_number": "177013",
"reason": "مدیریت انرژی",
"start_time": "13:00",
"stop_time": "15:00"
},
"status": "active"
},
"170391": {
"last_seen_at": "2026-09-09T18:30:36.030279+03:30",
"177322": {
"last_seen_at": "2026-11-30T13:30:53.924281+03:30",
"missing_checks": 0,
"notified_at": "2026-09-09T14:15:40.722577+03:30",
"notified_hash": "9bd36452e7bfb8125866782c6ecbfda1f1adfe8c0ad77d18b664506d487ccacd",
"notified_at": "2026-11-30T13:30:53.924281+03:30",
"notified_hash": "b51ba030ec293d9a1150f738b8aa7d881aa04b47659af1652794339ce0a9b4ba",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/20",
"outage_number": "170391",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "20:00",
"stop_time": "22:00"
"outage_date": "1405/09/10",
"outage_number": "177322",
"reason": "مدیریت انرژی",
"start_time": "11:00",
"stop_time": "13:00"
},
"status": "active"
},
"170508": {
"last_seen_at": "2026-09-12T11:03:53.405842+03:30",
"177746": {
"last_seen_at": "2026-12-05T12:30:11.293498+03:30",
"missing_checks": 0,
"notified_at": "2026-09-12T11:03:53.405842+03:30",
"notified_hash": "7812281209720f905f4258320e5ad19367781f0e01aec82c40a08e4ecb3f233d",
"notified_at": "2026-12-05T12:30:11.293498+03:30",
"notified_hash": "48bd36122eb2cd3debfe37fd4d0cdd22f287bb59e0610c2aaec25240809239d5",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/21",
"outage_number": "170508",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "16:00",
"stop_time": "18:00"
},
"status": "active"
},
"170623": {
"last_seen_at": "2026-09-12T11:03:53.405842+03:30",
"missing_checks": 0,
"notified_at": "2026-09-12T11:03:53.405842+03:30",
"notified_hash": "72fc0e34edc239bd54fdc0019fa6c77692576ff75d7fe9cab527aa1db22a90ec",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/22",
"outage_number": "170623",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "10:00",
"stop_time": "12:00"
},
"status": "active"
},
"171025": {
"last_seen_at": "2026-09-13T19:13:30.447732+03:30",
"missing_checks": 0,
"notified_at": "2026-09-13T19:13:30.447732+03:30",
"notified_hash": "876233e650ac502371f4f4a3fe6c91da8ebbccd3b6d6b6f901882154ed6548d3",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/23",
"outage_number": "171025",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "22:00",
"stop_time": "00:00"
},
"status": "active"
},
"171178": {
"last_seen_at": "2026-09-14T10:30:59.143409+03:30",
"missing_checks": 0,
"notified_at": "2026-09-14T10:30:59.143409+03:30",
"notified_hash": "4078fa92af208f9234c2792b9a42ce2e21b4ff2fc0823f2019388beadcd13493",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/24",
"outage_number": "171178",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "18:00",
"stop_time": "20:00"
},
"status": "active"
},
"171278": {
"last_seen_at": "2026-09-15T09:30:43.371163+03:30",
"missing_checks": 0,
"notified_at": "2026-09-15T09:30:43.371163+03:30",
"notified_hash": "ccd3130869a608e6c51f05a47e0e6079376261050562474821421536ff0eb1ae",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/25",
"outage_number": "171278",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "12:00",
"stop_time": "14:00"
},
"status": "active"
},
"171596": {
"last_seen_at": "2026-09-16T09:30:13.040411+03:30",
"missing_checks": 0,
"notified_at": "2026-09-16T09:30:13.040411+03:30",
"notified_hash": "2b2941d8f6e3f9dab4ec3c572f3614ff751d1760db2a5a5eb7757b1582a1de71",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/26",
"outage_number": "171596",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "18:00",
"stop_time": "20:00"
},
"status": "active"
},
"171829": {
"last_seen_at": "2026-09-16T14:11:59.399812+03:30",
"missing_checks": 0,
"notified_at": "2026-09-16T14:11:59.399812+03:30",
"notified_hash": "93398a8d6e3b31092961b14a6d2551bf5b27088ed4176351571e69c196d75380",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/27",
"outage_number": "171829",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "20:00",
"stop_time": "22:00"
},
"status": "active"
},
"171976": {
"last_seen_at": "2026-09-19T05:30:26.685432+03:30",
"missing_checks": 1,
"notified_at": "2026-09-18T11:30:23.672614+03:30",
"notified_hash": "31df4e5f5a88bcbf73a6613c1338570c8947a304b99e2842e31700bd998ff900",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/28",
"outage_number": "171976",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "16:00",
"stop_time": "18:00"
},
"status": "active"
},
"172097": {
"last_seen_at": "2026-09-19T11:45:39.571434+03:30",
"missing_checks": 0,
"notified_at": "2026-09-19T11:45:39.571434+03:30",
"notified_hash": "74ecac8af113468559e6c161c12890a9b736a89d2c244d64c0ca45063b8d1110",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/29",
"outage_number": "172097",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "10:00",
"stop_time": "12:00"
},
"status": "active"
},
"172785": {
"last_seen_at": "2026-09-20T12:09:07.572436+03:30",
"missing_checks": 0,
"notified_at": "2026-09-20T12:09:07.572436+03:30",
"notified_hash": "cae6ae29b46199d627c5871768c58a95c5c7456421939e66729babe9c5bb30e1",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/30",
"outage_number": "172785",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "22:00",
"stop_time": "00:00"
},
"status": "active"
},
"173566": {
"last_seen_at": "2026-09-21T11:30:33.636105+03:30",
"missing_checks": 0,
"notified_at": "2026-09-21T11:30:33.636105+03:30",
"notified_hash": "ebe9fb7cf1add0ebfea4a6ebb04e57e1bade7f8514d45d7c890acf65a9b4e76c",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/06/31",
"outage_number": "173566",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "16:00",
"stop_time": "18:00"
},
"status": "active"
},
"173646": {
"last_seen_at": "2026-09-22T11:30:50.158334+03:30",
"missing_checks": 0,
"notified_at": "2026-09-22T11:30:50.158334+03:30",
"notified_hash": "6bcbf73c758e0b98db0d6d7fe9e81b8cbcb7776a9d85989cfc58d16bcdb1462f",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/07/01",
"outage_number": "173646",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "12:00",
"stop_time": "14:00"
},
"status": "active"
},
"173937": {
"last_seen_at": "2026-09-24T03:30:13.070440+03:30",
"missing_checks": 0,
"notified_at": "2026-09-22T14:30:52.110642+03:30",
"notified_hash": "fc1fbee81f6813d194555dfe3a5ffec649b3bf595da3217f0e6d533268d22622",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/07/02",
"outage_number": "173937",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "18:00",
"stop_time": "20:00"
},
"status": "active"
},
"174424": {
"last_seen_at": "2026-09-25T04:30:30.885741+03:30",
"missing_checks": 0,
"notified_at": "2026-09-24T16:30:19.951582+03:30",
"notified_hash": "5e3472da97cbe312ff61114158cb8d03473270c09bfbd66d80a65deba8831c12",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/07/04",
"outage_number": "174424",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "16:00",
"stop_time": "18:00"
},
"status": "active"
},
"174687": {
"last_seen_at": "2026-09-26T11:30:27.519125+03:30",
"missing_checks": 0,
"notified_at": "2026-09-26T11:30:27.519125+03:30",
"notified_hash": "044c87fa4e542a0c9434d220f7b86f4847752c29ffe4b2c1a75ad26a2c84a2bf",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/07/05",
"outage_number": "174687",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "10:00",
"stop_time": "12:00"
},
"status": "active"
},
"175008": {
"last_seen_at": "2026-09-27T12:08:44.556309+03:30",
"missing_checks": 0,
"notified_at": "2026-09-27T12:08:44.556309+03:30",
"notified_hash": "cad4cc43abf2299018305f2ce78d45f73d792b8c6f1e25e31fb9d7d8d84ae3d5",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/07/06",
"outage_number": "175008",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "22:00",
"stop_time": "00:00"
},
"status": "active"
},
"175145": {
"last_seen_at": "2026-09-29T15:30:42.967961+03:30",
"missing_checks": 0,
"notified_at": "2026-09-28T11:30:43.286455+03:30",
"notified_hash": "2653127dc17027a5feb6284de780475c4685c1d7df6a1d1041d46960766d9e8b",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/07/07",
"outage_number": "175145",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "18:00",
"stop_time": "20:00"
},
"status": "active"
},
"175226": {
"last_seen_at": "2026-09-30T08:30:49.349592+03:30",
"missing_checks": 0,
"notified_at": "2026-09-29T10:30:44.100476+03:30",
"notified_hash": "dbcbeff29240a63e30b698d9415d9981edf535b8b0de9c830080e260c2fb26df",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/07/08",
"outage_number": "175226",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "12:00",
"stop_time": "14:00"
},
"status": "active"
},
"175478": {
"last_seen_at": "2026-09-30T10:30:48.099517+03:30",
"missing_checks": 0,
"notified_at": "2026-09-30T10:30:48.099517+03:30",
"notified_hash": "0954d395266de90213f0f7879876d4894365a3f994ef19318d2f91d09575f7b9",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/07/09",
"outage_number": "175478",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "18:00",
"stop_time": "20:00"
},
"status": "active"
},
"175724": {
"last_seen_at": "2026-09-30T12:30:13.927490+03:30",
"missing_checks": 0,
"notified_at": "2026-09-30T12:30:13.927490+03:30",
"notified_hash": "3dfdbb797eeb524bd58315ec07053951dd2632e875f750f37677b549cdab2772",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/07/10",
"outage_number": "175724",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "20:00",
"stop_time": "22:00"
},
"status": "active"
},
"175966": {
"last_seen_at": "2026-10-02T20:30:43.982836+03:30",
"missing_checks": 0,
"notified_at": "2026-10-02T20:30:43.982836+03:30",
"notified_hash": "38ed5ebebc415e03b7cc8caf5eef7d4b752b5eac6716fa414998e2f888f3437d",
"snapshot": {
"address": "باغ قلعه 8متری سوم ج ترانسفورماتور",
"is_planned": false,
"outage_date": "1405/07/11",
"outage_number": "175966",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "10:00",
"stop_time": "12:00"
},
"status": "active"
}
}
},
"7359439104426": {
"events": {
"169228": {
"last_seen_at": "2026-09-06T21:30:14.190928+03:30",
"missing_checks": 1,
"notified_at": "2026-09-06T12:09:17.256943+03:30",
"notified_hash": "a7c2b74d456d7c13e8e623ad069d4e970efa971e224f7235f56a5a6515902cbe",
"snapshot": {
"address": "بلوار 15 خرداد ک 27 بن بست گلستان پ 38",
"is_planned": false,
"outage_date": "1405/06/16",
"outage_number": "169228",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "10:00",
"stop_time": "12:00"
},
"status": "active"
},
"169728": {
"last_seen_at": "2026-09-07T09:30:14.426188+03:30",
"missing_checks": 0,
"notified_at": "2026-09-07T09:30:14.426188+03:30",
"notified_hash": "74ef4e197928b4d0443bc8b927243ababa5bd67a7dc0a02facc7061c5ad763df",
"snapshot": {
"address": "بلوار 15 خرداد ک 27 بن بست گلستان پ 38",
"is_planned": false,
"outage_date": "1405/06/17",
"outage_number": "169728",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "20:00",
"stop_time": "22:00"
},
"status": "active"
},
"169816": {
"last_seen_at": "2026-09-08T10:30:15.002238+03:30",
"missing_checks": 0,
"notified_at": "2026-09-08T10:30:15.002238+03:30",
"notified_hash": "56197d9ca837511b325a6104df3a1ef7aefcd0b0df0661dca9d14bef4a4ab6e6",
"snapshot": {
"address": "بلوار 15 خرداد ک 27 بن بست گلستان پ 38",
"is_planned": false,
"outage_date": "1405/06/18",
"outage_number": "169816",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "12:00",
"stop_time": "14:00"
},
"status": "active"
},
"170074": {
"last_seen_at": "2026-09-09T18:30:36.030279+03:30",
"missing_checks": 0,
"notified_at": "2026-09-09T10:30:13.981287+03:30",
"notified_hash": "c4883b5f8550cdabac7b23c11a29890e886aeef85a787261986af1cd1efe6044",
"snapshot": {
"address": "بلوار 15 خرداد ک 27 بن بست گلستان پ 38",
"is_planned": false,
"outage_date": "1405/06/19",
"outage_number": "170074",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "16:00",
"stop_time": "18:00"
},
"status": "active"
},
"170607": {
"last_seen_at": "2026-09-12T11:03:53.405842+03:30",
"missing_checks": 0,
"notified_at": "2026-09-12T11:03:53.405842+03:30",
"notified_hash": "fca53bd1f627de08c97e78d94685e504918b11e1a1a159166f9cd4ca2fe61ebf",
"snapshot": {
"address": "بلوار 15 خرداد ک 27 بن بست گلستان پ 38",
"is_planned": false,
"outage_date": "1405/06/21",
"outage_number": "170607",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "22:00",
"stop_time": "00:00"
},
"status": "active"
},
"170741": {
"last_seen_at": "2026-09-12T11:03:53.405842+03:30",
"missing_checks": 0,
"notified_at": "2026-09-12T11:03:53.405842+03:30",
"notified_hash": "987aa2d9f4e6e4f9a660c7349026c8a6c25aa1394d2feb5517f260f0d8b86d0b",
"snapshot": {
"address": "بلوار 15 خرداد ک 27 بن بست گلستان پ 38",
"is_planned": false,
"outage_date": "1405/06/22",
"outage_number": "170741",
"reason": "افزایش مصرف و ضرورت مدیریت بار",
"start_time": "18:00",
"stop_time": "20:00"
"outage_date": "1405/09/15",
"outage_number": "177746",
"reason": "مدیریت انرژی",
"start_time": "11:00",
"stop_time": "13:00"
},
"status": "active"
}
@@ -522,5 +102,5 @@
}
},
"schema_version": 1,
"updated_at": "2026-10-06T20:30:55.420463+03:30"
"updated_at": "2026-12-05T12:30:11.293498+03:30"
}