Homelab, Linux, JS & ABAP (~˘▾˘)~

[SAPUI5] Suppress default oData error message / display meaningful error messages

Create a separate ErrorHandler.js file, like it is described here and either do your own error handler implementation, or take the sample from here. To avoid displaying multiple errors at once, follow this chapter.

Thanks to the provided dsag sample, this is takes only a few minutes and improves the user experience a lot!

[Mint] Transmission Remote GUI: download directory path is not absolute

Every few months, I run into this issue when adding a torrent to transgui:

Although there is a 5-year-old closed issue on this bug, which also led to a code adjustment, this bug still seems to exist:
The user Kethsar has probably already found the right cause and gives some hints on how to solve it. At least it helped me to find a workaround:

  • close transgui if it’s running, otherwise your changes will get overwritten again
  • nano ~/.config/Transmission\ Remote\ GUI/transgui.ini
  • search for the [AddTorrent.transmission]section
  • remove some entries which a related, e.g.


  • save & quit nano
  • start trangui again and try to add a torrent again

It seems like the issues occurs, when the [AddTorrent.transmission] section reaches Folder50.

[Home Assistant] Mushroom Template card – Badge Icon

Somehow, I’ve only just realized that a badge icon can be used to display another entity status on a template card, even though it’s written in the documentation. I now use it to display the status of presence or motion sensors in the respective rooms.

badge_icon: >-
  {{ "mdi:motion-sensor" if states("binary_sensor.0xb4e3f9fffeb689d4_occupancy")  == "on" }}
badge_color: >- 
  {{ "green" if states("binary_sensor.0xb4e3f9fffeb689d4_occupancy") == "on" }}

[ABAP] xsdbool

Somehow I always forget that there is a boolean function in ABAP. That’s why I’m writing this post to hopefully remember it better. 🙂

If you just want to check something for truthiness, you can do it in the following three ways:

IF sy-subrc = 0.
  result = abap_true.
  result = abap_false.
result = SWITCH #( sy-subrc WHEN 0 THEN abap_true
                                   ELSE abap_false ).
result = xsdbool( sy-subrc = 0 )

[nodejs] Merge PDFs using pdf-lib

const { PDFDocument } = require('pdf-lib')

// files = [{ fileName: 'test1.pdf, content: arraybuffer },{ fileName: 'test2.pdf, content: arraybuffer }]

mergePdfs: async function (files) {
        try {
            const mergedPdf = await PDFDocument.create()

            for (let file of files) {
                const pdf = await PDFDocument.load(file.content)
                const copiedPages = await mergedPdf.copyPages(pdf, pdf.getPageIndices())
                copiedPages.forEach((page) => mergedPdf.addPage(page))

            const mergedPdfFile = await
            const buffer = Buffer.from(mergedPdfFile)
            return await buffer.toString('base64') // return as buffer or base64 encoded file
        } catch (err) {

[Home Assistant] Confirmation dialog

Just noticed that you can add a confirmation dialog on a tab action.

Very helpful to prevent things from being activated by mistake.

type: entity
entity: input_boolean.sleep_status
  action: toggle
    text: Activate sleep mode?
icon: mdi:sleep
icon_color: indigo