/SANDI

Send Altert Notifications DIrectly - Best name ever

Primary LanguagePython

┌────────────────────┐  ┌──────────────────────────────────────────┐
│  Clients           │  │              Core Service                │
│                    │ ┌┼─────────────────────────────────┐        │
│ ┌─── ──── ──── ─┐  │ ││ ┌──────────────────┐    ┌───────▼───────┐│   ┌──────────────────┐
│ │  MQTT         │──┼─┘│ │ Input Acceptors  │    │               ││   │ Outputs          │
│  ──── ──── ──── ┘  │  │ │                  │    │               ││   │                  │
│ ┌ ─ ─ ─ ─ ─ ─ ─ ┐  │  │ │ ┌ ─ ─ ─ ─ ─ ─ ─  │    │               ││   │ ┌ ─ ─ ─ ─ ─ ─ ─  │
│    Bash/CURL     ──┼──┼─┼─▶     REST     │─┼────▶   Mosquitto   ├┼─┬─┼─▶ iMessage     │ │
│ └ ─ ─ ─ ─ ─ ─ ─ ┘  │  │ │ └ ─ ─ ─ ─ ─ ─ ─  │    │               ││ │ │ └ ─ ─ ─ ─ ─ ─ ─  │
│ ┌─── ──── ──── ─┐  │  │ │                  │    │               ││ │ │ ┌─── ──── ──── ┐ │
│ │ Webinterface  │  │  │ │                  │    │               ││ ├─┼─▶ WhatsApp     │ │
│  ──── ──── ──── ┘  │  │ │                  │    │               ││ │ │ └── ──── ──── ─┘ │
│                    │  │ │                  │    └──┬─────────▲──┘│ │ │ ┌─── ──── ──── ┐ │
│                    │  │ │                  │       │         │   │ ├─┼─▶ E-Mail       │ │
│                    │  │ │                  │    ┌──▼ ──── ───┴ ─┐│ │ │ └── ──── ──── ─┘ │
│                    │  │ │                  │    │               ││ │ │ ┌─── ──── ──── ┐ │
│                    │  │ │                  │    │     Brain     ││ └─┼─▶ Webinterface │ │
│                    │  │ │                  │                     │   │ └── ──── ──── ─┘ │
└────────────────────┘  │ └──────────────────┘    │               ││   └─────────▲────────┘
 ┌───────────────────┐  │                         └── ──── ──── ──┘│             │
 │                   │  └────────────────────▲─────────────────────┘             │
 │       Done        │                       │                                   │
 │                   │  ┌────────────────────┴─────────────────────┐   ┌─────────┴────────┐
 └───────────────────┘  │Config (File):                            │   │Config (File):    │
 ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐  │[Mosquitto]                               │   │[Output]          │
                        │Port,IP,Persistence                       │   │Subscription      │
 │    In Progress    │  │[Brain]                                   │   │                  │
                        │(Event: Subscriptions+, Handler)+         │   │                  │
 └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘  │[Input]                                   │   │                  │
 ┌─── ──── ──── ──── ┐  │(Acceptor: Type, Port, IP, PublishTo)+    │   │                  │
 │                   │  └──────────────────────────────────────────┘   └──────────────────┘
 │      Planned      │  ┌──────────────────────────────────────────┐
 │                   │  │Queue structure (example):                │
  ──── ──── ──── ────   │/input                                    │
                        │    /serveralert                          │
                        │    /mailalert                            │
                        │/output                                   │
                        │    /iMessage                             │
                        │    /WhatsApp                             │
                        │    /E-Mail                               │
                        └──────────────────────────────────────────┘
                        ┌──────────────────────────────────────────┐
                        │Simple Brain Setup:                       │
                        │Just redirect /input/* to /output/* or    │
                        │specific /output/xxxx                     │
                        │                                          │
                        │Advanced Brain Setup:                     │
                        │Accumulate /input/xxx and send summary to │
                        │/output/mail or alert to /output/iMessage │
                        │                                          │
                        └──────────────────────────────────────────┘