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

[mielecloud] Add channels energy and water consumption #14456

Merged
merged 13 commits into from
Mar 24, 2023

Conversation

BjoernLange
Copy link
Contributor

@BjoernLange BjoernLange commented Feb 20, 2023

Resolves #14414.

@BjoernLange BjoernLange self-assigned this Feb 20, 2023
@jlaur
Copy link
Contributor

jlaur commented Feb 20, 2023

@BjoernLange - thanks for the PR. I plan to test it within the next few days. 🙂

@jlaur jlaur added the enhancement An enhancement or new feature for an existing add-on label Feb 20, 2023
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial feedback from first phase of testing (linking items to the new channels).

@jlaur
Copy link
Contributor

jlaur commented Feb 23, 2023

@BjoernLange - in case you haven't noticed, the integration tests are failing.

@BjoernLange BjoernLange force-pushed the 14414-mielecloud-eco-feedback branch from 96f12e6 to 4cba760 Compare February 24, 2023 07:23
Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM regarding the update instructions.

@BjoernLange BjoernLange force-pushed the 14414-mielecloud-eco-feedback branch from 4cba760 to 63c0d97 Compare February 28, 2023 13:38
@BjoernLange
Copy link
Contributor Author

I suspect the integration tests are failing because the things that now have update instructions are missing the thingTypeVersion property. Is there a way to instantiate things as they are defined in the XML thing type description from OH-INF during test setup? Otherwise I will just attach the property for the three affected handler types by hand. Maybe you can give me a hint @J-N-K?

Björn Lange added 8 commits March 24, 2023 09:50
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
@BjoernLange BjoernLange force-pushed the 14414-mielecloud-eco-feedback branch from 63c0d97 to 79708ab Compare March 24, 2023 08:51
Björn Lange added 4 commits March 24, 2023 10:52
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
@BjoernLange
Copy link
Contributor Author

I fixed the integration tests, would you mind having another look?

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides that SAT finding, LGTM.

I have tested on my productive system by backporting to 3.4.x. Unfortunately I haven't been able to make it work - both new channels stay UNDEF for my washing machine. Nothing of interest is logged, at least I see no payloads or other indicators with trace level. Have you been able to test successfully yourself, or do you have confirmation from other users? My washing machine is connected through XGW 3000, and I can see the consumption data in the Miele@home app.

@jlaur
Copy link
Contributor

jlaur commented Mar 24, 2023

@BjoernLange - okay, I added some logging of the payload:

	"xxxxxxxxxxxx": {
		"ident": {
			"type": {
				"key_localized": "Device type",
				"value_raw": 1,
				"value_localized": "Washing machine"
			},
			"deviceName": "Vaskemaskine",
			"protocolVersion": 2,
			"deviceIdentLabel": {
				"fabNumber": "xxxxxxxxxxxx",
				"fabIndex": "10",
				"techType": "WMV960WPS",
				"matNumber": "xxxxxxxx",
				"swids": [
					"3918",
					"25204",
					"25117",
					"20163",
					"3944",
					"20242",
					"25042",
					"25043",
					"25026",
					"2971",
					"20166",
					"2971",
					"20166"
				]
			},
			"xkmIdentLabel": {
				"techType": "XKM3000Z",
				"releaseVersion": "01.16"
			}
		},
		"state": {
			"ProgramID": {
				"value_raw": 1,
				"value_localized": "Cottons",
				"key_localized": "Program name"
			},
			"status": {
				"value_raw": 5,
				"value_localized": "In use",
				"key_localized": "status"
			},
			"programType": {
				"value_raw": 1,
				"value_localized": "Own programme",
				"key_localized": "Program type"
			},
			"programPhase": {
				"value_raw": 261,
				"value_localized": "Rinsing",
				"key_localized": "Program phase"
			},
			"remainingTime": [
				0,
				10
			],
			"startTime": [
				0,
				0
			],
			"targetTemperature": [
				{
					"value_raw": 3000,
					"value_localized": 30.0,
					"unit": "Celsius"
				}
			],
			"coreTargetTemperature": [],
			"temperature": [],
			"coreTemperature": [],
			"signalInfo": false,
			"signalFailure": false,
			"signalDoor": false,
			"remoteEnable": {
				"fullRemoteControl": true,
				"smartGrid": false,
				"mobileStart": false
			},
			"ambientLight": null,
			"light": null,
			"elapsedTime": [
				1,
				26
			],
			"spinningSpeed": {
				"unit": "rpm",
				"value_raw": 1600,
				"value_localized": "1600",
				"key_localized": "Spin speed"
			},
			"dryingStep": {
				"value_raw": null,
				"value_localized": "",
				"key_localized": "Drying level"
			},
			"ventilationStep": {
				"value_raw": null,
				"value_localized": "",
				"key_localized": "Fan level"
			},
			"plateStep": [],
			"ecoFeedback": null,
			"batteryLevel": null
		}
	},

so it seems this information is simply not available for me. The Miele@home app must use some other API to get this information.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlaur jlaur merged commit fbcb412 into openhab:main Mar 24, 2023
@jlaur jlaur added this to the 4.0 milestone Mar 24, 2023
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/miele-cloud-binding/93266/221

FordPrfkt pushed a commit to FordPrfkt/openhab-addons that referenced this pull request Apr 20, 2023
* Add POJOs for ecoFeedback from Miele REST API
* DeviceState offers  water and energy consumption
* Convert Quantity to State for channel population
* Add eco feedback channels to devices
* Fix item types and categories
* Add update instructions for eco feedback channels

Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mielecloud] Add support for reading water and power consumption
5 participants