Closed spoertner closed 4 years ago
I'm seeing the same issue. I see data getting synced to https://myflowerpower.parrot.com but it isn't showing up in the iOS app.
The v2 branch seems to work.
Tried v2 and copied over my credentials.json from the "v1" version, but i get "Error: Invalid URI "undefined/user/v3/authenticate"". Has the API url changed somehow?
when i add the url: 'https://api-flower-power-pot.parrot.com' to the credentials.json, i get the following error:
url: 'https://api-flower-power-pot.parrot.com/user/v3/authenticate', method: 'POST' } CODE: 400 error: invalid_client
Oh, you may need a new api key. I was getting an invalid client error after making sure everything else was there, and getting a new key made it work.
Here's where to request a key: https://api-flower-power-pot.parrot.com/api_access/signup Here are the official docs for the new/current API: http://developer.parrot.com/docs/FlowerPower/
Here's my output when I run, with my own data replaced with XXXX:
pi@raspberrypi:~/node-flower-bridge $ ./bridge display
-- Flower Bridge --
[---] No program is running node /home/pi/node-flower-bridge/start.js POST/urlencoded /user/v3/authenticate client_id: XXXX client_secret: XXXX username: XXXX password: XXXX grant_type: password app_identifier: { headers: { 'Content-Type': 'application/x-www-form-urlencoded', Authorization: '' }, body: 'client_id=XXXX&client_secret=XXXX&username=XXXX&password=XXXX&grant_type=password&app_identifier=', url: 'https://api-flower-power-pot.parrot.com/user/v3/authenticate', method: 'POST' } ✔ Login! and then a bunch more stuff.
the new api key worked, thank you.
strangely the v2 version finds only one of two sensors (it finds 2, but can only connect to one) and even from the one that he has connected to, no new data is transmitted to the cloud.
It seems to me that this is broken and as far as i can see, there is no active development anymore for the bridge ... but hey, it was fun while it lasted.
After patching (unknown, why the node package is not updated) the url in the file /build/node-flower-bridge/node_modules/flower-power-api/FlowerPowerCloud.js
FlowerPowerCloud.url = 'https://api-flower-power-pot.parrot.com';
and
const DEBUG = true;
I get the message
pi@raspberrypi:/build/node-flower-bridge# node start.js
POST/urlencoded /user/v2/authenticate
client_id: xxxx
client_secret: xxxx
username: xxxx
password: xxxx
grant_type: password
{ headers:
{ 'Content-Type': 'application/x-www-form-urlencoded',
Authorization: '' },
body: 'client_id=xxxx&client_secret=xxxx&username=xxxx&password=xxxx&grant_type=password',
url: 'https://api-flower-power-pot.parrot.com/user/v2/authenticate',
method: 'POST' }
✔ Login!
[Nov 06 2016 14:58:43]: New process every 15 minutes
GET/json /sensor_data/v4/garden_locations_status
{ headers:
{ 'Content-Type': 'application/json',
Authorization: 'Bearer xxxx' },
body: 'null',
url: 'https://api-flower-power-pot.parrot.com/sensor_data/v4/garden_locations_status',
method: 'GET' }
GET/json /sensor_data/v3/sync
{ headers:
{ 'Content-Type': 'application/json',
Authorization: 'Bearer xxxx' },
body: 'null',
url: 'https://api-flower-power-pot.parrot.com/sensor_data/v3/sync',
method: 'GET' }
GET/json /user/v4/profile
{ headers:
{ 'Content-Type': 'application/json',
Authorization: 'Bearer xxxx' },
body: 'null',
url: 'https://api-flower-power-pot.parrot.com/user/v4/profile',
method: 'GET' }
[Nov 06 2016 14:58:43]: Error in getInformationsCloud
There seems to be a problem with the new api response
After patching (unknown, why the node package is not updated) the url in the file /build/node-flower-bridge/node_modules/flower-power-api/FlowerPowerCloud.js
FlowerPowerCloud.url = 'https://api-flower-power-pot.parrot.com';
andconst DEBUG = true;
I get the message
pi@raspberrypi:/build/node-flower-bridge# node start.js POST/urlencoded /user/v2/authenticate client_id: xxxx client_secret: xxxx username: xxxx password: xxxx grant_type: password { headers: { 'Content-Type': 'application/x-www-form-urlencoded', Authorization: '' }, body: 'client_id=xxxx&client_secret=xxxx&username=xxxx&password=xxxx&grant_type=password', url: 'https://api-flower-power-pot.parrot.com/user/v2/authenticate', method: 'POST' } ✔ Login! [Nov 06 2016 14:58:43]: New process every 15 minutes GET/json /sensor_data/v4/garden_locations_status { headers: { 'Content-Type': 'application/json', Authorization: 'Bearer xxxx' }, body: 'null', url: 'https://api-flower-power-pot.parrot.com/sensor_data/v4/garden_locations_status', method: 'GET' } GET/json /sensor_data/v3/sync { headers: { 'Content-Type': 'application/json', Authorization: 'Bearer xxxx' }, body: 'null', url: 'https://api-flower-power-pot.parrot.com/sensor_data/v3/sync', method: 'GET' } GET/json /user/v4/profile { headers: { 'Content-Type': 'application/json', Authorization: 'Bearer xxxx' }, body: 'null', url: 'https://api-flower-power-pot.parrot.com/user/v4/profile', method: 'GET' } [Nov 06 2016 14:58:43]: Error in getInformationsCloud
There seems to be a problem with the new api response
I am getting the same error message
After the last iOS App update came a firmware update for the flower power sensor. Since then, the node-flower-bridge still connects fine with the device, but no data is transferred to the cloud service.