InfluxDB uselful queries

Show all available databases
show databases

Use a database e.g mydb
use mydb

Show available fields and their type of a a database
show field keys

Show series where xyz
show series where "powermeter" = 'xyzzz'

Calculate difference between the two latest values of two days
SELECT difference(last(total_kWh)) FROM power_total WHERE time >0 AND "powerMeter" = 'xyz' GROUP BY time(1d)

Select the latest entries from a field within a timespan of 2 days
select * from inputs WHERE time >= now() -2d
select * from inputs WHERE time >= now - 10m

Write measurement / series in database. Select database first. Tag Keys are not required
INSERT TheMeasurement value=10

Select last 10 entries
SELECT * FROM measurement ORDER BY desc LIMIT 10

Rename measurement. Not supported by influx. Copy into a new one is they way. To preserve tags, use group by *
SELECT * INTO DestMeasurementCopy from SrcMeasurement GROUP BY *

Drop a measurement
DROP MEASUREMENT measurement_name

Grant user all rights on database
GRANT ALL ON "powermeter" to "myUser"

Grant user read rights on database
GRANT READ ON "powermeter" to "myGrafanaUser"

Show rights of a user
SHOW GRANTS for myUser

Create user with password
CREATE USER "myUser" WITH PASSWORD thepassword

Create user with all privileges

Show all users

Create a database

Delete database

Windows 8.1 – Hardware wird nicht unterstützt


Wer das Problem unter Windows 7 / Windows 8.1 hat, dass Windows Update meldet „Hardware wird nicht unterstützt“ kann sich mit diesem Tool hier Abhilfe schaffen:

Der Grund für diese Meldung ist, dass Kaby Lake bzw. Ryzen Prozessoren nur noch von Windows 10 komplett unterstützt werden. Windows 7 und Windows 8.1 funktionieren mit dieser neuesten Prozessorgeneration zwar auch ganz normal weiter, sie können aber nicht den vollen Befehlssatz der Prozessoren ansprechen.

Ubuntu 16.04 – auto mount smb share

Create a file where your smb credentials are stored. e.g.

touch /etc/samba/user
sudo gedit /etc/samba/user

Enter your credentials like this:


create the directory where you want your smb share should be mounted

sudo mkdir /media/smb_share

edit your fstab to auto-mount your smb share

sudo gedit /etc/fstab

add a line like this:

//myserver_ip_address/folderToShare/  /media/smb_share/  cifs  credentials=/etc/samba/user,noexec  0 0

Unfortunately the mount will fail, you have to install cifs-utils

sudo apt-get install cifs-utils

After that you can try the following command which should mount your smb share. If you don’t install cifs-utils, this command should fail.

sudo mount /media/smb_share

Outlook 2016 – Posteingang IMAP keine Mails

Lösung – der Stammordnerpfad mus bei den Kontoeinstellungen angegeben werden:

Datei -> Kontoeinstellungen -> Kontoeinstellungen -> Reiter „E-Mail“ wählen -> Konto auswählen -> auf „Ändern“ klicken -> auf „Weitere Einstellungen“ klicken -> Reiter „Erweitert“ wählen -> Im Feld „Stammordnerpfad“ wird INBOX eingetragen -> „OK“ klicken -> „Weiter“ klicken -> „Schließen“ klicken -> „Fertig stellen“ klicken -> „Schließen“ klicken

Danach sollte es funktionieren ……….


BananaPI + Raspbian + fhem + 7″ Touch panel

Last week i installed fhem and the 7″ Touch panel from on my BananaPI running the Beta 1 Raspbian with Kernel.

Here’s the setup:

First you have to put the Raspbian Image (downloaded from the Raspbian beta 1 with Kernel 3.19-rc5) on your 8GB SD card (recommended, 4GB also works). You can do this with the Win32DiskImager.

After that, prepare your BananaPi, plug in the hdmi cable and prepare the touchpanel for the first run like in this youtube video.

Start the BananaPI and it should display some startup-code out-of-the-box.

I modified the the config.txt (/boot/config.txt) like this:


hdmi_cvt=1024 600 60 3 0 0 0


Like described here and in this video. But in fact, that did not work, because the gpu does not provide this resolution. It will remain on 1360×768

Install the touch feature:

Here is the original How-To:

sudo apt-get update
sudo apt-get install libx11-dev libxext-dev libxi-dev x11proto-input-dev
tar -zxf xinput_calibrator-0.7.5.tar.gz
cd xinput_calibrator-0.7.5
sudo make install

call the configuration software


The touchpanel is now calibrated but it won’t keep the settings across the reboot. Here is how to fix it :
The software should indicate you some details in the console window. You should see a part like this one :

Section "InputClass"
     Identifier    "calibration"
     MatchProduct    "eGalax Inc. USB TouchController"
     Option    "Calibration"    "121 1917 317 1741"

Create a 01-input.conf file :

sudo nano /usr/share/X11/xorg.conf.d/01-input.conf

Copy paste the previous settings in the file, save and exit.
Your panel should remain calibrated across reboots.
Touch panel only has a single click (obviously), so we have to emulate the right click with a long pressure.
Open the previously created file and copy paste these settings somewhere between Section „InputClass“ and EndSection :

sudo nano /usr/share/X11/xorg.conf.d/01-input.conf
#copy the following text:
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "750"
Option "EmulateThirdButtonThreshold" "30"

Modify parameters as desired.

Virtual Keyboard

There are a few Virtual keyboard software projects, you are free to test a different one.

sudo apt-get install florence
# use german country code:
setxkbmap de

Install fhem


Import repository gpg key:

sudo apt-get install apt-transport-https
wget -qO - | apt-key add -
#If line above does not work (certificate or gpg error), try this:
wget --no-check-certificate -qO - | apt-key add -
#If it stil not works, execute this line before line above again
echo ' "false";' > /etc/apt/apt.conf.d/30nohttps

No you can access fhem via your browser:
Web: :8083
WebPhone: 8084
WebTablet: 8085