normen / homebridge-landroid

Homebridge plugin to control Worx Landroid robo mowers through the Worx Cloud
24 stars 8 forks source link

[Landroid] StatusCodeError: 404 #43

Closed temppost closed 1 year ago

temppost commented 1 year ago

I reinstalled the plugin today. But I get an error [Landroid] StatusCodeError: 404 , and showing the program code. But the iPhone app works.

xDiavelS commented 1 year ago

I started to get this same issue this week as well.

normen commented 1 year ago

Yeah I can reproduce this, gonna check if theres an update.

normen commented 1 year ago

Update is out and should fix this.

normen commented 1 year ago

Hm, it seems the login with plain password doesn't really work anymore, oh well. Seems like this is more work.

temppost commented 1 year ago

The fix works for me. But I only see the party mode switch. I can't see the sensors.

normen commented 1 year ago

Can you actually control the mower?

temppost commented 1 year ago

Yes but only in the App

normen commented 1 year ago

Well so that means no 😄

Littlericket commented 1 year ago

Can confirm - the plugin is loading but mower is not "visible" as accessory. After reinstalling homebridge-landroid the landroid won't even show up anymore. Stops (or atleast the last message which appears) at:

Loaded plugin: homebridge-landroid@0.9.8
Registering platform 'homebridge-landroid.Landroid'
[Landroid] Initializing Landroid platform...
[Landroid] DidFinishLaunching
[Landroid] worx is selected

Seems no "login" happens nor mqtt connection to the worx cloud.

normen commented 1 year ago

See #44

normen commented 1 year ago

I pushed a version 0.9.9 that logs in to the cloud as per #44 but it seems the data format changed or something, I still can't read my mowers info. Publishing anyway so people can test what works for them (mower control? some status messages?).

Littlericket commented 1 year ago

@normen mower info is available here, but sensors are obv. undefined.

[1.10.2022, 12:22:00] [Landroid] Received Code
info.connection
[1.10.2022, 12:22:01] [Landroid] Connected to worx server
[1.10.2022, 12:22:03] [Landroid] 1 Recieve User Devices
[1.10.2022, 12:22:03] [Landroid] [DEBUG] MOWER: {"id":<snip>,"uuid":"<snip>","product_id":48,"user_id":<snip int>,"serial_number":"<snip>","mac_address":"<snip>","name":"S","locked":true,"firmware_version":3.28,"firmware_auto_upgrade":true,"push_notifications":true,"sim":null,"push_notifications_level":"warning","test":false,"iot_registered":true,"mqtt_registered":true,"pin_code":null,"registered_at":"2021-06-04 00:00:00","online":true,"app_settings":null,"accessories":null,"features":{"auto_lock":3.25,"bluetooth_pairing":true,"chassis":"s_2019","digital_fence_settings":3.25,"display_type":"tube","input_type":"keyboard_tube","lock":true,"mqtt":true,"multi_zone":true,"multi_zone_percentage":true,"multi_zone_zones":4,"one_time_scheduler":3.15,"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"},"pending_radio_link_validation":null,"mqtt_endpoint":"iot.eu-west-1.worxlandroid.com","mqtt_topics":{"command_in":"<snip>","command_out":"<snip>"},"warranty_registered":false,"purchased_at":null,"warranty_expires_at":null,"setup_location":{"latitude":<snip>,"longitude":<snip>},"city":{"id":<snip>,"country_id":276,"name":"<snip>","latitude":<snip>,"longitude":<snip>,"created_at":"2018-02-15 22:26:28","updated_at":"2018-02-15 22:26:28"},"time_zone":"Europe/Berlin","lawn_size":154,"lawn_perimeter":51,"auto_schedule_settings":{"boost":0,"exclusion_scheduler":{"days":[{"slots":[],"exclude_day":true},{"slots":[],"exclude_day":false},{"slots":[],"exclude_day":false},{"slots":[],"exclude_day":false},{"slots":[],"exclude_day":false},{"slots":[],"exclude_day":false},{"slots":[],"exclude_day":false}],"exclude_nights":false},"grass_type":"festuca_arundinacea","irrigation":true,"nutrition":{"k":3,"n":10,"p":3},"soil_type":"sand"},"auto_schedule":true,"distance_covered":214547,"mower_work_time":14697,"blade_work_time":13912,"blade_work_time_reset":13057,"blade_work_time_reset_at":"2022-09-20 13:37:04","battery_charge_cycles":160,"battery_charge_cycles_reset":0,"battery_charge_cycles_reset_at":null,"messages_in":799,"messages_out":33543,"raw_messages_in":841,"raw_messages_out":33543,"created_at":"2020-03-10 06:38:24","updated_at":"2022-09-23 01:21:11"}
[1.10.2022, 12:22:03] [Landroid] Adding Landroid S to HomeKit
[1.10.2022, 12:22:03] [Landroid] [DEBUG] DATA: 1
[1.10.2022, 12:22:03] [homebridge-landroid] This plugin generated a warning from the characteristic 'Battery Level': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.
[1.10.2022, 12:22:03] [Landroid] Landroid S charging status changed to undefined, battery level undefined
[1.10.2022, 12:22:03] [Landroid] Landroid S status changed to undefined (undefined), battery level undefined
[1.10.2022, 12:22:03] [Landroid] Landroid S error code changed to undefined (undefined), battery level undefined
Phoenix-DH commented 1 year ago

Thanks for 0.9.9 … Got rhe mover back and exactly the same behaviour.

xDiavelS commented 1 year ago

This is my HomeBridge log:

[10/1/2022, 8:27:00 PM] [Landroid] 1 Recieve User Devices [10/1/2022, 8:27:00 PM] [Landroid] Found Landroid in Worx Cloud with name: Larry [10/1/2022, 8:27:00 PM] [Landroid] Adding Landroid Larry to HomeKit [10/1/2022, 8:27:00 PM] [homebridge-landroid] This plugin generated a warning from the characteristic 'Battery Level': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info. [10/1/2022, 8:27:00 PM] [Landroid] Landroid Larry charging status changed to undefined, battery level undefined [10/1/2022, 8:27:00 PM] [Landroid] Landroid Larry status changed to undefined (undefined), battery level undefined [10/1/2022, 8:27:00 PM] [Landroid] Landroid Larry error code changed to undefined (undefined), battery level undefined [10/1/2022, 8:27:49 PM] [homebridge-landroid] This plugin generated a warning from the characteristic 'Battery Level': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.

And this is what I see in HomeKit: IMG_6627

temppost commented 1 year ago

only party mode is available, no sensors.

[10/1/2022, 1:52:13 PM] [Landroid] Found Landroid in Worx Cloud with name: Mower
[10/1/2022, 1:52:13 PM] [Landroid] Mowing data logging enabled for Landroid Mower
[10/1/2022, 1:52:13 PM] [Landroid] Adding Landroid Mower to HomeKit
[10/1/2022, 1:52:13 PM] [Landroid] Landroid Mower hours worked so far: NaN, hours mowed so far: NaN, distance moved so far: NaNkm
[10/1/2022, 1:52:13 PM] [homebridge-landroid] This plugin generated a warning from the characteristic 'Battery Level': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.
[10/1/2022, 1:52:13 PM] [Landroid] Landroid Mower charging status changed to undefined, battery level undefined
[10/1/2022, 1:52:13 PM] [Landroid] Landroid Mower status changed to undefined (undefined), battery level undefined
[10/1/2022, 1:52:13 PM] [Landroid] Landroid Mower error code changed to undefined (undefined), battery level undefined
[10/1/2022, 1:52:16 PM] [homebridge-landroid] This plugin generated a warning from the characteristic 'Battery Level': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info.
normen commented 1 year ago

Yea, it seems I only get a single number instead of the usual data packet.. Can you control the mower though? Or is there an error message about the mower not being found when you turn it on?

temppost commented 1 year ago

When I press the party mode switch, there is no reaction, but there is also no error in the log. The party mode remains activated in the app.

mistertropi commented 1 year ago

Same Problem Here. Is there any Solution? I can Not start the mower so far. Reason: @@Battery Level] characteristic value expected valid finite number and received "undefined" (undefined)

thanks a lot for help

slacky84 commented 1 year ago

Hi, I am getting similar issues. since the upgrade to 0.9.9, I cannon manage my landlord via home kit. The Rain sensor and battery levels are not working and I receive the similar errors as previously seen : "[10/5/2022, 9:35:31 AM] [homebridge-landroid] This plugin generated a warning from the characteristic 'Battery Level': characteristic value expected valid finite number and received "undefined" (undefined). See https://homebridge.io/w/JtMGR for more info."

Littlericket commented 1 year ago

I think @normen is working on it, but the iobroker landroid package is getting refactored by @TA2k and has some breaking changes as mentioned in #44.

slacky84 commented 1 year ago

OK thanks - much appreciated

CBHomekitCrazy commented 1 year ago

Hi, great plugin when it works ;-) Thx for the efforts!

Can't start stop the mower. Still get this: 9.11.2022 17.47.33Landroid BridgeLandroidTry to send a message but could not find the mower

log: 9.11.2022 17.45.28Landroid BridgeLandroidConnected to worx server 9.11.2022 17.45.29Landroid BridgeLandroid1 Recieve User Devices 9.11.2022 17.45.29Landroid BridgeLandroidFound Landroid in Worx Cloud with name: Roberto 9.11.2022 17.45.29Landroid BridgeLandroidAdding Landroid Roberto to HomeKit 9.11.2022 17.45.30Landroid BridgeERROR[Landroid Bridge 8F54@Landroid Roberto@@Battery Level] characteristic value expected valid finite number and received "undefined" (undefined) 9.11.2022 17.45.30Landroid BridgeLandroidLandroid Roberto charging status changed to undefined, battery level undefined 9.11.2022 17.45.30Landroid BridgeLandroidLandroid Roberto status changed to undefined (undefined), battery level undefined 9.11.2022 17.45.30Landroid BridgeLandroidLandroid Roberto error code changed to undefined (undefined), battery level undefined 9.11.2022 17.46.43Landroid BridgeERROR[Landroid Bridge 8F54@Landroid Roberto@@Battery Level] characteristic value expected valid finite number and received "undefined" (undefined) 9.11.2022 17.47.33Landroid BridgeLandroidSending to Landroid Roberto: [{"cmd":1}] (20193019840400864921) 9.11.2022 17.47.33Landroid BridgeLandroidTry to send a message but could not find the mower

Littlericket commented 1 year ago

@CBHomekitCrazy @normen will most probably fix till the next (german) mowing season. See #44.

CBHomekitCrazy commented 1 year ago

@CBHomekitCrazy @normen will most probably fix till the next (german) mowing season. See #44.

Yep, looking forward :-), though mower season is still on a month (Denmark)

tobihoby commented 1 year ago

Unfortunately I have the same problem now:

[20.2.2023, 20:36:19] [homebridge-landroid] StatusCodeError: 404 - {"message":"Not Found","code":"404.000"} at new StatusCodeError (/var/lib/homebridge/node_modules/homebridge-landroid/node_modules/request-promise-core/lib/errors.js:32:15) at Request.plumbing.callback (/var/lib/homebridge/node_modules/homebridge-landroid/node_modules/request-promise-core/lib/plumbing.js:104:33) at Request.RP$callback [as _callback] (/var/lib/homebridge/node_modules/homebridge-landroid/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/var/lib/homebridge/node_modules/homebridge-landroid/node_modules/request/request.js:185:22) at Request.emit (node:events:513:28) at Request. (/var/lib/homebridge/node_modules/homebridge-landroid/node_modules/request/request.js:1154:10) at Request.emit (node:events:513:28) at IncomingMessage. (/var/lib/homebridge/node_modules/homebridge-landroid/node_modules/request/request.js:1076:12) at Object.onceWrapper (node:events:627:28) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1359:12) at processTicksAndRejections (node:internal/process/task_queues:82:21) { statusCode: 404, error: { message: 'Not Found', code: '404.000' }, options: { method: 'GET', uri: 'https://api.worxlandroid.com/api/v2/users/certificate',

easycopters commented 1 year ago

Is there a fix available yet?

nameonweb commented 1 year ago

Same issue 404 for me... spring is coming here guys :-) ! hope a fix will be issued soon ! Thanks for your work

tt2g89 commented 1 year ago

Same same unfortunately, even after complete uninstall and reinstall and reconfiguration.

normen commented 1 year ago

Ayo, I checked in a version that might work, please check it out and test!

tt2g89 commented 1 year ago

Works, also the battery status is fine after your latest update a few minutes ago, thx a lot!! :) The only strange thing is that the Landroid is displayed teice as a switch - even after reload from cloud. BR

normen commented 1 year ago

Cool, thanks for checking back!

Hm, I didn't change anything on the HomeKit side afaict, dunno why it would appear twice :?

Littlericket commented 1 year ago

@normen everything’s working, no duplicated sensors/switches. big kudos!

@tt2g89 try resetting the accessoires cache for worx.

normen commented 1 year ago

Nice, closing this then. Some parameter names seem to have changed, if theres new issues with the code please open ... new issues :)

normen commented 1 year ago

Works, also the battery status is fine after your latest update a few minutes ago, thx a lot!! :) The only strange thing is that the Landroid is displayed teice as a switch - even after reload from cloud. BR

Found an issue that might cause this, should be fixed in 0.10.7

tt2g89 commented 1 year ago

Works, also the battery status is fine after your latest update a few minutes ago, thx a lot!! :) The only strange thing is that the Landroid is displayed teice as a switch - even after reload from cloud. BR

Found an issue that might cause this, should be fixed in 0.10.7

Hey @normen, unfortunately not yet, but thanks so much for your efforts! Did a cloud reload and deleted the one(!) device from cache in HB, too - still no change, two Robby-Switches and contact sensors are present, but only one water leckage sensor. In HB logs it is also only one device that has been added, but in home there are two. Have no clue, why. Did I miss to do a step to tidy up?

image
normen commented 1 year ago

Works, also the battery status is fine after your latest update a few minutes ago, thx a lot!! :) The only strange thing is that the Landroid is displayed teice as a switch - even after reload from cloud. BR

Found an issue that might cause this, should be fixed in 0.10.7

Hey @normen, unfortunately not yet, but thanks so much for your efforts! Did a cloud reload and deleted the one(!) device from cache in HB, too - still no change, two Robby-Switches and contact sensors are present, but only one water leckage sensor. In HB logs it is also only one device that has been added, but in home there are two. Have no clue, why. Did I miss to do a step to tidy up?

Hm, no idea then. What I (re-) added was code that removes mowers that are not reported from the cloud anymore. Seems like your issue is something else.

tt2g89 commented 1 year ago

Works, also the battery status is fine after your latest update a few minutes ago, thx a lot!! :) The only strange thing is that the Landroid is displayed teice as a switch - even after reload from cloud. BR

Found an issue that might cause this, should be fixed in 0.10.7

Hey @normen, unfortunately not yet, but thanks so much for your efforts! Did a cloud reload and deleted the one(!) device from cache in HB, too - still no change, two Robby-Switches and contact sensors are present, but only one water leckage sensor. In HB logs it is also only one device that has been added, but in home there are two. Have no clue, why. Did I miss to do a step to tidy up?

Hm, no idea then. What I (re-) added was code that removes mowers that are not reported from the cloud anymore. Seems like your issue is something else.

Okidoki, thanks anyways. When I turn them on, the mower also doesn't start his work, so there is some more strange going on. :( That's maybe related to #51 In some update you included the coverage of possible bans, I saw in the logs: [4/4/2023, 1:12:58 PM] [Landroid] Maybe your connection is blocked from Worx or your worx is offline. Restart Mqtt connection automatic in 24h using websockets custom auth, will connect to 'wss://iot.eu-west-1.worxlandroid.com/mqtt'... connection lost - will attempt reconnection in 128 seconds...

I will retry tomorrow.

Littlericket commented 1 year ago

@tt2g89 there are two switches: one for party mode and one for mowing. have you seperated them when viewing the switch details? To identify which is one, you can remove the name of the switch, it‘ll be the name on the placeholder value for identifying which is one.

tt2g89 commented 1 year ago

aaaaaah, got it! Thanks for the hint. You're right, it is the party mode. Deleting the placeholder brought light into darkness. When it will work tomorrow, the issue is solved for me aswell. Sorry for the efforts on your side, folks!