Skip to content

Instantly share code, notes, and snippets.

@ethaniel
ethaniel / readme.md
Last active March 26, 2024 18:14
Hikvision NVR updates camera settings (SVC, Framerate) automatically.

If you don't want this, then enable ONVIF on every camera in the settings (add a new ONVIF user with the privilege "Media operator"), and then change the protocol to ONVIF on the NVR side.

@ethaniel
ethaniel / sms-to-telegram.md
Last active April 9, 2024 03:44
HOWTO: Receive SMS via 4G/LTE Huawei stick on Raspberry Pi 4 and forward them via Telegram

HOWTO: Receive SMS via 4G/LTE Huawei stick on Raspberry Pi 4 and forward them via Telegram

I live abroad and have only 1 sim card slot in my phone. It holds the SIM card of the country that I am in right now. But I also have another SIM card from my home country which receives my banking SMS codes. I can't afford to lose the "home" SIM card, so I decided to keep it in my house and forward the SMS messages to my main phone and computer via Telegram (just like Whatsapp, but so much better).

I also made a choice to use a 4G/LTE stick instead of 3G, because the 3G signal in my area is getting worse in worse due to operators upgrading their equipment.

Prerequisites

  1. Raspberry Pi 4
  2. Huawei E8372 (but can be any similar)

Step 1 - Get the Huawei card to work properly with Raspberry

@ethaniel
ethaniel / readme.md
Last active April 25, 2024 16:23
How to setup a Nordvpn client inside a docker container, running on a Raspberry Pi, and then route some computers on the local network through it

Intro

I live in Thailand. Sometimes my internet connection is slow, because my ISP has poor international connectivity with some destinations (Europe, for instance). Sometimes routes that the ISP chooses have a lot of packet losses, or just slow. I needed a way to route SOME of the devices on my LAN another way. I decided to use NordVPN because they have a lot of servers worldwide and my ISP provides a reliable route to SOME of them (I use docker run -it trishmapow/nordvpn-tools FR --load 30 --fping | awk '{ print $NF,$0 }' | sort -k1,1 -n | cut -f2- -d' ' | head -n 10 to find the best servers with the lowest ping for instance). However, I didn't want to deal with installing a VPN client on every device, so I decided to make one inside my Raspberry (but without having the Raspberry use the VPN connection itself, because I have other services running on it).

You will need

  1. Raspberry Pi wired by LAN cable
  2. Through raspi-config go to Advanced options - Network Interface Names - choose No to