nocin.eu

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

[Home Assistant] Zigbee Devices I use in my Smarthome

This is just a personal list of Zigbee devices I use at home. The list is sorted in the order in which I bought the devices. You can tell this by the fact that I paid way too much for the first few devices before I got into the “AliExpress” game. 🙂

Helpful databases:
https://www.zigbee2mqtt.io/supported-devices
https://zigbee.blakadder.com/

ManufacturerModelTypeZ2MParingBattery/PoweringBest price I got it forComment
BlitzwolfBW-SHP13 Smart SocketPlug (incl. power measurement)#Pair this device with a long press (5 seconds) on the on/off button230v9,45€
BlitzwolfBW-SHP15 Smart SocketPlug (incl. power measurement)#Pair this device with a long press (5 seconds) on the on/off button230v8,98€
GermaPlugPlugPair this device with a long press (5 seconds) on the on/off button230v8,97€
Ikea TRÅDFRI MotionMotion sensor#Press pairing button 4 times2xCR20329,99€
Ikea TRÅDFRI RepeaterSignal Repeater#Push the reset button of the device with a paperclip for 5 seconds230v
Ikea TRÅDFRI LEDLED bulb E27#230v
IkeaTRÅDFRI Wireless dimmerDimmer / switchI’ve actually never used it.
IkeaTRÅDFRI SteckdosePlug#Press and hold the reset button until the white light starts fading230vFrom my eight devices, one already died.
IkeaBADRINGWater Leakage Sensor#Press the pairing button 4 times within 5 seconds1xAAA
IkeaE1743Dimmer / switch#Press the pairing button 4 times1xCR2032I’ve actually never used it.
Müller-LichttintLED bulb E14230v15,00€
Xiaomi MijiaGZCGQ01LMLight sensor11,75€Had no real use case for the device so far.
AqaraMCCGQ11LMContact sensor#Press and hold the reset button on the device for +- 5 seconds (until the blue light starts blinking).1xCR16328,56€Somehow, this device loses the connection to my Zigbee network every few months, and reconnection always causes problems.
AqaraWSDCGQ11LMTemperature and humidity sensor#Press and hold the reset button on the device for +- 5 seconds (when the blue blinks, immediately release the button for pairing to start).1xCR203213,93€Somehow, this device loses the connection to my Zigbee network every few months, and reconnection always causes problems.
AqaraSSM-U01Single Switch Module T1 (with neutral)#Press button on device for 8 seconds, or toggle external switch 5 times (if it does not work, continue toggling the switch).230v24,00€Supports rocker switch (bistable / Wippschalter) or rebound switch (monostable / Wipptaster). Switch mode can be changed via Zigbee2MQTT.
FAQ. Manual.
Ledvance (ex. OSRAM)SMART+ GardenpoleLED Garden lighting#Turn light 5x for 5 sec on and 5 sec off230v34,99€
LedvanceSMART+ BT TIBEA Pendant Tunable WhiteLED Pendant lamp#Turn light 5x for 5 sec on and 5 sec off230v
OSRAM (LIGHTIFY)Classic A60 W clearLED bulb E27Turn light 5x for 3 sec on and 5 sec off230v7,99€These bulbs can lead to problems in the Zigbee network. Cannot find the source anymore, where I’ve read this…
LidlLIVARNO LUX HG06106CLED bulb E27#Check zigbee2mqtt docs230v
LidlSilverCrest HG06335/HG07310Motion sensor#Factory reset the motion detector by holding the reset button (little hole on the right side, not the button on the back) for 5 seconds.In my experience, I had many issues pairing this device using Zigbee2MQTT. With ZHA it was always working on the first try. Also, it helped to remove the battery before paring.
Very poorly performing motion detector… already replaced it.
LidlLIVARNO Smart Home Outdoor-LED-BandLED Strip#Turn device on/off 3 times230vSome LEDs are not working anymore.
LidlLIVARNO home LED-BandLED Strip#Turn device on/off 3 times230vThe LED controller makes a high-pitched noise, which is super annoying.
After about 3 years, the controller stopped working completely.
PhilipsLWA001LED bulb E27#Only by using the Philips RWL021 remote. Press on & off buttons on the remote for 5 seconds close to the lamp. (#)230v
PhilipsRWL021Dimmer / switch#Factory reset the Hue dimmer switch by pressing and holding the setup button on the back for 10 seconds.CR2450Can also be used to reset Zigbee devices of other brands.(#)
SonoffSNZB-02DTemperature and humidity sensor#Press pairing button for 5 seconds CR245012,62€Somehow, this device loses the connection to my Zigbee network every few months. Check here for troubleshooting. I replaced it with another temp sensor.
SonoffZBMINIL2Smart Switch (no neutral)#Press the pairing button for 5 seconds, until the signal LED flashes slowly.
230v12,28€Supports rocker switch (Wippschalter) and push button (Wipptaster). To change mode, press the pairing button very fast three times (so fast that the relay does not get trigger while doing that) until the green LED flashes 3 times.
ONENUOTH01ZTemperature and humidity sensor#Press pairing button for 5 seconds (review)3xAAA11,13€Somehow, this device loses the connection to my Zigbee network every few months. That’s why I replaced it.
WenzhiWZ-M100-WPresence sensor#Connect via USB cable and press pairing button for 5 seconds5v USB-C11,83€Device is spamming the network with default firmware.
Device also works via ZHA via a custom quirk (see comments here).
There is also a custom firmware, but it cannot be flashed via OTA.
_TZE204_ztc6ggyl
TuyaZG-205Z/APresence sensor#Connect via USB cable and press pairing button for 5 seconds5v USB-C12,22€So far, the only Zigbee presence sensor, that is not spamming.
_TZE200_2aaelwxk
WenzhiMTG275-ZB-RLPresence sensor#Press and hold pairing button for more than 3 seconds230v17,64€Device is spamming the network. Check here.
_TZE204_dtzziy1e
ONENUOTS0207Water leak sensor#Press and hold pairing button until red LED is flashing2xAAA3,79€
eWeLinkSNZB-04Contact sensor#Press and hold the RESET button for 5 seconds till red LED flashes2xAAA2,29€
HEIMANHS1SASmoke detector#Press and hold the RESET button for 2 seconds till Test Button LED flashes green1x CR17335/CR123A15,79€
TuyaPA-44ZSmoke detector#Press and hold test/mute button for 10 seconds till LED flashes quickly1x CR173356,39€Low battery alert: ≤20%
TuyaTS0505B_1LED Ceiling Light#Turn device on/off 3 times230v18,81€The colors have very low brightness, nearly unusable during daytime
AlectoSMART-HEAT10Thermostat#Press 7 times on the display2xAA (1,5V)15,99€The device can be paired, without attaching it to a valve.
Does not provide many entities. Also, very bad battery lifetime.
TuyaSZ-A60-18WLED bulb E27#Turn device on/off 3 times4,39€Brand: Gleco | 500-999 lumen
AVATTOME168Thermostat#Rotate the knob until temperature state is ‘OF’, press and hold the knob for 5 seconds. Wi-Fi icon should flash.2xAA (1,5V)16,70€Set the temperature to maximum (35°C) before installation.
Tuya (Moes)TRV601Thermostat#In manual mode, turn the knob counterclockwise until the screen displays ‘OF’. Press and hold the middle button for 3 seconds until the WI-FI icon flashes.3xAA (1,5V)16,41€I noticed that it helps to re-insert the batteries, if the device won’t pair. Also, it’s important to first attach the thermostat to the valve and run the adapting process first.
This is so far my favorite TRV, as it provides more entities than the other ones.
MoesBHT-002-GAThermostat#Turn thermostat off, press and hold the temperature down button for +- 8 seconds230v28,40€Very positive review, but in my case the device is spaming the zigbee network… And unfortunately, sometimes there a some temperature spikes, which destroy the history graph in HA. This is also mentioned in the comments of the review.
Lucky via this thread, I found a custom firmware that can be flashed via OTA.
TuyaSmart SocketPlug (incl. power measurement)#
Pair this device with a long press (5 seconds) on the on/off button
230v2,93€
TuyaZTH08-ETemperature and humidity sensor#Press and hold the reset button on the device for +- 5 seconds 3xAAA5,86€
TuyaZTH01 Temperature and humidity sensor#Press and hold the reset button on the device for +- 5 seconds (until the network indicator at the top of the display starts blinking).2xAAA2,60€In Zigbee2MQTT, recognized as TS0201
MoesMS-105ZSmart Dimmer#To reset the device you need to have a switch wired between L and S, or short them using a tool like a voltmeter. Press the switch for 10 times, then wait for one second. If successful, you will hear three long beeps followed by a series of short beeps that will continue until the device is paired.
230v8,90€
SonoffZBMINIR2Smart Switch#Press the pairing button for 5 seconds, until the signal LED flashes slowly.230v1,73$
(1,52€)
Tuya (Zemismart)SPM02V2.5Power meter#Press the reset button 3~5 seconds til the LED is quickly flashing400v32,45€Unfortunately device is spamming the network a bit. The report interval can be changed on devices with newer firmware version. My device seems to have an older firmware and update is only possible via official hub…
MoesMoes ZS-EUD_1gangSmart touch dimmer#Press and hold On/Off Button for 5 seconds230v16,01€
eWeLinkSNZB-04_eWeLinkContact sensor#Press reset key for more than 6s until the indicator is flashingCR20232,60€It is labeled C3007 on the box.
Small device, but very bad battery lifetime.
SonoffTRVZBThermostat#Turn the device off and hold down the top button for 3 seconds.
The device must first be attached to the valve.
3xAA12,98€It’s possible to adjust the valve opening and closing degree.
TuyaTH02ZTemperature and humidity sensor#Press paring button (next to the batteries underneath the cover) for 5 seconds2xAAA3,50€It is labeled TH08Z-B on the box
eWeLinkSNZB-02Temperature and humidity sensor#Press and hold the RESET button for 5 seconds till red LED flashes2xAAA2,43€Got paired as SNZB-02, but it does look like a TH02Z
TuyaTS0203 (black)Contact sensor#Press and hold the reset switch on the device, the pinhole on the side of the device, using the provided reset pin for +- 5 seconds2xAAA3,70€It is labeled ZD06 on the manual. The device is working great, but the quality of the case seems to be very low.
TuyaTS0203 (white)Contact sensor#Press and hold the reset switch on the device, the pinhole on the side of the device, using the provided reset pin for +- 5 seconds2xAAA2,31
eWeLinkSNZB-03Water Leakage Sensor#Press and hold the RESET button for 5 seconds till red LED flashes2xAAA3,50€Got paired as SNZB-03 (motion sensor), but does look like an IH-K665. Switch in HA from occupancy to moisture in the device settings.
Tuya809WZTMotion sensor#Use a pin to press and hold the “SET button” of the sensor for 5s until the indicator flashes quickly. (button at the bottom, LED is at the front)2xAAA2,58€
ZbeaconTH01Temperature and humidity sensor#Press and hold the RESET button for 5 seconds till red LED flashes2xAAA2,31€
DycsmYG400ASmoke detector#Press and hold the RESET button for 5 seconds till LED flashes2xAAA5,93€
TuyaTS0603Garage door opener#Press reset key for about 10 seconds until the indicator light flashes quickly230v13,08€
HOBEIANZG-204ZV
Motion & temperature & humidity sensor
#Press and hold the RESET button for 3 seconds till LED flashes2xAAA1.78$
(~1,50€)
  
Device does not work. Motion is detected every few seconds until the battery is empty.
ONENUO (Tuya)ZP01Motion sensor#Press and hold the RESET button for 5 seconds till red LED flashes2xAAA2.58€
HOBEIANZG-102ZMVibration sensor#Press and hold the RESET button for 3 seconds till LED flashes2xAAA2.21$
Telink Semiconductor (Tuya)TS0202Motion sensor#Press and hold the RESET button until LED flashes2xAAA1.86$ (~1,43€)

[FI-TV] My Travel and Expenses for Business Traveler: Change default approver

I was working with the Fiori App My Travel and Expenses for Business Traveler and implemented a new approval workflow. Unlike in the SAP standard workflow, the first approver was not the boss of the employee. The workflow was already working fine, but when sending the travel expense from the Fiori app, it still displayed the boss as approver.

Naturally, the Fiori app does not know anything from the changes on the workflow. So I had to figure out where this approver value comes from and how I could adjust it to match the workflow logic.

I first went to the official documentation to check if there is any BAdI to change/overwrite the approver.

I also checked the note 3260453 – Enablement of Custom Logic for Key User Extensibility option in S/4HANA FIORI app MTE, but it seems like no BAdI was doing the job.

Spoiler: Actually there is a BAdI called FIN_TRV_APPROVER_NAME, but it is not listed here or anywhere else in the documentation. As many times before, incomplete SAP documentation wasted hours of my life…..

Because I could not find a BAdI, I went to the RAP service, to check where the approver is set and if it’s possible to overwrite it in someway.

When clicking the Create and send button in Fiori, a POST request to the endpoint CheckTripAmounts is fired. The response of type cds_ui_travelexpensemanage.TravelExpenseType contains the required value in field TrvlExpnApproverName.

I already knew the corresponding package for RAP-Service.

In package ODATA_TRV_MTE_UI_MANAGE I found the root view entity C_TravelExpense which contained the property TrvlExpnApproverName. Its projection I_TravelExpense was located in package VDM_TRV_MTE_UI_MANAGE. I was already afraid, that the approver is somehow read via some CDS association, but it turned out to be added as empty field and properly therefore is manually filled in some behavior implementation.

cast ( ' ' as vdm_trvlexpnapprovername )                                                                             as TrvlExpnApproverName,

The related behavior implementation was in class CL_BP_I_TRAVELEXPENSE and there I found the CheckTripAmounts method, which matched the POST request I saw in the Dev console. And here I found the following logic.

    DATA l_trvlexpnapprovername TYPE char40.
    cl_trv_business_data_s4=>get_approver( EXPORTING iv_employeenumber = api->get_header( )->get_pernr( )
                                                     io_header = api->get_header(  )
                                           IMPORTING ev_approver_name  = l_trvlexpnapprovername
                                                     et_messages       = lt_return ).

When looking in the get_approver method I found the default approver logic via OM, but also a BAdI call at the end.

    DATA lo_badi TYPE REF TO fin_trv_approver_name.
    TRY.
        GET BADI lo_badi.
        DATA(ls_general_data) = io_header->get_general_data( ).
        CALL BADI lo_badi->change_approver_name
          EXPORTING
            iv_traveller_pernr = iv_employeenumber
            is_general_data    = ls_general_data
          CHANGING
            cv_approver_name   = ev_approver_name
            cv_approver_pernr  = ev_approver_pernr.
      CATCH cx_root.
    ENDTRY.

Turned out, there is BAdI to overwrite the approver, it was just not documented…………………. all other eight BAdI’s are mentionend in the documentation.

[Fiori] Meine Formulare: Entgeltnachweise ausblenden “in Vertretung von” (onBehalf)

Möchte man Führungskräften die Möglichkeit geben, in der MyForms App die Formulare ihrer Mitarbeiter einzusehen, kann dies einfach über den HCMFAB_B_COMMON BAdI in der Methode GET_CONFIGURATION realisiert werden.

      IF iv_application_id = gc_application_id-myhrforms.
        ev_enable_onbehalf = boolc( go_employee_api->is_manager( iv_application_id = iv_application_id
                                                                 iv_pernr          = iv_employee_number ) = abap_true ).
      ENDIF.

Im Standard werden der Zeitnachweis und Entgeltnachweis angezeigt. Möchte man nun für die Führungskraft den Entgeltnachweis ausblenden, kann dies über den BAdI HCMFAB_BI_MYFORMS gemacht werden.

In der Methode GET_HIDE_REM_TIME_STATEMENT kann dies z.B. so realisiert werden.

        ev_hide_rem  = abap_false.
        ev_hide_time = abap_false.

        DATA(ownpernr) = go_employee_api->get_employeenumber_from_user( ).

        IF iv_pernr <> ownpernr.
          ev_hide_rem = abap_true.
        ENDIF.

Die Variable ev_hide_rem verhindert das Hinzufügen des Entgeltnachweises im folgenden, wie ab Zeile 25 zu sehen.

Jedoch ist nach meiner Beobachtung das noch nicht ausreichend, da in der Methode FILL_FORM_TYPES der Entgeltnachweis dann doch wieder hinzugefügt wird.

Daher habe ich den Entgeltnachweis zusätzlich noch in der Methode FILL_FORM_TYPES entfernt.

      DATA(ownpernr) = go_employee_api->get_employeenumber_from_user( ).

      IF iv_pernr <> ownpernr. " Manager dürfen nur Zeitnachweise ihrer Mitarbeiter sehen
        DELETE ct_form_types WHERE form_type <> 'SAP_INT_TIM_STM'.
        RETURN.
      ENDIF.

Die Führungskraft kann nun ausschließlich den Zeitnachweis des Mitarbeiters sehen. Er selbst kann alle Formulare wie gewohnt einsehen.

[Nextcloud] Docker update 31.0.14 to 32.0.12

Since I’ve had so many problems with Nextcloud updates in the past, I’m now sticking with the oldest LTS version for as long as possible and won’t update until it reaches its end of life. This has really improved my Nextcloud experience. The update to major version 32 went smoothly. I only had to run two commands manually afterward.

docker exec --user www-data nextcloud-app php occ db:add-missing-indices
docker exec --user www-data nextcloud-app php occ maintenance:repair --include-expensive

[Firefox] Extensions I use in 2026

About seven years ago, I wrote down the Firefox extensions I was using. I kept the list updated for a while. Looking at the list now, many of these extensions are still relevant to me today. So here’s an updated version.

[Fiori] Meine Formulare: Zeitnachweis Spalten ausblenden

In der Meine Formulare App können über den BAdI HCMFAB_B_MYFORMS ganz einfach Spalten ausgeblendet werden. Dafür eine BAdI Implementierung anlegen und die Methode FILL_FORM_SPECIFIC_FIELDS ausprogrammieren. Zum Entfernen einer Spalte muss diese einfach aus dem CHANGING Parameter ct_form_specific_fields gelöscht werden.

Dabei einfach über den FORM_TYPE auf das entsprechende Formular filtern und die gewünschte Spalte entfernen:

DELETE ct_form_specific_fields WHERE form_type = 'SAP_INT_TIM_STM' AND field_id = 'DEVIATION'.  "Abweichung entfernen

[FI-TV] Overview: Travel Management & My Travel and Expenses for Business Traveler (F6190)

Collection of useful resources, when working with the Fiori App: My Travel and Expenses for Business Traveler (F6190)

SAP Travel Management for SAP S/4HANA

SAP Help Travel Management (FI-TV)
FI-TV transactions
Reports
Tables
Good to Know: SAP Travel Management for SAP S/4HANA

Related notes:
2719018 – S4TWL – SAP Travel Management in SAP S/4HANA Suite 2022

Packet: PTRA_ADDON

My Travel and Expenses for Business Traveler (F6190)

Fiori Reference Library My Travel and Expenses for Business Traveler
SAP Help My Travel and Expenses
App Extensibility: My Travel and Expenses

Related notes:
3267811 – Default Travel Expense Start and End Date and Time settings with Travel Management S/4Hana Fiori application
3591806 – Fiori Apps Travel Management Version 3: Concurrent Employment not available → Helpful Attachment ExtensionTravelProfileVH.pdf
2164524 – Customizing of authorization object P_TRAVL for restricting creating/changing of expense reports
2633200 – Expense reports with and without mandatory travel requests
3406341 – Attachments in S4Hana Fiori apps MTE V3 and MTR V3

Packet: PAOC_TRV_S4

Workflow

Workflow Scenarios in Travel Management (FI-TV)
Approving a Trip
Standard WF for Approving Trips: WS20000040
Travel Management Workflow FAQ, Common Issues, Known Issues

Related notes:
2576990 – Workflow: Status of a trip after reject or send back for correction → Explanation, why the default workflows are a bit “uncomplete”

[YouTube] VacuumTube

I’ve been using my Proxmox HTPC for six years now. All this time, I’ve been watching YouTube via YouTube Leanback in a full-screen Firefox Browser window. This is most of the time working fine, but from time to time you have to change the user-agent if something stops working or the video quality is poor for some reason.

And while I was once again searching for a new user-agent which improves the YouTube Leanback experience, I randomly stumbled on VacuumTube. This was something I always wanted/needed for my HTPC! Using Firefox was working fine, and I could also use all Firefox Extensions that exists for YouTube. But it also has drawbacks, like keyboard shortcuts were not working well (depending on the user-agent used) or, as mentioned already, the video quality is sometimes limited. Therefore, I gave VacuumTube a try and must say, since then it is working perfectly! With version v1.4.0 it even got SponsorBlock integrated! Right now, there is really no feature missing for me.

What I recently found is, that you can save videos to your Watch later playlist without starting to play the actual video. Simply long press the enter key on your keyboard and select “Save to Watch later” on the menu that appears. At least in Firefox, none of the user agents I tested were able to do that. Really cool!

Another handy feature is that you can turn the subtitles on and off using the ‘C’ key.

[Hardware] Firmware Update on my Samsung CHG90 (2017) Monitor

A few years ago, I bought a used Samsung CHG90 (LC49HG90DMUXEN) monitor on eBay. After I got the device, I learned that this model series had a hardware issue (see here or here). Fortunately, the problems only occurred every few weeks. Since some people on Reddit wrote that a firmware update had improved the situation, even though it was a hardware issue, I tried updating the firmware as well. There is a generic update guide from Samsung, but it is not detailed enough to actually do the update…

The required firmware update can be found on the Samsung website under support > user manuals and guide and by searching with the model code: LC49HG90DMUXEN

https://www.samsung.com/de/support/user-manuals-and-guide

Although the latest firmware version is from September 2020, I was able to perform an update because my monitor was still running version 1017.2. The hardest part was figuring out how to find the software updater in the monitor menu, but after a quick search in the documentation, I found the right section. The trick was to open the menu and hold down the arrow key for 5 seconds.

https://downloadcenter.samsung.com/content/UM/202103/20210305193233676/BN46-00699A-Eng.pdf

The update took only a few seconds and completed successfully. Let’s see if this improves anything…