nibi79 / worxlandroid

openHAB Binding for Worx Landroid
57 stars 20 forks source link

[Landroid V4] Wrong value for current-blade-time channel #89

Closed sihui62 closed 8 months ago

sihui62 commented 11 months ago

OH version: openHAB 4.0.0 Build #3544 Binding version: 4.0.0.202307021742

Issue: Channel current-blade-time and channel total-blade-time show the same value. Channel total-blade-time seems to be correct (compared to the Android app), channel current-blade-time is incorrect.

Config:

Number:Time                Worx_TotalBladeTime       "Total blade time [%.0f h]"               { unit="h", channel="worxlandroid:mower:mower:m500plus:metrics#total-blade-time" }
Number:Time                Worx_CurrentBladeTime     "Current blade time [%.0f h]"             { unit="h", channel="worxlandroid:mower:mower:m500plus:metrics#current-blade-time" }

Worx_CurrentBladeTime shows as 730 h, Worx_TotalBladeTime shows as 730 h.

clinique commented 11 months ago

You're correct, this is not fully functional (lines 573-578). I will investigate how it was handle previously - what's for sure is that currently blade_work_time_reset is never set to any value.

sihui62 commented 11 months ago

what's for sure is that currently blade_work_time_reset is never set to any value.

Yes, same issue in the old version. I had to use Item.postUpdate(0) to reset the blade time :-)

clinique commented 9 months ago

Reset of blade work time and charge cycles should now operate correctly by sending any command to Worx_CurrentBladeTime and the same for Battery Current Cycle

sihui62 commented 9 months ago

OH version: openHAB 4.0.2 Release Binding version: 4.1.0.202309261327

Unfortunately I am seeing the same issue from the first post above. I cleared cache and tmp folders after installation of the newest binding version.

Channel current-blade-time and channel total-blade-time show the same value:

openHAB: oh1 oh2

Android App: app

clinique commented 9 months ago

Have you tried Klingenarbeitszeit.sendCommand(0) ?

sihui62 commented 9 months ago

Have you tried

No, but I did now:

openHAB: Item state is 0 h Android App (after refreshing): 115 h

Then I polled the AWS: openHAB: Item state is 0 h Android App (after refreshing): 115 h

So it seems they are out of sync.

clinique commented 9 months ago

I guess that the logic is stored in the android app, not provided by the API. Was it functioning in version 3 ?

sihui62 commented 9 months ago

Was it functioning in version 3 ?

Yes.

sihui62 commented 9 months ago

But don't invest too much time, it is not the most important part of the binding (which is otherwise working great)

clinique commented 9 months ago

Was it functioning in version 3 ?

Yes.

Not sure as you would expect being synced with the Android App. I had a look at the code of v3 and I'm now doing the same in v4. No data seem to come from the API for these 2 values.

sihui62 commented 9 months ago

As already said, it worked before and I used it to get a notification when I have to change the blades. If no values are coming anymore from the api I recommend to delete that channel and let us close this issue.

clinique commented 9 months ago

I found how to make it work in ioBroker ! Will add it.

sihui62 commented 8 months ago

Will add it.

With binding version 4.1.0.202310301404 all mentioned channels are correctly populated, thanks a lot. From my point of view this issue can be closed.

clinique commented 8 months ago

@sihui62 : I can not close it. I leave it to you.

sihui62 commented 8 months ago

Fixed with 4.1.0.202310301404