Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Probleme mit MQTT Bindings und Industrial Dual 0-20mA Bricklet 2.0

Featured Replies

Geschrieben

Hallo zusammen,

ich habe Probleme, via MQTT Bindings mit einem Industrial Dual 0-20mA Bricklet 2.0 zu sprechen. Hier mein Setup:

  • Industrial Dual 0-20mA Bricklet 2.0 an einem ESP32 Ethernet Brick per USB-C an einem Mac
  • Im Brick Viewer kann ich beide Geräte sehen und die Stromstärke am Bricklet anzeigen lassen.
  • MQTT-Broker (Mosquitto) läuft auf einem Raspberry Pi in meinem Heimnetz.
  • Auf dem Mac starte ich (tinkerforge_mqtt-Version 2_0_17): 
    tinkerforge_mqtt --broker-host raspberrypi --broker-username <user> --broker-password <password> --ipcon-host localhost --ipcon-port 4223 --debug

     

Die Verbindung zum Broker und zum Brick Daemon klappt. Anschließend versuche ich folgendes:

mosquitto_pub -h raspberrypi -u <user> -P <password> -p 1883 -m '{"register": true}' -t tinkerforge/register/industrial_dual_0_20ma_v2_bricklet/27Em/current
mosquitto_pub -h raspberrypi -u <user> -P <password> -p 1883  -m '{"channel": 0}' -t tinkerforge/request/industrial_dual_0_20ma_v2_bricklet/27Em/get_current

Auf Topic

tinkerforge/response/industrial_dual_0_20ma_v2_bricklet/27Em/get_current

bekomme ich dann

{"current": null, "_ERROR": "Did not receive response for function 255 in time (call of get_current of industrial_dual_0_20ma_v2_bricklet 27Em)"}

Auch ein Abfragen der Callback-Konfiguration mit

mosquitto_pub -h raspberrypi -u <user> -P <password> -p 1883 -m '{"channel": 0}' -t tinkerforge/request/industrial_dual_0_20ma_v2_bricklet/27Em/get_current_callback_configuration

klappt nicht:

{"period": null, "value_has_to_change": null, "option": null, "min": null, "max": null, "_ERROR": "Did not receive response for function 255 in time (call of get_current_callback_configuration of industrial_dual_0_20ma_v2_bricklet 27Em)"}

Ich bin über jeden Tipp dankbar, woran es hapern könnte. Die UID des Bricklets (27Em) stimmt. Ein Heraufsetzen von --ipcon-timeout hlft nicht.

Danke vorab und viele Grüße

Jannis

Geschrieben
On 7/22/2024 at 2:59 PM, jannis said:

Im Brick Viewer kann ich beide Geräte sehen und die Stromstärke am Bricklet anzeigen lassen.

Dafür mustest du im Brick Viewer localhost zum Hostnamen oder der IP-Adresse des ESP32 Ethernet Brick ändern. Das musst du auch beim Aufruf von tinkerforge_mqtt machen. Du hast dort --ipcon-host localhost stehen, dort musst du localhost auch zum Hostnamen oder der IP-Adresse des ESP32 Ethernet Brick ändern.

Geschrieben
  • Autor

Ok, vielen Dank! Jetzt klappt es. Ich hatte nicht kapiert, dass auf dem ESP32 Ethernet Brick auch ein Brick Daemon läuft. Ich dachte, der läuft nur auf dem Mac. Also gleiches Problem wie in 

.

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...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.