rwblinn Geschrieben January 23, 2020 at 15:23 Geschrieben January 23, 2020 at 15:23 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} Zitieren
rtrbt Geschrieben January 24, 2020 at 08:51 Geschrieben January 24, 2020 at 08:51 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. Zitieren
rwblinn Geschrieben January 24, 2020 at 09:14 Autor Geschrieben January 24, 2020 at 09:14 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) Zitieren
rwblinn Geschrieben January 24, 2020 at 09:37 Autor Geschrieben January 24, 2020 at 09:37 [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. Zitieren
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.