Problem Openhab2 Ds18B20 mit Raspberry Pi 3
Verfasst: 6. Mai 2019 20:46
Hallo, ich versuche die Temperatur bei Openhab2 unter Basic UI anzuzeigen wenn ich der sensor mit einem Script anspreche und unter Putty mit übergabe sensor Id aufrufe bekomme ich die richtiger Temperatur angezeigt bei dem Basic UI sehe ich nur text ohne Temperatur Item,Sitemap,Things sollte richtig sein habe ich mehrmals geprüft. Mit Berechtigungen habe ich auch einiges versucht ohne erfolg.
Bitte um hilfe
Danke
Auszug Logdatei:
2019-05-06 20:44:13.850 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-05-06 20:44:13.860 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'onewiretemp1Value' for widget org.eclipse.smarthome.model.sitemap.Text
2019-05-06 20:44:13.868 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'onewiretemp1Value' for widget org.eclipse.smarthome.model.sitemap.Text
2019-05-06 20:44:13.876 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'onewiretemp1Value' for widget org.eclipse.smarthome.model.sitemap.Text
Things:
exec:command:onewiretemp1 [command="bash /etc/openhab2/scripts/onewiretemp.sh 28-04175011eeff"]
Items:
String onewiretemp1Value "Temp 1 is [%s °F]" {channel="exec:command:onewiretemp1:output"}
Script:
#!/bin/bash
wert=`cat /sys/bus/w1/devices/$1/w1_slave | tail -n1 | cut -d '=' -f2`
##wert=`cat /etc/openhab2/temp/w1_slave | tail -n1 | cut -d '=' -f2`
#echo $wert
#wert2=`echo "scale=2; "\`echo ${wert##*=}\`" / 1000" | bc`
wert2=`echo "scale=2; $wert/1000" | tr -d $'\r' | bc`
echo $wert2
Bitte um hilfe
Danke
Auszug Logdatei:
2019-05-06 20:44:13.850 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Text
2019-05-06 20:44:13.860 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'onewiretemp1Value' for widget org.eclipse.smarthome.model.sitemap.Text
2019-05-06 20:44:13.868 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'onewiretemp1Value' for widget org.eclipse.smarthome.model.sitemap.Text
2019-05-06 20:44:13.876 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'onewiretemp1Value' for widget org.eclipse.smarthome.model.sitemap.Text
Things:
exec:command:onewiretemp1 [command="bash /etc/openhab2/scripts/onewiretemp.sh 28-04175011eeff"]
Items:
String onewiretemp1Value "Temp 1 is [%s °F]" {channel="exec:command:onewiretemp1:output"}
Script:
#!/bin/bash
wert=`cat /sys/bus/w1/devices/$1/w1_slave | tail -n1 | cut -d '=' -f2`
##wert=`cat /etc/openhab2/temp/w1_slave | tail -n1 | cut -d '=' -f2`
#echo $wert
#wert2=`echo "scale=2; "\`echo ${wert##*=}\`" / 1000" | bc`
wert2=`echo "scale=2; $wert/1000" | tr -d $'\r' | bc`
echo $wert2