Skip to content

Commit

Permalink
chore(release): 2023.05.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypfer committed May 29, 2023
1 parent 3ccd63f commit 71808b8
Show file tree
Hide file tree
Showing 8 changed files with 164 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ class CurrentStatisticsCapabilityMqttHandle extends CapabilityMqttHandle {
*/
constructor(options) {
super(Object.assign(options, {
friendlyName: "Current Statistics"
friendlyName: "Current Statistics",
helpMayChange: {
"Properties": "Available statistics depend on the robot model.",
}
}));
this.capability = options.capability;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ class TotalStatisticsCapabilityMqttHandle extends CapabilityMqttHandle {
*/
constructor(options) {
super(Object.assign(options, {
friendlyName: "Total Statistics"
friendlyName: "Total Statistics",
helpMayChange: {
"Properties": "Available statistics depend on the robot model.",
}
}));
this.capability = options.capability;

Expand Down
2 changes: 1 addition & 1 deletion docs/_pages/general/newcomer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Hi and welcome to the Valetudo Newcomer Guide.

This should hopefully answer all the questions you might have and also be interesting to read for people that haven't been following the recent development.

_Last update: 2023-04-23_
_Last update: 2023-05-29_


## What is Valetudo?
Expand Down
167 changes: 145 additions & 22 deletions docs/_pages/integrations/mqtt.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ Homie autodiscovery info is best viewed with something like [MQTT Explorer](http
- [Consumables monitoring (`ConsumableMonitoringCapability`)](#consumablesmonitoringconsumablemonitoringcapability)
- [Consumable (minutes) (`<CONSUMABLE-MINUTES>`)](#consumableminutesconsumable-minutes)
- [Consumable (percent) (`<CONSUMABLE-PERCENT>`)](#consumablepercentconsumable-percent)
- [Reset the consumable (`<CONSUMABLE-MINUTES>/reset`)](#resettheconsumableconsumable-minutesreset)
- [Reset the consumable (`<CONSUMABLE-PERCENT>/reset`)](#resettheconsumableconsumable-percentreset)
- [Current Statistics (`CurrentStatisticsCapability`)](#currentstatisticscurrentstatisticscapability)
- [Current Statistics Area (`area`)](#currentstatisticsareaarea)
- [Current Statistics Time (`time`)](#currentstatisticstimetime)
- [Refresh current statistics (`refresh`)](#refreshcurrentstatisticsrefresh)
- [Fan control (`FanSpeedControlCapability`)](#fancontrolfanspeedcontrolcapability)
- [Fan (`preset`)](#fanpreset)
- [Go to location (`GoToLocationCapability`)](#gotolocationgotolocationcapability)
Expand All @@ -77,12 +78,15 @@ Homie autodiscovery info is best viewed with something like [MQTT Explorer](http
- [Clean segments (`clean`)](#cleansegmentsclean)
- [Speaker volume control (`SpeakerVolumeControlCapability`)](#speakervolumecontrolspeakervolumecontrolcapability)
- [Speaker volume (`value`)](#speakervolumevalue)
- [Total Statistics (`TotalStatisticsCapability`)](#totalstatisticstotalstatisticscapability)
- [Total Statistics Area (`area`)](#totalstatisticsareaarea)
- [Total Statistics Count (`count`)](#totalstatisticscountcount)
- [Total Statistics Time (`time`)](#totalstatisticstimetime)
- [Water control (`WaterUsageControlCapability`)](#watercontrolwaterusagecontrolcapability)
- [Water (`preset`)](#waterpreset)
- [Wi-Fi configuration (`WifiConfigurationCapability`)](#wi-ficonfigurationwificonfigurationcapability)
- [Frequency (`frequency`)](#frequencyfrequency)
- [IP addresses (`ips`)](#ipaddressesips)
- [Refresh configuration (`refresh`)](#refreshconfigurationrefresh)
- [Signal (`signal`)](#signalsignal)
- [Wireless network (`ssid`)](#wirelessnetworkssid)
- [Zone cleaning (`ZoneCleaningCapability`)](#zonecleaningzonecleaningcapability)
Expand Down Expand Up @@ -124,10 +128,18 @@ Homie autodiscovery info is best viewed with something like [MQTT Explorer](http
- [Current Statistics Time (`sensor.mqtt`)](#currentstatisticstimetime)
- [Dust bin attachment (`binary_sensor.mqtt`)](#dustbindustbin)
- [Error (`sensor.mqtt`)](#vacuumstatusstatusstateattribute)
- [Fan (`select.mqtt`)](#fanpreset)
- [Map data (`camera.mqtt`)](#rawmapdataforhomeassistantmap-data-hass)
- [Map segments (`sensor.mqtt`)](#mapsegmentssegments)
- [Mop attachment (`binary_sensor.mqtt`)](#mopmop)
- [Play locate sound (`button.mqtt`)](#locatelocate)
- [Reset <CONSUMABLE-MINUTES> Consumable (`button.mqtt`)](#resettheconsumableconsumable-minutesreset)
- [Reset <CONSUMABLE-PERCENT> Consumable (`button.mqtt`)](#resettheconsumableconsumable-percentreset)
- [Speaker volume (`number.mqtt`)](#speakervolumevalue)
- [Total Statistics Area (`sensor.mqtt`)](#totalstatisticsareaarea)
- [Total Statistics Count (`sensor.mqtt`)](#totalstatisticscountcount)
- [Total Statistics Time (`sensor.mqtt`)](#totalstatisticstimetime)
- [Trigger Auto Empty Dock (`button.mqtt`)](#autoemptydockmanualtriggertrigger)
- [Vacuum (`vacuum.mqtt`)](#robot)
- [Water (`select.mqtt`)](#waterpreset)
- [Water tank attachment (`binary_sensor.mqtt`)](#watertankwatertank)
Expand Down Expand Up @@ -160,6 +172,10 @@ Home Assistant components controlled by this device:
- Command response topic: `<TOPIC PREFIX>/<IDENTIFIER>/AutoEmptyDockManualTriggerCapability/trigger`
- Data type: [enum](https://homieiot.github.io/specification/#enum) (allowed payloads: `PERFORM`)

Home Assistant components controlled by this property:

- Trigger Auto Empty Dock ([`button.mqtt`](https://www.home-assistant.io/integrations/button.mqtt/))




Expand All @@ -184,6 +200,8 @@ Home Assistant components controlled by this device:

*Node, capability: [ConsumableMonitoringCapability](/pages/usage/capabilities-overview.html#consumablemonitoringcapability)*

**Note:** This is an optional exposed capability handle and thus will only be available via MQTT if enabled in the Valetudo configuration.

{% include alert.html type="warning" content="Some information contained in this document may not be exactly what is sent or expected by actual robots, since different vendors have different implementations. Refer to the table below.

|------+--------|
Expand Down Expand Up @@ -220,6 +238,20 @@ Home Assistant components controlled by this property:



##### Reset the consumable (`<CONSUMABLE-MINUTES>/reset`) <a id="resettheconsumableconsumable-minutesreset" />

*Property, command, not retained*

- Command topic: `<TOPIC PREFIX>/<IDENTIFIER>/ConsumableMonitoringCapability/<CONSUMABLE-MINUTES>/reset/set`
- Command response topic: `<TOPIC PREFIX>/<IDENTIFIER>/ConsumableMonitoringCapability/<CONSUMABLE-MINUTES>/reset`
- Data type: [enum](https://homieiot.github.io/specification/#enum) (allowed payloads: `PERFORM`)

Home Assistant components controlled by this property:

- Reset <CONSUMABLE-MINUTES> Consumable ([`button.mqtt`](https://www.home-assistant.io/integrations/button.mqtt/))



##### Consumable (percent) (`<CONSUMABLE-PERCENT>`) <a id="consumablepercentconsumable-percent" />

*Property, readable, retained*
Expand All @@ -241,12 +273,38 @@ Home Assistant components controlled by this property:



##### Reset the consumable (`<CONSUMABLE-PERCENT>/reset`) <a id="resettheconsumableconsumable-percentreset" />

*Property, command, not retained*

- Command topic: `<TOPIC PREFIX>/<IDENTIFIER>/ConsumableMonitoringCapability/<CONSUMABLE-PERCENT>/reset/set`
- Command response topic: `<TOPIC PREFIX>/<IDENTIFIER>/ConsumableMonitoringCapability/<CONSUMABLE-PERCENT>/reset`
- Data type: [enum](https://homieiot.github.io/specification/#enum) (allowed payloads: `PERFORM`)

Home Assistant components controlled by this property:

- Reset <CONSUMABLE-PERCENT> Consumable ([`button.mqtt`](https://www.home-assistant.io/integrations/button.mqtt/))





#### Current Statistics (`CurrentStatisticsCapability`) <a id="currentstatisticscurrentstatisticscapability" />

*Node, capability: [CurrentStatisticsCapability](/pages/usage/capabilities-overview.html#currentstatisticscapability)*

**Note:** This is an optional exposed capability handle and thus will only be available via MQTT if enabled in the Valetudo configuration.

{% include alert.html type="warning" content="Some information contained in this document may not be exactly what is sent or expected by actual robots, since different vendors have different implementations. Refer to the table below.

|------+--------|
| What | Reason |
|------|--------|
| Properties | Available statistics depend on the robot model. |
|------+--------|

" %}

##### Current Statistics Area (`area`) <a id="currentstatisticsareaarea" />

*Property, readable, retained*
Expand All @@ -266,16 +324,6 @@ Home Assistant components controlled by this property:



##### Refresh current statistics (`refresh`) <a id="refreshcurrentstatisticsrefresh" />

*Property, command, not retained*

- Command topic: `<TOPIC PREFIX>/<IDENTIFIER>/CurrentStatisticsCapability/refresh/set`
- Command response topic: `<TOPIC PREFIX>/<IDENTIFIER>/CurrentStatisticsCapability/refresh`
- Data type: [enum](https://homieiot.github.io/specification/#enum) (allowed payloads: `PERFORM`)



##### Current Statistics Time (`time`) <a id="currentstatisticstimetime" />

*Property, readable, retained*
Expand Down Expand Up @@ -333,6 +381,10 @@ Sample value:
max
```

Home Assistant components controlled by this property:

- Fan ([`select.mqtt`](https://www.home-assistant.io/integrations/select.mqtt/))




Expand Down Expand Up @@ -380,6 +432,10 @@ Sample payload:
- Command response topic: `<TOPIC PREFIX>/<IDENTIFIER>/LocateCapability/locate`
- Data type: [enum](https://homieiot.github.io/specification/#enum) (allowed payloads: `PERFORM`)

Home Assistant components controlled by this property:

- Play locate sound ([`button.mqtt`](https://www.home-assistant.io/integrations/button.mqtt/))




Expand Down Expand Up @@ -448,6 +504,83 @@ Home Assistant components controlled by this property:



#### Total Statistics (`TotalStatisticsCapability`) <a id="totalstatisticstotalstatisticscapability" />

*Node, capability: [TotalStatisticsCapability](/pages/usage/capabilities-overview.html#totalstatisticscapability)*

**Note:** This is an optional exposed capability handle and thus will only be available via MQTT if enabled in the Valetudo configuration.

{% include alert.html type="warning" content="Some information contained in this document may not be exactly what is sent or expected by actual robots, since different vendors have different implementations. Refer to the table below.

|------+--------|
| What | Reason |
|------|--------|
| Properties | Available statistics depend on the robot model. |
|------+--------|

" %}

##### Total Statistics Area (`area`) <a id="totalstatisticsareaarea" />

*Property, readable, retained*

- Read topic: `<TOPIC PREFIX>/<IDENTIFIER>/TotalStatisticsCapability/area`
- Data type: [integer](https://homieiot.github.io/specification/#integer) (unit: cm²)

Sample value:

```json
3150000
```

Home Assistant components controlled by this property:

- Total Statistics Area ([`sensor.mqtt`](https://www.home-assistant.io/integrations/sensor.mqtt/))



##### Total Statistics Count (`count`) <a id="totalstatisticscountcount" />

*Property, readable, retained*

- Read topic: `<TOPIC PREFIX>/<IDENTIFIER>/TotalStatisticsCapability/count`
- Data type: [integer](https://homieiot.github.io/specification/#integer) (unit: #)

Sample value:

```json
5
```

Home Assistant components controlled by this property:

- Total Statistics Count ([`sensor.mqtt`](https://www.home-assistant.io/integrations/sensor.mqtt/))



##### Total Statistics Time (`time`) <a id="totalstatisticstimetime" />

*Property, readable, retained*

This handle returns the total statistics time in seconds

- Read topic: `<TOPIC PREFIX>/<IDENTIFIER>/TotalStatisticsCapability/time`
- Data type: [integer](https://homieiot.github.io/specification/#integer) (unit: seconds)

Sample value:

```json
7200
```

Home Assistant components controlled by this property:

- Total Statistics Time ([`sensor.mqtt`](https://www.home-assistant.io/integrations/sensor.mqtt/))





#### Water control (`WaterUsageControlCapability`) <a id="watercontrolwaterusagecontrolcapability" />

*Node, capability: [WaterUsageControlCapability](/pages/usage/capabilities-overview.html#waterusagecontrolcapability)*
Expand Down Expand Up @@ -528,16 +661,6 @@ Sample value:



##### Refresh configuration (`refresh`) <a id="refreshconfigurationrefresh" />

*Property, command, not retained*

- Command topic: `<TOPIC PREFIX>/<IDENTIFIER>/WifiConfigurationCapability/refresh/set`
- Command response topic: `<TOPIC PREFIX>/<IDENTIFIER>/WifiConfigurationCapability/refresh`
- Data type: [enum](https://homieiot.github.io/specification/#enum) (allowed payloads: `PERFORM`)



##### Signal (`signal`) <a id="signalsignal" />

*Property, readable, retained*
Expand Down
2 changes: 1 addition & 1 deletion docs/_pages/usage/implementation-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -716,4 +716,4 @@ Capability | <a href='#dreame_1c'>1C</a> | <a href='#dreame_1t'>1T</a> | <a href

<br/><br/><br/><br/><br/>
This page has been autogenerated.<br/>
Autogeneration timestamp: 2023-04-23T15:27:30.533Z
Autogeneration timestamp: 2023-05-29T16:06:23.453Z
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "valetudo",
"version": "2023.04.0",
"version": "2023.05.0",
"description": "Self-contained control webinterface for vacuum robots",
"license": "Apache-2.0",
"engines": {
Expand Down
22 changes: 6 additions & 16 deletions util/generate_mqtt_docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ function keyFn(key) {
}


ConsumableMonitoringCapabilityMqttHandle.prototype.genConsumableFriendlyName = (type, subType) => {
return `${type}`
}


class FakeMqttController extends MqttController {
// @ts-ignore
constructor() {
Expand Down Expand Up @@ -198,21 +203,6 @@ class FakeMqttController extends MqttController {
optionalExposedCapabilities: this.getOptionalExposableCapabilities()
});

// __.--,
// ,--'~-.,;=/
// { /,”” ‘ |
// `|\_ (@\(@\_
// \( _____(./
// | `-~--~-‘\
// | / / , \
// | | (\ \ \
// _\_|.-‘` `’| ,-= )
// (_ ,\ ____ \ ,/
// \ |--===--(,,/
// ```========-/
// \_______ /
// NOBODY TOUCH MA DELICIOUS SPAGHETTI 🍝🍝🍝

this.generatePromise = new Promise((resolve, reject) => {
this.resolveGenerate = resolve;
this.rejectGenerate = reject;
Expand Down Expand Up @@ -319,7 +309,7 @@ class FakeMqttController extends MqttController {
let markdown = "";

// Inject consumable friendly names since we're not using the standard ones
if (handle instanceof PropertyMqttHandle && handle.parent instanceof ConsumableMonitoringCapabilityMqttHandle && handle.topicName !== "refresh") {
if (handle instanceof PropertyMqttHandle && handle.parent instanceof ConsumableMonitoringCapabilityMqttHandle && !handle.topicName.endsWith("reset")) {
if (handle.getBaseTopic().endsWith("<CONSUMABLE-MINUTES>")) {
handle.friendlyName = "Consumable (minutes)";
handle.hassComponents[0].friendlyName = "Consumable (minutes)";
Expand Down

0 comments on commit 71808b8

Please sign in to comment.