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

[Home Assistant] Update firmware on Sonoff Zigbee USB Dongle-P

First, confirm that you have a Sonoff Zigbee 3.0 USB Dongle Plus. Go to Settings → Hardware → All Hardware → Search for Zigbee

Check your current firmware version:

Important: Stop Zigbee2Mqtt before flashing, as described in the docs!

Now let’s add the ZigStar repository: Settings → Add-ons → Add-on Store → Three dots → Repositories → Add https://github.com/mercenaruss/zigstar_addons

After that, install the Add-on for Texas Instruments CC2652P7 based radios.

Copy the firmware link from here: https://www.zigbee2mqtt.io/guide/adapters/

Got to the Configuration of the installed ZigStar Add-on and paste the firmware link and select the two radio buttons like bellow.

If you receive an error when saving the configuration, simply add 127.0.0.1 as Network Device and save again.

If the Configuration is successfully saved, start the Add-on and flashing will start immediately.

Switch to the Log tab and hit refresh until you see the “successfully stopped” message.

Now you can stop the ZigStar Add-on and start Zigbee2Mqtt again and check your new installed version.

Done.

[SAPUI5] Add custom header parameter to all oData queries

Simply go to your Component.js file and add this line to the init function:

this.getModel().setHeaders({"myCustomParameter": "test"})

In a CAP Backend, you get this parameter from the express req object, which can be accessed via the req.http property:

req.http.req.headers['myCustomParameter']

And here is a nice code snippet, on how to read this header parameter in an ABAP system: https://answers.sap.com/answers/425621/view.html

[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: https://github.com/transmission-remote-gui/transgui/issues/1270
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.
Folder1=/my/path/1
FolHit1=1
FolExt1=
LastDt1=18.02.2024

Folder2=/my/path/2
FolHit2=3
FolExt2=
LastDt2=18.02.2024

...
  • 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" }}