Parrot FlowerPower plugin

Posted on
Sun Nov 13, 2016 5:53 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Parrot FlowerPower plugin

For Indigo 7 I am introducing a new plugin which enables integration of your Parrot FlowerPower devices into your system. This plugin consumes data from the Parrot systems to create and monitor state changes on your FlowerPower devices. For each sensor a new device is created within Indigo and automatically synced with the Parrot servers. You can execute triggers on state changes relating to light, moisture, and temperature.

It should be noted that the plugin relies upon your phone to collect data from the sensors via bluetooth. I had considered having the plugin read the data directly from the sensors but concluded your Indigo server was unlikely to be in range of your houseplants and garden to be an effective strategy

v1.0 of this plugin can be downloaded via the releases tab at https://github.com/KieranBroadfoot/Flow ... digoPlugin

At the present time I do not have a new Parrot Pot so your mileage may vary. I believe it will work as expected but cannot confirm.

Thanks
k.

Posted on
Thu Nov 17, 2016 1:51 pm
AndyVirus offline
Posts: 214
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: Parrot FlowerPower plugin

Hello,

Just gave this a try and i cant get past the credentials screen. It just says "credentials are invalid". I know they work as my script still works and creates/updates indigo variables.
Is there a simple way to debug a plugin to see why this is failing for me? Looking forward to ditching the script and from your plugin learning how to make a plugin.

I already have credentials so not created them again. The create credentials button does not seem to do anything either.

Where does the credentials get saved from the gui? I could try adding them directly.

Posted on
Sat Nov 19, 2016 11:01 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Parrot FlowerPower plugin

Very recently Parrot updated their online service. The previous version is still available online but is expected to be deprecated at some point in the future. As such I chose to use the latest API which requires new credentials. The "Create API Key" option in the menu will open the correct page to generate these credentials. Were you able to do this?

Sadly the error message back from the API when credentials are invalid is pretty useless. It simply provides an "invalid_grant" error without any details as to what went wrong. As such I chose not to include better debugging information.

That said, I did notice that the latest API can sometimes provide predictive status responses indicating when a bound will be crossed in the future. Given we regularly check the status of the API I've chosen to treat predictive responses as indicative of being in a good state. Version 1.1 can be downloaded from GitHub if you are seeing "receiving unknown response from the cloud" error messages. I'll continue to monitor responses from the API to see if I can improve the plugin in parallel.

Thanks
k.

Posted on
Sat Nov 19, 2016 3:42 pm
AndyVirus offline
Posts: 214
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: Parrot FlowerPower plugin

Ah ok. I thought that "might" be the case so after i posted the above i noticed that safari opened on my mac mini where indigo 7 server is running not on my macbook pro when i connect to the server from.... so submitted the form for a nee api key so will give that a blast tomorrow. Ill bet thats why my pi flowerpower bridge has died too then


Sent from my iPhone using Tapatalk

Posted on
Wed Nov 23, 2016 12:18 pm
AndyVirus offline
Posts: 214
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: Parrot FlowerPower plugin

Yep that was it, i was using the old api key, generated new one and all working. Thanks!


Sent from my iPhone using Tapatalk

Posted on
Sun Nov 27, 2016 5:50 am
chasyori offline
Posts: 27
Joined: Dec 18, 2014

Re: Parrot FlowerPower plugin

How do i install the plugin. Thanks


Sent from my iPad using Tapatalk

Posted on
Mon Nov 28, 2016 6:39 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Parrot FlowerPower plugin

Visit https://github.com/KieranBroadfoot/FlowerPower.indigoPlugin/releases and click the "Source Code (zip)" option from the Downloads section of the latest version (currently v1.1). Rename the saved file to remove "-1.1" and it will instantly become available as an Indigo plugin which you can double click for install. Configuration of the plugin requires you to create an API key. Details for this can be found at the main GitHub page https://github.com/KieranBroadfoot/FlowerPower.indigoPlugin

Hope this helps.
k

Posted on
Mon Nov 28, 2016 7:56 am
chasyori offline
Posts: 27
Joined: Dec 18, 2014

Re: Parrot FlowerPower plugin

I was able to get it.. thanks for your help


Sent from my iPhone using Tapatalk

Posted on
Mon Mar 27, 2017 11:22 am
AndyVirus offline
Posts: 214
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: Parrot FlowerPower plugin

Hello,

As its getting close to gardening automation season again i am looking at options. This plugin as great, just need to figure out how to integrate with GreenIQ to control my zones (with out relying on GreenIQ app itself as nearly a year later and still no support for multiple Flower Powers per zone (I have 6 Zones and 14 Flower powers), but i digress.

I keep getting this in my indigo log:

Code: Select all
   FlowerPower Warning             received unknown response from cloud: air_temperature_soon_available
   FlowerPower Warning             received unknown response from cloud: light_soon_available
   FlowerPower Warning             received unknown response from cloud: fertilizer_unavailable
   Error                           cannot update device state for key temperatureInstruction to value  (invalid enumeration value)
   Error                           cannot update device state for key lightInstruction to value  (invalid enumeration value)
   Error                           cannot update device state for key fertilizerInstruction to value  (invalid enumeration value)


Is there anyway to suppress this?

Posted on
Sun Feb 04, 2018 6:27 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Parrot FlowerPower plugin

Andy,

I guess 10 months late is a new record. I've created a new release v1.2 which handles this by introducing new state types to the FlowerPower device. These states are "Not Available" and "Not Ready" where Not Ready reflects a new FlowerPower which has not yet been updated server side to include instructional advice.

I believe changes to the Device type will require you to re-create the FlowerPower devices though. Sorry. Deleting your existing devices should auto-create them the next time the plugin checks with the upstream API.

Hope this helps a little.
k.

Posted on
Sun Feb 04, 2018 7:37 am
Different Computers offline
User avatar
Posts: 1854
Joined: Jan 02, 2016
Location: East Coast

Re: Parrot FlowerPower plugin

I was intrigued, and went to look for the sensor on line to consider getting a few.

Seems they've stopped making the sensor except built into a pot. Anyone know of a source in the US?

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Sat Feb 10, 2018 10:12 am
AndyVirus offline
Posts: 214
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: Parrot FlowerPower plugin

broadk wrote:
Andy,

I guess 10 months late is a new record. I've created a new release v1.2 which handles this by introducing new state types to the FlowerPower device. These states are "Not Available" and "Not Ready" where Not Ready reflects a new FlowerPower which has not yet been updated server side to include instructional advice.

I believe changes to the Device type will require you to re-create the FlowerPower devices though. Sorry. Deleting your existing devices should auto-create them the next time the plugin checks with the upstream API.

Hope this helps a little.
k.


Thanks! Ill give it a go very soon. Need to get the flowerpower bridge powered back up as the app on iphone seems long dead. Parrot looks to have dropped flowerpower to focus on drones so hope the cloud service is not eol soon. I know you can read the devices directly but thats way above my knowledge/patience.

Amazon has flowerpower at £70 a sensor right now! Madness!


Sent from my iPhone using Tapatalk

Posted on
Mon Feb 26, 2018 9:54 am
AndyVirus offline
Posts: 214
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: Parrot FlowerPower plugin

Ok so it has suppresed the errors so thats great! Thanks!

I just had to restart the plugin though as it is using near 100% cpu. Will monitor and see if it happens again.

I do get this on plugin start up:

Enabling plugin "FlowerPower 1.2"
Starting plugin "FlowerPower 1.2" (pid 50927)
Started plugin "FlowerPower 1.2"
FlowerPower starting flowerpower plugin
FlowerPower credentials are valid
Error cannot update device state for key fertilizerInstruction to value not_available (invalid enumeration value)
Error cannot update device state for key fertilizerInstruction to value not_available (invalid enumeration value)

Posted on
Fri Mar 16, 2018 10:56 am
broadk offline
Posts: 41
Joined: Sep 05, 2013

Re: Parrot FlowerPower plugin

Andy, did you recreate the FlowerPower device? In the latest update I changed the device specification to support a new status of "not_available". This error indicates you are still using an old device type.

Hope this helps.
k.

Posted on
Fri Mar 16, 2018 11:38 am
AndyVirus offline
Posts: 214
Joined: Mar 18, 2014
Location: Newport Pagnell, UK

Re: Parrot FlowerPower plugin

broadk wrote:
Andy, did you recreate the FlowerPower device? In the latest update I changed the device specification to support a new status of "not_available". This error indicates you are still using an old device type.

Hope this helps.
k.


Ah, i thought i had but possibly not. Ill do it now


Sent from my iPhone using Tapatalk

Who is online

Users browsing this forum: No registered users and 2 guests