nibi79 / worxlandroid

openHAB Binding for Worx Landroid
57 stars 20 forks source link

[Landroid v4] Current Blade Time not Updated #106

Open TomW80 opened 1 month ago

TomW80 commented 1 month ago

Hello,

Yesterday I changed my blades and then reset the current blade time. But the element “LandroidCurrentBladeTime” does not get an update with the new current blade time.

The binding gets the time when it was reset.

„blade_work_time“:13369,„blade_work_time_reset“:13369,„blade_work_time_reset_at“:„2024-05-27 14:48:05“,

But resetting the current blade time does not.

2024-05-28 06:25:29.935 [DEBUG] [landroid.internal.api.WorxApiHandler] - Worx Landroid Api Response: {"id":,"uuid":"","product_id":70,"user_id":,"serial_number":"","mac_address":"","locked":true,"firmware_version":"3.32.0+1","firmware_auto_upgrade":true,"sim":null,"test":false,"iot_registered":true,"mqtt_registered":true,"registered_at":"2023-06-16 00:00:00","online":true,"protocol":0,"pending_radio_link_validation":null,"capabilities":["auto_lock","bluetooth_control","bluetooth_pairing","border_cut","digital_fence_settings","follow_border","lock","mqtt","multi_zone","multi_zone_percentage","one_time_scheduler","ota_upgrade","pairing_smartconfig","pause_over_border","pause_over_wire","rain_delay","rain_delay_start","safe_go_home","scheduler_two_slots","unrestricted_mowing_time","zone_keeper"],"capabilities_available":["display_pairing_shortcut"],"features":{"auto_lock":3.25,"bluetooth_control":3.2,"bluetooth_pairing":true,"chassis":"m_2021","digital_fence_settings":3.25,"display_type":"lcd","input_type":"keyboard_push_knob","lock":true,"mqtt":true,"multi_zone":true,"multi_zone_percentage":true,"multi_zone_zones":4,"one_time_scheduler":3.15,"pause_over_wire":3.26,"rain_delay":true,"rain_delay_start":3.08,"safe_go_home":3.25,"scheduler_two_slots":3.15,"unrestricted_mowing_time":true,"wifi_pairing":"smartconfig"},"accessories":{"ultrasonic":true},"mqtt_endpoint":"iot.eu-west-1.worxlandroid.com","mqtt_topics":{"command_in":"PRM100\/0C8B951994D0\/commandIn","command_out":"PRM100\/0C8B951994D0\/commandOut"},"name":"M","blade_height_shift":0,"push_notifications":true,"push_notifications_level":"warning","pin_code":null,"app_settings":null,"warranty_registered":true,"purchased_at":"2023-06-13 00:00:00","warranty_expires_at":"2026-06-13 00:00:00","setup_location":{"latitude":,"longitude":*},"city":{"id":*,"country_id":276,"name":"","latitude":,"longitude":,"created_at":"2018-02-15 22:41:12","updated_at":"2018-02-15 22:41:12"},"time_zone":"Europe\/Berlin","lawn_size":139.64207458496,"lawn_perimeter":73,"auto_schedule_settings":{"boost":1,"exclusion_scheduler":{"days":[{"slots":[{"reason":"generic","duration":240,"start_time":900}],"exclude_day":false},{"slots":[{"reason":"generic","duration":240,"start_time":900}],"exclude_day":false},{"slots":[{"reason":"generic","duration":240,"start_time":900}],"exclude_day":false},{"slots":[{"reason":"generic","duration":240,"start_time":900}],"exclude_day":false},{"slots":[{"reason":"generic","duration":240,"start_time":900}],"exclude_day":false},{"slots":[{"reason":"generic","duration":240,"start_time":900}],"exclude_day":false},{"slots":[{"reason":"generic","duration":240,"start_time":900}],"exclude_day":false}],"exclude_nights":true},"grass_type":"mixed_species","nutrition":{"k":27,"n":0,"p":0},"soil_type":"clay"},"auto_schedule":true,"improvement":false,"diagnostic":false,"distance_covered":219118,"mower_work_time":13594,"blade_work_time":13369,"blade_work_time_reset":13369,"blade_work_time_reset_at":"2024-05-27 14:48:05","battery_charge_cycles":189,"battery_charge_cycles_reset":118,"battery_charge_cycles_reset_at":"2024-03-21 16:55:34","created_at":"2022-08-14 08:55:29","updated_at":"2024-05-07 06:13:43","last_status":{"timestamp":"2024-05-28 04:24:07","payload":{"cfg":{"id":1,"sn":"","dt":"28\/05\/2024","tm":"06:24:08","lg":"de","cmd":0,"sc":{"m":1,"d":[["11:00",75,1],["11:00",75,0],["11:00",60,0],["11:00",60,1],["11:00",60,0],["11:00",60,0],["11:00",60,0]],"dd":[["19:00",75,0],["19:00",75,0],["19:00",60,0],["19:00",60,0],["19:00",60,0],["19:00",60,0],["19:00",60,0]],"distm":0,"p":0,"ots":{"wtm":0,"bc":0}},"mz":[0,0,0,0],"mzv":[0,0,0,0,0,0,0,0,0,0],"mzk":0,"rd":180,"al":{"lvl":1,"t":60},"tq":0,"modules":{"US":{"enabled":1}}},"dat":{"mac":"","fw":3.32,"fwb":1,"ls":1,"le":0,"conn":"wifi","bt":{"t":13.5,"v":19.79,"p":97,"nr":189,"c":1,"m":1},"dmp":[-5.8,1.9,0.6],"st":{"b":13369,"d":219118,"wt":13594,"bl":73},"act":1,"rsi":-77,"lk":1,"tr":0,"lz":0,"rain":{"s":0,"cnt":0},"modules":{"US":{"stat":"ok"}}}}}}

Can anyone confirm this?

Tom

TomW80 commented 1 month ago

As I have now found out, the current blade working time is calculated from the difference between “blade_work_time - blade_work_time_reset”. Which would be correct with the above values:

blade_work_time":13369, ‘blade_work_time_reset’:13369

So the calculation does not work correctly. But what are these values 13369? openhab shows 809760 s for the total blade time and 294960 s for the current blade time

The current blade time changed earlier.

2024-05-28 20:04:59.012 [INFO ] [openhab.event.ItemStateUpdatedEvent ] - Item 'LandroidCurrentBladeTime' updated to 294960 s

But this should be 1h

TomW80 commented 1 month ago

After a restart of openhab the item "Current Blade Time" get the right time. But why not after the Reset of the time in the Worx Landroid App?