Persistent names for usb-serial devices

Many usb-serial devices appear as /dev/ttyUSBX or /dev/ttyACMX in the system, the link changing every time several of these devices are plugged in. This is unsatisfying if you want to access these devices from a script. One solution is to use a UDEV ruleset to make a symbolic link for each device. Here is how to do it.

Determine vendor and product id of the usb-serial device:

Determine serial number of the device:

Create a UDEV ruleset that makes a symbolic link for each device:

sudo nano /etc/udev/rules.d/99-usb-serial.rules

and add and adapt to your needs:

SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="DAE0011W", SYMLINK+="1wire"

after replugging the device, there will be a symbolic link ‚1wire‘ be created for your device.

Lautsprecher in Fhem einbinden

Hier ein kleines Tutorial wie ein Lautsprecher an einem Radaa Rock oder Raspberrypi in fhem eingebunden werden kann. Zuerst die alsa und Utilities installieren:

In der fhem.cfg einen Lautsprecherdummy und ein Notify darauf anlegen:

In der eine entsprechende Funktion anlegen:

Im fhem root ein Verzeichnis „media“ erstellen, gewünschte Wave Dateien einfügen und fhem zuordnen:

Eine Wave-Datei kann nun folgendermaßen abgespielt werden:

Automatically update linux systems

Keeping your computer systems up to date has always been important. But now that word has gotten out that big brother is scanning whole countries networks and actively probes their ports keeping systems up to date is the least should do. Who knows if they are not installing backdoors as well, as a precautionary measure of course 🙂 So at least make it harder for them by keeping your system patched, it can be as easy as installing and running unattended-upgrade:

Now edit /etc/apt/apt.conf.d/10periodic:

and add/edit the following lines:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::Unattended-Upgrade "1";

Now you can select which updates to run by uncommenting some lines in /etc/apt/apt.conf.d/50unattended-upgrades:

I usually allow security and normal updates but reject proposed and backports.

SSH Access with certificates

To easily access all your computers you may want to authenticate yourself with certificates.

On a Mac, first install the missing ssh-copy-id:

Then you can copy your public key to the ssh hosts you frequently need by:

You may get this warning if the host already is in known hosts:
Warning: the RSA host key for 'panda' differs from the key for the IP address ''
Offending key for IP in /Users/tatsch/.ssh/known_hosts:19
Matching host key in /Users/tatsch/.ssh/known_hosts:24
Are you sure you want to continue connecting (yes/no)? yes

If that happens, simply delete the offending lines by

and ctrl + K to delete the whole line

UART on Pandaboard

List your users group with:

Add the user to the dialout group if necessary, to fix permission issues:

Now you can access all your uart devices:

for example UART4 on expansion connector A:

I2C on Pandaboard

To load the kernel module automatically at boot:

add i2c-dev

Finally add your user to the i2c group to fix permission problems: