ice987987/ioBroker.husqvarna-automower

Bug report - Park mower until next scheduled run

reutli opened this issue · 17 comments

reutli commented

The problem

When pushing (or set via script) "Park mower until next scheduled run" {"husqvarna-automower.0.6dcad25a-39f7-4baf-9f44-877302c35c1f.ACTIONS.PARKUNTILFURTHERNOTICE"} mower get's not the ACTION to Park until next schedule, but forever.

See picture from app attached.

I would expect that with the action, the mower would park and restart with the next schedule. When the function is called in the app, it works.
Is it a bug in the API that the command is not interpreted correctly or the adapter?
Debug log attached.

IMG_59820D00C4EF-1

It would be great to here about this issue, as this is kind of weird and also happens when mower is sent to garage due to rain (also with your script)

Version of "husqvarna-automower"-adapter

0.4.0

Husqvarna Automower Type

430X

Version of Node.js

18.18.2

Version of ioBroker js-controller

5.0.12

Version of "admin"-adapter

6.10.1

Operating system incl. version running ioBroker

Debian bookworm

Checklist of files to include below

  • iobroker.current.log (Please share the logs in debug mode and check that there are no personal information)
  • Contents of the JavaScript browser console (always include in cases of issues with the user interface)

Additional information & file uploads

iob_debug_log.txt

could you please try with option husqvarna-automower.0.xyz.ACTIONS.PARKUNTILNEXTSCHEDULE?

reutli commented

yes, done this - sorry. Issue is exactly regarding this command! When using "Park mower until next scheduled run" or "husqvarna-automower.0.xyz.ACTIONS.PARKUNTILNEXTSCHEDULE" mower parks forever.

See at least script
// during rain, park until next schedule on({id: sID_RainSensor, change: 'ne', val: true}, async function () { await setStateAsync(sID_PARKUNTILNEXTSCHEDULE, true); log('-==== It is raining. Mower is parked. ====-', 'info'); });

After rain mower shows "bis auf weiteres" instead of "Nächster Start xx, yy:yy".

That's the issue.

it seems like husqvarna changed the API schema for /mowers/{id}/actions

reutli commented

it seems like husqvarna changed the API schema for /mowers/{id}/actions

hmmm, any chance to adapt this?

What does happen if you send the command ParkUntilNextSchedule directly via https://developer.husqvarnagroup.cloud/apis/automower-connect-api?tab=openapi?

-> POST /mowers/{id}/actions

reutli commented

maybe you can provide a step-by-step instruction how to do this? With that given, I'll try

in my eyes this is an issue on husqvarna's side. the adapter sends the command correctly

type: 'ParkUntilNextSchedule',
but you get the message (see your log) HTTP status response: 202 Accepted which means that the request has been accepted for processing, but the processing has not been completed.

reutli commented

If so, can you open an issue with Husqvarna?
The action is handed over to the mower. If rain is detected the mower is going home, therefore the action/request is fulfilled by server. It's only the false status it gets after this command.

could you please check whitch value you get at nextStartTimestamp after you set ParkUntilNextSchedule? do you get 0? or a time? (Please check in the husqvarna app and in ioBroker)

reutli commented

Where exactly should I do this test?
a) send ParkUntilNextSchedule in the App
b) send ParkUntilNextSchedule in iob
c) send ParkUntilNextSchedule via Script

In the Husqvarna App I'll get no time when I do the tests via job or script, as this is the issue ;o)
Please advise...

could you test with a) and b)? (b) and c) should get the same result)

reutli commented

a) via App
status: mower is parked in garage
I got in ioBroker:

--
husqvarna-automower.0 | 2023-11-10 13:12:13.169 | debug | [wss.on - message]: {"id":"6dcad25a-39f7-4baf-9f44-877302c35c1f","type":"positions-event","attributes":{"positions":[{"latitude":xx.xxxxxx,"longitude":x.xxxxx}]}}
husqvarna-automower.0 | 2023-11-10 13:12:13.167 | debug | [wss.on - message]: {"id":"6dcad25a-39f7-4baf-9f44-877302c35c1f","type":"status-event","attributes":{"battery":{"batteryPercent":100},"mower":{"mode":"HOME","activity":"PARKED_IN_CS","state":"RESTRICTED","errorCode":0,"errorCodeTimestamp":0},"planner":{"nextStartTimestamp":1699869600000,"override":{"action":"NOT_ACTIVE"},"restrictedReason":"NOT_APPLICABLE"},"metadata":{"connected":true,"statusTimestamp":1699618333069}}}
husqvarna-automower.0 | 2023-11-10 13:12:11.816 | debug | [wss.on - message]: {"id":"6dcad25a-39f7-4baf-9f44-877302c35c1f","type":"positions-event","attributes":{"positions":[{"latitude":xx.xxxxxx,"longitude":x.xxxxx}]}}
husqvarna-automower.0 | 2023-11-10 13:12:11.807 | debug | [wss.on - message]: {"id":"6dcad25a-39f7-4baf-9f44-877302c35c1f","type":"status-event","attributes":{"battery":{"batteryPercent":100},"mower":{"mode":"HOME","activity":"PARKED_IN_CS","state":"RESTRICTED","errorCode":0,"errorCodeTimestamp":0},"planner":{"nextStartTimestamp":1699869600000,"override":{"action":"NOT_ACTIVE"},"restrictedReason":"NOT_APPLICABLE"},"metadata":{"connected":true,"statusTimestamp":1699618331713}}}
husqvarna-automower.0 | 2023-11-10 13:12:07.837 | debug | [wss.on - message]: {"id":"6dcad25a-39f7-4baf-9f44-877302c35c1f","type":"positions-event","attributes":{"positions":[{"latitude":xx.xxxxxx,"longitude":x.xxxxx}]}}
husqvarna-automower.0 | 2023-11-10 13:12:07.835 | debug | [wss.on - message]: {"id":"6dcad25a-39f7-4baf-9f44-877302c35c1f","type":"status-event","attributes":{"battery":{"batteryPercent":100},"mower":{"mode":"HOME","activity":"PARKED_IN_CS","state":"RESTRICTED","errorCode":0,"errorCodeTimestamp":0},"planner":{"nextStartTimestamp":1699869600000,"override":{"action":"NOT_ACTIVE"},"restrictedReason":"NOT_APPLICABLE"},"metadata":{"connected":true,"statusTimestamp":1699618327735}}}

but App but the app still shows the status "park until further notice":
IMG_009C74774E7D-1

b) via iob object (ACTIONS.PARKUNTILNEXTSCHEDULE)
status: mower is parked in garage
I got in iobroker:

husqvarna-automower.0 | 2023-11-10 13:22:59.299 | debug | [wss.on - message]: {"id":"6dcad25a-39f7-4baf-9f44-877302c35c1f","type":"status-event","attributes":{"battery":{"batteryPercent":100},"mower":{"mode":"HOME","activity":"PARKED_IN_CS","state":"RESTRICTED","errorCode":0,"errorCodeTimestamp":0},"planner":{"nextStartTimestamp":1699869600000,"override":{"action":"NOT_ACTIVE"},"restrictedReason":"NOT_APPLICABLE"},"metadata":{"connected":true,"statusTimestamp":1699618979183}}}
-- | -- | -- | --
husqvarna-automower.0 | 2023-11-10 13:22:59.276 | debug | [wss.on - message]: {"id":"6dcad25a-39f7-4baf-9f44-877302c35c1f","type":"positions-event","attributes":{"positions":[{"latitude":xx.xxxxxx,"longitude":x.xxxxx}]}}
husqvarna-automower.0 | 2023-11-10 13:22:56.910 | info | Accepted. Command PARKUNTILNEXTSCHEDULE Set.

same situation in app, like above.

==> for me it seems API/APP has an issue, as both are using die API with same effects.

you get "nextStartTimestamp":1699869600000 which is Mon Nov 13 2023 11:00:00 GMT+0100 (Mitteleuropäische Normalzeit). Does the mower not start at this time?

reutli commented

I'll check on Monday - but as I remember - no. At least App is showing "Geparkt - bis auf Weiteres". Will see and I'll report back.

any feedback or can we close here?

reutli commented

mower has NOT started as expected. BUT this could be due to on going rain ?!

can you stop the js-script and try again?