Cage Chromium Kiosk

Running chromium in kiosk mode on a rpi. Notes Append wayland=on /boot/firmware/cmdline.txt cage -d -- chromium --enable-features=UseOzonePlatform --ozone-platform=wayland --kiosk https://example.com cage -d – cog URL works apt install cage cog seatd xwayland

March 21, 2024

Local Mail Server

Local catch mail Name Link Notes smtp4dev Github page Active development ( 41 Issues ) mailhog Github page Less development (215 Issues) Docker compose smtp4dev services: smtp4dev: image: rnwood/smtp4dev:v3 restart: always ports: # Change the number before : to the port the web interface should be accessible on - "5000:80" # Change the number before : to the port the SMTP server should be accessible on - "25:25" # Change the number before : to the port the IMAP server should be accessible on - "143:143" volumes: # This is where smtp4dev stores the database.. - smtp4dev-data:/smtp4dev environment: # Uncomment to customise these settings #Specifies the virtual path from web server root where SMTP4DEV web interface will be hosted. e.g. "/" or "/smtp4dev" #- ServerOptions__BasePath=/smtp4dev #Specifies the server hostname. Used in auto-generated TLS certificate if enabled. - ServerOptions__HostName=smtp4dev #Locks settings from being changed by user via web interface #- ServerOptions__LockSettings=true #Specifies the path where the database will be stored relative to APPDATA env var on Windows or XDG_CONFIG_HOME on non-Windows. Specify "" to use an in memory database. #- ServerOptions__Database=database.db #Specifies the number of messages to keep #- ServerOptions__NumberOfMessagesToKeep=100 #Specifies the number of sessions to keep #- ServerOptions__NumberOfSessionsToKeep=100 #Specifies the TLS mode to use. None=Off. StartTls=On demand if client supports STARTTLS. ImplicitTls=TLS as soon as connection is established. #- ServerOptions__TlsMode=None #Specifies the TLS certificate to use if TLS is enabled/requested. Specify "" to use an auto-generated self-signed certificate (then see console output on first startup) #- ServerOptions__TlsCertificate= #Sets the name of the SMTP server that will be used to relay messages or "" if messages should not be relayed #- RelayOptions__SmtpServer= #Sets the port number for the SMTP server used to relay messages. #- RelayOptions__SmtpPort=25 #Specifies a comma separated list of recipient addresses for which messages will be relayed. An empty list means that no messages are relayed. #- RelayOptions__AllowedEmailsString= #Specifies the address used in MAIL FROM when relaying messages. (Sender address in message headers is left unmodified). The sender of each message is used if not specified. #- RelayOptions__SenderAddress= #The username for the SMTP server used to relay messages. If "" no authentication is attempted. #- RelayOptions__Login= #The password for the SMTP server used to relay messages #- RelayOptions__Password= #Specifies the port the IMAP server will listen on - allows standard email clients to view/retrieve messages #"ServerOptions__ImapPort"=143 volumes: smtp4dev-data:

March 9, 2024

Proxmox

Notes after migrating from VmWare to Proxmox LXC By default LXC containers use the hosts resolv.conf file to manage DNS settings. However I like my containers to receive DNS settings from DHCP. touch /etc/.pve-ignore.resolv.conf

January 26, 2024

Random growlight and irrigation notes

Random notes when looking for an irrigation system based on ESP32 on arduino or esphome platform Growlight: AliExpress growlight - Not tested Soil sensors: xiaomi miflora b-parasite - diy sensor Soil Moisture Sensor Kit 10 PCS Capacitive Soil Moisture Sensor NOTE: Some of these has problem with GND not connected to signal, use 1M resistor to fix. I connected the resistor on the backside of the board. Capacitive sensors is a must according to several sources on internet, resistive is guaranteed to fail. It’s like removing rust with electrolysis. Stores https://no.farnell.com/ https://no.farnell.com/b/seeed-studio Searchterms in norwegian: vekstlys jordsensor

October 10, 2023

Yocto

Some useful bitbake commands Clean the image or a particular recipe bitbake -c clean image | recipe Clean everything, including sstate_cache bitbake -c cleanall Download all required files first, then build bitbake --runonly fetch core-image-base && \ bitbake core-image-base KAS Earlier I used to create a git repo with all the layers as submodules. This was easy to maintain as long as the submodules used the official named branches (mickledore, scarthgap …). Most of the meta-layers used the release codenames, but qt6 was one of the exceptions. ...

October 9, 2023

Upgrade slaesh zigbee firmware

About the stick https://slae.sh/projects/cc2652/ Koenkk firmware files https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/ CC2652RB ZigBee OpenThread Upgrade slae.sh firmware on Linux Take a screenshot or write down the devices in z2m/zha. Stop z2m service in HA Disconnect from host Plug into linux host Locate serial interface: ls -al /dev/usb/by-id/usb-Silicon* export ZIGDEVICE=/dev/serial/by-id/usb-Silicon_Labs_slae.sh_cc2652rb_stick_-_slaesh_s_iot_stuff_11_22_33_44_55_66_77_88-if00-port0 mkdir zigbee-upgrade && cd zigbee-upgrade python3 -m venv --upgrade-deps venv && source ./venv/bin/activate pip install pyserial intelhex zigpy-znp wget https://raw.githubusercontent.com/JelmerT/cc2538-bsl/master/cc2538-bsl.py chmod +x cc2538-bsl.py wget https://github.com/Koenkk/Z-Stack-firmware/raw/master/coordinator/Z-Stack_3.x.0/bin/CC2652RB_coordinator_20220219.zip unzip CC2652RB_coordinator_20220219.zip rm CC2652RB_coordinator_20220219.zip # Backup nvram python -m zigpy_znp.tools.nvram_read -o nvram.json $ZIGDEVICE ./cc2538-bsl.py -p $ZIGDEVICE -evw CC2652RB_coordinator_20220219.hex python -m zigpy_znp.tools.nvram_write -i nvram.json $ZIGDEVICE

January 1, 2023

Unifi - 101

Find the AP through ARP on GW. SSH into it via admin user. set-default Wait for AP to renew IP address (Most likely the same). Log into switch show lldp nei (detail) Compare name and MAC

January 1, 2020

Clipping magic - Remove background from image

Hvem trenger Adobe CS eller Gimp for slike enkle oppgaver. Når Clipping Magic gjør det så enkelt.

January 1, 2018

Subdomain on one.com

Steps to activate a subdomain Log in via ssh - ssh example.com@ssh.example.com Change directory to /var/www - cd /var/www Make a subdirectory called subdomain. mkdir subdomain Add a CNAME record to DNS with subdomain.example.com and example.com as value. The subdomain will be accessible within a few minutes.

January 1, 2016

Linux 101

Mount cifs/smb: mount -t cifs //server/share/subdir_if_wanted /mnt/mountpoint -o domain=DOMAIN,username=USERNAME,password=PASSWORD Suppress application feedback: /usr/bin/application >/dev/null 2>&1 MO/PO - Localization apt-get install gettext Generate machine readable: msgfmt pofile.po -o mofile.mo You can also dump mo content to stdout. msgfmt pofil.po -o -

January 1, 2013