Ankündigung

Einklappen
Keine Ankündigung bisher.

Weitere Migrationsproblematik Thinks und DHT22-Sensor

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Weitere Migrationsproblematik Thinks und DHT22-Sensor

    Hi, mit den Thinks stehe ich noch auf Kriegsfuß

    Hier meine Dateien:
    AM2302sensor.sh (Hat mit OH1 immer funktioniert)
    Code:
    #!/bin/bash
    
    INPUT22=$(/home/openhabian/Adafruit_Python_DHT/examples/AdafruitDHT.py 22 22)
    TEMP22=$(echo $INPUT22|cut -d " " -f1 | sed 's/[^0-9.]*//g')
    HUM22=$(echo $INPUT22|cut -d " " -f2 | sed 's/[^0-9.]*//g')
    
    INPUT4=$(/home/openhabian/Adafruit_Python_DHT/examples/AdafruitDHT.py 22 4)
    TEMP4=$(echo $INPUT4|cut -d " " -f1 | sed 's/[^0-9.]*//g')
    HUM4=$(echo $INPUT4|cut -d " " -f2 | sed 's/[^0-9.]*//g')
    ADDW=5.00
    
    if [ "$1" = "HUM22" ]; then
    echo $HUM22 $ADDW | awk '{print $1 + $2}'
    fi
    
    if [ "$1" = "TEMP22" ]; then
    echo $TEMP22
    fi
    
    if [ "$1" = "HUM4" ]; then
    echo $HUM4 $ADDW | awk '{print $1 + $2}'
    fi
    
    if [ "$1" = "TEMP4" ]; then
    echo $TEMP4
    fi
    ThingsDatei:
    Code:
    exec:command:dht22 [command="/srv/openhab2-conf/scripts/AM2302sensor.sh TEMP4", interval=30, timeout=20]
    items:
    Code:
    Number TEMP_Keller4 "Temp 4 Keller [%.1f °C]" <temperature> (gTemp) {channel="exec:command:dht22"}
    String LUFT_Keller4 "Luftf. 4 Keller [%s]" <temperature> (gTemp) { channel="exec:command:dht22:output"}
    Log:
    Code:
    2017-06-23 14:58:54.043 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '22.6
    /usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /var/lib/openhab2/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
      warnings.warn(msg, UserWarning)
    /usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /var/lib/openhab2/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
      warnings.warn(msg, UserWarning)
    /usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /var/lib/openhab2/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
      warnings.warn(msg, UserWarning)
    /usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /var/lib/openhab2/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
      warnings.warn(msg, UserWarning)' for item 'LUFT_Keller4' to handler for channel 'exec:command:gude:TEMP4', because no thing with the UID 'exec:command:gude' could be found.
    2017-06-23 15:00:19.726 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '22.5
    /usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /var/lib/openhab2/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
      warnings.warn(msg, UserWarning)
    /usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /var/lib/openhab2/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
      warnings.warn(msg, UserWarning)
    /usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /var/lib/openhab2/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
      warnings.warn(msg, UserWarning)
    /usr/lib/python2.7/dist-packages/pkg_resources.py:1049: UserWarning: /var/lib/openhab2/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
      warnings.warn(msg, UserWarning)' for item 'LUFT_Keller4' to handler for channel 'exec:command:gude:TEMP4', because no thing with the UID 'exec:command:gude' could be found.
    Also wie man im Log sieht, kommt ein Wert zurück... Aber
    1. Was muss ich noch ändern, damit der Wert auch übergeben werden kann?
    2. Was genau muss ich gegen die SecurityWarnung machen
    3. Wie kann ich das Think so einstellen, dass ich TEMP4 mit dem item übergeben kann?


    Zuletzt geändert von edvtalker; 23.06.2017, 14:02.
Lädt...
X