koktaildotcom / homey-mi-flora

Integrate Xiaomi Mi Flora Plant Sensor into Homey
MIT License
11 stars 13 forks source link

Updating Sensors don´t work #36

Closed m-holler closed 6 years ago

m-holler commented 6 years ago

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. :-)

koktaildotcom commented 6 years ago

The app updates the sensor's values one by one. If the sensor is unreachable or doesn't give a reponse the app will try it again up to three times. After that it wil move to the next. If all the sensors are updated or tried for 3 times the (configurable) delay wil be triggered. After that the whole process wil start again.

What is the firmware of the sensor? What is the firmware of Homey? Have you connected another device to the sensor? (Phone app xiaomi flora) What is the distance from the sensor to Homey?

Can you send a report to the developer in Homey app overview? (Hover with )

m-holler commented 6 years ago

Sorry for being late, Firmware of Sensors: 3.1.8 and Pot 1.1.4 Homey: 1.5.11 Yes i have connect one IPhone, but if i am Ready with updating the sensorsdata, i will close the app, no Background Tasks. The distance is 5 to max 8 meters. Yes, i send now a report. Hope it helps.

m-holler commented 6 years ago

The log ID=11A6122B2C

koktaildotcom commented 6 years ago

Firmware should be compatibel. Is bluetooth always enabled on your phone? Because that can cause a problem. (Sensor can only connect to one device)

5 - 8 meter can be too far away, have you try a closer range?

I've not received any log.

koktaildotcom commented 6 years ago

@m-holler can you send the log again? In /manager/settings/#homey:manager:apps hover the app: homey-mi-flora with the < alt > key and wait until the Send to developer button appear and click on it.

m-holler commented 6 years ago

@koktaildotcom: I am not able to send you the log, if i hover over the homey-mi-flora app Nothing apears. There is Nothing to enter the key. I have tryed it with Edge and Firefox 60. Mhhh strange Thing.

About your Questions above: I have not tryed a Closer range, Bluetooth is Always on, on my mobile device, but the flora app is closed. I have tryed it with complete power off my mobile phone, and this makes no different.

koktaildotcom commented 6 years ago

Try Google Chrome. Goto: /manager/settings/#homey:manager:apps Click one time inside the white frame with: Apps installed on Homey Hover the app: homey-mi-flora with the key and wait until the Send to developer button appear and click on it.

Can you try a closer range and check if the problem disappear? Here the app is running for 4 months without any problems.

Do you have another app installed that uses BLE? Like a sound system or so?

m-holler commented 6 years ago

Ok, i have tried Google Chrome, but the Problem, no window or someting else Pops up, to sende the log to you. I think the Problem is, wich key i should use, and have i just copy and paste it ??? (i think this is a totaly noob Question :-) ) I have one other BLE-App installed on Homey, Mipow Playbulb (Experimental) from the homey devs. Do you have recived Problem like mine from other users ???? Ps: I have homey logger installed, but if i choose your app, the logger means, this app supports no live loging….so this way is also not functional, to send you a logfile. :-(

Have a nice Weekend.

koktaildotcom commented 6 years ago

It is the left alt key. (Was typing the 'alt' key with < > around it, but the editor hide the whole text)

But it looks like the app is interfering with the playbulb app. Is the app permanent connected to the BLE? You can try to disable the app and test if the flora app works.

Your the first with the same issue. Only distance related or connected to the flora mobile app are known issues. But that are characteristics of the BLE.

What "homey logger" do you spreak of?

koktaildotcom commented 6 years ago

@m-holler any success in connecting the devices?

Sagittarius-dk commented 6 years ago

Hi koktaildotcom

Seems like i have the same problem, when I install the program and add the two sensors I have so far, it works fine, but now they stop updating...

koktaildotcom commented 6 years ago

@Sagittarius-dk What is the firmware of the sensor? What is the firmware of Homey? Have you connected another device to the sensor? (Phone app xiaomi flora) What is the distance from the sensor to Homey? Do you have other BLE apps in your Homey?

Can you send a report to the developer in Homey app overview? (Hover with the alt key)

Sagittarius-dk commented 6 years ago

@koktaildotcom Firmware of the sensor are: v3.1.9 Homey Firmware Version: 1.5.11 Nope closed the program on my Iphone

one is 3 meter and the other is 5 meter

The log has been sent to the developer. The unique log ID is: d2ba6ff7-43fc-4772-a10a-d4d41a75f3fb

😊

koktaildotcom commented 6 years ago

Looks like the app successful update's the devices in the log: { measure_temperature: 25.7, measure_luminance: 312, flora_measure_fertility: 791, flora_measure_moisture: 28 } All devices are synced complete in: 18.441 seconds

Maybe there is a problem with the timeout that is set to trigger the next interval to update. Did you try to restart the app? Did you try a PTP to reset the Homey core?

Sagittarius-dk commented 6 years ago

Not sure what: Did you try a PTP to reset the Homey core? is ;/

Hmmm my problem is that its for Xiao1 the Soil moisture is really 18 and for Xiao2 its 33

I try restart the app now..

The delay between reading sensor values in minutes. The minimal interval is 5 minutes. The default interval is 15 minutes.

De interval between updates in minutes 30

koktaildotcom commented 6 years ago

PTP = Pull the plug reboot Homey with a hard reset.

Can you verify that (look in insights) that the sensor isn't updated. Or are the value's not correct?

Sagittarius-dk commented 6 years ago

The values are not correct, let my try pull the plug on the Homey 😉

From looking at "Insights" seems like it gets some kind of information, but the values are wrong, from what I see in the app: "Flower Care"

chart

Sagittarius-dk commented 6 years ago

after restart seem like Xiao1 made a huge jump down

chart

(now its shows correct values)

koktaildotcom commented 6 years ago

What are the values in Homey and the mi flora app?

Sagittarius-dk commented 6 years ago

To day I think in the mi flora app it was 23 and homey was think like 34
But not sure, I restarted homey and it made a new update

koktaildotcom commented 6 years ago

@Sagittarius-dk can you verify the differences in realtime after an update?

Sagittarius-dk commented 6 years ago

@koktaildotcom If you look at the screenshot, you can se the drop after restart. Is that what you are asking for? And yes I look at the number in device first, before restart... even have an api, that Homey is sending the numbers to Fibaro HC2

screen shot 2018-09-10 at 09 03 28 screen shot 2018-09-10 at 09 07 05
koktaildotcom commented 6 years ago

The drop is caused because the sensor is updated again after a period of dis-connectivity. The Fibaro HC2 connection to Homey is unknown to me, can you provide a screenshot of the sensor in Homey and in the Mi flora app? The sensor is already updated to the latest firmware i suppose?

Sagittarius-dk commented 6 years ago

Yes the firmware is the latest one...

The Fibaro only gets the data from Homey, and show them... maybe its the dis-connectivity thats give a small problem ?

screen shot 2018-09-10 at 10 19 07 screen shot 2018-09-10 at 10 18 56

img_0836 img_0837

koktaildotcom commented 6 years ago

Looks like the values are corresponding the same except for light intensity. This however is a very fluctuate sensor and likely to change very often. The sensor in Homey is updated on interval, so its possible that the live value is changed already.

Sagittarius-dk commented 6 years ago

@koktaildotcom

Jep Light Intensity goes fast up and down, but the most important is the moisture and fertilizer 😊

And thats seems to stop showing the correct numbers after a day or so...

koktaildotcom commented 6 years ago

That issue i cannot reproduce, you can try to add a flow in Homey like: image That way you get a notice when Homey is not firing the next update event (on interval).

Sagittarius-dk commented 6 years ago

Sure 😊

Sagittarius-dk commented 6 years ago

@koktaildotcom

Where do I find the “ADD to the log”

koktaildotcom commented 6 years ago

You need an app for that called: logger. Or you send a notification to your mobile.

Sagittarius-dk commented 6 years ago

I did setup the push notification... and the zone in my system are also called MiFlora?

koktaildotcom commented 6 years ago

I don't think so. You can filter in the 'and' column on a specific zone or do a match on a name.

You can test this by logging the zone and name of now. Then you can specify a filter

Sagittarius-dk commented 6 years ago

Think I found out, moved my sensors Xioa1 and Xioa2 to the garden zone and made the flow with that name 😊

Sagittarius-dk commented 6 years ago

@koktaildotcom

Its working fine so far, just to let you know 😊

screen shot 2018-09-11 at 13 26 35
koktaildotcom commented 6 years ago

Good to hear! Thanks for your message :)

Sagittarius-dk commented 6 years ago

@koktaildotcom HI it stoped working, have send you a log

screen shot 2018-09-15 at 14 02 00