Soluții
Notificări personalizate in whatsapp pentru Android
[mai mult...]Cum să vezi meniul și notificările simultan pe Android
[mai mult...]Everything you need to know about array constants in Excel
Array constants in Microsoft Excel are powerful tools for performing multiple calculations with a single formula. Using array constants in your Excel worksheets avoids the need for lengthy or repeated formulas and eliminates the risk of accidental data changes.
[mai mult...]How to built a Cheap Alarm System with Home Assistant and some Sensors
The whole system is powered by Home Assistant, a free and open-source smart home platform. Home Assistant runs on dedicated hardware like an old laptop or a Raspberry Pi, works offline, and is compatible with a huge range of smart home gadgets, including the all-important sensors that make this system work.
In my case, there are only a few entry points to the house where an intruder is likely to enter. I’ve got doors at the front and the back of the house, each of which has separate screen doors between them and the outdoors. In addition, I have casement windows with relatively small individual panes of glass. The windows are made from hardwood, since the house itself is getting on for 100 years old.
The main method of forced entry would be to open these doors or windows. Smashing the glass would still require that the window be opened unless we’re being burgled by toddlers (and they’d probably never reach the sills anyway). Ergo, this gives me a simple solution to home security in the form of cheap door or window sensors. I’m also sticking one on the garage, which is separate from the main house.
You can use virtually any door or window sensor that’s compatible with Home Assistant to accomplish this. I picked up a few IKEA Parasoll sensors ($15) out of curiosity, before quickly realizing they’d be perfect for such a project. Like similar products, they use a magnetic sensor to detect a change whenever the door or window is opened.
They take a single AAA battery, and the range of motion is fairly generous, so both elements don’t need to be lined up perfectly. There’s a red LED that fires whenever the sensor detects a change, which makes installation rather easy. They use Zigbee and work with Home Assistant’s Zigbee Home Automation (ZHA) integration via the Home Assistant Connect ZBT-1 Zigbee radio.
Home Assistant Connect ZBT-1
Add Zigbee or Thread compatibility to your Home Assistant server using the ZBT-1, previously known as the SkyConnect. While multi-protocol support has been tested, the dongle has proven to be most reliable when running one or the other (so you can always buy two to add both).
Writing the Automation
One of the biggest benefits of Home Assistant is its powerful automation system. This allows you to take several inputs, apply conditions to those inputs, and then fire off whatever actions you’d like to trigger. Being able to flesh out an automation by using building blocks is what gives this system the edge over platforms like Apple Home.
The first thing to do is define “When” triggers. You can do this from your main Home Assistant interface under Settings > Automations & scenes using the “Create automation” button. I used the “Add trigger” button to add “Device” triggers for all the sensors I wanted to use in the “open” position.
You can define a specific duration that the doors should be open if you want, but I left the trigger as instant. You can also add an “And Ii” condition, which qualifies the trigger. So, for example, you could use the “And If” condition to only trigger the automation between certain hours of the day, or based on some other condition of your choosing.
Finally, there are the “Then do” actions. This is where you decide what should happen in the event of your sensors being triggered (read: a break-in). I decided to trigger a scene that turns on the lights, set my HomePod’s volume to 70%, and play the obnoxious alarm tone from Half-Life 2. A proper siren would give me more control and probably be a better deterrent, but this is all proof of concept right now.
You can play with this formula to your heart’s content. Add more smart speakers (if you have them), set a repeat condition so that your alarm tone repeats forever, and add mobile notifications to devices of your choosing.
Arming, Disarming, and Muting the System
To arm the system, all you need to do is turn on your automation under the Settings > Automations and scenes menu via the “Automations” tab. To disable it, just turn it off. To stop the alarm once it’s been triggered, turn off the automation (yes, this will kill whatever sound you’ve told it to play on your smart speakers).
You also need to deactivate it in the morning. The easiest way to do this is to create a new automation that runs at a certain time of day. If you have a smart home control panel, you can add a handy toggle to that. If you use a voice assistant, you can use that. You could use an NFC tag on your way out, or anything else you can think of.
Personally, I’ve gone a slightly different route. I primarily use Apple Home to interact with Home Assistant, so I’ve exposed my Automation using the HomeKit Bridge integration as a switch within Apple Home. I can toggle the automation (and thus the alarm “system”) on and off by toggling this switch. I can include this in my Apple Home routines too, which means saying “Siri, Goodnight,” turns on the alarm and turns out the lights.
Doing this means that I can use Apple’s Shortcuts app to also disable the alarm automatically. I’ve got a failsafe set in Home Assistant so that the alarm turns itself off at 7 am to account for lie-ins, but I’ve also created a personal automation that runs a Shortcut to turn off the system when my iPhone alarm is turned off. You can add this to every family member’s iPhone, so that whenever they get up for an early start, the alarm will be deactivated before they’re even out of bed.
Having my security automation exposed in Apple Home also gives me one more super helpful control: being able to turn it off. Since Home Assistant kills the actions you’ve triggered when you turn the alarm off, I can hit a button to restore peace and quiet. I can also switch it on or off when I’m away from home.
Not only is this setup a work in progress (Half-Life 2 alarm noises, seriously), it’s also tailored to my own house. The windows in my place aren’t ideal for climbing through, even if you smash them first. Many homeowners cannot say the same. A vibration sensor stuck to larger panes of glass might be a good workaround, and some smart speakers can even recognize the sound and potentially give you a trigger.
This also isn’t a high-end system that automatically calls emergency services or a security company on your behalf. It’s a “better than nothing” hobby project that you can use to better understand what’s possible in Home Assistant.
[mai mult...]How to view Clipboard History on your Chromebook
Did you know that ChromeOS had a built-in clipboard manager? Clipboard history allows you to access the five most recent items you’ve copied to your clipboard—including images. Mastering this tool can transform how efficiently you work on your Chromebook, so let’s have a look at this neat little feature.
[mai mult...]