Hauke’s Projects

Playin' around with Electronics and Computers

Python

“Fair Use” Download of Large Vector Maps

With my switch to vector maps, the dramatically reduced storage requirements now allow to have maps for whole countries on my Smartphone. Getting such maps still requires tile downloads, which sum up to millions of web requests and gigabytes of data downloaded. To avoid unfair and excessive load to the map provider web services, and to avoid triggering blocking thresholds, I created a python script that downloads maps at slow rates and puts the downloaded tiles into MBtiles databases. The script is intended to run in the background whenever the computer is on, and over days and weeks download maps. It works through a list of maps to download, and when finished with the last one, it starts with the first one again, updating it. In my case, I installed the script on my media center PC, so whenever a recording runs or I use the PC for watching a show or listening to music, also my maps get an update.

Continue reading ““Fair Use” Download of Large Vector Maps”

Legal EPG Scraper for ARD TV Stations to Use With tvheadend External XMLTV Grabber

I wrote a Python EPG scraper for the EPG data of the German TV stations broadcast by ARD. It is legal for private use. Here I share the code and my thoughts behind it.

Continue reading “Legal EPG Scraper for ARD TV Stations to Use With tvheadend External XMLTV Grabber”

Interfacing EasyMeter Q3M via Info-Interface

The installation of my fuel cell heating required a bi-directional power meter. Bonn Netz, my local power network provider, uses meters of type EasyMeter Q3M which have two infrared interfaces: A bidirectional D0 interface, and a read-only info interface. I use the info interface (INFO-DSS) to read out power consumption and production of the three phases. For this, I built an optical interface, a 3D printed housing for it, and use the UART of a Raspberry Pi with python to get the values.

Continue reading “Interfacing EasyMeter Q3M via Info-Interface”

Motion Sensor PoC: BNO055 and Raspberry Pi Subtleties

The BNO055 is a capable IMU that has on-chip sensor fusion and filtering. Interfacing can be done using I²C and UART. When used with the Raspberry via I²C, you get erroneous measurements because of the I²C clock stretching bug of the Raspberry. Using the UART, results are correct.

Continue reading “Motion Sensor PoC: BNO055 and Raspberry Pi Subtleties”

Scroll to top