Snapmaker 2.0 and Home Assistant

Did you know that it’s possible to discover your Snapmaker 2.0 in your LAN? Just send an UDP discover Broadcast to Port 20054 and your Snapmaker will reply with his IP-Address, Model-Name and Status.

With this function, I inform my Home Assistant about the state of my Snapmaker. Home Assistant sends me a push-message if the 3D-Print, Laser-Cut or CNC is finished.
Because I only need this information, it’s not necessary to login, get info and logout to the Snapmaker.
Maybe I will write another script in future to read other values like process, temperatures, enclosure state etc.

Here is an example of my sensors with webhook: (For more details see this Link)

# Snapmaker JSON Webhook
- trigger:
    - platform: webhook
      webhook_id: wh-snapmakera350
      allowed_methods:
        - POST
        - PUT
      local_only: true
  sensor:
    - name: "Snapmaker State"
      state: "{{ trigger.json.state }}"
    - name: "Snapmaker IP"
      state: "{{ trigger.json.ip }}"
    - name: "Snapmaker Model"
      state: "{{ trigger.json.model }}"

Then download the code on github and edit the python-script to your needs.
Run it in a cronjob, I do that on a separate raspberry-pi.

That’s my quick and dirty solution, and this is my dashboard if the Snapmaker is off, and below if it’s on but not running:

VMware vCenter: SCP Backup does not work

Recently we changed the backup Server for our vCenter. The backup job over SCP worked for years on the old Server, but on the new one I was not able to configure the backup-schedule. I got always a timeout on the vCenter Server Appliance Management Web-GUI and I had to restart it with:

service-control --restart applmgmt

To get it working again without rebooting the whole vCenter Appliance.

After a few hours of debugging, I saw a process named sshpass which was hanging.
sshpass tries to find “Password:” in the prompt and sends then the password.

Now the problem was, the old Server had a prompt like:

Password:

And the new one had:

Password for username@servername:

So sshpass was not able to find “Password:” and timed out.

As both our servers are BSD, I had to fix the sshd config on the new Server for PAM in /etc/pam.d/sshd with adding of “authtok_prompt=Password:” and then restart sshd.

#auth required pam_unix.so no_warn try_first_pass
auth required pam_unix.so no_warn try_first_pass authtok_prompt=Password:

With this setting, the prompt changes from “Password for ….” to “Password:”.
And the backup-schedule works again 🙂

Wasserzähler auslesen

Dieses coole Projekt hat mir geholfen, endlich meinen Wasserzähler auszulesen:
https://jomjol.github.io/AI-on-the-edge-device-docs/

Hier stelle ich meinen 3d Druck zur Verfügung, um das ESP32-CAM Modul direkt auf einen Neovac Deckel zu montieren.

Beim Neovac den blauen Deckel abmontieren und dann den weissen Einsatz entfernen. Der untere Zylinder wird dann neu anstelle des weissen Einsatzes eingeklemmt. Der Deckel als Halterung für den ESP32 wird dann einfach über den Zylinder gestülpt und seitlich mit einer Schraube fixiert. Auf dem ESP32-CAM muss der Fokus angepasst werden.

Reparatur Novamatic LCD

Wir haben vor ca. 5 Jahren eine Kühl-Gefrierschrank Kombination von Novamatic gekauft, Typ KS-TF 326-IB. Nach etwas mehr als 2 Jahren ging die 7-Segment LCD-Anzeige nicht mehr.

Natürlich war die Garantie abgelaufen. Meiner Meinung nach handelt es sich hier um eine Fehlkonstruktion, man könnte es auch “Sollbruchstelle” nennen. Genau dort wo die Litzen vom Öffnen/Schliessen immer gebogen werden, ist kein Schutz vorhanden.

Da die Zeit gekommen ist um Strom zu sparen, habe ich mir heute endlich Zeit genommen den Defekt zu reparieren, damit ich die Temperatur im Kühlschrank wieder sehen und einstellen kann.

In der Explosionszeichnung handelt es sich um das Kabel an Position 77:

Continue reading Reparatur Novamatic LCD

Nintendo Game Boy ohne Sound

Ich habe einen als defekt deklarierten Game Boy DMG-01 erworben, der Verkäufer gab an dass kein Sound mehr vorhanden ist. Als erstes hab ich heute die Kopfhörerbuchse getestet, welche zu meiner Überraschung noch funktioniert. Also kein allgemeiner Defekt dass kein Sound mehr vorhanden wäre. Danach habe ich den Game Boy aufgeschraubt und das Problem sofort entdeckt:

Wie man sieht hat hier schon jemand versucht zu reparieren. Die Platine ist gebrochen, den Speaker und die abgerissenen Drähte habe ich bereits ausgelötet.

Continue reading Nintendo Game Boy ohne Sound