Sirens? Python real-time smart lighting alerts

Sirens? Python real-time smart lighting alerts

[English follows]

https://github.com/yuvsp/Alert_yeelight_liveJson

רציתי לשתף בפרויקט צדדי שעבדתי עליו, בהתמודדות פרודוקטיבית עם הימים המלחיצים של מבצע 'שומר החומות' והאזעקות המרנינות בלילות התל-אביביים ---

קוד פייתון שדואג להדליק את האורות (נורות בבית חכם) כשיש אזעקה באיזור.

מסתבר שהרבה אנשים מועדים בדרך לממ"ד, שלא לדבר על חירשים, שככל שבדקתי לא מצאתי שקיים פתרון יעודי עבורם (למעט ביפר רוטט והבהוב באפליקציה). בכלליות נדמה גם שיש משהו נחמד באור רך מהבהב כשאתה מתעורר בהיסטריה ב-3 בבוקר ומחפש את דרכך באפילה לחוף מבטחים.

השאלה שנשאלת, והיא הסיבה העיקרית לפוסט הזה (מלבד זה שתמיד כיף לשתף) - האם יש בנמצא מישהי/ו עם היכרות מעמיקה יותר עם צרכים של חרשים? או עם גישה לפיקוד העורף? או בכלליות מישהי/ו עם ידע פייתוני ורצון טוב / עיצה טובה איך אפשר לקחת את זה קדימה כדי לעזור לאנשים שחיים תחת איום הרקטות כבר שנים? אני בכ"ז די ג'וניור בתכנות וזה אמנם ממש עבד אצלי (פסטיבל אורות כתגובה ציונית הולמת לטרור), אבל זה עדיין לא ברמה סקלבילית של הפצה.

כמה מילים על הקוד [וחפירה רצינית יותר באנגלית למטה] -- זה בסך הכל די סטרייט-פורווארד: גילוי הנורות החכמות הקיימות ב- LAN, האזנה למערכת של פיקוד העורף, ניתוח בזמן-אמת של המידע כ- DF עם regex והבהוב של הנורות (חפירה על איך ובאיזה ספריות השתמשתי, אם זה מעניין מישהו, כאמור למטה באנגלית!). ואם הגעתןם עד לכאן, ח"ח ותודה על ההקשבה! 

 https://github.com/yuvsp/Alert_yeelight_liveJson

A few days now after the ceasefire came into effect, I’ve been wanting to share a side project of mine I’ve been working on during the operation:

A simple effective smart-house approach to siren alerts, enabling lights to go on (fading in with red light, to be specific) when there’re sirens nearby.

The idea came to me in past operations, learning about people that get injured hurrying to their safe room or shelter, usually by night. The stress that came with the current operation made me look for a productive way to cope: coding! Especially when those 3am Tel-Aviv sirens went on and off waking us up quite panicked. It has been for so many years that southern Israel’s cities were under an endless rocket threat and as far as I’ve searched for there is no simple solution for a bright light real-time alarm, useful for deaf people (there are vibrating beepers and blinking phone apps); nor for people stumbling in the hurry to a safe haven. Besides, it’s much nicer and relaxing having the notion that one can choose the option to wake up not alarmed by siren alone - but rather with fade-in alerting light without being lost in the dark. 

So, to cut to the chase, I coded a straight-forward Python script that manages to discover smart light bulbs locally (within LAN), affiliate with the IDF’s alert broadcasting system, read the events, convert to a DF (panda’s data frame) - and after a short regex analysis fade in a blinking red light with the discovered smart light bulbs.

To do so I used some Python libraries I found / or got to know during my Bs.c, and some scripting skills I acquired in the IDF a long time ago… -

  • #Requests library for reaching the online json with alert events, 
  • # Pandas library for manipulating the events as data frames,
  • #Threading library for the ongoing sampling,
  • #Yeelight library for the bulbs interface, and some more (Aaaaand pyinstaller, a useful library for packaging the code with its dependencies included. That enabled the ability to run it as a detachable app outside of any IDE).

It was a productive, teaching and joyous project that helped me go through those stressful fighting days. Yet eventually, I'm just an enthusiastic techy junior programmer with some odd hobbies and a passion for smart homes - while the main reason and takeaway for this post is the need to share and ask how that idea can be brought forward. If there’s anyone who got this far and has a deeper connection with the deaf community or a better understanding of deafs' needs in comparison to what’s available, or -

If anyone has an idea or a will or good advice regarding how it can be taken forward… I really think that together we might help as many people as possible. To conclude - this is a very hopeful shoutout. 

https://github.com/yuvsp/Alert_yeelight_liveJson


היי שירתתי בפיקוד העורף בתחום הטכנולוגיות, רעיון מעולה אשמח לעזור!

אלוף! נשמע רעיון מדהים, במיוחד לאור העובדה שמשום מה הוחלט להפסיק לייצר את הביפרים לחרשים.. יש לי חברה כבשת שמיעה שגרה בעוטף עזה, אשמח לחבר אותך אליה- שולחת לך בפרטי את המספר שלה.

Like
Reply

יוזה אדירה , כל הכבוד !!! אשמח לעזור לך , צור איתי קשר

Like
Reply

To view or add a comment, sign in

Others also viewed

Explore content categories