@jkmcnk@mastodon.social
@jkmcnk@mastodon.social avatar

jkmcnk

@jkmcnk@mastodon.social

an unkindness of ravens in a trench coat. sails the seas. tricks computers into things. knows nothing. festively benevolent. preferable to vegetables. bauhausian. a sad bush.

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

nixCraft, to random
@nixCraft@mastodon.social avatar

Is "fixed stuff" a good git commit message for a big project? I'm asking for myself ๐Ÿค”

jkmcnk,
@jkmcnk@mastodon.social avatar

@nixCraft it is perfect, tbh: you can directly copy it into release notes once time comes.

po3mah, to random
@po3mah@mastodon.social avatar

I impulsively made a reservation for an 8-day trekking trip.
Now I can work again with ease.

jkmcnk,
@jkmcnk@mastodon.social avatar

@po3mah did you consult your knees before?

juremes, to random Slovenian
@juremes@mastodon.social avatar

Tisto, ko ti postane jasno, da si zajebal, pa bi se vseeno rad naลกlepal na vlak "prvi iz skupine".

https://www.gov.si/novice/2024-05-22-izjava-predsednika-vlade-po-napovedi-voditeljev-spanije-irske-in-norveske-o-priznanju-palestine/

jkmcnk,
@jkmcnk@mastodon.social avatar

@mihamarkic a ni to tipiฤen golobji modus operandi, najprej se na polno zaleti v nekej, pol pa backtracka in obvisi nekje vmes. pezdetek, bi rekel pokojni dr. sc. med. janez rugelj. uglavnem, spet smo en kurac. :D @juremes

jkmcnk,
@jkmcnk@mastodon.social avatar

@po3mah s tino bi loh mela tease and denial kink OF. @mihamarkic @juremes

po3mah, to random
@po3mah@mastodon.social avatar

Vฤasih sem rad prebral Mazzinijeve ฤlanke. Zadnji, viteลกko-braniteljski pa se mi je malo zataknil.
Nekoฤ sem bil v podobni situaciji (urednikovanje delu, ki je bilo osumljeno plagiarizma), pa mi na kraj pameti ni padlo, da bi napadel celoten hudobni svet, krivdo avtorja pa zmanjลกal na minimum.

https://siol.net/mnenja/kolumne/miha-mazzini-anatomija-nekega-linca-634348

jkmcnk,
@jkmcnk@mastodon.social avatar

@po3mah zdej sam potrjuje svojo tezo, da je slovenci ne cenijo intelektualnega dela. win-win. ๐Ÿ˜œ

jkmcnk,
@jkmcnk@mastodon.social avatar

@galar noja, jst si sam mislim, da je pisanje nekoga, ki je po dveh linijah intimately involved s celo zadevo, tud treba jemat mal z rezervo. ๐Ÿคท @po3mah

jkmcnk,
@jkmcnk@mastodon.social avatar

@galar vse pisce clickbaiting crapa je treba jemati z rezervo. odnese pa vsak kaj drugega, jst predvsem za lase privleฤen kao socioloลกki in kao mal tko v ลกali argument za to, da slovenci nujno rabijo selfhelp knjige. ker je lih njegova punca napisala eno. uglavnem, oฤi si bom izpahnil od zavijanja z njimi. :D @po3mah

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

jkmcnk,
@jkmcnk@mastodon.social avatar

@tomi lol, v kakลกnih enotah je un konฤni navor? sili funta na inฤ? :D

jkmcnk,
@jkmcnk@mastodon.social avatar

@tomi in kako avtoriziraลก telefon?

jkmcnk,
@jkmcnk@mastodon.social avatar

@po3mah tam nekje na maลกineriji piลกe terminal torque. @tomi

jkmcnk,
@jkmcnk@mastodon.social avatar

@po3mah men se zdi to krasno, ลกe bolje bi bilo meriti navor v sili bika pitanca na seลพenj. @tomi

jkmcnk,
@jkmcnk@mastodon.social avatar
jkmcnk,
@jkmcnk@mastodon.social avatar

@po3mah ti sofisticirani prijemi se sam v locksports uporabljajo, resniฤnost je pajser in ลกraufenciger. @mihamarkic @tomi

jkmcnk, to random
@jkmcnk@mastodon.social avatar

what a time to be alive. ๐Ÿ˜œ https://www.tomazgorec.si/knjiga/

jkmcnk,
@jkmcnk@mastodon.social avatar

@po3mah v Tovarni(tm) mi servirajo te pomembne novice. :D

jkmcnk,
@jkmcnk@mastodon.social avatar

@po3mah men je sam ลพal, da smo zamudil prednaroฤilo, da vzamem tri in dobim osebno dostavo in loh zaลกamarim modela. :D

po3mah, to random
@po3mah@mastodon.social avatar

Nobody prepared me (or talked about) the phase of life when everything changes.
I'm approaching my 50s and I feel the biggest changes since puberty. Mental more than physical.
Less and less things are relevant.
People are tiring.
Hobbies are everything. I could garden all the time.
I don't care if I live 1 or 30 years more. Both is fine.
Books are everything. People who read can approach me, others can fuckoff.
Visits? No thanks, I have more important things to do. Like - nothing.

jkmcnk,
@jkmcnk@mastodon.social avatar

@po3mah I feel seen. :D

ai6yr, to random

Grocery shopping tip: wild mustard flowers (which are an invasive weed) taste IDENTICAL to fancy, expensive broccollini when cooked, and are free.

jkmcnk,
@jkmcnk@mastodon.social avatar

@c_dan4th indeed, most of the things we eat are cabbage. :D @ai6yr

ai6yr, to random

Seeking eggplant recipe ideas, as I have one limp eggplant in the fridge and 8 eggplants growing in hydroponics (which may produce a massive amount of eggplant).

So far my repertoire includes 2 dishes:

  1. Eggplant Parmesan (Italian)
  2. Eggplant in Garlic Sauce (Chinese)

(the family hates eggplant, except me, so we never eat it ๐Ÿค” )

#eggplant

jkmcnk,
@jkmcnk@mastodon.social avatar

@ai6yr baba ganoush. middle eastern cuisine is full of eggplants. ;) or just oven bake them, smeared with some olive oil and oregano and put them in a sandwich.

bagder, to random
@bagder@mastodon.social avatar

"HackerOne's GenAI copilot, Hai, streamlines vulnerability management."

๐Ÿค” ...

"Hai has been disabled for your organization."

๐Ÿ‘

jkmcnk,
@jkmcnk@mastodon.social avatar

@bagder this is kind of a common workflow for everything ai related. perhaps we should train a nn to automate it.

jkmcnk, to random
@jkmcnk@mastodon.social avatar

the world is held together by duct tape and bash scripting.

mcc, to random
@mcc@mastodon.social avatar

Anyway since waking up I have successfully written a Rust program that parses an mp3 and prints to the terminal the waveform (or rather signal power over time of the whole file) as ASCII art. It works great. There is only one problem: This is not something I need

jkmcnk,
@jkmcnk@mastodon.social avatar

@mcc why would that constitute a problem?

bagder, to random
@bagder@mastodon.social avatar

In 10 days (at up 2024) I will do this presentation - out of which I seem to already have about 100 slides prepared...

jkmcnk,
@jkmcnk@mastodon.social avatar

@bagder does it include klapaucius as well or is it only trurl?

gvy_dvpont, to random
@gvy_dvpont@mastodon.social avatar
jkmcnk,
@jkmcnk@mastodon.social avatar

@gvy_dvpont this is a manifestation of laziness, lack of imagination and ignorance of industry standards. it should require you to purchase loot boxes until you get a Doom Defreezer.

Migueldeicaza, to random
@Migueldeicaza@mastodon.social avatar

The one thing I am dreading about Godot/iPad is setting up the CI on Xcode Cloud.

Those devices are powered by modded raspberry pis running MacOS.

I am thinking that one hack might be to use GitHub CI + custom runners that SSH into my Studio to do the heavy lifting, and then use those binaries as the input to Xcode Cloud.

jkmcnk,
@jkmcnk@mastodon.social avatar

@mihamarkic you don't really question the motherfucker who initially wrote midnight commander. it's modded pis running macos. @Migueldeicaza

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