Skip to content

GitHub Actions: Node.js 12 actions are deprecated

If you use GitHub Actions to run Workflows and tests, you might have spotted this warning recently:

Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout@v2

This warning means that GitHub will deprecate a certain action, which checks out the repository into the runner. This is going on since early 2022 and by summer 2023 they plan to upgrade all actions to v16.

 

Continue reading "GitHub Actions: Node.js 12 actions are deprecated"

GitHub Actions: The `set-output` command is deprecated and will be disabled soon

If you use GitHub Actions to run Workflows and tests, you might have spotted this warning recently:

The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

This warning means that GitHub will deprecate a certain syntax which populates variables, and disables it by end of May 2023.

 

Continue reading "GitHub Actions: The `set-output` command is deprecated and will be disabled soon"

Install Firefox PPA version over Snap version

It was time to update my laptop, and I already knew that the update will bring Snap, and installs the Snap Firefox version. Along with many known problems. Previously the laptop was on 20.04 LTS, but this version is about to loose support.

I ran through the upgrade, and then added an Ansible Playbook to handle the Firefox installation, remove the Snap version and install the PPA version. Most of my laptop configuration is handled using Ansible Playbooks.

 

 

Continue reading "Install Firefox PPA version over Snap version"

Connect a Mac to a SMB server - as Guest

One of the things I do in our network is public drives. Every Linux system has a public "incoming" which is mapped to the primary user of the device (if there is one, like for a laptop). And this incoming shared drive can be accessed without password.

This makes it really convenient to copy files around from one laptop/user to another, or from mobile devices to laptops and vice versa, or use the printer/scanner to send the scan job directly to the laptop of the user's device. All in all, the users like this, and use it a lot. There is also minimal protection built-in, it will only work in our home network, access is blocked when the laptop is connected to a different network. But the folders are mostly empty anyway. For sharing files over the Internet we also have a Syncthing instance running, but that's a different story, and not as easy to use.

One thing which I was annoyed about is that by default a Mac will try to connect as a registered user. There is an option "Connect as Guest", but it's not pre-selected. Therefore every time I wanted to share something between Linux and Mac, I had to start "Finder", to to "Go" and then "Connect to Server", then click on the server from the list of last entries, and then also click on "Guest". The built-in help is also not useful, as it only talks about "click on Guest".

But it turns out that one can "pre-select" the Guest user. For this, the username is "Guest", and there is no password. This goes between the protocol and the hostname. Example:

smb://192.168.0.20/incoming

becomes:

smb://Guest:@192.168.0.20/incoming

There has to be a ":" between the username and the (non-existent) password, and the credentials are separated from the hostname by a "@". Using this connect string will auto-connect as anonymous user to the remote share. One click and a couple seconds saved!

Continue reading "Connect a Mac to a SMB server - as Guest"

Add a Google Calendar to openHAB

openHAB can integrate Google Calendars. The functionality is kind of limited, it can only see the current and the next calendar event, but in my case that is enough. More about the use case in another blog post.

There are three different calendar bindings available, let's have a quick look:

  • CalDAV Personal Binding: this is a v1 binding, which means it will no longer work in the soon-to-be-released openHAB v3. Apparently this works with Google calendars, but has performance issues. It can show the current and next event.
  • Google Calendar Scheduler: also a v1 binding. Needs more work for presense simulation, and additional bindings.
  • iCalendar Binding: v2 binding, should work with v3. It can show the current and next event. That's the one I'm going to use.

 

Continue reading "Add a Google Calendar to openHAB"

git pre-commit Hooks

A very common use case for hooks in git is a "pre-commit" hook. This hook is used to verify the to-be-committed data before it is added to the repository.

One important note: hooks are not part of the repository itself. Everyone can install a hook on it's own checkout of a repository, but by default the hook is not there when you clone/checkout the repository. This avoids security problems by executing arbitrary code during "git commit", or any "git" operation.
Because of this implication it is common that developers install a hook from somewhere in the repository into the ".git/hooks" directory. And in addition, the server side (the repository) can run the same checks during "git push", to enforce the rules.

Hooks in git work in a simple way: whatever program or script is run as the hook has to set a return code. If the return code is "0", git proceeds. If it's not "0", git aborts the operation.

 

Continue reading "git pre-commit Hooks"

Text-to-Speech in openHAB

In my ongoing endeavor to improve our home, a while ago I added a notification when the washing machine and the dryer are finished. The notification is send to a Telegram channel. Over the summer vacation I added a number new ChromeCast Audio devices (Google no longer offers the Audio CC, if you need one get one now). One is placed in the kitchen. Not only can I listen to music while eating breakfast, I can also output notifications, by using the CC as an audio sink in openHAB.

To make that useful, I decided to use a Text-to-Speech system. openHAB offers a couple different TTS systems, however most of them need a cloud integration, and therefore a working Internet connection. The "Pico TTS" works standalone, and was my favorite choice for this implementation.

 

Continue reading "Text-to-Speech in openHAB"

openHAB and Tankerkönig gas prices + Telegram integration - Second iteration

In my previous blog post about "Tankerkönig" I explained the details of how to integrate this binding into openHAB and provide a Telegram interface.

Someone on the openHAB community forum pointed out that Telegram bots allow queries, where one can present the user with options, and the user only has to click on one of the options. That makes it easier to use, and less typing is required as well. I went ahead and implemented that.

 

 

Continue reading "openHAB and Tankerkönig gas prices + Telegram integration - Second iteration"

Install openHABian image on Linux

My plan is to reinstall openHABian on a bigger SDcard, and on a Raspberry Pi 4. The latest release (v1.5) supports the new Pi 4, and I decided it's time to do a fresh install, and see if all my Playbooks are still working.

Raspberry Pi 4 with Sectronics Armor (cooling) Case

As always, I'm searching my shell history for the right command how to install the image ... but came up empty.

 

Continue reading "Install openHABian image on Linux"