Closed Nawi98 closed 3 years ago
try retrieve_dht_data.py | mosquitto_pub -t "dht11" -l
your script does a never ending loop, printing the results from the read. mosquitto_pub can send messages for each line with the -l option.
you might want to put in some sleep somewhere to avoid flooding.
Hello @Daedaluz Thx for ur reactivity Sir. Finally here is what the link I used (see application source code) : https://thingsboard.io/docs/samples/raspberry/temperature/ Regards.
please, close if there is nothing else =)
Hello @jacmet @ketan hope u re doing good I am running mosquitto version 1.6.9 on my Raspberry PI 4 and want to retrieve my DHT11 data using the command: mosquitto_pub -m messageValue I am using the python code below to retrieve the DHT11 value (the output is on the ssh terminal) but don't know yet how to redirect it into the "messageValue" variable.
Because that is the demo's aim
Could u please help me
Cheers.