Jump to content

Recommended Posts

Geschrieben

Aber ich habe doch genau die Dateien aus dem Bindings-Download (source/tinkerforge) nach /home/pi/tinkerforge zum Script kopiert... Es ändert nichts... In dem Verzeichnis liegt nichts ausser obigen Dateien und dem wetterstation.py.

Geschrieben

Der Aufruf von sudo brickv auf dem RPi bewirkt:

main.py: cannot connect to X server

 

Wenn du auf dem RPi kein X laufen hast, kannst du kein brickv starten, das ist normal.

 

Die Bindings liegen bereits im Verzeichnis des Scripts, andere Dateien sind dort nicht zu finden.

 

Die Verzeichnisstruktur muss so aussehen:

 

/home/pi/tinkerforge/
-> dein_script.py
-> tinkerforge/
----> __init__.py
----> ip_connection.py
----> brick_master.py
----> ...
----> bricklet_ambient_light.py
----> ...

 

Die Bindings müssen in einem tinkerforge Unterverzeichnis neben deinem Script liegen und nicht im gleichen Verzeichnis wie dein Script. Und dieses tinkerforge Unterverzeichnis muss eine __init__.py Datei beinhalten, was aber schon der Fall sein sollte wenn du es aus dem ZIP kopierst.

 

Beim Aufruf des Python-Scripts dann:

Traceback (most recent call last):

  File "xively.py", line 15, in <module>

    from xip_connection import Error

ImportError: No module named xip_connection

 

xip_connection? Das sollte wenn ip_connection ohne x sein.

Geschrieben

Oah... das macht mich noch rasend...

 

ls -al im Verzeichnis /home/pi/tinkerforge

drwxr-xr-x 3 pi pi   4096 Jun 17 19:08 .
drwxr-xr-x 6 pi pi   4096 Jun 16 22:02 ..
-rw-r--r-- 1 pi pi    318 Jun 17 19:08 setup.py
drwxr-xr-x 2 pi pi   4096 Jun 17 19:08 tinkerforge
-rw-r--r-- 1 pi pi 324466 Jun 17 19:08 tinkerforge.egg
-rwxrwxrwx 1 pi pi   5895 Jun 16 22:19 weather_station.py
-rwxrwxrwx 1 pi pi   8161 Jun 16 22:13 xively.py

 

ls -al im Verzeichnis /home/pi/tinkerforge/tinkerforge

drwxr-xr-x 2 pi pi   4096 Jun 17 19:08 .
drwxr-xr-x 3 pi pi   4096 Jun 17 19:08 ..
-rw-r--r-- 1 pi pi  16321 Jun 17 19:08 brick_dc.py
-rw-r--r-- 1 pi pi  26765 Jun 17 19:08 brick_imu.py
-rw-r--r-- 1 pi pi  12614 Jun 17 19:08 bricklet_ambient_light.py
-rw-r--r-- 1 pi pi  14356 Jun 17 19:08 bricklet_analog_in.py
-rw-r--r-- 1 pi pi   4258 Jun 17 19:08 bricklet_analog_out.py
-rw-r--r-- 1 pi pi  16159 Jun 17 19:08 bricklet_barometer.py
-rw-r--r-- 1 pi pi  13464 Jun 17 19:08 bricklet_current12.py
-rw-r--r-- 1 pi pi  13460 Jun 17 19:08 bricklet_current25.py
-rw-r--r-- 1 pi pi  13928 Jun 17 19:08 bricklet_distance_ir.py
-rw-r--r-- 1 pi pi   9063 Jun 17 19:08 bricklet_distance_us.py
-rw-r--r-- 1 pi pi   5301 Jun 17 19:08 bricklet_dual_button.py
-rw-r--r-- 1 pi pi   6182 Jun 17 19:08 bricklet_dual_relay.py
-rw-r--r-- 1 pi pi  14235 Jun 17 19:08 bricklet_gps.py
-rw-r--r-- 1 pi pi   8253 Jun 17 19:08 bricklet_hall_effect.py
-rw-r--r-- 1 pi pi  12252 Jun 17 19:08 bricklet_humidity.py
-rw-r--r-- 1 pi pi  10961 Jun 17 19:08 bricklet_industrial_digital_in_4.py
-rw-r--r-- 1 pi pi   9402 Jun 17 19:08 bricklet_industrial_digital_out_4.py
-rw-r--r-- 1 pi pi   9756 Jun 17 19:08 bricklet_industrial_dual_0_20ma.py
-rw-r--r-- 1 pi pi   9346 Jun 17 19:08 bricklet_industrial_quad_relay.py
-rw-r--r-- 1 pi pi  14327 Jun 17 19:08 bricklet_io16.py
-rw-r--r-- 1 pi pi  13581 Jun 17 19:08 bricklet_io4.py
-rw-r--r-- 1 pi pi  13945 Jun 17 19:08 bricklet_joystick.py
-rw-r--r-- 1 pi pi   8896 Jun 17 19:08 bricklet_lcd_16x2.py
-rw-r--r-- 1 pi pi  11634 Jun 17 19:08 bricklet_lcd_20x4.py
-rw-r--r-- 1 pi pi   8229 Jun 17 19:08 bricklet_led_strip.py
-rw-r--r-- 1 pi pi  12065 Jun 17 19:08 bricklet_linear_poti.py
-rw-r--r-- 1 pi pi   7644 Jun 17 19:08 bricklet_line.py
-rw-r--r-- 1 pi pi   8673 Jun 17 19:08 bricklet_moisture.py
-rw-r--r-- 1 pi pi   3738 Jun 17 19:08 bricklet_motion_detector.py
-rw-r--r-- 1 pi pi   7192 Jun 17 19:08 bricklet_multi_touch.py
-rw-r--r-- 1 pi pi   4069 Jun 17 19:08 bricklet_piezo_buzzer.py
-rw-r--r-- 1 pi pi   5377 Jun 17 19:08 bricklet_piezo_speaker.py
-rw-r--r-- 1 pi pi  14278 Jun 17 19:08 bricklet_ptc.py
-rw-r--r-- 1 pi pi   8443 Jun 17 19:08 bricklet_remote_switch.py
-rw-r--r-- 1 pi pi   8489 Jun 17 19:08 bricklet_rotary_encoder.py
-rw-r--r-- 1 pi pi  12088 Jun 17 19:08 bricklet_rotary_poti.py
-rw-r--r-- 1 pi pi   5662 Jun 17 19:08 bricklet_segment_display_4x7.py
-rw-r--r-- 1 pi pi   7824 Jun 17 19:08 bricklet_sound_intensity.py
-rw-r--r-- 1 pi pi  14822 Jun 17 19:08 bricklet_temperature_ir.py
-rw-r--r-- 1 pi pi   9047 Jun 17 19:08 bricklet_temperature.py
-rw-r--r-- 1 pi pi   4664 Jun 17 19:08 bricklet_tilt.py
-rw-r--r-- 1 pi pi  19054 Jun 17 19:08 bricklet_voltage_current.py
-rw-r--r-- 1 pi pi  11831 Jun 17 19:08 bricklet_voltage.py
-rw-r--r-- 1 pi pi  59003 Jun 17 19:08 brick_master.py
-rw-r--r-- 1 pi pi  23832 Jun 17 19:08 brick_servo.py
-rw-r--r-- 1 pi pi  26602 Jun 17 19:08 brick_stepper.py
-rw-r--r-- 1 pi pi      1 Jun 17 19:08 __init__.py
-rw-r--r-- 1 pi pi  40049 Jun 17 19:08 ip_connection.py
-rw-r--r-- 1 pi pi 324466 Jun 17 19:08 tinkerforge.egg

 

Hoffe, ich mache da irgendwo einen groben Fehler...

 

Übrigens, das Standard-Beispiel weather_station.py von der Tinkerforge-Homepage läuft problemlos, dasselbe Beispiel mit eingebautem xively-put von der Tinkerforge-Homepage hingegen wirft weiterhin den ip_connection-Fehler aus.

 

Ich betreibe die Wetterstation aber nicht per ip, diese ist weiterhin per USB angeschlossen.

Geschrieben

Wo hast du den Code denn weg? in deiner Exception steht etwas von "xip_connection", das kommt aber im Code gar nicht vor. Kann es sein das sich da irgendwie aus versehen ein zusätzlich "x" eingeschlichen hat was da nicht hingehört?

Geschrieben

Ich hatte das x wohl aus Versehen drin im Script.

Entfernt, aber keine Änderung beim Fehler, ip_connection error.

Warum IP? Ist doch am USB. Wetterstation Beispielscript funktioniert ohne ip_connection.

 

Geschrieben

Also, beim Aufruf von easy_install tinkerforge.egg:

Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 9, in <module>
    load_entry_point('distribute', 'console_scripts', 'easy_install')()
  File "/usr/local/lib/python2.7/dist-packages/setuptools-5.0.2-py2.7.egg/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/setuptools-5.0.2-py2.7.egg/pkg_resources.py", line 2438, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'easy_install') not found

 

Beim Aufruf des python-Script für Wetterstation + xively:

Traceback (most recent call last):
  File "xively.py", line 14, in <module>
    from ip_connection import IPConnection
ImportError: No module named ip_connection

 

Hier das nicht funktionierende xively-script mit dem ip_connection-Error:

 #!/usr/bin/env python
# -*- coding: utf-8 -*-

import socket
import sys
import time
import math
import logging as log
import httplib
import json
import threading
log.basicConfig(level=log.INFO)

from ip_connection import IPConnection
from ip_connection import Error
from brick_master import Master
from bricklet_lcd_20x4 import LCD20x4
from bricklet_ambient_light import AmbientLight
from bricklet_humidity import Humidity
from bricklet_barometer import Barometer

class Xively:
    HOST = 'api.xively.com'
    AGENT = "Tinkerforge xively 1.0"
    FEED = 'XXXXXXXX.json'
    API_KEY = 'XXXXXXX'

    def __init__(self):
        self.items = {}
        self.headers = {
            "Content-Type"  : "application/x-www-form-urlencoded",
            "X-ApiKey"      : Xively.API_KEY,
            "User-Agent"    : Xively.AGENT,
        }
        self.params = "/v2/feeds/" + str(Xively.FEED)
        self.upload_thread = threading.Thread(target=self.upload)
        self.upload_thread.daemon = True
        self.upload_thread.start()

    def put(self, identifier, value):
        try:
            _, min_value, max_value = self.items[identifier]
            if value < min_value:
                min_value = value
            if value > max_value:
                max_value = value
            self.items[identifier] = (value, min_value, max_value)
        except:
            self.items[identifier] = (value, value, value)

    def upload(self):
        while True:
            time.sleep(5*60) # Upload data every 5min
            if len(self.items) == 0:
                continue

            stream_items = []
            for identifier, value in self.items.items():
                stream_items.append({'id': identifier,
                                     'current_value': value[0],
                                     'min_value': value[1],
                                     'max_value': value[2]})

            data = {'version': '1.0.0',
                    'datastreams': stream_items}
            self.items = {}
            body = json.dumps(data)

            try:
                http = httplib.HTTPSConnection(Xively.HOST)
                http.request('PUT', self.params, body, self.headers)
                response = http.getresponse()
                http.close()

                if response.status != 200:
                    log.error('Could not upload to xively -> ' +
                              str(response.status) + ': ' + response.reason)
            except Exception as e:
                log.error('HTTP error: ' + str(e))

class WeatherStation:
    HOST = "localhost"
    PORT = 4223

    ipcon = None
    lcd = None
    al = None
    hum = None
    baro = None

    def __init__(self):
        self.xively = Xively()
        self.ipcon = IPConnection()
        while True:
            try:
                self.ipcon.connect(WeatherStation.HOST, WeatherStation.PORT)
                break
            except Error as e:
                log.error('Connection Error: ' + str(e.description))
                time.sleep(1)
            except socket.error as e:
                log.error('Socket error: ' + str(e))
                time.sleep(1)

        self.ipcon.register_callback(IPConnection.CALLBACK_ENUMERATE,
                                     self.cb_enumerate)
        self.ipcon.register_callback(IPConnection.CALLBACK_CONNECTED,
                                     self.cb_connected)

        while True:
            try:
                self.ipcon.enumerate()
                break
            except Error as e:
                log.error('Enumerate Error: ' + str(e.description))
                time.sleep(1)

    def cb_illuminance(self, illuminance):
        if self.lcd is not None:
            text = 'Illuminanc %6.2f lx' % (illuminance/10.0)
            self.lcd.write_line(0, 0, text)
            self.xively.put('AmbientLight', illuminance/10.0)
            log.info('Write to line 0: ' + text)

    def cb_humidity(self, humidity):
        if self.lcd is not None:
            text = 'Humidity   %6.2f %%' % (humidity/10.0)
            self.lcd.write_line(1, 0, text)
            self.xively.put('Humidity', humidity/10.0)
            log.info('Write to line 1: ' + text)

    def cb_air_pressure(self, air_pressure):
        if self.lcd is not None:
            text = 'Air Press %7.2f mb' % (air_pressure/1000.0)
            self.lcd.write_line(2, 0, text)
            self.xively.put('AirPressure', air_pressure/1000.0)
            log.info('Write to line 2: ' + text)

            temperature = self.baro.get_chip_temperature()/100.0
            # \xDF == ° on LCD 20x4 charset
            text = 'Temperature %5.2f \xDFC' % temperature
            self.lcd.write_line(3, 0, text)
            self.xively.put('Temperature', temperature)
            log.info('Write to line 3: ' + text.replace('\xDF', '°'))

    def cb_enumerate(self, uid, connected_uid, position, hardware_version,
                     firmware_version, device_identifier, enumeration_type):
        if enumeration_type == IPConnection.ENUMERATION_TYPE_CONNECTED or \
           enumeration_type == IPConnection.ENUMERATION_TYPE_AVAILABLE:
            if device_identifier == LCD20x4.DEVICE_IDENTIFIER:
                try:
                    self.lcd = LCD20x4(uid, self.ipcon)
                    self.lcd.clear_display()
                    self.lcd.backlight_on()
                    log.info('LCD20x4 initialized')
                except Error as e:
                    log.error('LCD20x4 init failed: ' + str(e.description))
                    self.lcd = None
            elif device_identifier == AmbientLight.DEVICE_IDENTIFIER:
                try:
                    self.al = AmbientLight(uid, self.ipcon)
                    self.al.set_illuminance_callback_period(1000)
                    self.al.register_callback(self.al.CALLBACK_ILLUMINANCE,
                                              self.cb_illuminance)
                    log.info('AmbientLight initialized')
                except Error as e:
                    log.error('AmbientLight init failed: ' + str(e.description))
                    self.al = None
            elif device_identifier == Humidity.DEVICE_IDENTIFIER:
                try:
                    self.hum = Humidity(uid, self.ipcon)
                    self.hum.set_humidity_callback_period(1000)
                    self.hum.register_callback(self.hum.CALLBACK_HUMIDITY,
                                               self.cb_humidity)
                    log.info('Humidity initialized')
                except Error as e:
                    log.error('Humidity init failed: ' + str(e.description))
                    self.hum = None
            elif device_identifier == Barometer.DEVICE_IDENTIFIER:
                try:
                    self.baro = Barometer(uid, self.ipcon)
                    self.baro.set_air_pressure_callback_period(1000)
                    self.baro.register_callback(self.baro.CALLBACK_AIR_PRESSURE,
                                                self.cb_air_pressure)
                    log.info('Barometer initialized')
                except Error as e:
                    log.error('Barometer init failed: ' + str(e.description))
                    self.baro = None

    def cb_connected(self, connected_reason):
        if connected_reason == IPConnection.CONNECT_REASON_AUTO_RECONNECT:
            log.info('Auto Reconnect')

            while True:
                try:
                    self.ipcon.enumerate()
                    break
                except Error as e:
                    log.error('Enumerate Error: ' + str(e.description))
                    time.sleep(1)

if __name__ == "__main__":
    log.info('Weather Station: Start')

    weather_station = WeatherStation()

    if sys.version_info < (3, 0):
        input = raw_input # Compatibility for Python 2.x
    input('Press key to exit\n')

    if weather_station.ipcon != None:
        weather_station.ipcon.disconnect()

    log.info('Weather Station: End')

 

Das funktionierende Script ohne xively:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import socket
import sys
import time
import math
import logging as log
log.basicConfig(level=log.INFO)

from tinkerforge.ip_connection import IPConnection
from tinkerforge.ip_connection import Error
from tinkerforge.brick_master import Master
from tinkerforge.bricklet_lcd_20x4 import LCD20x4
from tinkerforge.bricklet_ambient_light import AmbientLight
from tinkerforge.bricklet_humidity import Humidity
from tinkerforge.bricklet_barometer import Barometer

class WeatherStation:
    HOST = "localhost"
    PORT = 4223

    ipcon = None
    lcd = None
    al = None
    hum = None
    baro = None

    def __init__(self):
        self.ipcon = IPConnection()
        while True:
            try:
                self.ipcon.connect(WeatherStation.HOST, WeatherStation.PORT)
                break
            except Error as e:
                log.error('Connection Error: ' + str(e.description))
                time.sleep(1)
            except socket.error as e:
                log.error('Socket error: ' + str(e))
                time.sleep(1)

        self.ipcon.register_callback(IPConnection.CALLBACK_ENUMERATE,
                                     self.cb_enumerate)
        self.ipcon.register_callback(IPConnection.CALLBACK_CONNECTED,
                                     self.cb_connected)

        while True:
            try:
                self.ipcon.enumerate()
                break
            except Error as e:
                log.error('Enumerate Error: ' + str(e.description))
                time.sleep(1)

    def cb_illuminance(self, illuminance):
        if self.lcd is not None:
            text = 'Illuminanc %6.2f lx' % (illuminance/10.0)
            self.lcd.write_line(0, 0, text)
            log.info('Write to line 0: ' + text)

    def cb_humidity(self, humidity):
        if self.lcd is not None:
            text = 'Humidity   %6.2f %%' % (humidity/10.0)
            self.lcd.write_line(1, 0, text)
            log.info('Write to line 1: ' + text)

    def cb_air_pressure(self, air_pressure):
        if self.lcd is not None:
            text = 'Air Press %7.2f mb' % (air_pressure/1000.0)
            self.lcd.write_line(2, 0, text)
            log.info('Write to line 2: ' + text)

            try:
                temperature = self.baro.get_chip_temperature()
            except Error as e:
                log.error('Could not get temperature: ' + str(e.description))
                return

            # \xDF == ° on LCD 20x4 charset
            text = 'Temperature %5.2f \xDFC' % (temperature/100.0)
            self.lcd.write_line(3, 0, text)
            log.info('Write to line 3: ' + text.replace('\xDF', '°'))

    def cb_enumerate(self, uid, connected_uid, position, hardware_version,
                     firmware_version, device_identifier, enumeration_type):
        if enumeration_type == IPConnection.ENUMERATION_TYPE_CONNECTED or \
           enumeration_type == IPConnection.ENUMERATION_TYPE_AVAILABLE:
            if device_identifier == LCD20x4.DEVICE_IDENTIFIER:
                try:
                    self.lcd = LCD20x4(uid, self.ipcon)
                    self.lcd.clear_display()
                    self.lcd.backlight_on()
                    log.info('LCD 20x4 initialized')
                except Error as e:
                    log.error('LCD 20x4 init failed: ' + str(e.description))
                    self.lcd = None
            elif device_identifier == AmbientLight.DEVICE_IDENTIFIER:
                try:
                    self.al = AmbientLight(uid, self.ipcon)
                    self.al.set_illuminance_callback_period(1000)
                    self.al.register_callback(self.al.CALLBACK_ILLUMINANCE,
                                              self.cb_illuminance)
                    log.info('Ambient Light initialized')
                except Error as e:
                    log.error('Ambient Light init failed: ' + str(e.description))
                    self.al = None
            elif device_identifier == Humidity.DEVICE_IDENTIFIER:
                try:
                    self.hum = Humidity(uid, self.ipcon)
                    self.hum.set_humidity_callback_period(1000)
                    self.hum.register_callback(self.hum.CALLBACK_HUMIDITY,
                                               self.cb_humidity)
                    log.info('Humidity initialized')
                except Error as e:
                    log.error('Humidity init failed: ' + str(e.description))
                    self.hum = None
            elif device_identifier == Barometer.DEVICE_IDENTIFIER:
                try:
                    self.baro = Barometer(uid, self.ipcon)
                    self.baro.set_air_pressure_callback_period(1000)
                    self.baro.register_callback(self.baro.CALLBACK_AIR_PRESSURE,
                                                self.cb_air_pressure)
                    log.info('Barometer initialized')
                except Error as e:
                    log.error('Barometer init failed: ' + str(e.description))
                    self.baro = None

    def cb_connected(self, connected_reason):
        if connected_reason == IPConnection.CONNECT_REASON_AUTO_RECONNECT:
            log.info('Auto Reconnect')

            while True:
                try:
                    self.ipcon.enumerate()
                    break
                except Error as e:
                    log.error('Enumerate Error: ' + str(e.description))
                    time.sleep(1)

if __name__ == "__main__":
    log.info('Weather Station: Start')

    weather_station = WeatherStation()

    if sys.version_info < (3, 0):
        input = raw_input # Compatibility for Python 2.x
    input('Press key to exit\n')

    if weather_station.ipcon != None:
        weather_station.ipcon.disconnect()

    log.info('Weather Station: End')

 

Hoffe, das hilft...

 

Geschrieben

Und folgendes lief statt easy_install tinkerforge.egg fehlerfrei durch:

@rpiHM ~/tinkerforge $ sudo python setup.py install
running install
running bdist_egg
running egg_info
creating tinkerforge.egg-info
writing tinkerforge.egg-info/PKG-INFO
writing top-level names to tinkerforge.egg-info/top_level.txt
writing dependency_links to tinkerforge.egg-info/dependency_links.txt
writing manifest file 'tinkerforge.egg-info/SOURCES.txt'
reading manifest file 'tinkerforge.egg-info/SOURCES.txt'
writing manifest file 'tinkerforge.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv6l/egg
running install_lib
running build_py
creating build
creating build/lib.linux-armv6l-2.7
creating build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/brick_dc.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_distance_us.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_temperature.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_remote_switch.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_tilt.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_motion_detector.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/brick_servo.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/brick_stepper.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_industrial_digital_out_4.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_analog_out.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_ambient_light.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_moisture.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_multi_touch.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_analog_in.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_industrial_digital_in_4.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_industrial_dual_0_20ma.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_current12.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_io4.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_humidity.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_lcd_20x4.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_gps.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_piezo_buzzer.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_dual_button.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/__init__.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_io16.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_piezo_speaker.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_voltage_current.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_distance_ir.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_joystick.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/ip_connection.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_rotary_poti.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_rotary_encoder.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_lcd_16x2.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_sound_intensity.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_current25.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/brick_master.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/brick_imu.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_temperature_ir.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_industrial_quad_relay.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_led_strip.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_barometer.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_hall_effect.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_dual_relay.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_voltage.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_line.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_segment_display_4x7.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_ptc.py -> build/lib.linux-armv6l-2.7/tinkerforge
copying tinkerforge/bricklet_linear_poti.py -> build/lib.linux-armv6l-2.7/tinkerforge
creating build/bdist.linux-armv6l
creating build/bdist.linux-armv6l/egg
creating build/bdist.linux-armv6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/brick_dc.py -> build/bdist.linux-armv6l/egg/tinkerf
orge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_distance_us.py -> build/bdist.linux-armv6l
/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_temperature.py -> build/bdist.linux-armv6l
/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_remote_switch.py -> build/bdist.linux-armv
6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_tilt.py -> build/bdist.linux-armv6l/egg/ti
nkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_motion_detector.py -> build/bdist.linux-ar
mv6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/brick_servo.py -> build/bdist.linux-armv6l/egg/tink
erforge
copying build/lib.linux-armv6l-2.7/tinkerforge/brick_stepper.py -> build/bdist.linux-armv6l/egg/ti
nkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_industrial_digital_out_4.py -> build/bdist
.linux-armv6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_analog_out.py -> build/bdist.linux-armv6l/
egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_ambient_light.py -> build/bdist.linux-armv
6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_moisture.py -> build/bdist.linux-armv6l/eg
g/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_multi_touch.py -> build/bdist.linux-armv6l
/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_analog_in.py -> build/bdist.linux-armv6l/e
gg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_industrial_digital_in_4.py -> build/bdist.
linux-armv6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_industrial_dual_0_20ma.py -> build/bdist.l
inux-armv6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_current12.py -> build/bdist.linux-armv6l/e
gg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_io4.py -> build/bdist.linux-armv6l/egg/tin
kerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_humidity.py -> build/bdist.linux-armv6l/eg
g/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_lcd_20x4.py -> build/bdist.linux-armv6l/eg
g/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_gps.py -> build/bdist.linux-armv6l/egg/tin
kerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_piezo_buzzer.py -> build/bdist.linux-armv6
l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_dual_button.py -> build/bdist.linux-armv6l
/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/__init__.py -> build/bdist.linux-armv6l/egg/tinkerf
orge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_io16.py -> build/bdist.linux-armv6l/egg/ti
nkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_piezo_speaker.py -> build/bdist.linux-armv
6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_voltage_current.py -> build/bdist.linux-ar
mv6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_distance_ir.py -> build/bdist.linux-armv6l
/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_joystick.py -> build/bdist.linux-armv6l/eg
g/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/ip_connection.py -> build/bdist.linux-armv6l/egg/ti
nkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_rotary_poti.py -> build/bdist.linux-armv6l
/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_rotary_encoder.py -> build/bdist.linux-arm
v6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_lcd_16x2.py -> build/bdist.linux-armv6l/eg
g/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_sound_intensity.py -> build/bdist.linux-ar
mv6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_current25.py -> build/bdist.linux-armv6l/e
gg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/brick_master.py -> build/bdist.linux-armv6l/egg/tin
kerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/brick_imu.py -> build/bdist.linux-armv6l/egg/tinker
forge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_temperature_ir.py -> build/bdist.linux-arm
v6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_industrial_quad_relay.py -> build/bdist.li
nux-armv6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_led_strip.py -> build/bdist.linux-armv6l/e
gg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_barometer.py -> build/bdist.linux-armv6l/e
gg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_hall_effect.py -> build/bdist.linux-armv6l
/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_dual_relay.py -> build/bdist.linux-armv6l/
egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_voltage.py -> build/bdist.linux-armv6l/egg
/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_line.py -> build/bdist.linux-armv6l/egg/ti
nkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_segment_display_4x7.py -> build/bdist.linu
x-armv6l/egg/tinkerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_ptc.py -> build/bdist.linux-armv6l/egg/tin
kerforge
copying build/lib.linux-armv6l-2.7/tinkerforge/bricklet_linear_poti.py -> build/bdist.linux-armv6l
/egg/tinkerforge
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/brick_dc.py to brick_dc.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_distance_us.py to bricklet_distan
ce_us.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_temperature.py to bricklet_temper
ature.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_remote_switch.py to bricklet_remo
te_switch.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_tilt.py to bricklet_tilt.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_motion_detector.py to bricklet_mo
tion_detector.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/brick_servo.py to brick_servo.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/brick_stepper.py to brick_stepper.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_industrial_digital_out_4.py to br
icklet_industrial_digital_out_4.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_analog_out.py to bricklet_analog_
out.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_ambient_light.py to bricklet_ambi
ent_light.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_moisture.py to bricklet_moisture.
pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_multi_touch.py to bricklet_multi_
touch.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_analog_in.py to bricklet_analog_i
n.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_industrial_digital_in_4.py to bri
cklet_industrial_digital_in_4.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_industrial_dual_0_20ma.py to bric
klet_industrial_dual_0_20ma.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_current12.py to bricklet_current1
2.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_io4.py to bricklet_io4.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_humidity.py to bricklet_humidity.
pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_lcd_20x4.py to bricklet_lcd_20x4.
pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_gps.py to bricklet_gps.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_piezo_buzzer.py to bricklet_piezo
_buzzer.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_dual_button.py to bricklet_dual_b
utton.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_io16.py to bricklet_io16.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_piezo_speaker.py to bricklet_piez
o_speaker.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_voltage_current.py to bricklet_vo
ltage_current.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_distance_ir.py to bricklet_distan
ce_ir.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_joystick.py to bricklet_joystick.
pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/ip_connection.py to ip_connection.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_rotary_poti.py to bricklet_rotary
_poti.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_rotary_encoder.py to bricklet_rot
ary_encoder.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_lcd_16x2.py to bricklet_lcd_16x2.
pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_sound_intensity.py to bricklet_so
und_intensity.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_current25.py to bricklet_current2
5.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/brick_master.py to brick_master.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/brick_imu.py to brick_imu.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_temperature_ir.py to bricklet_tem
perature_ir.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_industrial_quad_relay.py to brick
let_industrial_quad_relay.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_led_strip.py to bricklet_led_stri
p.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_barometer.py to bricklet_baromete
r.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_hall_effect.py to bricklet_hall_e
ffect.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_dual_relay.py to bricklet_dual_re
lay.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_voltage.py to bricklet_voltage.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_line.py to bricklet_line.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_segment_display_4x7.py to brickle
t_segment_display_4x7.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_ptc.py to bricklet_ptc.pyc
byte-compiling build/bdist.linux-armv6l/egg/tinkerforge/bricklet_linear_poti.py to bricklet_linear
_poti.pyc
creating build/bdist.linux-armv6l/egg/EGG-INFO
copying tinkerforge.egg-info/PKG-INFO -> build/bdist.linux-armv6l/egg/EGG-INFO
copying tinkerforge.egg-info/SOURCES.txt -> build/bdist.linux-armv6l/egg/EGG-INFO
copying tinkerforge.egg-info/dependency_links.txt -> build/bdist.linux-armv6l/egg/EGG-INFO
copying tinkerforge.egg-info/top_level.txt -> build/bdist.linux-armv6l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/tinkerforge-2.1.0-py2.7.egg' and adding 'build/bdist.linux-armv6l/egg' to it
removing 'build/bdist.linux-armv6l/egg' (and everything under it)
Processing tinkerforge-2.1.0-py2.7.egg
Copying tinkerforge-2.1.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding tinkerforge 2.1.0 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/tinkerforge-2.1.0-py2.7.egg
Processing dependencies for tinkerforge==2.1.0
Finished processing dependencies for tinkerforge==2.1.0
pi@rpiHM ~/tinkerforge $ 

 

Aber der ip_connection Fehler bleibt beim xively-script

Geschrieben

 

Kann das der Unterschied sein?

 

from ip_connection import IPConnection
from ip_connection import Error
from brick_master import Master
from bricklet_lcd_20x4 import LCD20x4
from bricklet_ambient_light import AmbientLight
from bricklet_humidity import Humidity
from bricklet_barometer import Barometer

 

gegenueber

 

from tinkerforge.ip_connection import IPConnection
from tinkerforge.ip_connection import Error
from tinkerforge.brick_master import Master
from tinkerforge.bricklet_lcd_20x4 import LCD20x4
from tinkerforge.bricklet_ambient_light import AmbientLight
from tinkerforge.bricklet_humidity import Humidity
from tinkerforge.bricklet_barometer import Barometer

 

Der Loetkolben

 

Geschrieben

Wo steht das man das "tinkerforge." entfernen soll? Das solltest du nur entfernen wenn die ip_connection.py und die brick_master.py usw im gleichen order wie das auszuführende Script liegt.

 

Du schmeißt da alles ein wenig durcheinander ;). Wenn du die .egg installierst brauchst du den tinkerforge/ Order selbst nicht mehr, da die Python library direkt im System installiert wird. Oder andersrum: Wenn du den tinkerforge/ Order da hast wird nicht der Kram benutzt der über das .egg im System installiert ist.

Geschrieben

Ja, da schmeiße ich wohl was durcheinander...

 

Mittlerweile gibt es folgendes zu vermelden:

Ich habe python setup.py install fehlerfrei ausgeführt. Das .egg lässt sich weiterhin nicht installieren mit gleichem Fehler.

 

Im Verzeichnis des Scripts befindet sich das tinkerforge-Verzeichnis mit den benötigten Dateien *.py.

 

Heisst, schreibe ich im Script vor den genannten Zeilen wie ip_connection nun tinkerforge.ip_connection, so laufen nun die Scripte.

 

Aber am liebsten wäre mir, wenn sich das .egg im System installieren würde.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...