Page 1 of 2

Parrot FlowerPower plugin

PostPosted: Sun Nov 13, 2016 5:53 am
by broadk
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.

Re: Parrot FlowerPower plugin

PostPosted: Thu Nov 17, 2016 1:51 pm
by AndyVirus
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.

Re: Parrot FlowerPower plugin

PostPosted: Sat Nov 19, 2016 11:01 am
by broadk
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.

Re: Parrot FlowerPower plugin

PostPosted: Sat Nov 19, 2016 3:42 pm
by AndyVirus
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

Re: Parrot FlowerPower plugin

PostPosted: Wed Nov 23, 2016 12:18 pm
by AndyVirus
Yep that was it, i was using the old api key, generated new one and all working. Thanks!


Sent from my iPhone using Tapatalk

Re: Parrot FlowerPower plugin

PostPosted: Sun Nov 27, 2016 5:50 am
by chasyori
How do i install the plugin. Thanks


Sent from my iPad using Tapatalk

Re: Parrot FlowerPower plugin

PostPosted: Mon Nov 28, 2016 6:39 am
by broadk
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

Re: Parrot FlowerPower plugin

PostPosted: Mon Nov 28, 2016 7:56 am
by chasyori
I was able to get it.. thanks for your help


Sent from my iPhone using Tapatalk

Re: Parrot FlowerPower plugin

PostPosted: Mon Mar 27, 2017 11:22 am
by AndyVirus
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?

Re: Parrot FlowerPower plugin

PostPosted: Sun Feb 04, 2018 6:27 am
by broadk
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.

Re: Parrot FlowerPower plugin

PostPosted: Sun Feb 04, 2018 7:37 am
by Different Computers
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?

Re: Parrot FlowerPower plugin

PostPosted: Sat Feb 10, 2018 10:12 am
by AndyVirus
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

Re: Parrot FlowerPower plugin

PostPosted: Mon Feb 26, 2018 9:54 am
by AndyVirus
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)

Re: Parrot FlowerPower plugin

PostPosted: Fri Mar 16, 2018 10:56 am
by broadk
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.

Re: Parrot FlowerPower plugin

PostPosted: Fri Mar 16, 2018 11:38 am
by AndyVirus
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