Jump to content

rtrbt

Administrators
  • Gesamte Inhalte

    1.401
  • Benutzer seit

  • Letzter Besuch

  • Tagessiege

    127

Posts erstellt von rtrbt

  1. The message published to "callback/bindings/restart" is sent by the bindings to notify other bindings to print the warning you see. As your broker is running on another machine, my first guess is, that there is a timing problem here: Maybe the bindings see their own restart message. But I need to take another look. For now you can ignore the warning if you are sure, there is no other instance running.

     

    Your broker seems to run okay, you don't need to reinstall.

     

    For testing purposes you can try to enumerate the attached devices:

    publish

    {"register": true}

    to

    tinkerforge/register/ip_connection/enumerate

    and then publish an empty message to

    tinkerforge/request/ip_connection/enumerate

    You should then see responses for all found devices under the topic

    tinkerforge/callback/ip_connection/enumerate

  2. Hi Theo,

    Hast du noch ein anderes Programm parallel laufen, dass mit dem NFC-RFID-Bricklet kommuniziert? Im Log kommen über das state-changed-Callback Antworten auf Anfragen, die der Brick Viewer nicht abgesetzt haben kann. Das Flackern wird dann dadurch ausgelöst, dass das Bricklet in kurzer Zeit (~10ms) zwei Mal nach der Tag-ID sucht und erst die richtige ID findet und danach einen Fehler zurückgibt.

     

    Hattest du das Problem schon mit dem alten Brick Viewer?

  3. Hi,

    Die Bindings brauchen etwas mehr manuelle Arbeit als die alte Proxy. Damit ein MQTT-Client die Daten erhält, muss ein Callback registriert, oder (periodisch) ein Getter aufgerufen werden. Die MQTT-Bindings verhalten sich hier genauso wie die Bindings der Programmiersprachen.

     

    MQTT-Broker-Verbindungsdaten lassen sich mit --broker-host [HOSTNAME/IP] und --broker-port [PORT] konfigurieren. Es gibt noch weitere Parameter für Authentisierung, Zertifikate usw., die mit --help angezeigt werden können. Ich werde das ganze aber mal noch in die Dokumentation einbauen.

     

    Gruß,

    Erik

  4. Hi,

     

    As of today, a beta version of the MQTT bindings 2.0 is available. Please tinker around with them and post any bugs, suggestions and other feedback here.

     

    The MQTT bindings are now generated like other programming language bindings. All Bricks and Bricklets are supported. The bindings map directly to the Python bindings, which is why they are not backwards-compatible to the old MQTT proxy. The MQTT proxy is now discontinued.

     

    The current version of the bindings is attached to this post, including examples.

     

    The bindings depend on Python >= 2.7.9 or >= 3.4 and the Paho library (>= 1.3.1) available here.

     

    The documentation can be found here

     

    Have a lot of fun!

     

    Erik

     

    Edit:

    Version 2.0.1

    - Fix handling of JSON errors for Python 2

    tinkerforge_mqtt_bindings_2_0_1.zip

  5. Moin,

     

    Seit heute ist eine Beta-Version der MQTT-Bindings 2.0 verfügbar. Experimentiert damit, wir freuen uns auf Feedback, Bugs und mehr.

     

    Die MQTT-Bindings werden jetzt, genau wie die Bindings anderer Programmiersprachen, automatisch generiert. Alle Bricks und Bricklets werden unterstützt. Die Bindings bilden die API der Python-Bindings ab, weshalb sie nicht rückwärtskompatibel zur alten MQTT-Proxy sind. Die MQTT-Proxy ist damit abgekündigt.

     

    Die aktuellen Bindings, sowie Beispiele im examples-Ordner, sind angehangen.

     

    Die Bindings hängen von Python >= 2.7.9 oder >= 3.4 und der Paho-Bibliothek (>= 1.3.1), die hier verfügbar ist, ab.

     

    Die Dokumentation ist hier zu finden

     

    Viel Spaß!

     

    Erik

     

    Edit:

    Version 2.0.1:

    - Fehlerbehandlung für JSON-Fehler in Python 2 überarbeitet.

    tinkerforge_mqtt_bindings_2_0_1.zip

  6. Hi,

     

    As of today, a beta version of the Go bindings is available. Please tinker around with them and post any bugs, suggestions and other feedback here.

     

    The current version of the bindings is attached to this post, including example sources. The bindings can also be installed with

    go get github.com/Tinkerforge/go-api-bindings

     

    There are no further dependencies except the Go compiler.

     

    The documentation on the Tinkerforge home page is not visible yet, as it is still work in progress, but a complete API documentation is available here

     

    Have a lot of fun!

     

    Erik

     

    Edit: I've attached version 2.0.1, which should also work on 32 bit systems (for example the Raspberry Pi).

    tinkerforge_go_bindings_2_0_1.zip

  7. Moin,

     

    Seit heite ist eine Beta-Version der Go-Bindings verfügbar. Experimentiert damit, wir freuen uns auf Feedback, Bugs und mehr.

     

    Die aktuellen Bindings, sowie Beispiele im examples-Ordner, sind angehangen. Die Bindings können auch mit

    go get github.com/Tinkerforge/go-api-bindings

    installiert werden.

     

    Außer dem Go-Compiler werden keine weiteren Abhängigkeiten benötigt.

     

    Die Dokumentation für die Tinkerforge-Seite ist noch in Arbeit und deshalb nicht sichtbar, es gibt aber hier eine vollständige Dokumentation der API.

     

    Viel Spaß!

     

    Erik

     

    Edit: Jetzt ist Version 2.0.1 angehangen, die auch auf 32-Bit-Systemen (z.b. dem Raspberry Pi) funktionieren sollte.

    tinkerforge_go_bindings_2_0_1.zip

  8. Das ist ein Bug in unserem Beispiel. Damit negative Temperaturen funktionieren, muss der Code wie folgt abgeändert werden:

    temperature1 = ('{:6.2f}'.format((t_low | (t_high << ) / 16.0))     

    muss stattdessen

    temperature1 = (t_low | (t_high << )
    if temperature1 > 1 << 12:
        temperature1 -= 1 << 16 # Negative 12-bit values are sign-extended to 16-bit two's complement.
    temperature1 /= 16.0 # 12 bit mode measures in units of 1/16°C.
    temperature1 = '{:6.2f}'.format(temperature1)
    

    sein, bei temperature2 analog.

     

    Das Problem ist, dass der Temperatursensor eine 12 Bit lange Zahl in Zweier-Komplement-Form ausgibt (und die aufgeblasen auf 16 Bit, damit sie zwei Byte füllt). Das hat der Beispielcode bisher nicht beachtet. Ich behebe das mal in den Beispielen aller Sprachen.

     

×
×
  • Neu erstellen...