Thursday, August 5, 2021

ESP2866-01 Wiring

 Some ESP8266-01 Boards need the Ping CH_PD pulled, high, otherwise it is in rest mode.

Pulled high means putting a 10kOhm resistor between CH_PD and VCC.




Sunday, July 18, 2021

Tasmota Time settings

 ntpserver1 yourntpgoeshere


Germany: Timezone 99



https://tasmota.github.io/docs/Commands/

Sunday, May 23, 2021

ESP8266 via MQTT Iobroker

 https://www.smarthome-tricks.de/allgemein/nodemcu-esp8266-sensoren-an-iobroker-ueber-mqtt/

https://www.smarthome-tricks.de/esp8266/pubsubclient-fuer-mqtt-mit-benutzername-passwort-und-port/


https://github.com/knolleary/pubsubclient



Sunday, February 28, 2021

Grafana View Collection

 Internet Connection View:

https://www.smarthome-tricks.de/grafana/5-3-grafana-dashboard-fuer-die-internet-geschwindigkeit/

Tuesday, January 19, 2021

Information on Linux systems live

 Process overview: top, htop, nmon

Disk/read/write: iotop -o -b -d 10

Tuesday, December 22, 2020

Beware ! Minecraft Windows 10 Edition from Microsoft store

 To my knowledge there is no satisfactory solution to share a Minecraft Win 10 licence from MS Store on a Win10 Computer among different users with differen MS Store accounts.

No App Sharing as known from Apple or Google possible. 

The MS Solution is to buy the licence X-Times!

Not Cool!

Monday, October 19, 2020

Granting Access for non Root to GPIOs

https://stackoverflow.com/questions/30938991/access-gpio-sys-class-gpio-as-non-root



Anleitung dafür Rechte auf GPIOs zu setzen aus:
http://www.netzmafia.de/skripten/hardware/RasPi/RasPi_GPIO_Shell.html

Datei:
# /etc/udev/rules.d/80-gpio-noroot.rules
# Zugriff auf GPIO ohne root-Rechte ermoeglichen
#
# Gruppe aendern
SUBSYSTEM=="gpio", RUN+="/bin/chown -R root.gpio /sys/class/gpio"
SUBSYSTEM=="gpio", RUN+="/bin/chown -R root.gpio /sys/devices/virtual/gpio"
# Sticky-Bit setzen
SUBSYSTEM=="gpio", RUN+="/bin/chmod g+s /sys/class/gpio"
SUBSYSTEM=="gpio", RUN+="/bin/chmod g+s /sys/devices/virtual/gpio"
# Zugriffsrechte setzen
SUBSYSTEM=="gpio", RUN+="/bin/chmod -R ug+rw /sys/class/gpio"
SUBSYSTEM=="gpio", RUN+="/bin/chmod -R ug+rw /sys/devices/virtual/gpio"


#Jetzt müssen Sie nur noch den udev-Daemon von den Änderungen wissen lassen (beim nächsten Reboot passiert das dann automatisch):
sudo service udev restart
sudo udevadm trigger --subsystem-match=gpio

Iobroker zur Gruppe gpios hinzufügen:
sudo usermod -aG gpio iobroker



Nun ist folgendes passiert: 
Die Rechte auf die GPios wurden auf die Gruppe GPIO erweitert.
Dies wird bei jedem Boot wiederholt.
Der Nutzer Iobroker wurde dieser Gruppe hinzugefügt und kann nach einem Neustart nun die GPios schalten.


Saturday, September 26, 2020

Ubuntu Blocking Packages from update

 https://askubuntu.com/questions/18654/how-to-prevent-updating-of-a-specific-package

dpkg

Put a package on hold:

echo "<package-name> hold" | sudo dpkg --set-selections

Remove the hold:

echo "<package-name> install" | sudo dpkg --set-selections

Display the status of your packages:

dpkg --get-selections

apt

Hold a package:

sudo apt-mark hold <package-name>

Remove the hold:

sudo apt-mark unhold <package-name>

Show all packages on hold:

sudo apt-mark showhold

Saturday, August 15, 2020

postfix for raspi info

 I just installed Postfix on multiple raspis to be informed about updates, problems etc.

Any suggestions on how this could be done easier by e.g. collecting would be very much appreciated.


I started of with:

sudo apt install postfix:

  • Setup as satellite machine
  • Hostname unchanged
  • Relay or smarthost: put in your smtp
  • Everythin else default.

After that I've updated my /etc/aliases to reroute everything towards root and then towards my external mail adress:

postmaster:    root
nagios: root
root: admin@yourdomain.com


in the postfix Config file: /etc/postfix/main.cf I added:



smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
sender_canonical_maps = hash:/etc/postfix/sender_canonical
smtp_tls_security_level = encrypt


The  meaning of sender_canonical  is not clear as it seems redundant to the aliases:
www-data admin@yourdomain.com
root admin@yourdomain.com


the sasl_password file needs the input of your external relay or smarthost:

smtpserver:25  user:password


Be sure, the file ist only readable by its owner.


now:

sudo newalias    --> gets the aliases updated
 sudo postmap hash:/etc/postfix/sasl_password  && sudo postmap /etc/postfix/sender_canonical --> gets the files merged into postfix
sudo systemctl restart postfix -->  start with new config

If everything works you should be able to do this:
echo Hello!  Test! | mail -s Testmail admin@yourdomain.com



If it does not work due to the encryption or auth because missing Mech:
https://serverfault.com/questions/1008119/postfix-error-sasl-authentication-failed-cannot-authenticate-to-server-no-mec
try to install:
apt install libsasl2-modules


Friday, August 14, 2020

Nagios

Nagios installed following ....




Systems under surveillance need:

 sudo apt-get install nagios-nrpe-server nagios-plugins

 


nagios extension:

https://community.spiceworks.com/topic/275519-how-do-i-install-a-perl-script-into-nagios