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.

Featured Replies

Geschrieben

Hi,

 

tried to setup an Air Quality Bricklet for MQTT Callback with a Raspberry Pi 4 running mosquito and the Tinkerforge MQTT Binding 2.0.6.

The Brick Viewer shows all data; An MQTT request provides also the data (see below …/get_all_values request with response), but with MQTT callback no response.

Question: what is wrong in below configuration?

pi@4dev:~ $ mosquitto_pub -t tinkerforge/request/air_quality_bricklet/Jvj/set_all_values_callback_configuration -m '{"period": 100, "value_has_to_change":false}'

pi@4dev:~ $ mosquitto_pub -t tinkerforge/register/air_quality_bricklet/Jvj/all_values -m '{"register": true}'

 

OUTPUT

pi@4dev:~ $ mosquitto_sub -v -t tinkerforge/#

tinkerforge/request/air_quality_bricklet/Jvj/set_all_values_callback_configuration {"period":10,"value_has_to_change":false}
tinkerforge/register/air_quality_bricklet/Jvj/all_values {"register":true}

tinkerforge/request/air_quality_bricklet/Jvj/get_all_values {}
tinkerforge/response/air_quality_bricklet/Jvj/get_all_values {"iaq_index": 26, "iaq_index_accuracy": "low", "temperature": 2100, "humidity": 5403, "air_pressure": 102912}

 

 

Geschrieben

The configuration seems to be correct. You could try the following:

  • Run the bindings with --debug
  • Read back the callback configuration with
     mosquitto_pub -t tinkerforge/request/air_quality_bricklet/Jvj/get_all_values_callback_configuration -m ''

    after you've set it.

Also the period is in milliseconds, so 10 should work, but will flood you with data that will be very often identical.

Geschrieben
  • Autor

Please find the output of running the bindings with parameter --debug.

Changed the period to 5000.

2020-01-24 10:10:29,786 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m582), 'b'tinnse/air_quality_bricklet/Jvj/get_all_values_callback_configuration'', ... (46 bytes)
2020-01-24 10:10:48,678 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m586), 'b'tinkerforge/callback/air_quality_bricklet/Jvj/all_values'', ... (109 bytes)
2020-01-24 10:10:53,637 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m587), 'b'tinkerforge/callback/air_quality_bricklet/Jvj/all_values'', ... (109 bytes)
2020-01-24 10:10:58,600 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m588), 'b'tinkerforge/callback/air_quality_bricklet/Jvj/all_values'', ... (109 bytes)
2020-01-24 10:11:03,561 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m589), 'b'tinkerforge/callback/air_quality_bricklet/Jvj/all_values'', ... (109 bytes)
2020-01-24 10:11:08,513 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m590), 'b'tinkerforge/callback/air_quality_bricklet/Jvj/all_values'', ... (109 bytes)
2020-01-24 10:11:13,478 <DEBUG> paho.mqtt.client: Sending PUBLISH (d0, q0, r0, m591), 'b'tinkerforge/callback/air_quality_bricklet/Jvj/all_values'', ... (109 bytes)

 

Geschrieben
  • Autor

[SOLVED] Rebooted the Raspberry Pi and the MQTT Bindings are working ok. Tested from the CLI and also using Node-RED flow.

Thanks for help anyhow.

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.