Skip to content

Commit

Permalink
data types of (nearly) all datapoints adjusted
Browse files Browse the repository at this point in the history
  - **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
  • Loading branch information
jpgorganizer committed Mar 31, 2020
1 parent 17d8f68 commit 48c7ba9
Show file tree
Hide file tree
Showing 7 changed files with 784 additions and 409 deletions.
41 changes: 32 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ And of course you need a running ioBroker installation.
1. Verify default values of other settings in instance configuration. For most users the following values will be ok.
- ping frequence: 150 seconds
- factor for token validity: 1.001
- testvariable: false (just for debugging/development)
- PreDefineStates: (new in v0.4.0): `false` (default), if `true` then all states of the Gardena API are created regardless if they are currently transmitted by Gardena service
- testVariable: false (just for debugging/development)
- Loglevel: 3 (default) [0 = no log, 1 = some logs, 2 = some more logs, 3 = all logs]
- Authentication host URL: https://api.authentication.husqvarnagroup.dev
- Webservice Basis-URL: https://api.smart.gardena.dev

Please note that password and application key are encoded and stored within the adapter
and become just decoded for authentication with the Gardena application host.
Expand Down Expand Up @@ -76,11 +79,15 @@ To control the device use datapoint
All other datapoints are just for monitoring and information.

Special datapoints:
- `activity_value_i`
- `activity_mowing_i`

*This datapoint is generated by the adapter and not by Gardena API.*

This datapoint shows two different states for the mower: `MOWING` or `NOT_MOWING`. Depending on the value of datapoint `activity_value` this datapoint is set.
This datapoint shows two different states for the mower:
- `true`: mowing or
- `false`: not mowing.

Depending on the value of datapoint `activity_value` this datapoint is set.

If `activity_value` is
- `OK_CHARGING` The mower has to be mowing but insufficient charge level keeps it in the charging station.
Expand All @@ -89,7 +96,7 @@ Special datapoints:
- `PARKED_AUTOTIMER` The mower skips mowing because of insufficient grass height.
- `PAUSED` The mower is in a waiting state with hatch closed.

`activity_value_i` is set to `NOT_MOWING`.
`activity_mowing_i` is set to `false`.

If `activity_value` is
- `OK_CUTTING` The mower is cutting in AUTO mode (schedule).
Expand All @@ -99,7 +106,7 @@ Special datapoints:
- `NONE` No activity is happening, perhaps due to an error.
- all other values

`activity_value_i` is set to `MOWING`.
`activity_mowing_i` is set to `true`.

- `duration_leftover_i`

Expand All @@ -122,6 +129,8 @@ To control the device use datapoint

Change this datapoint to stop all valves.
- To stop all valves immediately use string `STOP_UNTIL_NEXT_TASK`

Note: Do not display the value of this datapoint in your application, as the value is mostly undefined

#### Monitoring
All other datapoints are just for monitoring and information.
Expand All @@ -134,7 +143,9 @@ To control the device use datapoint
- `duration_value`

Change this datapoint to start the valve.
- To start for a defined time set the value to the value in seconds (please use multiples of 60)
- To start for a defined time set the value to the value in seconds (please use multiples of 60).

**Note:** It seems that there is a not documented limitation for this value to a maximum of 3540 seconds (59 minutes). Please report if you see this or other limitations. (at least I didn't see that in documentation)
- to cancel the current watering and continue with the schedule use string `STOP_UNTIL_NEXT_TASK`
- to skip automatic operation until specified time, the currently active operation might or might not be cancelled (depends on device model) use string `PAUSE`
- to restore automatic operation if it was paused use string `UNPAUSE`
Expand Down Expand Up @@ -169,7 +180,8 @@ To control the device use datapoint

Special datapoint:
- `duration_leftover_i`
This datapoint is generated by the adapter and not by Gardena API.

*This datapoint is generated by the adapter and not by Gardena API.*

The value describes the number of minutes till the power socket is shut off.
- An integer, one (`1`) or more.
Expand All @@ -189,15 +201,26 @@ Note: not tested


## Known Errors
- the received value for mower datapoint `operationHours` is different to that reported in Gardena App. It's currently not clear which one is correct.
- the received value for mower datapoint `operationHours_value` is different to that reported in Gardena App. It's currently not clear which one is correct.


## Note
This is a private project. I am not in any association with Gardena or Husqvarna.


## Changelog

### 0.4.0
* (jpgorganizer)
- **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 https://github.com/jpgorganizer/ioBroker.smartgarden/issues/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 https://github.com/jpgorganizer/ioBroker.smartgarden/issues/2)
- states are readonly now; except states for commands (Issue https://github.com/jpgorganizer/ioBroker.smartgarden/issues/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

### 0.3.0
* (jpgorganizer)
- create all states read/write
Expand Down
16 changes: 11 additions & 5 deletions admin/index_m.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@
</div>
<div class="row">
<div class="input-field col s6">
<input class="value" id="authentication_host" type="text">
<label for="authentication_host" class="translate active">authentication_host</label>
<input class="value" id="gardena_authentication_host" type="text">
<label for="gardena_authentication_host" class="translate active">gardena_authentication_host</label>
</div>
</div>
<div class="row">
Expand Down Expand Up @@ -158,10 +158,10 @@
<label for="gardena_authtoken_factor" class="translate active">gardena_authtoken_factor</label>
</div>
</div>
<div class="row">
<div class="row">
<div class="input-field col s6">
<input class="value" id="useTestVariable" type="text">
<label for="useTestVariable" class="translate active">useTestVariable</label>
<input class="value" id="preDefineStates" type="checkbox">
<label for="preDefineStates" class="translate active">preDefineStates</label>
</div>
</div>
<div class="row">
Expand All @@ -170,6 +170,12 @@
<label for="logLevel" class="translate active">logLevel</label>
</div>
</div>
<div class="row">
<div class="input-field col s6">
<input class="value" id="useTestVariable" type="checkbox">
<label for="useTestVariable" class="translate active">useTestVariable</label>
</div>
</div>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 48c7ba9

Please sign in to comment.