koktaildotcom / homey-mi-flora Goto Github PK
View Code? Open in Web Editor NEWIntegrate Xiaomi Mi Flora Plant Sensor into Homey
License: MIT License
Integrate Xiaomi Mi Flora Plant Sensor into Homey
License: MIT License
When I enable the "Xiaomi Mi Flora" app on my Homey my "HomeyKit" app stops working. I can see when sensors are triggered in HomeKit, but I can´t turn on/off lights for instance. As soon as I Disable the "Xiaomi Mi Flora" app the Homekit integration starts to work again. I use 1.5.13 on my Homey and 2.0.18 on the Xiaomi Mi Flora App.
like:
"filter": "driver_uri=homey:app:nl.marvinschenkel.kodi&driver_id=kodi|kodi_manual"
/lib/MiFloraDevice.js:301
let minValue = args.device.getSetting(this._thresholdMapping[capability].min);
^
TypeError: args.device.getSetting is not a function
at Homey.FlowCardCondition.register.registerRunListener (/lib/MiFloraDevice.js:301:56)
at FlowCardCondition._onRun (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/FlowCard.js:1:1246)
at emitThree (events.js:136:13)
at FlowCardCondition.emit (events.js:217:7)
at ManagerFlow._onRun (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/manager/flow.js:1:2274)
at _eventListeners.filter.forEach.t (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/HomeyClient.js:1:1219)
at Array.forEach ()
at HomeyClient._onMessage (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/HomeyClient.js:1:1196)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
I own 7 sensors and would like an option to identify the sensor (led blink)
Any way to implement this?
distance of 3-5 metres. chart
homey 1.5.11
app version v2.0.2
firmware version 3.1.8 and 2.7.0
Add the uuid
to the device settings to make it easy to identify the devices.
The sensor is not found by the Homey app.
What else can i try?
Under settings for RoPots, it is possible to add limits for "luminance".
However, RoPots unfortunately haven't got that capability.
Suggest deleting the setting as I guess it could be confusing in some cases.
I update my homey to 2.0 today and my flora sensor have stopt working. I removed the sensor and tried to add it but i got error. Tried reintall but it faild again
The error code is:
Error: missing_permission:homey:wireless:ble
Hi koktaildotcom,
Are you planning to add other Xiaomi BLE devices to your code. Specifically this one: https://www.aliexpress.com/item/Original-Xiaomi-Mijia-Smart-Indoor-Temperature-Humidity-Monitor-Bluetooth-mi-Home-App-Control-Air-Conditioning-Fan/32845378033.html
Kind regards,
WinSCaP
I'm getting no data from my sensor. In the app everything is working fine.
Hi koktaildotcom,
There seems to be a problem with the app. It doesn't update the values once it's started. I have to restart the app in order to make it fetch new readings. It will read the sensors once, then just stops updating.
Once you restart the app every 15 minutes (currently done with the new System experiment Flow card action to restart the app), it seems to work more or less (have this in place as of 14:00). But that really shouldn't have to be done to make it update.
The refresh setting does not fix anything. Tried values of 10 minutes, 15 minutes and 30 minutes. All would not update any sensor data after first fetch.
Installed latest beta version of app (2.1.0) and latest Homey rc (2.0.5.rc2).
Edit: just noticed this notice;
The app is rewrited for v2.0 but does update just once due to Homey core issues as mentioned in de skd-app issue ticket to athom on github. Athom is looking for a fix for this issue ‘soon’ untill than the app wil not be fully compatibel with v2.0.
Well, that seems to answer it. At least the workaround seems to work for now. I'll just await Athom's fix patiently. :-)
Add same trigger cards for: Xiaomi mi flora pot
Hi,
was wondering if it would be possible to add another trigger card with something like "Sensor value within X of configured threshold" - that is, within the configured interval, but closing in on the limit...
That would allow for setting the limits for moisture etc. for each sensor corresponding to the plant and be able to make not only a flow triggered by the moisure (e.g.) being outside the limits, but also to make flows that trigger when you are getting close - that is, make it possible to react in due time instead of (kind of) too late...
Of course, flows can be made that correspond to a specific sensor - but a card using or more generic approach would allow for fewer flows :-)
Add a trigger card for if a device is out of range after 3 tries.
App v. 2.0.3 (and 2.0.6)
Readings from my RoPots are available when using the desktop app or browser, but not when using the mobile app (v.2 for iOS, 1.1.107). However, in the original Homey app (for iOS), readings are shown...
Enclosed the files of the translation
This app is not working homey V2.
It gives a BLE permission error
The threshold settings on the device aren't always clear to users. Add a content block above the settings with extra information about the settings.
Great app, thank you for that. When adding (min or max) thresholds values in advanced settings an error occurs when submitting it to the device. "An unknown error has occured [unkown error]". Firmware version 3.2.1 / Diagnostic rapport: 6346f9f6-e6a5-41ec-bfbd-230be23248ed.
Hi, great app! Worked like a charm!
But after only few hours sensors both stop working. No update anymore. Last update of both sensors is 2 days ago.
Anything to do with setting of treshold values?
Treshold values set manually, poll interval 30min. Furthermore I am restarting the app every night via homey flow.
Homey firmware is: 2.1.2
App ver: 2.1.10
Mi Flora firmware: 3.2.1
Issue report
3353ab2f-a193-4955-a999-ce1d132df65f
Any idea how to get and keep this working?!
Due to the BLE beta in Homey the direct connection on a advertisement is not stable. This should be called directly if the BLE is out of beta.
Have an issue with the MI flora device. Worked for quite some time and was providing steady data. I had to relocate one plant because we're preparing for a move to another house. I think the MI flora was out of reach for a bit too long. Haven't been able to read new values ever since. Please help.
dc6756a3-fc0e-420e-a95f-e426f3119453
The used nomenclature for variables in the app include that the measured values are named with the prefix "measure_" - this means, that if the token "sensor" is used to compose a log message like shown in the example below, text will be "[Device name]: measure_moisture is too low ([value])".
Although the logic in naming the variable is obvious and has many advantages, I suggest the variables for the measured values are names without the prefix (only "moisture", e.g.) in order to make composed messages more "clean" and ordinary language-like.
This would also prevent the situation that a message read out would like "[Device name]: measure-underscore-moisture is too low ([value] :-)
since 2 months or so, the polling interval does not work.
it does not matter if i let the interval on default or set it to a specific time, it does not refresh.
once i restart the app, the information is collected.
any ideas on what i might be doing wrong, or could this be fixed ?
kind regards,
Ziglar
In the pairing screen with homey its just says "follow the instruction"
Change to a information section with tips and qa's like:
If the sensor cannot by found, check if the sensor is connected to another bluetooth device.
For optimal signal strength keep the sensor within a close distance of homey
.
Always download the native mi app. this will update the sensor to the latest firmware.
https://community.athom.com/t/xiaomi-mi-flora-sensor-ropot-app/45/174?u=koktail
Feature request:
Can you add the humidity value of stick sensor to homey insights?
Reason:
Gives me the opportunity to check if automatic watering works when on holiday (not in use when at home because of hideous looks in kitchen, reason why next point is still valid)
Point out to wife she ignored notifications on her phone to water plants.
Establish a relation between watering and soil moisture. (Some people may call that Evapotranspiration or ET)
If you pair more than 7 devices at once, the BLE gives a timeout. Stop update on pairing, but trigger an update event in the app.
Hi! Unfortunately, the app crashed while I was doing the following: (...) This is the stack trace: /lib/MiFloraDevice.js:300 let minValue = args.device.getSetting(this._thresholdMapping[capability].min); ^ TypeError: args.device.getSetting is not a function at Homey.FlowCardCondition.register.registerRunListener (/lib/MiFloraDevice.js:300:52) at FlowCardCondition._onRun (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/FlowCard.js:1:1246) at emitThree (events.js:136:13) at FlowCardCondition.emit (events.js:217:7) at ManagerFlow._onRun (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/manager/flow.js:1:2274) at _eventListeners.filter.forEach.t (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/HomeyClient.js:1:1219) at Array.forEach () at HomeyClient._onMessage (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/HomeyClient.js:1:1196) at emitTwo (events.js:126:13) at process.emit (events.js:214:7)
I want to make an trigger card
(when) with the complete status of all the devices.
Flora sensor 1
Flora ropot 1
Then there is a possibility to make a flow:
When status raport is available ($status_raport) -> And it is 9:00 pm on saterday -> Send notification to phone ($status)
Hi @koktaildotcom,
Great app, thanks for the effort.
I noticed that the mobile interface is showing correctly on the old web interface:
But on the new (beta) app, the interface only shows a blank screen (adding a screenshot doesn't make sense).
I tried to optimize the icons (with illustrator) to check if that resolves this issue (see PR#2), but that is not the case...
I'll see if I can look into it this evening.
PS. I would propose to setup a paypalme account and replace your current contribution link to that one; saves Paypal fees... ;-P
After upgrading from 1.5.13 to 2.0.0.rc it looked like everything was workig fine, untill today i didn't notice anything was wrong. But I havent received a message for a while now so I looked at the status. The status was refreshed 9 days ago.
After removing and trying to add the sensor i get the following message:
Cannot get devices:Cannot discover BLE devices from the homey manager. Error: missing_permission:homey:wireless:ble
I recongize this error because BLE Christmas Lights had the same problem. He had to create a new app with permissions specifically set voor v2 firmware.
As suggested in #70 update the devices when a new device or more devices are paired.
Hi,
I have a Xiaomi minflora ( Chinese edition)a few days.
At the beginning there where no problems it was updated regularly but now the updates intervals are like 8 or 9 hours.
I’ve tryide to change the setting no effect,
I’ve rebooted the sensor no effect,
I’ve changed the settings because I thought there was an issue with the range no problem every change is saved without time out.
Homey firmware is: 2.1.2
App ver: 2.1.10
Mi Flora firmware: 3.2.1
Log id: f98be123-522c-48da-b42c-d46c9c988c82
I hope you can see what’s wrong
Kind regards,
Kamil Kuchta
Suggestion:
When adding a minimum value, the max value is automatically changed to being at least 1 higher than that.
Would prevent a situation with "impossible" values (having a maximum limit that is lower than the lower limit).
Not a big deal, just an idea ;-)
Can you please add a local tag available for flows telling what zone the sensor is in? As I have multiple sensors, and some of them are monitoring the same type of plant.
The RoPot (unfortunately) does not have the capability to measure the surrounding light - so reporting this capability is not relevant.
As a result of @betonmoewe issue: #71
Add 2 new cards for determining if a value is below or above its threshold.
I have 7 Xiaomi Sensors, and if i install the app new, and registering the 7 Sensors, the App will be work for About 1 day.
In the Settings you can choose the intervall of updating the sensors. I have set this value to 60 Minutes for now, but it won´t update the sensor data.
If i Restart the app, Nothing apears.
If i restard Homey, 1 or 2 Sensors have new data, the rest not.
How did you pull the sensor data ??? All at one time ??? What happend, when you can´t connect to one of These sensors ??? Will you try the other sensors, or will the app stop ???
In my opinion 2 new values in the General Settings make sense.
Number of retrays if something went wrong.
Delay between the poll from sensor to sensor. (If i have a pollingvalue of Default 15 minutes, then the second value can be 30 seconds, that means a delay before the second,third…. sensor datas are requested)
I have some other Bluetooth LE devices (Mipow), and there was a solution, to put a delay between the pull of the devices, if you have more than one.
Best regards, and thank you for coding such a nice app. :-)
I am using version 2.1.13 from the homey xiaomi mi flora.
I have 2 sensors hhcc from xiaomi. Both are working fine in the app vegtrug grow care. I updated both to the latest version which is 2.3.0.
When adding both sensors to homey they are found. And displayed in the devices tab of homey app.
When selecting one no data is shown. The orher one has the same issue.
I have made a homey diagnostic report 0e371201-6da3-4148-a63d-2c6c7def2775.
With older software versions of the sensors data was shown bit never updated.
Let me know if you need some more information.
Rgds dirk
Trigger for plant X: "Sensor value is below the configured threshold" + "The plant has not enough moisture" -> Alarm
results even in an alarm if moisture is above threshold: low = 20, high = 80 ... after watering the plant, the moisture value was above 80 and the alarm was released every time, the sensor was refreshed. After some hours the value droped below 80 and no alarm was send any more.
This app has stopped working after Homey got updated to version 2.4.1. The app is running, but no reports are coming from any of the devices connected using this app.
When trying to add a sensor it returns a message:
"Cannot get devices:Cannot discover BLE devices from the Homey manager. Error: missing_permission:Homey:wireless:ble"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.