offset \ˈȯf-ˌset\ noun

a force or influence that makes an opposing force ineffective or less effective

Long Overdue Vacation And Then Some

We're back in Ireland. This would mean that we were away and this article is deliberately late because we were both recharging our batteries, so to speak.

It's been twenty months, no vacation, staying put and waiting for the vaccine, but once we finally got vaccinated twice with an mRNA vaccine and were able to move around a bit, we decided to take the long way to see our parents. The direct flight was to Venice because at the time the incidence rate wasn't bad. We had to fill out the passenger locator form for Italy and, with both being vaccinated, we packed our masks and trinkets in backpacks and boarded the plane. Being locked down for a long time, we were noticeably more nervous in travel, but once we got the road underneath us, it started to feel familiar. We spent a few days in Venice, and while it was not crowded, there was still a big number of tourists in spite of the pandemic.

Venice is sinking, due to the climate change, and things are getting worse. They've set up MOSE project of closing the lagoon to combat the tides and they also believe that it can combat the rising sea level, but the project is not without its share of criticism.

With the worries out of the way, Venice is beautiful and its fame is pretty much deserved. As Vesna said, someone took out the roads and cars and put waterways and boats. It's a pedestrian city where one can walk, but it's boats all the way if you want to go around the city. Visiting can be a great experience because there are so many things to see, with the mandatory warning to avoid the usual tourist traps. For example, if there's a picture of food on the restaurant menu or a waiter inviting you inside, don't go there. They're out for numbers and overcharge things.


/media/images/venice.jpg

While in Venice, we also visited Dolomites which are breathtakingly beautiful. The height of the mountains offsets the vegetation line so the peaks turn naked at one point. The sky was clear and we saw them in all their glory. There was no snow because it was the prealp area in summer, but low white clouds can hit the peaks often.


/media/images/dolomites.jpg

After Venice, we were supposed to board a catamaran ferry to Pula, which for some reason didn't operate. We opted to go the long way across the mainland, taking a train to Trieste and then a bus to Pula the following day. The reservation of all the tickets and the overnight stay we needed was tricky to execute on a moving transport with the unstable internet connection and against high demand, and for a moment we were worried we'd be spending the night at the station. Because we were extremely lucky, that didn't happen. With one day lost on travel, seeing Trieste was like seeing an old acquaintance (because we were there before). It's still beautiful and we had a nice evening there.

In a way, I feel like on this trip we were following in the footsteps of James Joyce considering he was a Dublin native that was both in Trieste and Pula.

Next day we arrived in Pula. It is ridden with Austro-Hungarian architecural style, much like Trieste, but there's also a heavy influence from the Roman empire with arches and ruins and a huge free-standing amphitheater. There's also a strong remnant of Yugoslavia that can be felt in the city.

Being an old defensive port of the Austro-Hungarian empire, it has a number of fortresses surrounding it. Sadly, most of them have been left to disarray. The fortress overlooking the city is where the worlds meet. There are ruins of a Roman theater on the slopes of the fortress's hill, and beneath the fortification there is an underground complex, built as a nexus of evacuation routes during WWI. An expo on the old tram system that Pula once had was featured in its cold corridors. Speaking of rails, here's a fun fact: the rail system of Istria, the Croatian peninsula where Pula is located, is not connected with the one of the rest of the country.


/media/images/pula.jpg

Pula has a great coastline, albeit a bit cold water for our taste and its very near the Brijuni national park where the Non Aligned Movement was founded by Tito, Nasser and Nehru. It held a great relevancy during the Cold War, being a balance between the east and the west and is second only to United Nations in terms of member countries. That a lot of people are not aware of it illustrates well how propaganda prefers simplistic polarized narratives, omitting historical complexity.

I digress. Moving away from the geopolitics, we left Pula after four days on a bus and headed for Krk to meet with our friends who recently had a baby. The island of Krk, and the town of Krk in it, is very touristy. Sure, there are things to see, but most of it is catering to tourists. This part of the vacation was mostly chilling on the beach. We filled up our itineraries in Venice and Pula like there would be no tomorrow so it was nice to not do much.

After four nights, we left the coastline and headed to Slavonija via Zagreb. Several buses later, we were pretty scared and bought antigen tests. Vaccine breakthrough is real and we wanted to test ourselves just in case. We didn't contract anything during our travel so it was safe for us to see other people. The rest of the vacation was a workation. Seeing folks, going down the memory lane, crashing our drone three times, getting a new ID, injuring my back while carrying appliances. You know, the usual.

We attended Vesna's cousin's wedding. There was an MD present so everyone had to provide the proof of vaccination or take the test. Luckily, no people were infected, buy I have to point out that it was still scary to be there and not know if there's a disease present in spite of being vaccinated. Vaccination is not 100% effective.

There's a number of small spots along the way we visited, but I didn't want to go into details with an already big article.

We saw some friends in Zagreb where we lived for eleven years. Some connections remain and some even got reinforced by regular video calls. It was a good year for online D&D. Between Slavonija and Zagreb, buses are faster than trains, but are much more lax with respect to epidemiological guidelines.

We boarded the plane on a rainy Thursday and went back to Dublin via Frankfurt. Next big trip might be the US because Croatia entered the US Visa Waiver program. The work will require me to go there and I won't need to get a visa for it starting December. Onward to new experiences.

Home Automation Redux

Thinking how Home Assistant has REST integration to enable it to interact with various services online, BOINC came to mind, but, to my disappointment, it does not really serve the info from a single point via REST. There are services that parse public data but they should not be scraped and don't provide an API. I had to resort to parsing XML instead from two endpoints that I'm a part of to get the proper data. I also had to do some manual calculation in the template, but it works. My instance now has a card that updates daily and shows my BOINC status.


/media/images/boinc_home_assistant.png

But, then again, Home Assistant supports multiple cards, right, so I went wild a bit with it:

  1. a picture-glance card to show the photo of the kitchen in two states. Are the lights on or off?
  2. streaming web camera in the room to see the state, also with a picture-glance. This is not always on. I was just playing with it to see if it can be done (it can - I did it with a mjpeg integration)
  3. a picture-elements card with a floor plan

1 and 2 are pretty easy to set up according to the instructions, but the mjpeg integration takes a bit more work. I tried using the webcamera on Windows as my source for the streaming video. What I did was install cam2ip with CV on Windows. It can connect to the camera, but the window is always present to keep the server going. I minimized it to tray with another piece of software called RBTray and put everything in start-up. There's still some manual work but it's not as annoying. The rest is setting up the camera integration with mjpeg platform in the Home Assistant and binding it to the picture-glance card. While mentioning Windows augmentations, you might want to check out Power Toys from Microsoft itself. It's also very good. I used it to quickly grab some color samples from images of the apartment.

Onto number 3. The most powerful card of the visual bunch is picture-elements. Some people use just that one to set everything up and remove other cards to have their Home Assistant interface use only that. Whatever the case, setting up picture-elements takes a lot of work. I use it just as another card in the dashboard because there's currently a whole lot of them. I added all the devices in the house to the device_tracker (wired and wireless networks and Bluetooth) so they would serve as a set of icons on the plan. For the ones that had the integration, I used the proper device instead. I did toy with the alternate image states for the devices, but in the end went with the icons. Nevertheless, the option is there. I might return to it if the current looks annoy me.

I initially made the floor plan with Homestyler, but I didn't want to stick with it. I could not save things without an account and it has only the imperial units for dimensions so I switched to Sweet Home 3D, a desktop version and redrew everything. Textures and colors for the walls and furniture I made by taking photos around the apartment. I used PowerToys mentioned above to sample colors quickly. Now it's a fancy card that shows our household and the states of things inside. The apartment file should be useful in case we decide to move out and want to show the dimensions to other folks.

As for the other automations, I played a bit with lighting where the color would shift throughout the day to be easy on the eyes. There are three temperature options on the cheap IKEA bulbs so I bound them to three times a day to change the temperature. It has issues so I'm not really pleased with it at the moment because it's sketchy. What was to be simple "Turn on the lights, change the color, turn it off" turned into adding delays, special cases for the specific lights and it still managed to work half the time.

Mortgage Redemption

So we bought an apartment in Dublin. That is a fairly old piece of news. Just recently (mid last month) we paid off the mortgage so the place is finally fully ours. There was some more work involved in paying it off sooner than the expiry of the loan.

When we felt we were ready, we contacted our solicitor's office and indeed there were a few bits and pieces left to complete: signing our home declaration and confirming we were married. The office dealt with it very promptly. What was left then was actually clearing the mortgage.

The last month we got our financial picture complete so we went to the bank, consolidated our accounts, added what little was left from the bank of mom and dad (essentially getting rid of the cash on our hands) and poured everything into repaying the loan. In the process leaving just enough for us to live till the next paycheck, but we knew we would recover quickly.

It was difficult to find information on what was involved in closing a mortgage because all the banks are about opening them instead. Customer support on Twitter was unsurprisingly useless. All we got from them was a number to call which we already had. One phone call later and what we got, among other things, was that the whole process was called mortgage redemption (which is a phrase to look up online). After we gave them enough info, they sent us a letter few days later with the official sum we owed at the time (which we already knew from the online mortgage account), what the interest per day was since the day the letter was issued (so already the official sum was behind) and the closing fee (60€).

With that letter we went to the bank and, while the staff was patient and helpful, in the end it came down to manually calculating the real amount as we had to take that daily interest into account. There was some overall confusion on how to approach it and the bank had to call their own support to ask for clarification. It's not every day that someone comes to redeem a mortgage.

We were told that whatever we overpaid, the bank would give back to us, but that was a slight problem. We didn't have enough for the next rate so if there was an automatic attempt to deduct it from our account it would have bounced. We canceled the direct debit and hoped for the best. Everything was in order in the end.

It took a few days for the paid amount to be processed, we got refunded a few cents and eventually they closed the mortgage account, which disappeared from our app. A few more days later, another letter appeared in the mailbox with a confirmation that everything was OK and reiterating what they did.

We were also told we would be informed when the deeds were ready, but this notice wasn't coming so we sent them an email. Apparently, they had arrived just the day before and were ready for pickup. This was a few days ago before writing this, and, aside from canceling or changing life insurance, the last piece of the puzzle.

"We're gonna frame them!" turned into "Nope" very fast. It was around 3 kg of paper that we will keep somewhere safe instead.


/media/images/mortgage_redemption.jpg

What happened is that because of the pandemic, we saved some money faster. We didn't go anywhere so that was a big plus, but we were still equipping the apartment, so a minuscule minus. I still remember sleeping on the floor for some weeks, and then on the couch for some more months until the bed arrived. It was a journey well worth the wait. Still some things missing, but we're getting there. Just last month we got the lights installed in our storage room. Something we were missing and had to illuminate the place with the torches when we were taking out things.

Usually people have a nice party, but we made a nice meal and had it on the balcony with a glass of wine overlooking the trees across the street with our weak morning glory flowering above us. Idyllic setting comes and goes with the weather here. Not like we wouldn't have done it otherwise, but I guess it called for a celebration.

With variants all over the place, we're still staying put. At least for a bit more.

Home Assistant Icecast Radio Alarm and Syncthing

Usually when you listen to a radio online, chances are that the stream is coming from the Icecast server. Icecast is an open source project and I've set it up to run on our Raspberry PI in a Docker container.

To generate the music for the Icecast, I use Liquidsoap (also in a separate Docker container like Icecast) and it takes files from a certain folder on the external drive (passing it in the container as a volume via host folder).

The inspiration partially came from Silent Protest talk and then their repo containing Docker images.

Some music is not available on Spotify so I resort to this method as well. Just like the Spotify alarm was set up, the automation for this is done in the Home Assistant in a similar way, but much simpler. You need to call media_player.play_media service and give it the target of the speakers with the source being that music stream from Icecast. It's bound to the local network as well because I am not comfortable exposing the service to the world.

Now here's the kicker. That same folder that is the music source for the Icecast stream is synced among other PCs in the household using Syncthing (also in a separate Docker container). This means we can update the folder with new files and Liquidsoap's configuration periodically scans the changes in the folder and updates the streaming playlist. This is the reload parameter from the Liquidsoap cookbook. I am really happy with how it's all brought together.

Syncthing pierces the local network. It also creates a mesh from the connected instances. I use it to back-up my database on the external server and replicate the file among other synced devices. It involves some terminal commands and an edit of the crontab, as well as having a .pgpass file ready to execute the pg_dump command without a prompt. Remember to have that file owned by the user executing the commands and that the permissions are 600.

# have this in the crontab, for instance as a daily job
# this dumps Postgres database to a certain file with
# a timestamp as a part of the filename, Windows compatible
pg_dump -U {db-user} {db-name} -f /folder/for/syncthing/Sync/{project-name}_`date +\%Y-\%m-\%d_\%H-\%M-\%S`.sql
# to restore, use: $ psql -U {db-user} {db-name} < {dump-filename-from-above}.sql

# to remove backups, also a daily cron job
# this lists all the files in the folder, then
# filters out first 13 entries and
# removes them from the system
ls -t /folder/for/syncthing/Sync/*.sql | sed -e '1,13d' | xargs -d '\n' rm

Because I have an external drive locally and a big enough one on the network, I can sync between devices, cheaply backing-up photos and videos. When I take photos with the GoPro, I move them from the device to the cell phone app and then to the phone system. It ends up in the same folder ready for syncing, courtesy of Syncthing for Android. For now it only backs up the photos of the local parks and scenic spots. It can be sunny here. It's summer after all. We'll make use of this functionality even more once the pandemic passes.

Aside from the alarm radio in the Home Assistant, I also added a Syncthing card in it, using REST integration to say what the usage of it is. That works well, too, and it expands my Home Assistant dashboard with a new functionality. I shamelessly copied the instructions from the community forums.

We Don't Have a Rudder But We Have a Sail

There's still some momentum. In relation to the previous post, I'm continuing the foray into the apartment becoming a proper livable/workable place. I had fun again although we're still at the mercy of the great context we're in. That context has improved somewhat, though. Now the country allows us to move around it, but nothing's working and we still haven't gotten our jabs. Nevertheless, we're biding our time and doing things at home.

The curtain annoyed me for a time. It's a vertical blind that you have to pull two strings to get open. One is changing the angle of the vertical strips that make it up, the other is moving the strips to the side. I think it's a fairly standard one when it comes to vertical blinds. The blinds reach all the way to the floor.


/media/images/vertical-blinds.jpg

I spent some time researching the options to make it automated so I didn't need to pull the strings. Unfortunately, there's no one device for automating it. The most frequent is Aqara curtain controller usually coming from Xiaomi, but that one doesn't fit my use-case. The only option I could find that would do it was two devices, one for each string, coming from Zemismart. I opted for only one at this time to see if it would work. It took some weeks to arrive.

The problem is that during some of the weekday mornings, the robotic vacuum goes around the apartment and it needs to have the space cleared so it can do its thing. We do a little dance. The apartment comes to life and while the vacuum is going around the rooms, we're opening the curtains and moving chairs around. I thought that it would be great if the curtain could unroll in the morning before the robotic vacuum started its routine. I cannot do anything about the chairs except leave them as they are, but at least some of the manual work would be eliminated.

So on to the Zemismart. Assembling it was not a pain, but setting it up to join the Zigbee mesh was. Especially since the instructions are weird. Fortunately, it can (and does) work with an unbeaded cord and is strong enough to pull the curtains we have. The only trick is the tension of the string so I played with it a bit to get it right. I used double sided tape to stick it to the window frame, but it kept falling off as the tension of the string needed to be adjusted. Nevertheless, it enabled me to figure out where I needed to screw in the device's plate to maintain the right tension. Picking the right cog, charging and installing it in place turned out to be the easy part.

Getting the motor to turn on, to have it spin in the right direction, to set the limits for where the start, middle and end are, as well as connect it to the Zigbee mesh can bring about some trouble. It took some research to figure out what each thing was supposed to do. Motor off and on is mostly for safety reasons. Direction is for which way you want the mechanism to spin and it should work at the default, but you can override it. Think what up and down buttons mean to set the direction right. Limits are self-explanatory, but they're both using the same button to set (except the middle). Having it in pair mode is not difficult to engage, but the software support is patchy at best.

I have a Conbee 2 gateway for Zigbee coming from Phoscon. It usually comes with the computer app, but the app couldn't find the motor. What furter complicates things, over there everything is treated like a light instead of a device. In the end I didn't need the app and decided to remove it. After all, Conbee 2 is a Zigbee radio and can work with any library that is willing to support it. This proved great because Home Assistant has an integration with the Conbee 2 stick via zigpy library which is more up to date than the official app. I needed to expose the device path on Linux to the Docker instance of the Home Assistant.

This enabled me to have the device join the mesh with the controls and all, but the way this thing was made, there are hacks set up in place just to make it work. Luckily, they're setting it up in the library so I will avail of the new functionality. For now I can say that the device is at least connected to the mesh and it can be triggered by remote controller buttons, but rudimentary controls from the Home Assistant also work, like calling the services directly instead of using the controls in the card and instead of "close" or "open", it goes to the next limit. That's why my automation is doing "set_cover_position" instead.

I am tempted to get another one to control the angles of the blinds. I know it will be a pain to control two motors to get the natural light, but it's better than running to the living room to open the curtains.

Now, if only I could figure out what to do with the one in the bedroom...