@linjari@mastodontti.fi
@linjari@mastodontti.fi avatar

linjari

@linjari@mastodontti.fi

Ruokaseikkailija, Insinööri ja aikuispartiolainen. Rationaalinen arkipyöräilijä. Ex. Bensalenkkari.

shitposting, aktiivinen liikenne ja tampere.
Huolissaan tulevaisuudesta sekä lyhyellä että pitkällä tähtäimellä.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

tomi, to homeassistant

Link to the original blog post with a nice text/pictures layout.

The problem:

  • kids keep forgetting to carry the key to unlock the front door. They never forget to carry their phones though.

The solution:

  • unlocking the front door using a mobile phone

HW parts:

SW:

The process:

  1. I installed a wall box near the front door, under a nearby electrical socket (see below)
  2. When the company installed the front door, I asked them to install a UTP cable from the door lock mechanism to the socket.
  3. Bought the materials above (Aliexpress for the boards, Conrad for the power suppy).
  4. Connected the mains to the breaker (for emergency switch-off)
  5. Connected the cables from the breaker to the 24V power supply
  6. Connected the cables from the power supply to the ESP32 board, door solenoid relay and ESP32’s relay. Luckily, I didn’t need to install 5V power supply for the ESP board, because it also works with 24V.

Here’s the doodle of the connecting scheme:

doodle of the electrical schemeHere’s the original connecting scheme from Innotherm (door manufacturer), in Slovenian: It was useful because it reveals which power supply is appropriate (Meanwell MW HDR 30-24).

the electrical scheme for wiring the door unlocking mechanism7. Fitted everything in the wall box. It was too shallow! I couldn’t hide all the junk with the flat cover that came with a box.

Before fitting:

circuit breaker, power suppy and esp32 board hanging out of the wall boxEverything nicely fit in a box:

circuit breaker, power suppy and esp32 board nicely ft in the the wall box8. I designed and 3D printed a new cover in TinkerCad:

3d model of the wall box cover10. After a 3rd try (of 3D design and printing), all measures were finally correct and I could cover the box (Mastodon post):

wall box cover mounted11. Flashed ESP32 board with ESPHome*, added it to Home Assistant.

(*Actually it wasn’t that simple. The board doesn’t have a data USB connector. I had to buy USB2TTL adapter. I was bitching about it here.)

esp32 board with usb2ttl adapter connectedNevertheless, after the firmware update, I edited .yaml for the board so it exposes:

Main entity:

  • Switch (for controlling relay), connected to GPIO16

Misc. entities:

  • LED light (connected to GPIO 23, to signal when the door is opened)
  • Wifi sensor (for checking the power of Wifi signal, because the esp board is located in a wall box)
  • Uptime (to see the time since the last esp board reset)
  • Restart switch (to remotely restart the board if needed – but until now it wasn’t needed)

.yaml code for ESPHome (gathered from various websites, mainly from ESPHome):

... skipping the first part, wifi connectivity, substitutions etc.light:  - platform: status_led    name: "ESP32-rele01-vrata Led"    restore_mode: ALWAYS_OFF    pin:      number: GPIO23      inverted: Falseswitch:  - platform: gpio    pin: GPIO16    name: "Door lock switch"    inverted: False  # The following can be omitted  - platform: restart    name: ${devicename} restartsensor:  - platform: wifi_signal    name: ${devicename} wifi signal    update_interval: 600s  # human readable uptime sensor output to the text sensor above  - platform: uptime    name: ${devicename} Uptime in Days    id: uptime_sensor_days    update_interval: 60s    on_raw_value:      then:        - text_sensor.template.publish:            id: uptime_human            state: !lambda |-              int seconds = round(id(uptime_sensor_days).raw_state);              int days = seconds / (24 * 3600);              seconds = seconds % (24 * 3600);              int hours = seconds / 3600;              seconds = seconds % 3600;              int minutes = seconds /  60;              seconds = seconds % 60;              return (                (days ? String(days) + "d " : "") +                (hours ? String(hours) + "h " : "") +                (minutes ? String(minutes) + "m " : "") +                (String(seconds) + "s")              ).c_str();time:  - platform: homeassistant    id: homeassistant_time# Text sensors with general information.text_sensor:  # Expose ESPHome version as sensor.  - platform: version    name: $devicename Version  # Expose WiFi information as sensors.  - platform: wifi_info    ip_address:      name: $devicename IP    bssid:      name: $devicename BSSID  # human readable update text sensor from sensor:uptime  - platform: template    name: Uptime Human Readable    id: uptime_human    icon: mdi:clock-start    
  1. I’ve put an NFC sticker on the door.

  2. Wrote 2 simple automations that open a relay when the phone touches the NFC sticker and closes it after 1 second:

screenshot of the door unlock automation2nd automation switches the relay off after 1 second (also blinks the red status led on the ESP board):

screenshot of the door lock automation14. Added Aqara Door sensor to the door and connected it my existing Zigbee network using Zigbee2MQTT. It’s for logging when the door is open and for turning on the red status LED on the ESP32 board when the door is opened.

aqara door sensor mounted at the edge of the door15. Added a new control dashboard in Home Assistant for tracking what’s going on with the door:

dashboard in home assistant with various door statusesConclusion

After 6 months, it works great. Kids are satisfied and me too, because this is one of the first usable HomeAssistant projects that involve some electronics and physical devices. It works in 99% of cases.

There are some issues with it though:

  • The ESP32 board sometimes reboots after unlocking. It seems that the door solenoid relay draws too much current and the voltage from the power supply drops momentarily. Probably I need to add a capacitor to the board power input to smooth the voltage. This is not a big issue, because the board starts working normally after 3 or 4 seconds after the reboot.
  • Once or twice it happened the esp board relay got stuck in an OFF state. I had to hit it gently with a screwdriver to unstuck it. After that, I reduced the time the door solenoid is opened from 2 to 1 sec. Not sure if it will help. Maybe it’s just a bad relay.
  • Several times the wifi was down and the board couldn’t communicate with the Home Assistant. It looks like my telco provider’s router is not the best one and it freezes sometimes. Probably I need to buy a better wifi router.

TODO

I have several ideas on how to upgrade the unlocking mechanism:

  • unlocking with a fingerprint
  • unlocking with facial recognition

Disclaimer

The links to the products are not affiliate links and I don’t receive any compensation for linking.

The code and the ideas are mostly from HomeAssistant and ESPHome community forums.

https://blog.rozman.info/unlocking-the-front-door-using-the-mobile-phone-and-home-assistant/

doodle of the electrical scheme
the electrical scheme for wiring the door unlocking mechanism

linjari,
@linjari@mastodontti.fi avatar

@tomi you might want to have some snubber cap on the relay, lock solenoid might have some inductive kickback. (That might be the reason for relay to stick)

linjari,
@linjari@mastodontti.fi avatar
ronanmcd, to cycling
@ronanmcd@mastodon.green avatar

This is an interesting article on road.cc about the issues around the industry and nosediving profits.
It mentions "In very basic terms, pandemic = bike boom, bike boom = brands purchasing more stock to meet demand, pandemic ends and demand drops = less buyers for said stock, less buyers = stock sitting on shelves unsold. In short, not good."
But I would add this would not be an issue if... 1/2
link: https://road.cc/content/news/cycling-live-blog-15-may-2024-308373

linjari,
@linjari@mastodontti.fi avatar

@ronanmcd @kevinteljeur Also, boom being amplified to businesses by limited availablity -> same customers asking multiple places for a bike. Who then order stuff reflecting all these queries.

niksii, to random Finnish
@niksii@mementomori.social avatar

Mitä tapahtuisi, yksityisautoilu kiellettäisiin kaikkialla maailmassa?

linjari,
@linjari@mastodontti.fi avatar

@anuko @niksii @helna @magdalenahai kun olin kiinassa vaihdossa ihmettelin joskus eri firmojen busseja.

Teollisuuslaitokset sijaitsi kaupunkien ulkopuolella/laidoilla ja tehdas oli hoitanut työntekijöille kyydin töihin. Ei rahvaalla siellä varaa autoihin ollut. (Saati kaupungeissa tilaa)

rolle, to spain
@rolle@mementomori.social avatar

🇪🇸 Spain has a good chance of winning. The song is a banger! I absolutely love that italo disco and 80s soundscape. The audience is LOUD.

linjari,
@linjari@mastodontti.fi avatar

@rolle bearded men with bare asscheeks and high heel boots?!

That might be too confusing for some.

meganL, to cycling
@meganL@mas.to avatar

Wooden removable bollards put in places to protect human life.

Metal permanent bollards put at a corner of a building to protect property.

This is what "Platinum Bike-Friendly" looks like at UC Davis.

#UCAccessNow #CarCentrism #Ableism #BikeNite @cycling

linjari,
@linjari@mastodontti.fi avatar

@meganL @cycling would be mighty sad if someone would glue those poles in their holes...

ronanmcd, to cycling
@ronanmcd@mastodon.green avatar

This is odd. From an article about Ethiopian culture, racing in particular. This photo from a race shows a number of riders, all from the same team, on bikes branded Twitter
🤷‍♂️

linjari,
@linjari@mastodontti.fi avatar

@ronanmcd its chinese premium bike brand. Screenshot from aliexpress.

CelloMomOnCars, (edited ) to solar
@CelloMomOnCars@mastodon.social avatar

"#Solar prices have significantly decreased, leading participation to increase. This has disrupted rate equity between solar-owning customers and non-solar-owning customers.

The proposed alternative would have all grid-provided energy billed at retail rates and all excess solar energy credited at [a lower rate].

The billing would only apply to future customers, but would not affect customers who already own them."

https://www.alligator.org/article/2024/04/gru-authority-board-adopts-changes-to-billing-for-solar-owning-customers

Edit: please read whole thread before you get mad

linjari,
@linjari@mastodontti.fi avatar

@CelloMomOnCars @kevincianfarini in many places in Europe power generation and use work with "free" market. Even single home solar can be sold to market with hourly pricing. Big users and generators trade their use in future market. Day ahead pricing is based on highest bidder closing the forecasted gwh amount.
(To keep more expensive means of use still viable, because they are needed for special cases)

There are limitations in this system, but its good start.

https://www.nordpoolgroup.com/en/trading/#

linjari,
@linjari@mastodontti.fi avatar

@CelloMomOnCars @kevincianfarini this separates power market, grid providers, power sales and power generation, but all work under same power pool system. Households might have two different power companies and grid provider.

(One for buying power, one for selling generated power and one that owns cable coming to house.)

Payment generally consist of:
Grid: transfer fee / kwh and monthly fixed fee based on main fuse size + tax
Power provider: power fee / kwh and monthly fee

linjari, to random Finnish
@linjari@mastodontti.fi avatar

Hmm. Tampereelle on avattu tavarapyöriin erikoistunut pyöräliike.

https://lootabikes.fi/

linjari,
@linjari@mastodontti.fi avatar

@feuer on kyllä 😅

tommi, to random Finnish
@tommi@jontka.fi avatar

Puolisko laittoi kuvan ketjunvaihtohommista saatetekstillä "tää ei oo oikeen kokonen". Mutta siis...what fresh hell, kyllähän se ketjulenkin pituus pitäisi aina olla samat puoli tuumaa? Mitä pirskattia tässä nyt tapahtuu?

Ketju on Prisman halvinta Jupiteria ("vakioketju 1/2" x 1/8"), takanapa vaihteeton Shimano.

linjari,
@linjari@mastodontti.fi avatar

@tommi @osma mä oon jotenkin kuvitellut että ns sinkulaketju ja shimano1v/nexus ketju on eri jaolla, koska mullakin on tullu tämmönen istumisongelma vastaan.

E:täältä löytyy peruspyörän osia https://www.mototrade.fi/polkupyoran-varaosat/polkupyoran-voimansiirto/c/163/

thor, to random
@thor@berserker.town avatar

There have been 3 school shootings in Finland since 2007. The most recent one happened just the other day. I'm aware of a single case in Norway, in 2009. I wonder what's going on with Finland?

linjari,
@linjari@mastodontti.fi avatar

@thor welfare state is crumbling and right wing has cut school system and social spending at every possible spot since 2003.

Populist fascists have been gaining traction and that has ruined basically all news/some, there is no discussion culture anymore, just shouting.

ssamulczyk, to random
@ssamulczyk@mstdn.social avatar

Now, the less exciting news. After 1,5 month, the garage finally came up with my car's diagnosis. Skipped timing belt, they say, based on some scuffing on the belt and no compression on the cylinders... I think I'm gonna take it to another garage for a second opinion, because right now I'm being told the repair can go up to €2,5k which is half of the value of the entire car... :bulbasaurroll:

linjari,
@linjari@mastodontti.fi avatar

@ssamulczyk if it still runs, ask for new belt and tensioner and call it a day. -- if it works you saved 2k. If not, look for whole engine from scrapyard, and you can reuse tensioner and belt if they survive testing.

jhilden, to cycling
@jhilden@vis.social avatar

Belt drive on the Riese&Müller cargo bike broke after 2,900km. Wet snow that is deposited along with gravel on the belt and then ends up in the rear sprocket or pinion is apparently kryptonite for it.

Would easily be avoided with some sort of cover for the belt, but seems bike designers don’t think about winter.

linjari,
@linjari@mastodontti.fi avatar

@jhilden could we have some pictures of the carnage?

ilkkajii, to random
@ilkkajii@typo.social avatar

Please someone tell me that buying this Penco tape dispenser won’t make me happy.

linjari,
@linjari@mastodontti.fi avatar

@ilkkajii @lindstorm but rapid stapler no1 IS happy.

linjari, to random Finnish
@linjari@mastodontti.fi avatar
osma, (edited ) to random
@osma@mas.to avatar

Hienoa, että valosaasteesta kirjoitetaan! Suomessa tosiaan valoa heitetään taivaalle hyvin ajattelemattomasti, pienetkin kaupungit loistavat horisontissa kymmenien kilometrien päähän ja Helsinki on kevyesti Euroopan kärkeä keinovalon määrässä per asukas.

Tuloksena menetämme yötiavaan ja luonnon, joka tarvitsee pimeyttä - erityisesti talvehtiakseen.

https://yle.fi/a/74-20066775
#valosaaste

linjari,
@linjari@mastodontti.fi avatar

@osma hieman asiaan liittyen. Iloisesti yllätyin kun lähikentän valoihin oli energiatehokkuusuudistuksessa lisätty liiketunnistin. Eivät enää paahda valot joka ilta valkeaan jääkenttään.

Mutta sinänsä, pieni ilo kun lähialueella on hehtaaritolkulla valaistua parkkipaikkaa. Sähkön hinnannousu on kyllä kivasti sammutellut turhia valoja.

stshank, to random
@stshank@mstdn.social avatar

My work Mac was stuck in a boot loop trying to update to Sonoma 14.2.1. It'd sometimes get as far as asking for my password, then the fan would surge and it'd restart. What fixed it: unplugging it from power. Weird.

linjari,
@linjari@mastodontti.fi avatar

@stshank my work dell firmware update specifically advices to unplug all docks and power supplies before proceeding.

osma, to cycling
@osma@mas.to avatar

There are things Helsinki could learn about winter #cycling from Oulu.

"It's also about how we communicate to our residents," says Vaarala. "When there's a major snowstorm some other places might say: 'Leave your bike at home and take a bus or car.' We've decided in the city of Oulu to never send that kind of message. Instead, we say: 'There's a major snowstorm coming, please leave your car at home and take a bicycle because the paths will be cleared by 7am.'"
https://www.bbc.com/future/article/20231220-why-oulu-finland-is-the-winter-cycling-capital-of-the-world

linjari,
@linjari@mastodontti.fi avatar

@osma @Setok long term project, started in the 70's.

Helsinki, Tampere and Turku are decades late to this game.

https://www.kaleva.fi/oulun-pyoratieverkoston-isa-mauri-myllyla-valittii/1859630

jhilden, to random
@jhilden@vis.social avatar

I’m just thinking of how the city of Salo (a small-ish municipality on the way from Helsinki to Turku) paid some consultant like 20k€ to do a plan for a Hyperloop connection from Helsinki to Stockholm via Salo.
https://www.theverge.com/2023/12/21/24011448/hyperloop-one-shut-down-layoff-closing-elon-musk

linjari,
@linjari@mastodontti.fi avatar

@VPSuuronen @jhilden @tml @henrik eiks siinä jossain ekassa haihattelusuunnitelmassa hyperloop ollu vähän niinkuin putkiposti että osa kapseleista olis voinu jäädä matkalle tms.

linjari,
@linjari@mastodontti.fi avatar

@tml @VPSuuronen @jhilden @henrik saattais olla aavistuksen epämukava kiihtyvyys jos pääjunan eteen laitetaan "air rifle coach" joka kiihdytetään matkavauhtiin ilmapatjalla tunnelissa.

Mut tässä olis jo varmaan tarpeeks pöhinäkontenttia lähteä "suunnittelemaan"

linjari, to diy Finnish
@linjari@mastodontti.fi avatar

Meet Smart Hai Addix performance Spike. #diy

Pohjasta vuotavat Hait sai ehkä hieman lisäaikaa kaljamakeleille. Aika näyttää kuinka nää kestää. Nastoja ainakin piisaa 😄

gerrymcgovern, to random
@gerrymcgovern@mastodon.green avatar

Electric bikes are displacing four times as much demand for oil as all the world’s electric cars.
https://theconversation.com/the-worlds-280-million-electric-bikes-and-mopeds-are-cutting-demand-for-oil-far-more-than-electric-cars-213870

“I use my e-bike on journeys in my area, including towns 10 and 15 miles away. I am a middle-aged chubster with two very dodgy knees. Some days, I can cycle more easily than I can walk. I live in a very hilly, very windy part of rural Scotland. The e-bike is transformative and brings me great joy.”
Ruth Watson, @kuantancurls

linjari,
@linjari@mastodontti.fi avatar

@hembrow @ned @gerrymcgovern

Also.. eu regulations make ebikes less like mopeds. I totally get that People dislike 1kw thumb throttle rockets on shared paths.

linjari,
@linjari@mastodontti.fi avatar

@PaulWermer @hembrow @ned @gerrymcgovern proper maintenance is essential with leaves/snow/trash, good infra makes it lot easier. And traffic lights with sensors for bikes are like magic. 🥰

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • tacticalgear
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • Youngstown
  • everett
  • anitta
  • slotface
  • GTA5RPClips
  • rosin
  • thenastyranch
  • kavyap
  • mdbf
  • Leos
  • modclub
  • osvaldo12
  • Durango
  • khanakhh
  • provamag3
  • cisconetworking
  • ngwrru68w68
  • cubers
  • tester
  • ethstaker
  • megavids
  • normalnudes
  • lostlight
  • All magazines