Domochip / gardena2mqtt

Gateway to control GARDENA Smart system devices through MQTT
GNU General Public License v3.0
10 stars 4 forks source link

Changing location name / Need to wait #4

Closed MettIgel4711 closed 1 month ago

MettIgel4711 commented 2 years ago

Hi, excellent job! Easy access via MQTT is really useful.

I had a problem getting the code to work. After a while I found that the location names during the subscription phase were set to "My Garden", while after the first round of device updates (right after setting up MQTT) it changed to "GARDENA smart Garden". Due to the subscription of wrong location names receiving commands did not work.

I guess it's a problem of the Gardena API. A little workaround of moving the "subscribe_everything" call right after "smart_system.start_ws" and a delay of 60 secs solved the problem. Anyone else having the same issue? Or something that needs to be adapted in the code? Thanks!

Domochip commented 1 month ago

Hey, sorry for the late reply 😄

I removed the location level. As README of Gardena API states :

Currently the app restricts an account to have access to a single location only.

So even if first request and websocket doesn't return the same location name, it's not a problem anymore.

The new version is now available as "domochip/gardena2mqtt:latest-dev" It would be great if you can test it before I release.

thanks