A TV news pundit might on any given evening in 2024 look at the viewers and gravely announce that we are living in uncertain times. Those of us who’ve been around for a bit longer than we’d like to admit would see that, scratch our heads, and ask “Have we ever not lived in uncertain times?” If all this uncertainty is getting to you though, you can now reassure yourself as [Ian Williams] has, with a threat level monitor which displays the UK’s current level of projected fear threat level.
The build is fairly straightforward in hardware terms, with a Raspberry Pi Zero and a Pimoroni e-paper display pHAT. The software grabs the current level of doom from in this case the UK government’s website with a nifty bit of Python code, and turns it into an easy to read alert level bar.
So if you’re genuinely worried that the sky might fall upon your head you can now gain reassurance from a small piece of electronic hardware. If you feel things are really going south though, how about converting your basement into a fallout shelter?
I could do with one of these for rabbits eating my fruit trees in my
DEAD RAT CIDER
orchard. I’m guessing it would need some kind of roving dog bot to patrol the site and infer the threat level through object recognition. Currently, the rabbits are at 140 m, but regularly try to populate new territory.No clue. Neither DEADBEEF or BAADC0DE.
We’ll all need one of these before long the way the worlds going!
The penitent rush towards dystopia
I’ve been working on a similar project I call Doom, though my program checks many different indicators to determine if SHTF. So far it queries the number of power outages in many states (at least one from each grid), pings nodes across the country to check internet health, checks the NOAA CME alerts, and uses a 4G/GNSS HAT to get the number of GPS-type satellites in range (meaning they’re still alive and active). I’ll add this to it (as more informational, less ‘red alert’) as well as the Defcon level. I will be checking local power/internet/cellular status. I’m currently trying to get it to use an SDR to automatically detect and parse Emergency Alert System messages which has been difficult. I also want to automatically download live images from the NOAA satellites (using SDR/special antenna) as they pass overhead (which would also check the status of those satellites and show any mushroom cloud assuming the satellites are still active).
I’m glad my little project is useful!
Nice build but a waste of time and space putting levels 1 & 2 on it.
The threat level has never been less than 3 out of 5.
Oh, wow – by contrast, the US has never been above half way (below DEFCON3 – their scale is inverted) except a partial DEFCON2 during the Cuban missile crisis.
Pretty sure us ‘Muricans been to defcon 1 couple times for just a short while last decade or so
DEFCON is not published. any value you find online is pure speculation
DefCon is a completely different thing.
The equivalent is Homeland Security’s color coded threat level – which hasn’t gone below Orange since inception;)
Yeah, here it’s a case of when it says “Critical” they’re expecting an attack *right now* and Police, Security Services, Military, and any potential target’s security teams are on high alert, almost certainly due to specific time sensitive information – it’s not normally for public consumption.
Reading the recent opinion polls (or Electoral Calculus), one can imagine that the current government is quite scared indeed. Good :-)
Can this be done for DEFCON status?
DEFCON is not officially published anywhere, so anything you find online which states “we’re currently at DEFCON 3” is speculation at best. Maybe check Homeland to see if they have a similar threat level indicator you could use instead, then modify the sentence code to match whatever sentence preceeds the threat level word.
Appreciate the response.
But does it play that cheerful song from Monty Python? Bright side of Life. Rather timely.
It does now!
import requests
from bs4 import BeautifulSoup
import inkyphat
import time
import webbrowser # Added library to open webpages
def update_image():
url = “https://www.gov.uk/terrorism-national-emergency”
response = requests.get(url)
soup = BeautifulSoup(response.text, “html.parser”)
sentence = soup.find(text=”The threat to the UK (England, Wales, Scotland and Northern Ireland) from terrorism is “)
if sentence:
next_word = sentence.find_next(“strong”)
if next_word:
next_word = next_word.text.strip().lower()
print(f”Retrieved sentence: {sentence}”) # Debugging print
print(f”Next word (image indicator): {next_word}”) # Debugging print
if next_word in image_paths:
inkyphat.clear() # Clear the display
inkyphat.set_image(image_paths[next_word])
inkyphat.show()
# Open URL if threat level is critical
if next_word == “critical”:
webbrowser.open(“https://soundcloud.com/user-226991342/always-look-on-the-bright-side-of-lifewav”)
inkyphat.set_colour(“red”) # Specify the color of your Inky pHAT
inkyphat.set_image(“/home/pi/inky/images/connecting.png”)
inkyphat.show()
time.sleep(15) # Wait 5 seconds on boot
image_paths = {
“low”: “/home/pi/inky/images/1.png”,
“medium”: “/home/pi/inky/images/2.png”,
“substantial”: “/home/pi/inky/images/3.png”,
“severe”: “/home/pi/inky/images/4.png”,
“critical”: “/home/pi/inky/images/5.png”
}
# Continuous loop to check for updates (alternative to schedule)
while True:
update_image()
time.sleep(43200) # Update every 12 hours (43200 seconds)
I believe the word you Brits use for something like this is, “Cheeky.”
I dream about similar dev but with radioactivy@ home. Why I cant but kit or assemble device?
Thanks for publishing my little project :)
Don’t choose to live in fear.
Dont be dumb enough to live in a city.
Yea man just have enough money to buy a house + property in the countryside and a job that lets you telework. E Z P Z
What if a person is Jewish and living in the UK though.. perhaps keep that threath level up there for a bit you think?