[iCloud binding] precision

Thank you for a great binding! Configuration was a breeze and everything started working right away, including family devices.
Haven’t really put it to good use yet, but looking at the rest api I noticed that battery percentage “has a lot of precision”, many decimals in other words, but yet its precision is in whole percents, so maybe the binding could do the rounding to an integer value. I know I can do it myself and will, but it looks like something that should be done under the hood (or is it just the rest api?). Same goes for location, fewer decimals would make rules with “changed” trigger more reliable when the value wouldn’t change every time with the fluctuations of readings.
Btw. I’m on 2.2.0, so if these are already addressed in the later snapshots, sorry for the useless post.

Michael,

I agree with you that this is a great binding. Easy to set up and is stable.

However, I do not agree that bindings should limit precision. It is a valid statement that nobody needs more than integer precision on battery life, but to me it’s a matter of principle… give me as much data/precision as possible and I will decide how to use it. :slight_smile:

I actually fully agree with you here. BUT the data isn’t more precise than integer percentage, it just has “floating point rounding errors” (sorry, don’t know the correct term). If you look at the data it’s always just a small fraction above or below an integer value. If it was say 84,5 % then I would wholehearteldy want it to be as precise as possible.

Correct. And if you use %d for displaying any other battery value in site maps, this raises an error for my gBatteries group. I had to use a float instead. A decimal value would be fully consistent with any other battery value across openHAB.

Just tried out the iCloud binding. I set it up with my account and it works great. My wife has her Iphone on another account. Is it possible to have more than one account setup? I played around in the paper UI, but was unable to figure out how to do it. Thanks for any help.

If you read the documentation thoroughly you would notice that you can specify multiple things for multiple accounts and access multiple devices per account.

Not sure though if you need manual configuration or can use paper UI.

https://www.openhab.org/addons/bindings/icloud/

Thanks for the reply Robert. I know it’s possible but it’s just not working. I setup her account in the paper UI just fine but no things are showing up like they did when I setup my first account.

Have you tried configuring the binding through text files?

No, I’ve only ever used the paper UI. Not sure how to do text files.

The documentation won’t help you much unfortunately.

https://www.openhab.org/docs/configuration/

I think the demo has some examples to get to know it.

It is a little too difficult to provide you with a working example, but you could make a start by looking at the examples included with the iCloud binding documentation.

That is, if you want to, of course.