Jump to content

MQTT Air Quality Bricklet Callback No Response


rwblinn

Recommended Posts

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}

 

 

Link zu diesem Kommentar
Share on other sites

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.

Link zu diesem Kommentar
Share on other sites

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)

 

Link zu diesem Kommentar
Share on other sites

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