How update data in your cloud

Hello,

I have account in your system and want update info about my flowers by using raspberry. Should I register my devices in system with your mobile app or I can just send historic data by using PUT request to https://apiflowerpower.parrot.com/sensor_data/v5/sample as in your example https://github.com/Parrot-Developers/node-flower-power-cloud/blob/master/flower-power-cloud.js ?

Hi,
You first need to register all the probe with the application.
Then, grab credentials for your account.
You will be able to make PUT request only on registered probes.

We will soon publish a complete application example using a Raspberry Pi !
Best,
Jerome

Thanks for answer Jerome! I’ll wait example.

Two fast questions.

I just send request for update historic data and took successful response

=> #<HTTParty::Response:0x7fe6e7ad4938 parsed_response={"9003B70000E7F152"=>8940, "actions"=>[{"created_session_history_for_sensor"=>"9003B70000E7F152"}, {"accepted_upload"=>"Sensor:9003B70000E7F152"}], "user_config_version"=>9, "errors"=>[], "server_identifier"=>"1.3.2 May 5th 2015"}, @response=#<Net::HTTPOK 200 OK readbody=true>, @headers={"server"=>["nginx/1.6.2 (Ubuntu)"], "date"=>["Mon, 08 Jun 2015 15:23:07 GMT"], "content-type"=>["application/json; charset=utf-8"], "transfer-encoding"=>["chunked"], "connection"=>["close"], "status"=>["200 OK"], "x-frame-options"=>["SAMEORIGIN"], "x-xss-protection"=>["1; mode=block"], "x-content-type-options"=>["nosniff"], "etag"=>["W/\"76ae2e70108c1a10da9360122edf4a2b\""], "cache-control"=>["max-age=0, private, must-revalidate"], "x-request-id"=>["d97f6359-7a96-4707-be01-3d449f4f6fea"], "x-runtime"=>["0.509284"], "strict-transport-security"=>["max-age=31536000; includeSubdomains"]}>

But in my cabinet https://myflowerpower.parrot.com/ I doesn’t see changes. The same if I try check last uploaded samples for location from API.

Data that I send: https://gist.github.com/KonstantinReido/dad11d2b29fabbaf4c98

And second question is how sensor will know about sync process and update internal state for response in next time with new values for historic data.

Thanks!

Hej Jerome,

that sounds great for me too and comes at the right time, thx a lot! :smile:
So will your example contain the use of Bluetooth- and Web-API or just one of them?

Waiting impatiently for your example,
Gerhard :smile:

It will contain both :smile:

You made my day! :smile:
I promise I’ll try to wait patiently.

Any updates on that topic?

When do you think you could publish the example for the rasberry.
It would be great for my watering system in the garden :0)
I hope soon ;0) because the summer here is over in a few weeks :sunny:

Before end of month !
And you will be able to contribute to improve the program :smile:

… I hope so :smile:

Today?

I hope for testing material for the weekend.

and here it is !

This is the first version, so there can be some small issues :smile:

Error
sudo node app.js

module.js:340
throw err;
^
Error: Cannot find module './index’
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/pi/FlowerPower-Tools/BLE-cloud-bridge/app.js:4:19)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

fixed, we changed directories on our target last minute

So I need to reinstalle FlowerPowerTools?

Now has this:
login error: premature end-of-file
login error: invalid credentials: code=undefined results=undefined
getGarden: premature end-of-file

/home/pi/FlowerPower-Tools/BLE-cloud-bridge/app.js:102
var uuid1 = tabSensors[a].toLowerCase();
^
ReferenceError: a is not defined
at discoUuid (/home/pi/FlowerPower-Tools/BLE-cloud-bridge/app.js:102:31)
at async.series.loop1 (/home/pi/FlowerPower-Tools/BLE-cloud-bridge/app.js:117:4)
at /home/pi/node_modules/async/lib/async.js:763:21
at /home/pi/node_modules/async/lib/async.js:391:17
at iterate (/home/pi/node_modules/async/lib/async.js:181:13)
at /home/pi/node_modules/async/lib/async.js:192:25
at /home/pi/node_modules/async/lib/async.js:393:21
at /home/pi/node_modules/async/lib/async.js:768:34
at /home/pi/FlowerPower-Tools/BLE-cloud-bridge/app.js:87:9
at /home/pi/node_modules/node-flower-power-cloud/flower-power-cloud.js:157:26

Where is thèse “a” variable defined?

Should be "loop1"
Please look at the github commit history , you will see that we are still updating the software :wink:

So I need to wait… Please tell me when is done.