zipimport.ZipImportError: can’t decompress data; zlib not available
Requires zlib1g-dev
sudo apt install zlib1g-dev
zipimport.ZipImportError: can’t decompress data; zlib not available
Requires zlib1g-dev
sudo apt install zlib1g-dev
We wanted a way of delivering passive status updates from our dockers to the Icinga2 API. I’ve used bash scripts for this in the past with curl, but figured python would be a better tool to use as it has access to the docker API using the docker module.
Ok, so I wrote some simple code, but do I just stick the .py
files on the servers and let them run like that? That seems a bit raw to me, so how do I package things properly. There are a lot of ways to do it, but I found this article did the job for me.
https://medium.com/nerd-for-tech/how-to-build-and-distribute-a-cli-tool-with-python-537ae41d9d78
There are some things I don’t understand fully, but I got my code and class delivered in a simple manner that means I can just call it like any other executable.
A simple pip3 install my,whl
and I can run it.
After an upgrade on Manjaro, I got no graphical environment. Looking in the logs it tells me something is going on with nvidia:
$ sudo journalctl -b
...
Jan 25 19:11:53 detective systemd-modules-load[345]: Failed to find module 'nvidia'
Jan 25 19:11:53 detective systemd-modules-load[345]: Failed to find module 'nvidia-drm'
Jan 25 19:11:53 detective systemd-modules-load[345]: Failed to find module 'nvidia-uvm'
Then trying the reinstall at a command prompt:
sudo mhwd -f -i pci video-nvidia
It complained about all kinds of kernel drivers not being found linux510-nvidia
, linux513-nvidia
and not being able to uninstall because of dependencies for psensor
, nvidia-utils
and libxnvctrl
. I had to manually uninstall these, but only after I installed kernel 515rebooted and removed the old kernels. Then reinstall.
sudo mhwd-kernel -i linux515
sudo reboot
sudo mhwd-kernel -r linux513
sudo mhwd-kernel -r linux510
sudo pacman -R psensor nvidia-utils libxnvctrl
sudo mhwd -f -i pci video-nvidia
In actual fact, I got graphics back after the reboot, but I figured I best tidy up.
Related to: Manjaro Gnome Failure After Update
As my download station operates headless, Cockpit is a nice way to manage it using a browser.
Well, Couchpotato is no longer being updated, and the project had been archived as read only. That’s not good, I’ve used Couchpotato for years.
I did some googling around and it looks like Radarr has matured quite a bit. Radarr is a fork of the Sonarr project (the TV episode grabber), but Radarr is designed to fetch movies. A natural choice, when I’m already using Sonarr.
Continue readingPackage manager said I needed some updates, including nzbget. Usually this is pretty straight forward, but this time it just fails and goes into a state where your only option is to “Repair”. The repair also fails so what now?
Continue readingHaving a new LilyGO TTGO ESP32 arrive, I got to work on flashing it with Tasmota straight away. A bit fiddly as you need to connect the download board, which gives us the CH340 USB to Serial we need.
This wasn’t as straight forward, and I had to play with it some more. I’m not using PoE right now, just powering it with 5v from USB C and using a regular Ethernet switch port. Tooks some reading to find that the settings I needed to make in user_config_override.h
contradicted what I was using for the WT32-ET01, even though it’s supposed to be the same Ethernet adapter.
I found the clue here: https://github.com/Xinyuan-LilyGO/LilyGO-T-ETH-POE/blob/master/example/eth/eth.ino
The github post showed that the setting used GPIO17
#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
That meant I needed to change the ETH_CLKMODE
to 3 and then restart.
#define USE_ETHERNET
// Wireless-Tag WT32-ETH01
#define ETH_TYPE 0 // [EthType] 0 = ETH_PHY_LAN8720, 1 = ETH_PHY_TLK110, 2 = ETH_PHY_IP101
#define ETH_ADDRESS 1 // [EthAddress] 0 = PHY0 .. 31 = PHY31
#define ETH_CLKMODE 3 // [EthClockMode] 0 = ETH_CLOCK_GPIO0_IN, 1 = ETH_CLOCK_GPIO0_OUT, 2 = ETH_CLOCK_GPIO16_OUT, 3 = ETH_CLOCK_GPIO17_OUT
I found I could also test these settings out at the console using:
EthType 0
EthAddress 0
EthClockMode 3
I had a eureka moment as I got it fired up though – more of a negative realisation than eureka. If I am to use this on the Gatekeeper project, I need 12v DC to power the keypad and fire the latch on the door striker. Using PoE – how am I going to do that?
If I use a PoE injector I can separate 12v DC, pipe it through a buck convertor and get it to provide both 12v for the striker and 5v to power the ESP. I can’t do that with a full PoE implementation.
So far this board gave me some challenges, mostly no 12v DC. That means it goes into the parts box until I find a different project to use it with.
With the Gatekeeper project, it was decided to look at wired Ethernet connectivity rather than WiFi. I guess there’s some added security to that, but it does mean finding an ESP with Ethernet – even more preferably with Power over Ethernet (PoE).
Looking around there are a few options. But sadly, some that I can’t get shipped to the UK due to export restrictions – even if they are on a UK domain of an electronic supplier!
I’ve bought a few options to try out, the first of which arrived is the WT32-ETH01.
Continue reading