Showing Posts From
Configuration
- 10 Aug, 2017
- 2 min read
Fhem config file (fhem.cfg) write protected
After the last major update of FHEM, the FHEM configurtion file (fhem.cfg) is write protected and cannot be changed. This protection was set in order to protect system settings and files to be changed by new users. If you click in the FHEM user interface onto Edit files and then fhem.cfg as you are used to you will see the content of the file but cannot edit it. The notification "You can enable saving this file by setting the editConfig attribute, but read the documentation first for the side effects." advises you to read the documentation before making any changes.If you are confident with the FHEM configuration file and know what you are doing you can cancel the write protection by setting the arribute editConfig to the value of 1. The easiest way to set the editConfig attribute to 1 is by typing the command attr WEB editConfig 1in the command text field in the upper region of the user interface and hitting ENTER.After that you just need to save the config file. Therefore, click onto Save config on the left side.Hint: Before making any changes to the fhem.cfg file make sure you make a backup copy of that file. In case anything goes wrong and you somehow destroy the configuration file you are able to revert to the initial state.Below you can find the initial, unedidted content of the fhem.cfg file of FHEM 5.7 attr global userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd widgetOverride attr global autoload_undefined_devices 1 attr global logfile ./log/fhem-%Y-%m.log attr global modpath . attr global motd SecurityCheck:\ \ WEB,WEBphone,WEBtablet has no basicAuth attribute.\ telnetPort has no password/globalpassword attribute.\ \ Restart FHEM for a new check if the problem is fixed,\ or set the global attribute motd to none to supress this message.\attr global statefile ./log/fhem.save attr global updateInBackground 1 attr global verbose 3define telnetPort telnet 7072 globaldefine WEB FHEMWEB 8083 global attr WEB editConfig 1define WEBphone FHEMWEB 8084 global attr WEBphone stylesheetPrefix smallscreendefine WEBtablet FHEMWEB 8085 global attr WEBtablet stylesheetPrefix touchpad# Fake FileLog entry, to access the fhem log from FHEMWEB define Logfile FileLog ./log/fhem-%Y-%m.log fakelogdefine autocreate autocreate attr autocreate filelog ./log/%NAME-%Y.logdefine eventTypes eventTypes ./log/eventTypes.txt# Disable this to avoid looking for new USB devices on startup define initialUsbCheck notify global:INITIALIZED usb create
- 22 Apr, 2017
- 1 min read
Enable UART Port on Raspberry Pi
By standard the UART interface is configured as serial console. If you want to use the UART interface for other things, e.g. for a GPS module, the standard function needs to be deactivated. Open the cmdline.txt file with the Nano text editor. sudo nano /boot/cmdline.txt and remove the following part from the file. console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 The content of the file should look like this dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait Exit the editor with ctrl+x and save the changes using y.Open inittab sudo nano /etc/inittab and search for the following line. T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 Insert a # at the beginning of the line to comment this line. Doing so the line should look like this. #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 Exit the editor the same ways as in the previous step.From Kernel 3.18.x on the following step must be excecuted aditionally. sudo nano /boot/config.txt Search for the following line and remove the # at the beginning of the line. #dtparam=spi=on Exit the editor the same ways as in the previous step. Show kernel version uname -aRestart RPI. sudo reboot
- 05 Jan, 2016
- 2 Min. Lesezeit
Raspberry Pi: Benutzer automatisch Anmelden/Einloggen beim booten (Autologin)
In der neuen Version vom Raspberry Pi Betriebsystem "Raspbian Jessie", ist es jetzt möglich, dass man die Benutzer/Passwort Abfrage einfach über [raspi-config](http://www.forum-raspberrypi.de/Thread-faq-wie-konfiguriere-ich-den-raspberry-pi-mit-raspi-config) ausschalten kann. Beim hochfahren (booten) wird der Benutzer pi automatisch angemeldet. Dies ist sehr hilfreich, wenn man nach dem hochfahren ein Programm oder Script automatisch starten lassen will, ohne einen Benutzer mit der Tastatur und Monitor anmelden zu müssen. Variante: raspi-config (Jessie) Variante: autologin.conf (Jessie) Variante: ältere Raspbian Version (Wheezy)Variante: raspi-config (Jessie)Öffne das Raspberry Pi configuration tool mit folgendem Befehl. sudo raspi-configwählen Punkt 3 Boot Options jetzt wähle den Punkt B2 Console Autologin Text console, automatically logged in as 'pi' user Nach einem Neustart sollte der Benutzer pi jetzt automatisch eingeloggt werden.Variante: autologin.conf (Jessie) Leider hat bei mir die Variant über raspi-config nicht funktioniert. Hier eine Anleitung wie ich das automatische Anmelden zum laufen bekommen habe.Öffne die Datei autologin.conf mit dem Nano Text Editor sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.confund füge folgenden Text ein.[Service] ExecStart= ExecStart=-/sbin/agetty --autologin pi --noclear %I 38400 linux Beende den Editor mit ctrl+x und bestätige die Änderung mit y.Nach einem Neustart sollte der Benutzer pi jetzt automatisch eingeloggt werden. sudo rebootVariante: ältere Raspbian Version (Wheezy) Der Vollständigkeit halber hier die Anleitung für die ältere Raspbian VersionÖffne die Datei inittab sudo nano /etc/inittabsuch diese Zeile 1:2345:respawn:/sbin/getty 115200 tty1 und kommentiere sie mit # aus. #1:2345:respawn:/sbin/getty 115200 tty1 Füge direkt danach diesen Text ein (neue Zeile). 1:2345:respawn:/bin/login -f pi tty1 /dev/tty1 2>&1 Beende den Nano Texteditor mit ctrl+x und bestätige die Änderung mit y.Nach einem Neustart sollte der Benutzer pi jetzt automatisch eingeloggt werden. sudo reboot
- 28 Nov, 2015
- 2 Min. Lesezeit
FHEM Konfigurations Datei (fhem.cfg) kann nicht bearbeitet werden (Schreibschutz)
Seit dem letzten großen Update von FHEM, ist die FHEM Konfigurationsdatei (fhem.cfg) nach der Installation schreibgeschützt und kann nicht verändert werden. Diese Sperre soll Neulinge davor schützen wichtige Systemdateien zu verändern. Klickt man wie gewohnt in der FHEM Oberfläche auf Edit files und dann fhem.cfg sieht man den Inhalt dieser Datei, aber er kann nicht verändert werden. Ein Hinweis "You can enable saving this file by setting the editConfig attribute, but read the documentation first for the side effects." weisst uns darauf hin, dass wir die Dokumentation lesen sollen.Wenn du vertraut mit der FHEM Konfigurationsdatei bist und weisst was du tust, kannst du den Schreibschutz aufheben indem du das Attribute editConfig auf 1 setzt. Am einfachsten kannst du das editConfig Attribut auf 1 setzen wenn du diesen Befehl attr WEB editConfig 1oben in das Befehls-Textfeld ein gibst und ENTER drückst.Danach musst du die config Datei noch speichern. Dazu klickst du links auf Save config.Tipp: Bevor du Veränderungen an der fhem.cfg Datei machst, solltest du dir immer eine Kopie davon speichern. Wenn etwas schief läuft und du dir deine Konfigurations-Datei zerstörst, kannst du so ganz einfach den ursprünglichen Zustand wiederherstellen.Hier noch der unveränderte Inhalt der fhem.cfg von FHEM 5.7 attr global userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd widgetOverride attr global autoload_undefined_devices 1 attr global logfile ./log/fhem-%Y-%m.log attr global modpath . attr global motd SecurityCheck:\ \ WEB,WEBphone,WEBtablet has no basicAuth attribute.\ telnetPort has no password/globalpassword attribute.\ \ Restart FHEM for a new check if the problem is fixed,\ or set the global attribute motd to none to supress this message.\attr global statefile ./log/fhem.save attr global updateInBackground 1 attr global verbose 3define telnetPort telnet 7072 globaldefine WEB FHEMWEB 8083 global attr WEB editConfig 1define WEBphone FHEMWEB 8084 global attr WEBphone stylesheetPrefix smallscreendefine WEBtablet FHEMWEB 8085 global attr WEBtablet stylesheetPrefix touchpad# Fake FileLog entry, to access the fhem log from FHEMWEB define Logfile FileLog ./log/fhem-%Y-%m.log fakelogdefine autocreate autocreate attr autocreate filelog ./log/%NAME-%Y.logdefine eventTypes eventTypes ./log/eventTypes.txt# Disable this to avoid looking for new USB devices on startup define initialUsbCheck notify global:INITIALIZED usb create