Skip to content

Mission of this project is enhance alerting of one-account team by non-standart way.

Notifications You must be signed in to change notification settings

lipelix/beacon-alerting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beacon-alerting

This project handles alerts coming from opsgenie turn on beacon placed in Pilsen offices.

GOAL: When alert emerge, beacon start blink. It keeps blinking until alert is acknowledged.

System architecture

How to make it work?

It will consist of bunch of chapters - at first we need to create PoC and, grab all components (software and hardware) and check if it is feasible. After that we can move forward and start to figuring out how to solve power, soldering (or create custom board..) and make advanced prototype - the Alpha. At the end of Alpha it will work, but will not be beauty - that will be last part.

🛫 Chapter I - PoC DONE

Outcome of this chapter will be functional model with components connected on breadboard - beacon will be simulated with Light-Emitting Diode - which will react on external signal (sended through wifi or GSM) - diode will start blink.

  • Decide wifi vs GSM approach
    • 📶 PoC of GSM approach POSTPONED
      • Create simulation (https://wokwi.com/)
      • Gather all components
      • Assemble components on breadboard
      • Kick-off firmware and upload it to board
    • 🛜 PoC of Wifi approach DONE
      • Create simulation (https://wokwi.com/)
      • Gather all components
      • Assemble components on breadboard
      • Kick-off firmware and upload it to board
  • Present functional prototype
  • Get a beer

🔮 Chapter II - Alpha

Outcome of this chapter will be functional model with components connected through soldering or custom board - beacon will be real beacon - which will react on external signal (sended through wifi or GSM) from opsgenie when alert emerge.

TBA Chapter I. could reveal something hidden - will be added

  • Find hardware board creator (china?)
  • Create simulation model including power
  • Create integration in opsgenie
  • Present functional Alpha
  • Get a beer

🚨 Chapter III - The Beacon v1.0.0

TBA Chapter II. could reveal something hidden - will be added

  • Put all things together
    • Create 3D model which will hold all components together
    • Print/Solder/Emerge base
    • Put components together in base
  • Present functional Beacon
  • Get a lot of beer


Work notes

Micro-controllers

2 approaches how to do this:

1) Wifi based approach 🛜

IN_PROGRESS

This will need wi-fi module (is part NodeMCU). Firmware will need be connected with opsgenie through API. This should be handled by some ospgenie integration.

Then firmware will turn-on pins which will init beacon.

👍 Pros:

  • one micro-controller

👎 Cons:

  • need to setup wifi
  • wifi has to work all the time - manage reconnection
  • handling opsgenie integration

2) GSM based approach 📶

POSTPONED

This will need GSM module and main micro-controller(arduinoNano). Firmware will need to handle incomming calls or SMS from opsgenie.

Then firmware will turn-on pins which will init beacon.

👍 Pros:

  • simpler communication channel with opsgenie
  • GSM is everywhere wifi is not

👎 Cons:

  • one micro-controller + second GSM module
  • need to setup GSM (tel number, sim card)
  • GSM has to work all the time - manage reconnection

Development tools

Troubleshooting

🐛 - for chinesse Arduino Nano use Board Type Arduino Duemilanove or Diecimila

Progress

03-11-2023

Party started 🎉

  • prepared components
  • created plan

Party started


01-12-2023

Work on Chapter I.

Gsm vs Wi-fi


31-01-2024

Work on Chapter I.

  • Create outgoing integration from OpsGenie to webhook
curl --location --request POST 'https://turtle-hip-endlessly.ngrok-free.app/' --header 'ngrok-skip-browser-warning: 1'

21-02-2024

Work on Chapter I.

  • Integration between micro-controller and cloudflare worker
    • create integration with websockets micro-controller is client cloudflare worker server
    • beacon-alerting/wi-fi/wifi/wifi.ino - receive messages from cf worker
    • adjust playground-app and add webhook integration beacon-alerting/playground-app/index.html
    • cf worker runs on https://beacon-alerts.lipelix.workers.dev/

Output of micro-controller

20-03-2024


Work on Chapter I.

  • Get components together on breadboard
  • Firmware development
    • 🎉 Correctly setup pins and ON/OFF states in wifi.ino
  • Integration between micro-controller and cloudflare worker

Relay does not switch, but it works manually

01-04-2024


🎉 Finalize Chapter I.

  • Get components together on "Mlekarna kunin" base
    • solder jumpers on mosfet
    • connect all components together
  • Firmware development
    • Use only ON/OFF states instead of full action description to simplify thing wifi.ino
  • Create integration between micro-controller and cloudflare worker
    • Deploy both workers
      • beacon-alerts.lipelix.workers.dev - server which sends status of beacon to micro-controller
      • beacon-alerts-client.lipelix.workers.dev - client which receives alerts from ospgenie and change state in KV store

Final PoC with components all together Chapter I. PoC - Architecture Chapter I. PoC - Wiring

Used components

TBA

About

Mission of this project is enhance alerting of one-account team by non-standart way.

Resources

Stars

Watchers

Forks