• 4 Posts
  • 28 Comments
Joined 1 year ago
cake
Cake day: June 29th, 2023

help-circle
  • Oh, I backup religiously since Blue failed right after I moved and backup my backups on my laptop as well. (literally failed; I lost everything and had to run photorec and three other tools to pick out everything I’d done for the previous six months, since that I hadn’t copied to a backup on my server because I was prepping to move at the time).

    So far, OTBR is the biggest stopping issue since HA runs it but nothing sticks. I admit, moving zwave is my actual biggest dread; zigbees I can do probably in a weekend, but zwave is such hell to unpair and re-pair (thought it makes up for it by sticking forever). That’s part of the reason I love Thread and Matter; they’re almost as sticky as zwave once they pair, and while pairing them is variable (sometimes fast, sometimes not so much) they repair themselves pretty consistently if the outage is under 24 hours and you can deliberately unpair them fairly easily.


  • I’ve been running Home Assistant for roughly five-six years (Pi, then Blue, now Amber and a second instance on my server for network integrations like nmap and netgear), but since my SmartThings hub was taking care of zigbee/zwave, until now I used HA as a coordinator for every smart device ecosystem I was using (Hue, Wyze, Ring, Blink, Alexa, August, Arlo, et al). Sorry that wasn’t clear.

    While Ive started slowly adding zigbee devices directly, I haven’t started with zwave and thread isn’t working for me yet (OTBR is running but nothing sticks). And I really don’t want to have my hub fail and all my thread/matter devices useless when I don’t have anything that can access them.







  • So it can be done, it just–required a lot of steps and me making a mapping spreadsheet of all the containers. But! Automations and scripts run in the homeassistant container, while when you ssh, you’re going into the ssh addon container which should have been obvious and really was once I finished mapping all the containers.

    Goal: I need /usr/local/bin in the ssh container so I can run scripts over ssh and access my function library script easily without ./path/to/script.

    Summary: ssh into HAOS from the homeassistant container with an HAOS root user (port 22222), run docker exec to get into the ssh addon container, then make your symlinks for /usr/local/bin.

    (Note: this is ridiculously complicated and I know there has to be a better way. But this works so I win.)

    1. Get access to HAOS itself as root: https://developers.home-assistant.io/docs/operating-system/debugging. Verify you can login successfully.
    2. In homeassistant container:
    • a. create an .ssh folder (/config/.ssh)
    • b. add the authorized_keys file you made for step one.
    • c. add the public and private keys you made for step one (should be in the ssh addon container).
    • d. set permissions;
    chmod 600 /config/.ssh/authorized_keys
    chmod 600 /config/.ssh/PRIVATE_KEY
    chmod 644 /config/.ssh/PUBLIC_KEY
    chmod 700 /config/.ssh
    
    • e. In /config/shell_scripts.yaml or wherever you put your shell scripts, add the script you want to use to update /usr/local/bin: UPDATE_BIN_SCRIPT: /config/shell_scripts/UPDATE_BIN_SCRIPT
    • f. Restart HA.
    • g. Check it in Developer Tools->Services

    I have no idea how consistent the ssh addon container name is usually but it’s different on all three of my installs, so insert your container name for SSH_ADDON_CONTAINER_NAME

    Steps: login to HAOS, go into the SSH Container, and do the update. This is horribly messy but hey, it works.

    UPDATE_BIN_SCRIPT

    #!/bin/bash
    
    # OPTIONAL: Update some of the very outdated alpine packages in both homeassistant and the ssh addon (figlet makes cool ascii art of my server
    # name).   You'll need to run it twice; once for the homeassistant container, then again in the ssh container.  Assuming you want to update packages,
    # anyway
    # update homeassistant container packages
    apk add coreutils figlet iproute2 iw jq ncurses procps-ng sed util-linux wireless-tools
    
    # ssh into HAOS and access docker container
    ssh -i /config/.ssh/PRIVATE_KEY -p 22222 root@HA_IP_ADDRESS << EOF
    	docker exec SSH_ADDON_CONTAINER_NAME \
    	bash -c \
           'apk add coreutils figlet iproute2 iw jq ncurses procps-ng sed util-linux wireless-tools; \
    	if [ ! -h /usr/local/bin/SCRIPT1 ]; then echo "SCRIPT1 does not exist"; \
    	ln -s /homeassistant/shell_scripts/SCRIPT1 /usr/local/bin/SCRIPT1; echo "Link created"; \
    	else echo "Link exists";fi; \
    	if [ ! -h /usr/local/bin/SCRIPT2 ]; then echo "SCRIPT2 does not exist"; \
    	ln -s /homeassistant/shell_scripts/SCRIPT2 /usr/local/bin/SCRIPT2; echo "Link created"; \
    	else echo "Link exists";fi'
    EOF
    
    echo "Done"
    

    I am going to feel really stupid when I find out there’s a much easier way.


  • Docker containers are designed to be immutable. The moment they’re stopped and recreated, any changes to them ads thrown out. You’re supposed to add a layer to your Docker image if you want to add command lines and such. That’s why it’ll keep deleting your stuff every time you update.

    It took me until I put Home Assistant on my server in a docker container to realize what was going on there. I use docker more now, but it’s really, really nothing like this.

    Running the script inside Docker should put it in the right place, but I wouldn’t advice doing it that way.

    That’s what I’ve been doing manually over regular ssh (not the 22222 port one).

    To work around the path issue, maybe consider using hard links rather than soft links?

    That’s what I think I need to do, but the only ‘hard’ links–at least according to multiple find -name/find -iname searches on the ssh 22222 port–are all in /mnt/data/docker/overlay2 and /var/lib/docker/overlay2. I get there’s a working pattern with the overlays but dear God why.

    Alternatively, you could figure out where HAOS stores the Docker config and add a volume definition of your own. You’ll probably be able to put all of your files in /usr/local/bin by adding a line like “- /path/home/host:/usr/local/bin” in the right place. I don’t know where this config is stored, though.

    Okay that makes sense. I guess the first step is to get the container structure and volume.

    Thanks so much! I’ll update if I find the solution or die trying.




  • You know, I didn’t think of that. I’ve never run an OS in docker; all I tested my data collection scripts on were my regular VM’s a few times just for fun. And for that matter, most LXC containers I run in Proxmox are privileged to get around restrictions (still haven’t found a way for LXC’s to let me compile different architectures, though. HA may have updated their docker to current, which would explain why it happened so suddenly.

    And yes, for now, I’ll just do root login to grab the information; it’s technically more accurate, I am just knee-jerk distrustful of using root to the point until Proxmox and this last year, I almost forgot it existed unless there’s a very weird linux problem I need it for. Thanks for this information, though; I’ve only just started seriously working with LXC and docker containers, so that’s not an approach I woudl have considered.


  • Full disclosure: I just–and I mean just–got my head wrapped around docker and containers due to installing Proxmox on my server. Right now, my Proxmox server runs a LXC container for docker, and in docker I run Handbrake and MakeMKV images that run the GUIs in a browser or run with command line. They connect to each other through mounting the LXC’s /home/user into both., then added a connection to the remote shares on my other server so I can send them to my media server. Yes, I did have to map all the mountings out first before I started but hey, that’s how I learn.

    Long way of saying: I am just now able to start understanding how Home Assistant works–someone said Home Assistant OS was basically really a hypervisor overseeing a lot of containers and now that I use Proxmox, that really helped–but I’m still really unfamiliar with the details.

    I installed the full Home Assistant on a dedicated Pi4, so it’s the only thing it does. Until yesterday, the only part I actually interacted with was the data portion, which is where all my files are, where I configure my GUI and script, store addons, etc. The container for this portion runs on Alpine Linux; I can and have and do install/update/change/build packages I need or like to use. in there It’s ephemeral; anything I do outside the data directory (it holds /config, /addons, etc) gets wiped clean on update, so I reinstall them whenever HA does an update .

    When I run my data collection scripts on my Home Assistant SBC, they take their information from the container aka Alpine Linux., including saying my OS was Alpine. All of this worked correctly up until–according to the directory dates, December 10th at 2:40 AM when the /sys/firmware was last updated and everything in it vanished, breaking the symlink to /proc/device-tree/model. This also updated the container OS to Alpine 3.19.0. Data collection runs hourly; one of my Pis ssh’s into each computer to run four data collection scripts and updates a browser page I run off apache, so I can check current presence and network status and also check the OS/hardware/running services of all my computers from the browser (the services script doesn’t work on Alpine yet; different structure). I didn’t notice until recently because work got super busy, so I only verified availability and network status regularly.

    These are the packages I install or switch to an updated/different version the Alpine container to help with this or just have fun: -figlet (it’s just cute ASCII art for an ssh banner), -iproute2 (network info, when updated has option to store network info in a variable as a json),

    • iw (wireless adapter info),
    • jq (reads and processes json files),
    • procps-ng (updated uptime package for more options),
    • sed (updated can do more than the installed one),
    • util-linux (for column command in bash),
    • wireless-tools (iwconfig, more wireless data if iw doesn’t have it) (Note: I think tr may also be updated by one of these.)

    These are the ones I use for data collection that are already installed:

    • lscpu (“Model name” “Vendor ID” “Architecture” “CPU(s)” “CPU min MHz” “CPU max MHz”)
    • uname (kernel)

    These are the files I access for data collection:

    • /proc/device-tree/model (Computer model)
    • /proc/meminfo (RAM)
    • /proc/uptime (Uptime)
    • /etc/os-release (Current OS data)
    • /sys/class/thermal/thermal_zone0/temp (CPU temperature for all my SBCs except BeagleBone Black)

    Until this month, all of those files were accessible both before I do the package updates and after. The only one affected was maybe /proc/uptime by the uptime update to get more options. Again: I’ve been running these scripts or versions of them for well over a year and I test individually on each SBC before adding them to my data collection scripts to run remotely; all of these worked on every computer, including whatever SBC was running Home Assistant. (Odroid N2+ until it died a few months ago) And all of them work right now–except /proc/device-tree/model on my Home Assistant SBC. The only way I can get model info is to add an extra ssh to Home Assistant itself as root and grab the data off that file (and while I"m there, get the OS data for Home Assistant instead of Alpine), save it to my shell script directory in my data container, and have the my script process that file for my data after it gets the rest from the container.

    That’s why I’m weirded out; this is one of the things that is the same on every single Linux OS I’ve used and on Alpine, so why on earth would this one thing change?

    This could conceivably be an Alpine issue; I downloaded Alpine 3.19.0 to run in Proxmox when I get a chance, and I kind of hope that it’s a deliberate change in Alpine, because otherwise, I can’t imagine why on earth the HA team would alter Alpine to break that symlink. Or they could be templating Alpine for the container each time and this time it accidentally broke. The entire thing is just so weird. Or maybe–though not likely–a bug in Alpine 3.19.0, but I doubt it; I can’t possibly be the first to notice, it was released at least three weeks ago and I googled a lot.

    I’m honestly not sure it affects anything at all, but it bothers me so here we are. Though granted, it did make me finally get off my ass and figure out how to login as root into HA as well as do a badly needed refactor of my main data collection script (the one that does the ssh’ing) as well as clean and refactor my computer information scripts, so maybe it was destiny.




  • I know, I’m trying to write up a clear bug report on this, but I’m honestly not sure if it actually has any effect other than messing up my data collection scripts. Yeah, it’s annoying the hell out of me but I’ve been going through the documented issues with the core and it doesn’t look like anyone else noticed a problem. I’ve been trying to figure out if it’s created by an alpine package that I can run, but not much luck there.

    Note: I enabled root for Home Assistant OS and the symlink and file are fine there.




  • Egg boiler. On the surface it’s just the most gadgety pointless product invented but I literally wore it out because suddenly I could have hard boiled eggs and no risk of setting my apartment on fire because I forgot about the eggs. After I move, it’s the first thing I’m getting for my kitchen because low-risk hard boiled eggs are totally worth it.

    There’s a lot of seemingly ‘useless’ kitchen gadgets like this: full size food processor, waffle maker, breadmaker, even my ridic large instapot. I don’t use them every day or even every week and no, I don’t need them for daily life. Yes I can mince fifty thousand vegetables for this really complicated soup by hand or make bread from scratch or do whatever you do to make a pot roast without them–but I won’t do those things. I know me pretty well now; if I want to make that soup, make some fresh bread, or do that thirty-step fancy pot roast, I need those tools or I’ll default to frozen pizza and maybe have fresh Italian bread if I went to Central Market recently and remembered to grab it from the bakery.


  • I mean, I try and test drive all new social media platforms that don’t actively make my skin crawl, but. I’ve really bonded with it super fast, and not the way I did with Mastodon where I really sat down to make myself adapt. Don’t get me wrong, I love it and pretty much use constantly, but there’s always an adjustment period; the very worst was tumblr’s hellscapy postingness, but reddit was a very close second. My first social media was livejournal, so for me, everything is compared to that. When I went to dreamwidth, I had enough experience scripting and remembered enough from doing web design to build my own layout and theme straight from the available source, so my friendslist there (dw: circle) is literally customized as close as my skill level then could get to exactly how I want to read, and the right sidebar is customized to only want I personally want there that aren’t distracting to me, which is basically a fancier and more idiosyncratic version of my livejournal friendslist. I do me, okay.

    Back to Lemmy: from the first, it was super comfortable and familiar. Community posts to the left, right sidebar, almost the exact amount of white space I need, so it was effortless to follow along and add communities and post comments. No weird distractions, nothing unnecessary or fancy to take my attention from content, and I can open up pictures directly in my feed and close them there without having to go to the community or change my scroll rhythm much. Joyous.

    I just went back to DW to search for one of my posts and while there, I paused on my circle page and took a moment to realize: oh. They are not the same, no, but Lemmy is basically a less idiosyncratic minimalist version of my specific reading aesthetic; the base elements of both are the same.

    (The only thing I might want to change is coloring the post titles since I’m very trained to see plain uncolored black text as text and not links, but three entirely different colors on a general feed page like this one might be a dealbreaker for me; I can adapt to seeing ‘post title is link even if black’ but tossing in a green or something with blue and orange in close proximity feels like a nope and I do like the blue for user and orange for community very, very much.)

    So tentatively: this may be my new community-oriented home.


  • Oh, no problem, and thanks for the heads-up! And here’s where I say: I’m weirdly not surprised to hear that.

    Backstory:I managed to sprain/strain/something my back horribly right when covid hit and couldn’t get in for physical therapy for almost six months, so it was slow to heal and I semi-re-whtaever’ed it two more times (once: opening a box. A box) and the low-grade pain constant pain and inability to bend or do certain movements without an upgrade lasted about two-ish years. My mom’s amazing mattress: nope. Pillow-top mattress:? Nope. My mattress was a hellscape but again, Amazon sale.

    When I got the Nectar, I really wasn’t feeling it; it’s this weird combination of not-hard and not-soft for a bed (I kept thinking it would make a really good slouchy couch). My son didn’t’ mind it, but my mom carefully did not say she thought I should consider a refund. I thought: eh, I’ll keep it at least the month trial period as I know nothing about mattresses and I know even less about returning them.

    My back? LOVES IT. A month sleeping in it, my back only acts up when I actually do things that are not back-friendly. The only thing I know this thing has changed about how I sleep is this mattress super discourages movement once unconsciousness commences; like, it cannot be done, and God help you if you take a sleeping pill before setting your sleeping plans in place. If go to sleep on my left side, right side, back, with my legs crossed or in a pretzel configuration, nothing’s going anywhere until I’m fully awake again so I better make sure the position I fall asleep in is one that I won’t regret spending eightish hours in (or hope I need to go to the bathroom at some point and wake up to fix things). So yes, you better believe my body position before sleep habits got an overhaul very very fast and I haven’t lapsed in a very long time.

    Wait, did I mention what caused that first dramatic agonizing strain? Pain that was so bad an ambulance had to be called–during covid–but they advised against the ER because COVID even though I could not stand straight for three days? I had to go stay with my mom to take care of me because movement = screaming until we could get to my doctor on the phone to send muscle relaxants and anti-inflammatories I had to take for months before this mattress came into my life?

    One morning, I was sitting cross-legged on the couch like every other day of my life and then I stood up. That’s how this started.

    I feel like I should defend my mattress’s honor or something but–I mean, this is pretty consistent in the pattern of my life to date. Standing up broke my back; a overpriced crappy mattress healed it and then trained me into better sleep posture. Truly, life is a rich tapestry indeed.


  • Unless someone else names them first: nope. Same with my favorite coffee and my favorite tea.

    My origin story is this: 1.) parents who knowingly and recklessly got married and decided to produce offspring despite both families having a history of long legs–they knew this!–and produced a five-ten daughter with disproportionally long legs and 2.) apparently, I should have taken better care of my gall bladder (somehow?).

    Due to my gall bladder feeling neglected or some shit it punished me for eating and drinking and living before abandoning me via surgical intervention: this has led to slowly growing intolerance for acidic foods and drinks. My favorite two drinks are coffee and tea and I like them caffeiney and delicious. As it turns out,it is not easy to find a balance between very low acid and not something either dark roasted or tasting of feet that I could also easily tolerate for more than one cup.

    Then I found my coffee. It was amazing and perfect and I will pay well for not being in pain for my caffeine, I just prefer not to admit it to a living human being. I was innocently excited through that entire five pounds; then I went to get more and everything went very very wrong.

    This coffee–delicious, low acid, no pain!–has six (6) unbearably bougie descriptor terms before the word ‘coffee’ and two (2) after. Worse, they rearrange the coffee there regularly from spite., all the bags look the same totally not pretentious off-brown paper with stupid plain text and I can never find it on my own and suspect they hide it. Every time–EVERY TIME–the salespeople will maliciously make me use ALL EIGHT WORDS (plus ‘coffee’), out loud, in the correct order, before they’re totally "Oh this [eight words plus coffee}] is right here!’

    This is their idea of fun on a slow day; I bet they got perfect scores on the PCL-R, too.

    I actually had better luck with tea,. then I made a terrible mistake. One day while browsing, I found a new one I hadn’t seen. I didn’t read past the words ‘low-acid’ because why would I? It’s just plain black tea. I bought it, loved it, then went to get more. I couldn’t find it, hunted up the empty bag from my previous purchase that I’d brought for just this reason, and for the first time read the full label and all the descriptors, and then easily found my favorite new tea. It was beneath a GiANT CHALKBOARD on which the formal name of my new tea resided: five (5) incredibly pretentious descriptors and something new and much, much worse. Once–once–someone went with me to pick it up and I only belatedly remembered that goddamn chalkboard when they said “soooooo…your tea has to be ethically handpicked by specially trained monkeys, huh?” and oh God. No one understands: I saw the words ‘low acid’ and thought ‘cool’. No, I didn’t read further, that’s on me, but it didn’t occur to me ethical monkeys were involved because why in the name of God would they be?

    Now I am the girl who buys handpicked by ethical monkeys tea, [eight words] coffee and overpriced jeans and everyone else is “ooh that’s nice, i just get my jeans from the thrift store and drink lipton”.

    All of these psychopaths are five feet seven inches or less and have a goddamn gallbladder; some are first and second degree blood relations ad make really good desserts for Christmas and family reunions so what can you do, but some are people I chose willingly to associate with and call friend and therefore know where I live and all my online identities so I’m stuck with them until I can figure out how to make it look like an accident, hopefully a pretentious one. I hide my spaghetti sauce now when there’s any danger one might show up; at some point at the rate I’m going, I will probably have to hide my entire pantry and I’m not sure how to do that in an apartment.

    Am I being dramatic about this? Yes, but I deserve it; this has been in progress for fifteen years and the less I can tolerate acid, the more words are applied to basic foods with a corresponding increase in price. I have had to deal with this and every so often, I am wearing one of those pairs of jeans while doing it and I just. Cannot.



  • Both specific and in general 1.) Nectar mattress. The only mattresses i’d ever bought were from amazon and very on sale. Important Life Advice: whatever you have to do to make i happen, get a good mattress. Even my bed approves and it thinks everything is beneath it, including me.

    2.) My bed.

    Oh boy, here we go. This goddamn bed.

    I bought it roughly twenty years ago and it literally took my entire tax return at my first job and then some to get it and the very first piece of furniture I personally picked out and bought for myself which may explain absolutely nothing about how I ended up like this.

    It’s fairly straightforward, plain four poster queen bed but so incredibly melodramatic no matter the room I put it in, this thing will dramatically not fit and carry on like it’s actually in a castle tower in 1700s Frances waiting for a princess to sleep in it (it did not act like this at the store, okay). It has an unnecessary number of parts (some really could have been consolidated and a couple I’m not sure even have a function other than to add time to assembling it) every piece of it is awkward to move, even the parts that have no reason to be and don’t look like they are, and every single piece is ten times heavier than than look or is reasonable, sane, or really should even be possible. The wood is dark and does a very cool dark gleaming thing, and it takes hours to clean and oil it to a soft gleam (so. goddamn. many. parts). Twenty-four hours later it’s sitting there dull and dramatically telling everyone who sees it I never clean it and also use substandard wood oil

    It takes a very base minimum of two people to even attempt to put it together and you better not have plans for the rest of the day because it doesn’t matter how many times you have done this, somehow, you will always get six parts wrong because whoever designed this has another job making complicated puzzle locks that you will never solve and will die mad about it (this person is a sadist). Just looking at it in any given bedroom I live in, it makes me feel I should be wearing something long, white, and flowy while waiting for my angsty vampire lover to visit me in the dead of the night and not taking my night’s sleep shorts and a tank top.

    This bed is a snobby, judgemental asshole who acts like I didn’t buy it at the goddamn Roomstore at ten percent off because it was a floor model.

    But. it’s a goddamn tank that’s been in substandard moving vans and the backs of multiple trucks and dropped down stairs and sometimes forgets to at least look scuffed. It will survive all the wars and still give its occupants a great night’s sleep. Those deceptively slim posts are strong enough to joust with a burglar, beat him to death, and then put back and rehang my very melodramatic bed curtains on them (though I’ll need a little hysterical strength to hold them up for very long; I am not kidding how stupid heavy those thing are and should not be). I love this bed, it is my soulmate, and it is where I will sleep until I move to a convenient grave. I hope all of you are able to have one of these in your life and if you already do, you have my condolences; but it’s ride or die now.

    3.) The best headphones I can afford and a budget for potential upgrade/replace every two years (you don’t have to use that timeline,but it works for me). Related: Sonos speakers. No, they are not the best in any class but they are good to really good in multiple speaker classes and are affordable–if you budget strictly and buy a piece at a time or watch for amazon sales like it’s your job–for normal people.

    4.) Kindle may actually be the most important single decision I have made in my life. I like books; I didn’t want to use a screen. I did it and a decade and change greater with slowly degrading eyesight I bless the day I decided to try it every day. Currently on an Oasis.

    5.) Giving up and budgeting specifically to pay a ridiculous amount of money for my jeans. Sure, the receipts legit horrifies me, but they fit perfectly, are crazy comfortable, can pretty much survive anything I do to them (and I am hard on my clothes) and some have been with me since before the Obama administration and don’t even have a loose thread on them. I have literally every single pair i ever bought and they still look great (and I never add up the cost of them all and what thing I could have bought with that much money, God).