Openhabian on RaspberryPi2ModelB gets IP but error: no network!

I tested OpenHasbian1.4 today on rspberrypi 2B.
I had to plug in ethernet since the wifi support from openhabian.conf is only for rpi3 models with wifi on board. Then everything went fine.
After oh-installation compleets, I had to change the keyboard layout using dpkg-reconfigure keyboard-configuration. That is succeded.
Now I need to get my wifi dongle up.
Iwconfig tells me the adapter is seen. I can also scan for ssid’s: sudo iwlist scan.
I managed to create a file wlan0 in /etc/network/interfaces.d/ using the forbidden ‘sudo su’, but couldnt otherwise.
I added my psk doing wpa_passphrase SSID MYPSKEY > /etc/network/interfaces.d/wlan0
And then with nano I added some thong I found in the wili from debian:
auto wlan0
Iface wlan0 inet dhcp
wpa-…
wpa-…

Saved and exited.
Then: ifup wlan0
But I get this error:
Wpa_supplicant: sbin/wpa_supplicant daemon failed to start
Run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Ifup: failef to bring up wlan0

I retried as normal user, but then I get a permissipn denied.

How should I bring up my wifi. Did I do wrong with all above?