Husqvarna AutoMower Integration

lastest dashboard with statistics and map with location and last errors desc.

Also, i failed to mention while doing all this coding today that the husq api is one of the best and best documented I have ever coded for.

In addition, this hardware and software is highly advanced.. Just look at the list of errors it can sense and alert you too out of the box without taking it into somewhere to have a code pulled.

2 Likes

How would you use the 'Set Schedule' function?

changes were ignored and pull request closed.. so here is my version directly

If you look, they were incorporate plus many other fixes....

I suggest you avoid forking the thread needlessly.

Are you asking about use cases or formatting? You can see an example of both with the MowBot Tamer app.

Ok thanks. Thr thread just said.it was cloaed.without integrating. Sorry

I'm seeing this error when sending commands to the cloud

2022-07-18 06:35:12.333 am errorAutoMower App (v00.00.03) | sendCmdToHusqvarna(mower: null, data: [data:[type:settings, attributes:[cuttingHeight:9]]], isRetry: false uriend: settings) | mower not enabled in settings: [3694d75c-e540-41ed-92a2-5eb2f5a74e25, 6ef6b734-19f5-40fd-9a43-b745bb0d9350]

I am running V.03 installed through HPM. I have renewed the secret key. The app is showing as being 'Online' in the app center.

Manually rolled back to v.02 and it works properly.

pushed a fix if you want to try it out

Initial impression on the new webhook feature is good. Nice work!

Websocket still working well. What do you recommend for the polling setting now that the websocket feature is in place? Is polling needed at all? Or just set that setting to a higher value?

In a PM please show me the settings for the connect mgr. I can then let you know my thoughts.

Also I pushed an update so HPM repair please, then go into automanager and hit done.

I think I must be missing something, re: websocket.

AutoMower Manager has been working great with polling. I'm getting what appear to be connection errors on WebSocket. I tried HPM repairing, and then completely removing and reinstalling with the newest version. I ran a repair again a few minutes ago after seeing that an update was pushed, but it still looks like it's having issues.

Husqvarna AutoMower - WebSocket has an access token but connectionActive is false, and then, there are the log entries below. Looks like the server is returning 'Forbidden'. Is there something else I need to do to get websocket functional?

dev:35992022-07-19 13:14:29.225 info Socket (v0.0.3.0) | reconnectWebSocket() called delay: 64
dev:35992022-07-19 13:14:29.209 info Socket (v0.0.3.0) | close() called
dev:35992022-07-19 13:14:29.207 warn Socket (v0.0.3.0) | Websocket Failure Message: failure: Expected HTTP 101 response but was '403 Forbidden'
dev:35992022-07-19 13:14:29.205 traceSocket (v0.0.3.0) | Websocket Status Event | failure: Expected HTTP 101 response but was '403 Forbidden'
dev:35992022-07-19 13:14:29.000 traceSocket (v0.0.3.0) | connect called
dev:35992022-07-19 13:14:27.636 info Socket (v0.0.3.0) | close() called
dev:35992022-07-19 13:14:25.984 traceSocket (v0.0.3.0) | Scheduled auto - connect for 3 seconds
dev:35992022-07-19 13:14:25.956 traceSocket (v0.0.3.0) | Scheduled close for 1 seconds
dev:35992022-07-19 13:14:25.954 info Socket (v0.0.3.0) | initialize() called
dev:35992022-07-19 13:14:09.937 info Socket (v0.0.3.0) | reconnectWebSocket() called delay: 16
dev:35992022-07-19 13:14:09.920 info Socket (v0.0.3.0) | close() called

try re-authenticating

That thing is pretty large! Didn’t even know a robotic lawn mowers even existed. Those things are pricey though! I’m going to have to wait for the budget versions… (if it would even work with my odd shaped lawn).

Unfortunately, no change.

I even tried deleting the application on Husqvarna's developer portal and recreating it. New key, new secret. AutoMower Manager is still connecting OK. Husqvarna AutoMower - WebSocket is still generating the same errors.

The access token in the device updated when the key and secret were updated.

try rebooting your hub politely.

I only saw this once and re-authenticating solved it for me.

Rebooted. Unfortunately, that didn’t fix it.

They say in their docs:

The current code does this, and others have used it. I would be sure all your automower (app, drivers, web socket are up to date in HE). You might update the files manually (vs. HPM) to ensure this.

I have seen this error once myself during development, and for me recreating the token (login) with the current code resolved it.

You can in a private message post what you see from

https://developer.husqvarnagroup.cloud/applications

for what you see for your applications look like (do not post publicly).