cannot-store-data-from-embedded-system

Home - cannot-store-data-from-embedded-system

Jordan Maulana asked 12 months ago

red circle shows that my code is correct.. but my data can not be uploaded into my bucket in mesosfer.

i accomplished this tutorial and it was working before
https://mesosfer.com/community/store-data-iot-device-cloud-server-using-nodejs.html

but now when i try it again, my data can not be uploaded

Girly Saputri Staff replied 12 months ago

Upload your code in 3party image hosting or paste your code -> pastebin.com

Jordan Maulana replied 12 months ago

sorry i have a difficulty to understand how to post a picture here..

my embedded system said “mqtt connect” after i ran my code..
but the data can not be uploaded into my bucket

Muhammad Salman Abdul Qohar replied 12 months ago

same problem here, it’s working once.

Jordan Maulana replied 11 months ago

haha.. nice to have same suffering :v

8 Answers
Best Answer
Jordan Maulana answered 11 months ago

Alhamdulillah it is now working..
thanks for answering, thanks for repairing..

Avianto Staff replied 11 months ago

Good job Jordan…
Are you satisfied with our team’s answer? If yes please click the check icon

Badrullami Staff answered 12 months ago

Hi Jordan,
Please go to sample code publisher in menu device, make sure that appId value is same with appId in your AppSetting. Like the picture below.
Thanks.

Jordan Maulana replied 11 months ago

client.on(‘connect’, function () {
console.log(‘mqtt connect’)
})

if there is an error in coding etc, when i run publisher.js my device will not show “mqtt connect” right?

my device is showing “mqtt connect” so my code is working. but i found it just worked once..
for second time i tried it again, the data can not be uploaded into bucket, even my device shows “mqtt connect”

Girly Saputri Staff answered 11 months ago

Hi Jordan,
Are you satisfied with Badrullami’s answer? If yes, please click the check icon and if no, let me know what can I help. 🙂

Jordan Maulana replied 11 months ago

no. it is not about the code. it was working. as same as Muhammad Salman Abdul Qohar, it was working but just once. next time i ran it, it was not working.

Jordan Maulana answered 11 months ago

Thanks Mr Badrullami for the answer. it is not about the code.. because i found my code works, but why just once..

Badrullami Staff answered 11 months ago

Hi Jordan,
If you wan’t to send data more than one,  you can loop or execute client.publish(xxx,xxxx) according to your needs in publisher code. After that if you use consumer and web socket, please comment client.end()
Thanks.
 

Jordan Maulana replied 11 months ago

Hai Mr. Badrullami,

no no, that is not what i mean..
it was working yesterday, today i tried it again and not working. like that..

Muhammad Salman Abdul Qohar (above) has the same problem
it works.. once..

Jordan Maulana answered 11 months ago

Hai Mr. Badrullami,
no no, that is not what i mean..
it was working yesterday, today i tried it again and not working. like that..
Muhammad Salman Abdul Qohar (above) has the same problem
it works.. once..

Your Answer