Bosh Dishwasher with Home-Connect

Moderator: leecollings

Knibor
Posts: 112
Joined: Sunday 20 May 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Bosh Dishwasher with Home-Connect

Post by Knibor »

Hi, is it possible to start and stop my dishwasher with "home-connect" with Domoticz ?

Thanks
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by waaren »

Knibor wrote: Wednesday 05 August 2020 19:22 Hi, is it possible to start and stop my dishwasher with "home-connect" with Domoticz ?
Bosch seem to support an API on home-connect (if you applied for a developer key) so it should be possible.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
FireWizard
Posts: 1747
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by FireWizard »

Hi,
@Knibor

Have a look at this thread: https://www.domoticz.com/forum/viewtopi ... 28&t=16840

For Node Red, some nodes has been developed, so I agree with @waaren, it should not be too difficult
https://flows.nodered.org/node/node-red ... omeconnect

Perhaps this article is interesting to read: https://docs.joepverhaeg.nl/dishwasher/

Regards
Knibor
Posts: 112
Joined: Sunday 20 May 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by Knibor »

Thanks for the info,

It woud be great if there was a working plugin for Domoticz to communicate with Home-Connect. That's the way you can build your own smart home with appliances that you can start when the sun shines.

There is a Home-Connect plugin from Mario Peters on this forum, but it seems this thread is dead... I don't get this to work, can someone look at this plugin? What should I enter in Hardware "Port". What port do they mean? And I don't see any Devices what should be created with the plugin?

Thanks
User avatar
FireWizard
Posts: 1747
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by FireWizard »

@Knibor,

A guy, DavidMStraub, has something created for Home Assistant. You can find his script at: https://github.com/DavidMStraub/homeconnect.
So there exist a Python script, but if this can be modified for Domoticz, I don't know.

I would prefer the Node Red option, see what it presents and push the data to Domoticz

Unless someone picks up the script of Mario Peters.

Regards
Knibor
Posts: 112
Joined: Sunday 20 May 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by Knibor »

Hi,
After a while I decided to use Node Red to connect with the Bosch Dishwasher.
I can now start/stop the dishwasher and can choose between differs programs with Node Red.

But now I have problems to connect a virtual switch in Domoticz that connect with MQTT to Node Red and start a program.

I have tested the connection between domoticz and Node Red. I can in Node Red put a switch on and off, and in Domoticz a light goes on and off.
So the connection between Node Red and Domoticz works perfect.

Is there someone with Node Red/ Domoticz experience to establish a switch function in domoticz that start a program from the dishwasher in Node Red?
Schermafbeelding 2020-08-13 om 17.29.03.png
Schermafbeelding 2020-08-13 om 17.29.03.png (257.51 KiB) Viewed 5772 times
Schermafbeelding 2020-08-13 om 17.29.24.png
Schermafbeelding 2020-08-13 om 17.29.24.png (47.72 KiB) Viewed 5772 times
User avatar
FireWizard
Posts: 1747
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by FireWizard »

Hi

@Knibor

I think that will be possible.
Before we start, I need some information.

The last picture represents a test to control a switch in Domoticz and you insert the correct payload with the 2 "Inject" nodes. I think we can forget this.

The first picture represents the "Home Connect" nodes from https://flows.nodered.org/node/node-red ... omeconnect. Correct?
Which version of Node Red do you use?

What do you inject with the different "Inject" nodes?
And what is the output of the different "Debug" nodes?

For the 4 different programs a selector switch might be the best option. Agree?

Awaiting your response.

Regards
Knibor
Posts: 112
Joined: Sunday 20 May 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by Knibor »

Hi thanks for the response,

The first picture represents the "Home Connect" nodes from https://flows.nodered.org/node/node-red ... omeconnect. Correct?
Yes, the first picture represents the "Home Connect" node from https://flows.nodered.org/node/node-red ... omeconnect.

Which version of Node Red do you use?
The Version of Node Red is. V1.06

What do you inject with the different "Inject" nodes?
The different inject nodes are different dishwasher programs.

And what is the output of the different "Debug" nodes?
Inject Nodes "Stop" and the dishwasher Programms "Debug"
13-8-2020 19:57:03node: 191ef492.755f1b
msg.payload : boolean
true

The "Receive Programm" are the state of the Dishwasher "Debug"
13-8-2020 19:58:35node: 2cced186.40287e
msg.payload : Object
object
data: object
key: "Dishcare.Dishwasher.Program.NightWash"
options: array[4]
0: object
key: "BSH.Common.Option.StartInRelative"
value: 0
unit: "seconds"
1: object
key: "Dishcare.Dishwasher.Option.HygienePlus"
value: false
2: object
key: "Dishcare.Dishwasher.Option.IntensivZone"
value: false
3: object
key: "Dishcare.Dishwasher.Option.ExtraDry"
value: false

For the 4 different programs a selector switch might be the best option. Agree?
Yes, a selector switch would be the best way.
User avatar
FireWizard
Posts: 1747
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by FireWizard »

Hi,

@Knibor

I will send you a PM to avoid that we have a privat conversation in the public part.
If we have a working flow, we will publish it here.

Regards
Knibor
Posts: 112
Joined: Sunday 20 May 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by Knibor »

Hi,

I agree with that, thanks

Regards
mariopeters
Posts: 61
Joined: Wednesday 22 August 2018 12:18
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by mariopeters »

Perhaps you could watch a Python-plugin I wrote in the past.
Recently I updated it a little bit and it works fine right at the moment for my Siemens dishwasher and washer.
Look for it at https://github.com/mario-peters/Domotic ... ect-Plugin.
I will update the wiki in short time, so you know how to install it.
Knibor
Posts: 112
Joined: Sunday 20 May 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by Knibor »

Hi thanks for the answer.

When I install the plugin, and choose the plugin in "hardware". Which port should be filled in at "port" ?
And I see no devices?
gimic
Posts: 50
Joined: Thursday 04 January 2018 8:43
Target OS: Linux
Domoticz version: 3.66
Location: Roeselare, Wvl, BE
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by gimic »

FireWizard wrote: Thursday 13 August 2020 21:19 Hi,

@Knibor

I will send you a PM to avoid that we have a privat conversation in the public part.
If we have a working flow, we will publish it here.

Regards
Hi did you get the node red working with homeconnect? If yes can you share the code plz?
mariopeters
Posts: 61
Joined: Wednesday 22 August 2018 12:18
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by mariopeters »

Knibor wrote: Tuesday 01 September 2020 19:54 Hi thanks for the answer.

When I install the plugin, and choose the plugin in "hardware". Which port should be filled in at "port" ?
And I see no devices?
The plugin in Domoticz is actually an HTTPListener. So the requested port is the port (on the server where Domoticz is running) on which the plugin is listening. In addition, there is a script that runs in the background and retrieves information from Home Connect and forwards it to the plugin. You have to start this script separately. See for this: https://github.com/mario-peters/Domotic ... lugin/wiki

If you added the plugin, you will find the devices on the Devices page in Domoticz. There you can add them to the dashboard.
User avatar
FireWizard
Posts: 1747
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by FireWizard »

Hi, @gimic,

Unfortunately our conversation ended with a last post to @knibor, September 7.
We had a couple of things working, but as I do not own Bosch Home Connect, it is impossible to test for me.

If you want to continue, I'm prepared to support and to share what @knibor and I have made so far.

But perhaps, you should also look at @mariopeters plugin.

Regards
Knibor
Posts: 112
Joined: Sunday 20 May 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: NL
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by Knibor »

Hi, @gimic

I could not evaluate Home Connect any more.
The biggest problem I ran into in the end was that the Home connect server always threw me out after a few days. This was because there were too many requests.
When this is solved I will continue with the Home connect thing.

Robin
foscolino
Posts: 20
Joined: Monday 02 November 2020 18:38
Target OS: Windows
Domoticz version: 2.20
Location: Italy
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by foscolino »

sorry, is not possible adapt script "homeconnectSSE.sh" for linux to windows service?
I have installed mario-peters home-connect plugin on windows machine, the script work only if i refresh hardware manually.
Is there a solution to convert script?
can you help me, please?
stingone
Posts: 48
Joined: Monday 26 October 2015 16:28
Target OS: -
Domoticz version:
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by stingone »

Knibor wrote: Thursday 13 August 2020 17:43 Hi,
After a while I decided to use Node Red to connect with the Bosch Dishwasher.
I can now start/stop the dishwasher and can choose between differs programs with Node Red.

But now I have problems to connect a virtual switch in Domoticz that connect with MQTT to Node Red and start a program.

I have tested the connection between domoticz and Node Red. I can in Node Red put a switch on and off, and in Domoticz a light goes on and off.
So the connection between Node Red and Domoticz works perfect.

Is there someone with Node Red/ Domoticz experience to establish a switch function in domoticz that start a program from the dishwasher in Node Red?

Schermafbeelding 2020-08-13 om 17.29.03.png

Schermafbeelding 2020-08-13 om 17.29.24.png
Did you get it working with mqtt and willing to share the flows?
User avatar
FireWizard
Posts: 1747
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by FireWizard »

Hello @stingone,

You wrote:
Did you get it working with mqtt and willing to share the flows?
As said earlier communication with @Knibor stopped at some stage and I do not remember how far we did come at that time.

In my archive I found 2 flows, which I am happy to share.

Flow 1.

Code: Select all

[{"id":"0af9a2353abcf1d8","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"6dbcd633.8e82","type":"mqtt in","z":"0af9a2353abcf1d8","name":"Domoticz Out","topic":"domoticz/out","qos":"2","datatype":"json","broker":"1dcf01d5.02819e","x":90,"y":220,"wires":[[]]},{"id":"dd124a7.dc97938","type":"switch","z":"0af9a2353abcf1d8","name":"Filter Selector Switch","property":"payload.idx","propertyType":"msg","rules":[{"t":"eq","v":"466","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":300,"y":220,"wires":[["96347c40.06f9a8"]]},{"id":"7ddea1ce.a79a5","type":"comment","z":"0af9a2353abcf1d8","name":"Domoticz selector switch IDX 466","info":"","x":160,"y":280,"wires":[]},{"id":"138ca4c7.8117f3","type":"function","z":"0af9a2353abcf1d8","name":"","func":"if (msg.payload.nvalue === 0) {\n    msg.payload = true;\n    node.send([[msg],[null],[null]]);\n} else \n\nif (msg.payload.nvalue === 2) {\n    var svalue1 = msg.payload.svalue1;\n    msg.payload = true;\n    msg.body = {\n            \"data\": {\n            \"key\": \"BSH.Common.Setting.PowerState\",\n            \"value\": \"BSH.Common.EnumType.PowerState.On\",\n            \"type\": \"BSH.Common.EnumType.PowerState\",\n            \"constraints\": {\n            \"allowedvalues\": [\n            \"BSH.Common.EnumType.PowerState.On\",\n            \"BSH.Common.EnumType.PowerState.Standby\"\n             ],\n            \"access\": \"readWrite\"\n        }\n      }\n    }\n    node.send([[null],[null],[msg]]);\n    \n    switch (svalue1) {\n        case \"10\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Eco50\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n        \n        case \"20\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Auto2\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n        case \"30\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Intensiv70\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n        case \"40\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.NightWash\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n        case \"50\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Kurz60\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n        \n        case \"60\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Glas40\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n        case \"70\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Quick45\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n        case \"80\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.MachineCare\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n    }\n}\n","outputs":3,"noerr":0,"initialize":"","finalize":"","x":80,"y":360,"wires":[[],[],[]]},{"id":"7da8a126.dc13c","type":"debug","z":"0af9a2353abcf1d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":850,"y":200,"wires":[]},{"id":"5e7eb55.73937cc","type":"home-connect-request","z":"0af9a2353abcf1d8","auth":"e5e1346e.c0c2e","name":"Start Program","tag":"programs","operationId":"start_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":900,"y":240,"wires":[["d28ad56a.2df9f"]]},{"id":"d28ad56a.2df9f","type":"debug","z":"0af9a2353abcf1d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":240,"wires":[]},{"id":"94e988d0.a28a28","type":"home-connect-request","z":"0af9a2353abcf1d8","auth":"58eba0bf.1dc1b8","name":"Powerstate on","tag":"settings","operationId":"set_setting","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"BSH.Common.Setting.PowerState","statuskey":"","imagekey":"","x":880,"y":340,"wires":[["4eae41b8.4d58c8"]]},{"id":"e9293fb.05ff64","type":"debug","z":"0af9a2353abcf1d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":850,"y":300,"wires":[]},{"id":"fad9b69.f99dfc8","type":"home-connect-request","z":"0af9a2353abcf1d8","auth":"e5e1346e.c0c2e","name":"Stop Program","tag":"programs","operationId":"stop_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":880,"y":140,"wires":[["27a0da3.c3618a6"]]},{"id":"27a0da3.c3618a6","type":"debug","z":"0af9a2353abcf1d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":140,"wires":[]},{"id":"36843afe.da6b96","type":"debug","z":"0af9a2353abcf1d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":850,"y":400,"wires":[]},{"id":"4eae41b8.4d58c8","type":"debug","z":"0af9a2353abcf1d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":340,"wires":[]},{"id":"96347c40.06f9a8","type":"function","z":"0af9a2353abcf1d8","name":"","func":"var key = {};\n\nif (msg.payload.nvalue === 0) {\n    msg.payload = true;\n    node.send([[msg],[null],[null]]);\n} else \n\nif (msg.payload.nvalue === 2) {\n    var svalue1 = msg.payload.svalue1;\n    msg.payload = true;\n    msg.body = {\n            \"data\": {\n            \"key\": \"BSH.Common.Setting.PowerState\",\n            \"value\": \"BSH.Common.EnumType.PowerState.On\",\n            \"type\": \"BSH.Common.EnumType.PowerState\",\n            \"constraints\": {\n            \"allowedvalues\": [\n            \"BSH.Common.EnumType.PowerState.On\",\n            \"BSH.Common.EnumType.PowerState.Standby\"\n             ],\n            \"access\": \"readWrite\"\n        }\n      }\n    }\n    node.send([[null],[null],[msg]]);\n    \n    switch (svalue1) {\n        case \"10\" : key = \"Dishcare.Dishwasher.Program.Eco50\";\n        break;\n    \n        case \"20\" : key = \"Dishcare.Dishwasher.Program.Auto2\";\n        break;  \n\n        case \"30\" : key = \"Dishcare.Dishwasher.Program.Intensiv70\";\n        break;\n\n        case \"40\" : key = \"Dishcare.Dishwasher.Program.NightWash\";\n        break;\n\n        case \"50\" : key = \"Dishcare.Dishwasher.Program.Kurz60\";\n        break;\n        \n        case \"60\" : key = \"Dishcare.Dishwasher.Program.Glas40\";\n        break;\n\n        case \"70\" : key = \"Dishcare.Dishwasher.Program.Quick45\";\n        break;\n\n        case \"80\" : key = \"Dishcare.Dishwasher.Program.MachineCare\";\n        break;\n\n    }\n\n        msg.body = {\n        \"data\": {\n        \"key\": key,\n        \"options\": []\n        }\n    }\n    \nreturn [null,msg,null];    \n}","outputs":3,"noerr":0,"initialize":"","finalize":"","x":520,"y":220,"wires":[["fad9b69.f99dfc8","7da8a126.dc13c"],["7980fb35.21de24"],["94e988d0.a28a28","36843afe.da6b96"]]},{"id":"7980fb35.21de24","type":"delay","z":"0af9a2353abcf1d8","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":700,"y":220,"wires":[["5e7eb55.73937cc","e9293fb.05ff64"]]},{"id":"27dd18f.82e8ee8","type":"mqtt in","z":"0af9a2353abcf1d8","name":"Domoticz Out","topic":"domoticz/out","qos":"2","datatype":"json","broker":"1dcf01d5.02819e","x":90,"y":560,"wires":[["89ce0da.07ed6f"]]},{"id":"89ce0da.07ed6f","type":"switch","z":"0af9a2353abcf1d8","name":"Filter Selector Switch","property":"payload.idx","propertyType":"msg","rules":[{"t":"eq","v":"466","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":300,"y":560,"wires":[["2f32a640.fe1bda","225ebb13.73cdcc"]]},{"id":"2f32a640.fe1bda","type":"function","z":"0af9a2353abcf1d8","name":"","func":"if (msg.payload.nvalue === 2) {\n\n    msg.body = {\n            \"data\": {\n            \"key\": \"BSH.Common.Setting.PowerState\",\n            \"value\": \"BSH.Common.EnumType.PowerState.On\",\n            \"type\": \"BSH.Common.EnumType.PowerState\",\n            \"constraints\": {\n            \"allowedvalues\": [\n            \"BSH.Common.EnumType.PowerState.On\",\n            \"BSH.Common.EnumType.PowerState.Standby\"\n             ],\n            \"access\": \"readWrite\"\n        }\n      }\n    }\nreturn msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":520,"y":560,"wires":[["95bd6a71.3b1f4"]]},{"id":"95bd6a71.3b1f4","type":"home-connect-request","z":"0af9a2353abcf1d8","auth":"58eba0bf.1dc1b8","name":"Powerstate on","tag":"settings","operationId":"set_setting","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"BSH.Common.Setting.PowerState","statuskey":"","imagekey":"","x":720,"y":560,"wires":[["587c47ec.c508f"]]},{"id":"e836e7c9.c504f8","type":"home-connect-request","z":"0af9a2353abcf1d8","auth":"e5e1346e.c0c2e","name":"Stop Program","tag":"programs","operationId":"stop_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":720,"y":720,"wires":[["d7b33bb2.12a2b8"]]},{"id":"d7b33bb2.12a2b8","type":"debug","z":"0af9a2353abcf1d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":910,"y":720,"wires":[]},{"id":"86507913.d60a5","type":"function","z":"0af9a2353abcf1d8","name":"","func":"if (msg.payload.nvalue === 0) {\n    msg.payload = true;\n    return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":200,"y":860,"wires":[[]]},{"id":"cb12b6.d714c548","type":"debug","z":"0af9a2353abcf1d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":780,"wires":[]},{"id":"e7f71225.a38b9","type":"debug","z":"0af9a2353abcf1d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1110,"y":620,"wires":[]},{"id":"2134b3e0.71e71c","type":"home-connect-request","z":"0af9a2353abcf1d8","auth":"e5e1346e.c0c2e","name":"Start Program","tag":"programs","operationId":"start_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":1140,"y":660,"wires":[["fc74f00d.84b3b"]]},{"id":"fc74f00d.84b3b","type":"debug","z":"0af9a2353abcf1d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1330,"y":660,"wires":[]},{"id":"ced90e9a.1fcf08","type":"combine-if","z":"0af9a2353abcf1d8","topic":"condition","name":"","timeout":0,"x":930,"y":660,"wires":[["2134b3e0.71e71c","e7f71225.a38b9"],[]]},{"id":"fde0f06.72ea11","type":"function","z":"0af9a2353abcf1d8","name":"","func":"var key = {};\n\nif (msg.payload.nvalue === 2) {\n    var svalue1 = msg.payload.svalue1;\n\n    switch (svalue1) {\n        case \"10\" : key = \"Dishcare.Dishwasher.Program.Eco50\";\n        break;\n    \n        case \"20\" : key = \"Dishcare.Dishwasher.Program.Auto2\";\n        break;  \n\n        case \"30\" : key = \"Dishcare.Dishwasher.Program.Intensiv70\";\n        break;\n\n        case \"40\" : key = \"Dishcare.Dishwasher.Program.NightWash\";\n        break;\n\n        case \"50\" : key = \"Dishcare.Dishwasher.Program.Kurz60\";\n        break;\n        \n        case \"60\" : key = \"Dishcare.Dishwasher.Program.Glas40\";\n        break;\n\n        case \"70\" : key = \"Dishcare.Dishwasher.Program.Quick45\";\n        break;\n\n        case \"80\" : key = \"Dishcare.Dishwasher.Program.MachineCare\";\n        break;\n\n    }\n\n        msg.body = {\n        \"data\": {\n        \"key\": key,\n        \"options\": []\n        }\n    }\n    \nreturn msg;    \n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":200,"y":920,"wires":[[]]},{"id":"587c47ec.c508f","type":"change","z":"0af9a2353abcf1d8","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"[object Blob]","fromt":"str","to":"true","tot":"bool"},{"t":"set","p":"topic","pt":"msg","to":"condition","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":940,"y":560,"wires":[["ced90e9a.1fcf08"]]},{"id":"225ebb13.73cdcc","type":"function","z":"0af9a2353abcf1d8","name":"","func":"var key = {};\n\nif (msg.payload.nvalue === 0) {\n//    msg.payload = true;\n    msg.payload = {\"command\":\"udevice\",\"idx\":8,\"nvalue\":0,\"svalue\":\"0\"};\n    return [null,msg];\n    } \n\nelse if (msg.payload.nvalue === 2) {\n    var svalue1 = msg.payload.svalue1;\n\n    switch (svalue1) {\n        case \"10\" : key = \"Dishcare.Dishwasher.Program.Eco50\";\n        break;\n    \n        case \"20\" : key = \"Dishcare.Dishwasher.Program.Auto2\";\n        break;  \n\n        case \"30\" : key = \"Dishcare.Dishwasher.Program.Intensiv70\";\n        break;\n\n        case \"40\" : key = \"Dishcare.Dishwasher.Program.NightWash\";\n        break;\n\n        case \"50\" : key = \"Dishcare.Dishwasher.Program.Kurz60\";\n        break;\n        \n        case \"60\" : key = \"Dishcare.Dishwasher.Program.Glas40\";\n        break;\n\n        case \"70\" : key = \"Dishcare.Dishwasher.Program.Quick45\";\n        break;\n\n        case \"80\" : key = \"Dishcare.Dishwasher.Program.MachineCare\";\n        break;\n\n    }\n\n        msg.body = {\n        \"data\": {\n        \"key\": key,\n        \"options\": []\n        }\n    }\nreturn [msg,null];    \n}","outputs":2,"noerr":0,"initialize":"","finalize":"","x":520,"y":660,"wires":[["345d584.4be2ea8"],["e836e7c9.c504f8","cb12b6.d714c548","f0080b67.488fd8","3f6f1e07.c66eea"]]},{"id":"f0c0d97a.f8389","type":"inject","z":"0af9a2353abcf1d8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[object Blob]","payloadType":"str","x":730,"y":500,"wires":[["587c47ec.c508f"]]},{"id":"4f57a9dd.7c0678","type":"inject","z":"0af9a2353abcf1d8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"condition","payload":"false","payloadType":"bool","x":720,"y":620,"wires":[["ced90e9a.1fcf08"]]},{"id":"345d584.4be2ea8","type":"delay","z":"0af9a2353abcf1d8","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":740,"y":660,"wires":[["ced90e9a.1fcf08"]]},{"id":"6a67d606.ad5728","type":"function","z":"0af9a2353abcf1d8","name":"","func":"if (msg.payload.nvalue === 0) {\n    msg.payload = {\"command\":\"udevice\",\"idx\":8,\"nvalue\":0,\"svalue\":\"0\"};\n    return msg;\n    } \n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":520,"y":860,"wires":[[]]},{"id":"3f6f1e07.c66eea","type":"mqtt out","z":"0af9a2353abcf1d8","name":"Domoticz In","topic":"domoticz/in","qos":"","retain":"","broker":"28f2a34.5e04cdc","x":890,"y":860,"wires":[]},{"id":"f0080b67.488fd8","type":"debug","z":"0af9a2353abcf1d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":890,"y":920,"wires":[]},{"id":"1dcf01d5.02819e","type":"mqtt-broker","name":"Domoticz","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"28f2a34.5e04cdc","type":"mqtt-broker","name":"Domoticz","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Have a look and if I can support, I am happy to do so.

Regards
User avatar
FireWizard
Posts: 1747
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Bosh Dishwasher with Home-Connect

Post by FireWizard »

Hello @stingone,

Flow 2 (alternative)

Code: Select all

[{"id":"ac0418fcd47e4708","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"c01ff4ac.385828","type":"inject","z":"ac0418fcd47e4708","name":"Receive Haid","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":150,"y":140,"wires":[["3c9eea6f.9c69fe"]]},{"id":"d522e6fb.18f1c8","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":890,"y":140,"wires":[]},{"id":"baf5c282.da4b1","type":"mqtt in","z":"ac0418fcd47e4708","name":"Domoticz Out","topic":"domoticz/out","qos":"2","datatype":"json","broker":"1dcf01d5.02819e","x":110,"y":420,"wires":[["6a27d9a9.76e13"]]},{"id":"6a27d9a9.76e13","type":"switch","z":"ac0418fcd47e4708","name":"Filter Selector Switch","property":"payload.idx","propertyType":"msg","rules":[{"t":"eq","v":"466","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":320,"y":420,"wires":[["efc45b03.64005"]]},{"id":"efc45b03.64005","type":"function","z":"ac0418fcd47e4708","name":"","func":"if (msg.payload.nvalue === 0) {\n    msg.payload = true;\n    return [msg,null,null,null,null,null,null,null,null]\n} else \n\nif (msg.payload.nvalue === 2) {\n    switch (msg.payload.svalue1) {\n        case \"10\":\n            msg.payload = true;\n            return [null,msg,null,null,null,null,null,null,null]\n        break;\n        \n        case \"20\":\n            msg.payload = true;\n            return [null,null,msg,null,null,null,null,null,null]\n        break;\n\n        case \"30\":\n            msg.payload = true;\n            return [null,null,null,msg,null,null,null,null,null]\n        break;\n\n        case \"40\":\n            msg.payload = true;\n            return [null,null,null,null,msg,null,null,null,null]\n        break;\n\n        case \"50\":\n            msg.payload = true;\n            return [null,null,null,null,null,msg,null,null,null]\n        break;\n        \n        case \"60\":\n            msg.payload = true;\n            return [null,null,null,null,null,null,msg,null,null]\n        break;\n\n        case \"70\":\n            msg.payload = true;\n            return [null,null,null,null,null,null,null,msg,null]\n        break;\n\n        case \"80\":\n            msg.payload = true;\n            return [null,null,null,null,null,null,null,null,msg]\n        break;\n\n    }\n}\n","outputs":9,"noerr":0,"initialize":"","finalize":"","x":520,"y":420,"wires":[["d44d3d46.cf931"],["683eece4.c1f78c"],["ae26ebb6.45ecf"],["b809b626.3ffb6"],["e06d13b0.6f4ff"],["d9af0291.907678"],["f378d4f8.03c6f8"],["cdc1c169.9ac0d8"],["6954b48.c58754c"]]},{"id":"d44d3d46.cf931","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Stop","tag":"programs","operationId":"stop_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":870,"y":200,"wires":[["d026efe2.93e528"]]},{"id":"683eece4.c1f78c","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Start Program.Eco50","tag":"programs","operationId":"start_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"{\n    \"data\": {\n        \"key\": \"Dishcare.Dishwasher.Program.Eco50\",\n        \"options\": []\n    }\n}","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":920,"y":260,"wires":[["1aa85f30.7e49d1"]]},{"id":"ae26ebb6.45ecf","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Start Program.Auto2","tag":"programs","operationId":"start_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"{\n    \"data\": {\n        \"key\": \"Dishcare.Dishwasher.Program.Auto2\",\n        \"options\": []\n    }\n}","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":920,"y":320,"wires":[["739e3b1a.b69ab4"]]},{"id":"b809b626.3ffb6","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Start Program.Intensiv70","tag":"programs","operationId":"start_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"{\n    \"data\": {\n        \"key\": \"Dishcare.Dishwasher.Program.Intensiv70\",\n        \"options\": []\n    }\n}","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":930,"y":380,"wires":[["f2ab6116.2c2a2"]]},{"id":"e06d13b0.6f4ff","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Start Program.NightWash","tag":"programs","operationId":"start_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"{\n    \"data\": {\n        \"key\": \"Dishcare.Dishwasher.Program.NightWash\",\n        \"options\": []\n    }\n}","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":930,"y":440,"wires":[["b741147.d9b2768"]]},{"id":"d9af0291.907678","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Start Program.Kurz60","tag":"programs","operationId":"start_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"{\n    \"data\": {\n        \"key\": \"Dishcare.Dishwasher.Program.Kurz60\",\n        \"options\": []\n    }\n}","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":920,"y":500,"wires":[["a2746922.cdccb"]]},{"id":"f378d4f8.03c6f8","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Start Program.Glas40","tag":"programs","operationId":"start_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"{\n    \"data\": {\n        \"key\": \"Dishcare.Dishwasher.Program.Glas40\",\n        \"options\": []\n    }\n}","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":920,"y":560,"wires":[["7474dbc.acbc1a4"]]},{"id":"cdc1c169.9ac0d8","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Start Program.Quick45","tag":"programs","operationId":"start_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"{\n    \"data\": {\n        \"key\": \"Dishcare.Dishwasher.Program.Quick45\",\n        \"options\": []\n    }\n}","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":920,"y":620,"wires":[["bb9cac1a.d2626"]]},{"id":"6954b48.c58754c","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Start Program.MachineCare","tag":"programs","operationId":"start_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"{\n    \"data\": {\n        \"key\": \"Dishcare.Dishwasher.Program.MachineCare\",\n        \"options\": []\n    }\n}","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":940,"y":680,"wires":[["2d87edd1.005a52"]]},{"id":"a6c0c653.584b48","type":"comment","z":"ac0418fcd47e4708","name":"How to receive HAID","info":"Install Home Connect Nodes \"node-red-contrib-homeconnect\"\n\nConnect your Dishwasher with Wifi.\n\nSee the instructions on Youtube https://www.youtube.com/watch?v=wRscaAe0Q3Q\n\nSecond, go to the Home Connect Develop website, and register.\n\nGo to Aplications and register your Application\nOnes you have register you application (Dishwasher) You can open it and than you can see Client ID and Client Secret.\n\nNow you go to Receive HAID Node and open it.\nOpen \"Auth\" with \"pencil\"\nFill in you Client ID and Client Secret.\nIn \"Scope pu the text \"IdentifyAppliance Dishwasher\"\nNow \"Start authorization\"\nYou will redirected to the Home Connect Develop website. Fill in your username and password. \nThan push on the button Accept. \n\nGo back to Node Red, Done, and Deploy the flow.\nWhen you push on the button Receive HAID, you can see in the in th Debug window the Message. Open it and you will see the HAID code off your Dishwasher. Fill in this HAID code without \"\" marks, ","x":150,"y":180,"wires":[]},{"id":"3c9eea6f.9c69fe","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Receive Haid","tag":"default","operationId":"get_home_appliances","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":530,"y":140,"wires":[["d522e6fb.18f1c8"]]},{"id":"6b6f45fd.70e6ac","type":"home-connect-event","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"","haid":"BOSCH-SMI88TS46E-68A40E409F63","x":140,"y":1082,"wires":[["5a622a5c.d84cd4"]]},{"id":"176b15e6.e891aa","type":"mqtt out","z":"ac0418fcd47e4708","name":"","topic":"domoticz/in","qos":"","retain":"","broker":"dfe8d232.cb0b58","x":950,"y":1082,"wires":[]},{"id":"ab9d33e7.78cc58","type":"comment","z":"ac0418fcd47e4708","name":"Dishwasher door open/close Text Device IDX 467","info":"","x":1050,"y":1140,"wires":[]},{"id":"863dc1a3.435108","type":"comment","z":"ac0418fcd47e4708","name":"Slector device Off, when programm finished  IDX 466","info":"At the end of the program, the selector switch for program selection is set to Off.","x":1060,"y":1220,"wires":[]},{"id":"d69d0290.ab2ae","type":"function","z":"ac0418fcd47e4708","name":"Dishwasher On","func":"if (msg.payload.value == \"BSH.Common.EnumType.PowerState.On\") {\n    msg.payload = true;\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":280,"y":1302,"wires":[["9ffa3703.8e68d8"]]},{"id":"3df91045.833c1","type":"comment","z":"ac0418fcd47e4708","name":"Trigger for dishwasher on","info":"","x":290,"y":1262,"wires":[]},{"id":"9ffa3703.8e68d8","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"","tag":"programs","operationId":"get_active_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":620,"y":1302,"wires":[["41af95f6.61b5dc","5309aa1.d87f754"]]},{"id":"7bc5d4c7.9de27c","type":"comment","z":"ac0418fcd47e4708","name":"Output programm choise forecast","info":"","x":600,"y":1262,"wires":[]},{"id":"5d297660.1b799","type":"home-connect-event","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"","haid":"BOSCH-SMI88TS46E-68A40E409F63","x":140,"y":1362,"wires":[["3ef794db.6527dc","d69d0290.ab2ae"]]},{"id":"3ef794db.6527dc","type":"join","z":"ac0418fcd47e4708","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"payload.key","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":370,"y":1362,"wires":[["41b4360d.df6b58"]]},{"id":"300715de.94335a","type":"mqtt out","z":"ac0418fcd47e4708","name":"","topic":"domoticz/in","qos":"","retain":"","broker":"c497df4d.5adaf","x":950,"y":1402,"wires":[]},{"id":"5ef7a67c.93e25","type":"comment","z":"ac0418fcd47e4708","name":"To Domoticz Text device IDX 481","info":"","x":1010,"y":1502,"wires":[]},{"id":"3e4e37b3.22b3e","type":"comment","z":"ac0418fcd47e4708","name":"Text Duration / Progress / Forecast","info":"","x":1020,"y":1462,"wires":[]},{"id":"234e063b.a69002","type":"comment","z":"ac0418fcd47e4708","name":"Output Duration and Progress, dishwasher on","info":"","x":210,"y":1422,"wires":[]},{"id":"bbd12fbd.9e30e","type":"comment","z":"ac0418fcd47e4708","name":"Programm choice Text Device IDX 467","info":"","x":1010,"y":1180,"wires":[]},{"id":"f75b77c1.e81978","type":"comment","z":"ac0418fcd47e4708","name":"Domoticz selector switch IDX 466","info":"","x":180,"y":480,"wires":[]},{"id":"5a622a5c.d84cd4","type":"function","z":"ac0418fcd47e4708","name":"Dishwasher Program","func":"var msg1 = {};\nvar msg2 = {};\n\nswitch (msg.payload.value) {\n        case \"Dishcare.Dishwasher.Program.Intensiv70\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Intensief 70 graden\" };\n        break;\n        \n        case \"Dishcare.Dishwasher.Program.Auto2\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Auto 45-65 graden\" };\n        break;\n                \n        case \"Dishcare.Dishwasher.Program.Eco50\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Eco 50 graden graden\" };\n        break;\n        \n        case \"Dishcare.Dishwasher.Program.NightWash\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Nachtprogramma\" };\n        break;\n        \n        case \"Dishcare.Dishwasher.Program.Kurz60\":\n            msg.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Kort 60 graden\" };\n        break;\n        \n        case \"Dishcare.Dishwasher.Program.Glas40\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Glas 40 graden\" };\n        break;\n        \n        case \"Dishcare.Dishwasher.Program.Quick45\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Snel progamma 45 graden\" };\n        break;\n        \n        case \"Dishcare.Dishwasher.Program.PreRinse\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Voor spoelen\" };\n        break;\n        \n        case \"Dishcare.Dishwasher.Program.MachineCare\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Machine verzorging\" };\n        break;\n        \n        case \"BSH.Common.EnumType.PowerState.Off\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Machine uit\" };\n            msg2.payload = {\"command\": \"switchlight\", \"idx\": 466, \"switchcmd\": \"Off\" };\n        break;\n        \n        case \"BSH.Common.EnumType.PowerState.On\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Machine Aan\" };\n        break;\n        \n        case \"BSH.Common.EnumType.DoorState.Open\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Deur open\" }\n        break;\n    \n        case \"BSH.Common.EnumType.DoorState.Closed\":\n            msg1.payload = {\"command\": \"udevice\", \"idx\": 467, \"svalue\": \"Deur dicht\" }\n        break;\n\n}\n\nreturn [[msg1,msg2]];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":1082,"wires":[["176b15e6.e891aa"]]},{"id":"41af95f6.61b5dc","type":"change","z":"ac0418fcd47e4708","name":"Move key","rules":[{"t":"move","p":"payload.data.key","pt":"msg","to":"payload.key","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"payload.key","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":1302,"wires":[["3ef794db.6527dc"]]},{"id":"41b4360d.df6b58","type":"function","z":"ac0418fcd47e4708","name":"Progress Program","func":"var duration = msg.payload[\"BSH.Common.Option.RemainingProgramTime\"].value;\nvar progress = msg.payload[\"BSH.Common.Option.ProgramProgress\"].value.toString();\nvar forecast = \"Energy  forecast: \" + msg.payload[msg.topic].data.options[7].value.toString() + \"%\" + \"; Water forecast: \" + msg.payload[msg.topic].data.options[8].value.toString() + \"%\";\n\n\nfunction sec2hhmmss(sec) {\n\nvar Hours = Math.floor(sec/3600).toString();\nvar Minutes = Math.floor((sec-(Hours*3600))/60).toString();\nvar Seconds = (sec-(Hours*3600)-(Minutes*60)).toString();\n\nreturn ('0' +Hours).slice(-2)+':'+('0' +Minutes).slice(-2)+':'+('0' +Seconds).slice(-2);\n}\n\nmsg.payload = {\"command\":\"udevice\",\"idx\":481,\"nvalue\":0,\"svalue\":\"Tijdsduur: \" + sec2hhmmss(duration) + \" u\" + \"\\n\" + \"Voortgang: \" + progress + \" %\" + \"\\n\" + forecast};\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":630,"y":1402,"wires":[["300715de.94335a"]]},{"id":"5309aa1.d87f754","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":710,"y":1180,"wires":[]},{"id":"d026efe2.93e528","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":200,"wires":[]},{"id":"1aa85f30.7e49d1","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":260,"wires":[]},{"id":"739e3b1a.b69ab4","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":320,"wires":[]},{"id":"f2ab6116.2c2a2","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":380,"wires":[]},{"id":"b741147.d9b2768","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":440,"wires":[]},{"id":"a2746922.cdccb","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":500,"wires":[]},{"id":"bb9cac1a.d2626","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":620,"wires":[]},{"id":"7474dbc.acbc1a4","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":560,"wires":[]},{"id":"2d87edd1.005a52","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":680,"wires":[]},{"id":"ed2831a8.7e1848","type":"mqtt in","z":"ac0418fcd47e4708","name":"Domoticz Out","topic":"domoticz/out","qos":"2","datatype":"json","broker":"1dcf01d5.02819e","x":110,"y":840,"wires":[["91b3c2b7.43eeb8"]]},{"id":"91b3c2b7.43eeb8","type":"switch","z":"ac0418fcd47e4708","name":"Filter Selector Switch","property":"payload.idx","propertyType":"msg","rules":[{"t":"eq","v":"466","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":320,"y":840,"wires":[["4e8aa08.f484a6"]]},{"id":"b88ecd06.340da8","type":"comment","z":"ac0418fcd47e4708","name":"Domoticz selector switch IDX 466","info":"","x":180,"y":900,"wires":[]},{"id":"43520e2c.eab8a","type":"function","z":"ac0418fcd47e4708","name":"","func":"if (msg.payload.nvalue === 0) {\n    msg.payload = true;\n    node.send([[msg],[null],[null]]);\n} else \n\nif (msg.payload.nvalue === 2) {\n    var svalue1 = msg.payload.svalue1;\n    msg.payload = true;\n    msg.body = {\n            \"data\": {\n            \"key\": \"BSH.Common.Setting.PowerState\",\n            \"value\": \"BSH.Common.EnumType.PowerState.On\",\n            \"type\": \"BSH.Common.EnumType.PowerState\",\n            \"constraints\": {\n            \"allowedvalues\": [\n            \"BSH.Common.EnumType.PowerState.On\",\n            \"BSH.Common.EnumType.PowerState.Standby\"\n             ],\n            \"access\": \"readWrite\"\n        }\n      }\n    }\n    node.send([[null],[null],[msg]]);\n    \n    switch (svalue1) {\n        case \"10\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Eco50\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n        \n        case \"20\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Auto2\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n        case \"30\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Intensiv70\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n        case \"40\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.NightWash\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n        case \"50\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Kurz60\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n        \n        case \"60\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Glas40\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n        case \"70\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.Quick45\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n        case \"80\":\n            msg.body = {\n                \"data\": {\n                \"key\": \"Dishcare.Dishwasher.Program.MachineCare\",\n                \"options\": []\n            }\n        }            \n    node.send([[null],[msg],[null]]);\n        break;\n\n    }\n}\n","outputs":3,"noerr":0,"initialize":"","finalize":"","x":100,"y":980,"wires":[[],[],[]]},{"id":"db0e481.7ae5638","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":820,"wires":[]},{"id":"eb6b4eda.661b4","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Start Program","tag":"programs","operationId":"start_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":900,"y":860,"wires":[["382cf0ae.fdee6"]]},{"id":"382cf0ae.fdee6","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":860,"wires":[]},{"id":"e1e71925.011718","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"58eba0bf.1dc1b8","name":"Powerstate on","tag":"settings","operationId":"set_setting","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"BSH.Common.Setting.PowerState","statuskey":"","imagekey":"","x":900,"y":960,"wires":[["5f0bc824.26fda"]]},{"id":"5649a224.6b8254","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":920,"wires":[]},{"id":"d5fdbb7c.53a968","type":"home-connect-request","z":"ac0418fcd47e4708","auth":"e5e1346e.c0c2e","name":"Stop Program","tag":"programs","operationId":"stop_program","haid":"BOSCH-SMI88TS46E-68A40E409F63","body":"","optionkey":"","programkey":"","settingkey":"","statuskey":"","imagekey":"","x":900,"y":760,"wires":[["7268130b.956074"]]},{"id":"7268130b.956074","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":760,"wires":[]},{"id":"79409640.316428","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":1020,"wires":[]},{"id":"5f0bc824.26fda","type":"debug","z":"ac0418fcd47e4708","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":960,"wires":[]},{"id":"4e8aa08.f484a6","type":"function","z":"ac0418fcd47e4708","name":"","func":"var key = {};\n\nif (msg.payload.nvalue === 0) {\n    msg.payload = true;\n    node.send([[msg],[null],[null]]);\n} else \n\nif (msg.payload.nvalue === 2) {\n    var svalue1 = msg.payload.svalue1;\n    msg.payload = true;\n    msg.body = {\n            \"data\": {\n            \"key\": \"BSH.Common.Setting.PowerState\",\n            \"value\": \"BSH.Common.EnumType.PowerState.On\",\n            \"type\": \"BSH.Common.EnumType.PowerState\",\n            \"constraints\": {\n            \"allowedvalues\": [\n            \"BSH.Common.EnumType.PowerState.On\",\n            \"BSH.Common.EnumType.PowerState.Standby\"\n             ],\n            \"access\": \"readWrite\"\n        }\n      }\n    }\n    node.send([[null],[null],[msg]]);\n    \n    switch (svalue1) {\n        case \"10\" : key = \"Dishcare.Dishwasher.Program.Eco50\";\n        break;\n    \n        case \"20\" : key = \"Dishcare.Dishwasher.Program.Auto2\";\n        break;  \n\n        case \"30\" : key = \"Dishcare.Dishwasher.Program.Intensiv70\";\n        break;\n\n        case \"40\" : key = \"Dishcare.Dishwasher.Program.NightWash\";\n        break;\n\n        case \"50\" : key = \"Dishcare.Dishwasher.Program.Kurz60\";\n        break;\n        \n        case \"60\" : key = \"Dishcare.Dishwasher.Program.Glas40\";\n        break;\n\n        case \"70\" : key = \"Dishcare.Dishwasher.Program.Quick45\";\n        break;\n\n        case \"80\" : key = \"Dishcare.Dishwasher.Program.MachineCare\";\n        break;\n\n    }\n\n        msg.body = {\n        \"data\": {\n        \"key\": key,\n        \"options\": []\n        }\n    }\n    \nreturn [null,msg,null];    \n}","outputs":3,"noerr":0,"initialize":"","finalize":"","x":540,"y":840,"wires":[["d5fdbb7c.53a968","db0e481.7ae5638"],["7134086c.50f468"],["e1e71925.011718","79409640.316428"]]},{"id":"7134086c.50f468","type":"delay","z":"ac0418fcd47e4708","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":720,"y":840,"wires":[["eb6b4eda.661b4","5649a224.6b8254"]]},{"id":"1dcf01d5.02819e","type":"mqtt-broker","name":"Domoticz","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"dfe8d232.cb0b58","type":"mqtt-broker","name":"Domoticz","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"c497df4d.5adaf","type":"mqtt-broker","name":"Domoticz","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
Regards
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest