Jump to content
Sign in to follow this  
rwblinn

MQTT Air Quality Bricklet Callback No Response

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}

 

 

Share this post


Link to post
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.

Share this post


Link to post
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)

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...