icof
in case of fire
Due to the ongoing global pandemic I started to work mostly from home.
Beside my job as a software engineer I am also a volunteer firefighter in my local community.
This means that I’m on call for emergencies 24/7, also during my daily work as a SE.
When I am in the office and get a call, I can speak to my colleagues in seconds that I have to go (Or they just see me running to my car).
In booth cases they are informed that I am afk and can probably re-schedule or take over meetings for me.
When working from home I want to send an absence notification to my colleagues.
Chatting my 2-4 colleagues can be time-consuming.
Well, I am an engineer. I can automate this in combination with a big red button. I like big red buttons.
gocrazy installation
First you need to plug-in the Pi SD card into your PC. If you have already installed an OS like raspbian on this SD card, I recommend flashing it.
With the fdisk
utility you can delete all existing partitions.
Now you can follow the go-krazy installation guide: https://github.com/gokrazy/gokrazy#installation
You can update your gokrazy installation via the web endpoint:
gokr-packer -update yes -hostname 192.168.178.49 -serial_console=disabled ./cmd/icof-cmd
Configuration
To run icof on gokrazy you have to create a startup configuration and place it in the following directory on the permanent data partition of your gocrazy installation: /perm/icof/start-config.json
.
Configuration:
{ "email_config": { "host": "", "port": 0, "username": "", "password": "", "from_email_address": "" }, "email_receiver_config": { "alert_subject": "", "resolve_subject": "", "receivers": [ { "name": "", "alert_template_message": "", "resolve_template_message": "", "addresses": [ { "email": "", "name": "", "surname": "" } ] } ] } }
Circuit
The circuit uses a pull down resistor. This will pull down the input signal at the GPIO pin to LOW if the switch is pressed and the power circuit is interrupted.
- Emergency switch is wired in NC (normally closed).
- A 10kΩ resistor is used
- 3,3V power pin is enough
Shopping List
- A raspberry pi 3 B+ or 4 (choose whats curently available) https://www.amazon.de/s?k=raspberry+pi&__mk_de_DE=%C3%85M%C3%85%C5%BD%C3%95%C3%91&