Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State für Error-Code anlegen #2

Closed
StrathCole opened this issue Mar 25, 2020 · 3 comments
Closed

State für Error-Code anlegen #2

StrathCole opened this issue Mar 25, 2020 · 3 comments

Comments

@StrathCole
Copy link

Der State lastErrorCode_value existiert scheinbar nur, wenn er das erste Mal von der API gesendet wurde. Vielleicht kannst du den vorab schon anlegen, damit er von anderen Skripten "subscribed" werden kann, auch wenn noch kein Fehler aufgetreten ist.
Ggf. trifft das auch für andere States zu, das kann ich aber mangels genauer Kenntnis der Api nicht sagen.

@jpgorganizer
Copy link
Owner

Das ist richtig, States werden nur angelegt, wenn sie vom Gardena Webservice übertragen werden. Eigentlich habe ich erwartet, dass alles States bei der Initialisierung zumindest einmalig übertragen werden, damit der Client die vollständige Abbildung des Serverzustandes besitzt.

Mir ist das bisher nicht aufgefallen, dass dem nicht so ist. Ist das sonst noch jemandem aufgefallen?

@StrathCole
Copy link
Author

Laut Definition der API ist es so, dass nicht alle States zu Beginn übergeben werden. Siehe hier:
https://developer.1689.cloud/apis/GARDENA+smart+system+API#/readme im Abschnitt "Rules of events processing". Dort sieht man, dass beim PATCH event (2. Box) eine Eigenschaft übergeben wird, die vorher nicht existierte.

@jpgorganizer
Copy link
Owner

wird mit v0.4.0 kommen - Version ist im internen Test, kommt morgen oder übermorgen

jpgorganizer added a commit that referenced this issue Mar 31, 2020
  - **NOTE**: with this version an additional dependency is necessary at runtime. If it does not get installed together with the installation of this adapter, please install seperately with `npm install https://github.com/jpgorganizer/ioBroker.utils`
  - **NOTE**: you **must delete all states** of the adapter instance to install this release and please check your application carefully for necessary adjustments regarding type/role changes (see below)
  - data types of (nearly) all datapoints adjusted for compliance with ioBroker guidance:
    * states now have special ioBroker type and role instead of former `string`/`text` where applicable, e.g. `number`/`value.battery` for `batteryLevel_value` (Issue #3)
  - datapoint `activity_value_i` replaced by `activity_mowing_i` with type/role `boolean`/`indicator.working`: `true` means *mowing*, `false` means *not mowing*
  - possibility to pre-define states integrated, see new switch `PreDefine States` in adapter/instance configuration (Issue #2)
  - states are readonly now; except states for commands (Issue #4)
  - input field for `useTestVariable` in adapter/instance configuration switched to a *checkbox* (former: *text*); please check your settings
  - error in command  `stop_all_valves_i` in VALVE_SET fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants