STARKVIND Domoticz to Zigbee2MQTT

Moderator: leecollings

Post Reply
BazemanKM
Posts: 35
Joined: Wednesday 22 July 2015 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

STARKVIND Domoticz to Zigbee2MQTT

Post by BazemanKM »

STARKVIND air purifier works with Zigbee2MQTT. https://www.zigbee2mqtt.io/devices/E200 ... ikea-e2007

To change the mode publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"fan_mode": VALUE} where VALUE can be: off, auto, 1, 2, 3, 4, 5, 6, 7, 8, 9.

Autodiscovery MQTT doesn't make a selector switch for the fan mode, so i made a dummy (idx 541). 0 = off, 10 = auto, 20 =1 till 9 = 100

From Domoticz in MQTT:

Code: Select all

{
    "Battery" : 255,
    "LastUpdate" : "2022-10-24 10:39:30",
    "LevelActions" : "||||||||||",
    "LevelNames" : "Uit|Auto|1|2|3|4|5|6|7|8|9",
    "LevelOffHidden" : "false",
    "RSSI" : 12,
    "SelectorStyle" : "1",
    "description" : "",
    "dtype" : "Light/Switch",
    "hwid" : "16",
    "id" : "0001426D",
    "idx" : 541,
    "name" : "Luchtververser",
    "nvalue" : 2,
    "stype" : "Switch",
    "svalue1" : "100",
    "switchType" : "Selector",
    "unit" : 1
}
We have to work with svalue1, that's the fanmode.

I made a flow in Node-RED to translate Domoticz to MQTT

Code: Select all

[{"id":"1bec2846.4029b8","type":"tab","label":"Luchtververser","disabled":false,"info":""},{"id":"92af5d9e.d6b11","type":"mqtt in","z":"1bec2846.4029b8","name":"Domoticz Luchtververser","topic":"domoticz/out/541/","qos":"2","datatype":"auto","broker":"4d2ff189.666908","nl":false,"rap":false,"x":150,"y":200,"wires":[["a6e7acbe.f6401"]]},{"id":"a6e7acbe.f6401","type":"json","z":"1bec2846.4029b8","name":"","property":"payload","action":"","pretty":false,"x":370,"y":200,"wires":[["b6d70fc0.f6db5"]]},{"id":"cb50b45d.9a4e28","type":"mqtt out","z":"1bec2846.4029b8","name":"MQTT Lucht ververser","topic":"zigbee2mqtt/Luchtververser/set/","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"4d2ff189.666908","x":1060,"y":220,"wires":[]},{"id":"b6d70fc0.f6db5","type":"switch","z":"1bec2846.4029b8","name":"","property":"payload.svalue1","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"10","vt":"str"},{"t":"eq","v":"20","vt":"str"},{"t":"eq","v":"30","vt":"str"},{"t":"eq","v":"40","vt":"str"},{"t":"eq","v":"50","vt":"str"},{"t":"eq","v":"60","vt":"str"},{"t":"eq","v":"70","vt":"str"},{"t":"eq","v":"80","vt":"str"},{"t":"eq","v":"90","vt":"str"},{"t":"eq","v":"100","vt":"str"}],"checkall":"true","repair":false,"outputs":11,"x":530,"y":200,"wires":[["84ae7545.8ffa28"],["881d8691.c06168"],["19ce1141.d3d9ef"],["62faf9e6.ef52b8"],["5ff40353.feecbc"],["27c0f93.50b5306"],["76c5ca57.250ad4"],["dbddd75e.ec73d8"],["15badd72.2f72a3"],["b3344efa.f3137"],["a0d9040d.0eb0c8"]]},{"id":"881d8691.c06168","type":"function","z":"1bec2846.4029b8","name":"auto","func":"msg.payload = {\"fan_mode\": auto}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":60,"wires":[["cb50b45d.9a4e28"]]},{"id":"19ce1141.d3d9ef","type":"function","z":"1bec2846.4029b8","name":"1","func":"msg.payload = {\"fan_mode\": 1}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":100,"wires":[["cb50b45d.9a4e28"]]},{"id":"62faf9e6.ef52b8","type":"function","z":"1bec2846.4029b8","name":"2","func":"msg.payload = {\"fan_mode\": 2}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":140,"wires":[["cb50b45d.9a4e28"]]},{"id":"5ff40353.feecbc","type":"function","z":"1bec2846.4029b8","name":"3","func":"msg.payload = {\"fan_mode\": 3}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":180,"wires":[["cb50b45d.9a4e28"]]},{"id":"27c0f93.50b5306","type":"function","z":"1bec2846.4029b8","name":"4","func":"msg.payload = {\"fan_mode\": 4}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":220,"wires":[["cb50b45d.9a4e28"]]},{"id":"76c5ca57.250ad4","type":"function","z":"1bec2846.4029b8","name":"5","func":"msg.payload = {\"fan_mode\": 5}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":260,"wires":[["cb50b45d.9a4e28"]]},{"id":"dbddd75e.ec73d8","type":"function","z":"1bec2846.4029b8","name":"6","func":"msg.payload = {\"fan_mode\": 6}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":300,"wires":[["cb50b45d.9a4e28"]]},{"id":"15badd72.2f72a3","type":"function","z":"1bec2846.4029b8","name":"7","func":"msg.payload = {\"fan_mode\": 7}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":340,"wires":[["cb50b45d.9a4e28"]]},{"id":"b3344efa.f3137","type":"function","z":"1bec2846.4029b8","name":"8","func":"msg.payload = {\"fan_mode\": 8}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":380,"wires":[["cb50b45d.9a4e28"]]},{"id":"a0d9040d.0eb0c8","type":"function","z":"1bec2846.4029b8","name":"9","func":"msg.payload = {\"fan_mode\": 9}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":420,"wires":[["cb50b45d.9a4e28"]]},{"id":"8381b23d.4aaae","type":"comment","z":"1bec2846.4029b8","name":"","info":"","x":150,"y":60,"wires":[]},{"id":"84ae7545.8ffa28","type":"function","z":"1bec2846.4029b8","name":"off","func":"msg.payload = {\"fan_mode\": off}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":20,"wires":[[]]},{"id":"4d2ff189.666908","type":"mqtt-broker","name":"192.168.2.4","broker":"192.168.2.4","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"protocolVersion":"4","keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]
The flow doesn't work, what is wrong?

Or is there a way to send a command from de Domoticz selector switch?
User avatar
FireWizard
Posts: 1770
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by FireWizard »

Hello @BazemanKM

I loaded your flow in my test system and indeed it gives directly 2 errors.

You wrote:
To change the mode publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"fan_mode": VALUE} where VALUE can be: off, auto, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Remember, unlike 1, 2, 3, etc. off and auto are not numbers. It are strings! Does your fan accept this "value" as a string.
We have to work with svalue1, that's the fanmode.
It is at least the value, we have to use, coming from the selector switch.
The flow doesn't work, what is wrong?
That is very simple, but you do not tell what works and what doesn't work.
It is always better to tell that, as the one, who might be able to help you, can focus on the things that do not work.

1. I see that you use as incoming topic in the MQTT node domoticz/out/$IDX. Did you configure Domoticz as such?

2. You can remove the JSON node, as you can set in the MQTT Input node the "Output" to "a parsed JSON object".

3. In the upper 2 "Function" nodes, marked "off" and "auto" the first line is not correct.

Code: Select all

msg.payload = {"fan_mode": off}
return msg;
and

Code: Select all

msg.payload = {"fan_mode": auto}
return msg;
Node Red (Javascript) interpreters this auto and off as a variable and so complains about:
"ReferenceError: off is not defined (line 1, col 28)"

or auto is not defined.

And that is correct. you did not define these two variables.
But probably, it are no variables but strings. So change the lines to:

Code: Select all

msg.payload = {"fan_mode": "off"}
return msg;
and

Code: Select all

msg.payload = {"fan_mode": "auto"}
return msg;
4. Assuming the your fan accepts strings, like "off" and "auto", does it also accept numbers? Or should the numbers be strings as well.

So not

Code: Select all

msg.payload = {"fan_mode": 1}
return msg;
but

Code: Select all

msg.payload = {"fan_mode": "1"}
return msg;
Test it and let us know.

Regards
BazemanKM
Posts: 35
Joined: Wednesday 22 July 2015 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by BazemanKM »

SOLVED: Had to use "string" thanks FireWizard

Code: Select all

[{"id":"1bec2846.4029b8","type":"tab","label":"Luchtververser","disabled":false,"info":""},{"id":"92af5d9e.d6b11","type":"mqtt in","z":"1bec2846.4029b8","name":"Domoticz Luchtververser","topic":"domoticz/out/541","qos":"2","datatype":"auto","broker":"4d2ff189.666908","nl":false,"rap":false,"x":150,"y":200,"wires":[["a6e7acbe.f6401"]]},{"id":"a6e7acbe.f6401","type":"json","z":"1bec2846.4029b8","name":"","property":"payload","action":"","pretty":false,"x":370,"y":200,"wires":[["b6d70fc0.f6db5"]]},{"id":"cb50b45d.9a4e28","type":"mqtt out","z":"1bec2846.4029b8","name":"MQTT Lucht ververser","topic":"zigbee2mqtt/Luchtververser/set","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"4d2ff189.666908","x":1060,"y":220,"wires":[]},{"id":"b6d70fc0.f6db5","type":"switch","z":"1bec2846.4029b8","name":"","property":"payload.svalue1","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"10","vt":"str"},{"t":"eq","v":"20","vt":"str"},{"t":"eq","v":"30","vt":"str"},{"t":"eq","v":"40","vt":"str"},{"t":"eq","v":"50","vt":"str"},{"t":"eq","v":"60","vt":"str"},{"t":"eq","v":"70","vt":"str"},{"t":"eq","v":"80","vt":"str"},{"t":"eq","v":"90","vt":"str"},{"t":"eq","v":"100","vt":"str"}],"checkall":"true","repair":false,"outputs":11,"x":530,"y":200,"wires":[["84ae7545.8ffa28"],["881d8691.c06168"],["19ce1141.d3d9ef"],["62faf9e6.ef52b8"],["5ff40353.feecbc"],["27c0f93.50b5306"],["76c5ca57.250ad4"],["dbddd75e.ec73d8"],["15badd72.2f72a3"],["b3344efa.f3137"],["a0d9040d.0eb0c8"]]},{"id":"881d8691.c06168","type":"function","z":"1bec2846.4029b8","name":"auto","func":"msg.payload = {\"fan_mode\": \"auto\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":60,"wires":[["cb50b45d.9a4e28"]]},{"id":"19ce1141.d3d9ef","type":"function","z":"1bec2846.4029b8","name":"1","func":"msg.payload = {\"fan_mode\": \"1\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":100,"wires":[["cb50b45d.9a4e28"]]},{"id":"62faf9e6.ef52b8","type":"function","z":"1bec2846.4029b8","name":"2","func":"msg.payload = {\"fan_mode\": \"2\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":140,"wires":[["cb50b45d.9a4e28"]]},{"id":"5ff40353.feecbc","type":"function","z":"1bec2846.4029b8","name":"3","func":"msg.payload = {\"fan_mode\": \"3\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":180,"wires":[["cb50b45d.9a4e28"]]},{"id":"27c0f93.50b5306","type":"function","z":"1bec2846.4029b8","name":"4","func":"msg.payload = {\"fan_mode\": \"4\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":220,"wires":[["cb50b45d.9a4e28"]]},{"id":"76c5ca57.250ad4","type":"function","z":"1bec2846.4029b8","name":"5","func":"msg.payload = {\"fan_mode\": \"5\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":260,"wires":[["cb50b45d.9a4e28"]]},{"id":"dbddd75e.ec73d8","type":"function","z":"1bec2846.4029b8","name":"6","func":"msg.payload = {\"fan_mode\": \"6\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":300,"wires":[["cb50b45d.9a4e28"]]},{"id":"15badd72.2f72a3","type":"function","z":"1bec2846.4029b8","name":"7","func":"msg.payload = {\"fan_mode\": \"7\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":340,"wires":[["cb50b45d.9a4e28"]]},{"id":"b3344efa.f3137","type":"function","z":"1bec2846.4029b8","name":"8","func":"msg.payload = {\"fan_mode\": \"8\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":380,"wires":[["cb50b45d.9a4e28"]]},{"id":"a0d9040d.0eb0c8","type":"function","z":"1bec2846.4029b8","name":"9","func":"msg.payload = {\"fan_mode\": \"9\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":420,"wires":[["cb50b45d.9a4e28"]]},{"id":"8381b23d.4aaae","type":"comment","z":"1bec2846.4029b8","name":"https://www.zigbee2mqtt.io/devices/E2007.html#ikea-e2007","info":"https://www.zigbee2mqtt.io/devices/E2007.html#ikea-e2007","x":250,"y":60,"wires":[]},{"id":"84ae7545.8ffa28","type":"function","z":"1bec2846.4029b8","name":"off","func":"msg.payload = {\"fan_mode\": \"off\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":20,"wires":[["cb50b45d.9a4e28"]]},{"id":"4d2ff189.666908","type":"mqtt-broker","name":"192.168.2.4","broker":"192.168.2.4","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"protocolVersion":"4","keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]
BazemanKM
Posts: 35
Joined: Wednesday 22 July 2015 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by BazemanKM »

FireWizard wrote: Monday 24 October 2022 15:07 Hello @BazemanKM

Test it and let us know.

Regards
The fan accepts strings, also for the numbers
Incoming topic in the MQTT node domoticz/out/$IDX i configured that in Domoticz.

Image
Image
BazemanKM
Posts: 35
Joined: Wednesday 22 July 2015 21:39
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by BazemanKM »

New Node-RED flow that also communicates the setting on STARKVIND to Domoticz.

Code: Select all

[{"id":"1bec2846.4029b8","type":"tab","label":"Luchtververser","disabled":false,"info":""},{"id":"92af5d9e.d6b11","type":"mqtt in","z":"1bec2846.4029b8","name":"Domoticz Luchtververser","topic":"domoticz/out/541","qos":"2","datatype":"auto","broker":"4d2ff189.666908","nl":false,"rap":false,"x":150,"y":200,"wires":[["a6e7acbe.f6401"]]},{"id":"a6e7acbe.f6401","type":"json","z":"1bec2846.4029b8","name":"","property":"payload","action":"","pretty":false,"x":370,"y":200,"wires":[["b6d70fc0.f6db5"]]},{"id":"cb50b45d.9a4e28","type":"mqtt out","z":"1bec2846.4029b8","name":"MQTT Lucht ververser","topic":"zigbee2mqtt/Luchtververser/set","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"4d2ff189.666908","x":1060,"y":220,"wires":[]},{"id":"b6d70fc0.f6db5","type":"switch","z":"1bec2846.4029b8","name":"","property":"payload.svalue1","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"10","vt":"str"},{"t":"eq","v":"20","vt":"str"},{"t":"eq","v":"30","vt":"str"},{"t":"eq","v":"40","vt":"str"},{"t":"eq","v":"50","vt":"str"},{"t":"eq","v":"60","vt":"str"},{"t":"eq","v":"70","vt":"str"},{"t":"eq","v":"80","vt":"str"},{"t":"eq","v":"90","vt":"str"},{"t":"eq","v":"100","vt":"str"}],"checkall":"true","repair":false,"outputs":11,"x":530,"y":200,"wires":[["84ae7545.8ffa28"],["881d8691.c06168"],["19ce1141.d3d9ef"],["62faf9e6.ef52b8"],["5ff40353.feecbc"],["27c0f93.50b5306"],["76c5ca57.250ad4"],["dbddd75e.ec73d8"],["15badd72.2f72a3"],["b3344efa.f3137"],["a0d9040d.0eb0c8"]]},{"id":"881d8691.c06168","type":"function","z":"1bec2846.4029b8","name":"auto","func":"msg.payload = {\"fan_mode\": \"auto\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":60,"wires":[["cb50b45d.9a4e28"]]},{"id":"19ce1141.d3d9ef","type":"function","z":"1bec2846.4029b8","name":"1","func":"msg.payload = {\"fan_mode\": \"1\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":100,"wires":[["cb50b45d.9a4e28"]]},{"id":"62faf9e6.ef52b8","type":"function","z":"1bec2846.4029b8","name":"2","func":"msg.payload = {\"fan_mode\": \"2\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":140,"wires":[["cb50b45d.9a4e28"]]},{"id":"5ff40353.feecbc","type":"function","z":"1bec2846.4029b8","name":"3","func":"msg.payload = {\"fan_mode\": \"3\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":180,"wires":[["cb50b45d.9a4e28"]]},{"id":"27c0f93.50b5306","type":"function","z":"1bec2846.4029b8","name":"4","func":"msg.payload = {\"fan_mode\": \"4\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":220,"wires":[["cb50b45d.9a4e28"]]},{"id":"76c5ca57.250ad4","type":"function","z":"1bec2846.4029b8","name":"5","func":"msg.payload = {\"fan_mode\": \"5\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":260,"wires":[["cb50b45d.9a4e28"]]},{"id":"dbddd75e.ec73d8","type":"function","z":"1bec2846.4029b8","name":"6","func":"msg.payload = {\"fan_mode\": \"6\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":300,"wires":[["cb50b45d.9a4e28"]]},{"id":"15badd72.2f72a3","type":"function","z":"1bec2846.4029b8","name":"7","func":"msg.payload = {\"fan_mode\": \"7\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":340,"wires":[["cb50b45d.9a4e28"]]},{"id":"b3344efa.f3137","type":"function","z":"1bec2846.4029b8","name":"8","func":"msg.payload = {\"fan_mode\": \"8\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":380,"wires":[["cb50b45d.9a4e28"]]},{"id":"a0d9040d.0eb0c8","type":"function","z":"1bec2846.4029b8","name":"9","func":"msg.payload = {\"fan_mode\": \"9\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":420,"wires":[["cb50b45d.9a4e28"]]},{"id":"8381b23d.4aaae","type":"comment","z":"1bec2846.4029b8","name":"https://www.zigbee2mqtt.io/devices/E2007.html#ikea-e2007","info":"https://www.zigbee2mqtt.io/devices/E2007.html#ikea-e2007","x":250,"y":60,"wires":[]},{"id":"84ae7545.8ffa28","type":"function","z":"1bec2846.4029b8","name":"off","func":"msg.payload = {\"fan_mode\": \"off\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":750,"y":20,"wires":[["cb50b45d.9a4e28"]]},{"id":"60b97aff.bb1c44","type":"function","z":"1bec2846.4029b8","name":"","func":"var fan = msg.payload;\nmsg.payload = {};\nmsg.payload.svalue = fan;\nmsg.payload.idx = 541;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":660,"wires":[["fce3f2d2.8a2a3","dd302328.678d5"]]},{"id":"fce3f2d2.8a2a3","type":"mqtt out","z":"1bec2846.4029b8","name":"","topic":"domoticz/in","qos":"","retain":"","broker":"4d2ff189.666908","x":1130,"y":660,"wires":[]},{"id":"88e4601.78b52a","type":"switch","z":"1bec2846.4029b8","name":"","property":"payload.fan_mode","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"auto","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"7","vt":"str"},{"t":"eq","v":"8","vt":"str"},{"t":"eq","v":"9","vt":"str"}],"checkall":"true","repair":false,"outputs":11,"x":450,"y":660,"wires":[["93ce04c9.c2eed8"],["74f79a22.81c194"],["4b517e1b.c2018"],["c6291ff3.599ef"],["b7b01075.d8be1"],["b6157f8f.627c5"],["30b07e62.f97242"],["891ef81f.ee5658"],["973b8c5d.93721"],["f87a7bcc.c586f8"],["f1f5ac1.ae1635"]]},{"id":"74f79a22.81c194","type":"function","z":"1bec2846.4029b8","name":"auto","func":"msg.payload = \"10\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":540,"wires":[["60b97aff.bb1c44"]]},{"id":"4b517e1b.c2018","type":"function","z":"1bec2846.4029b8","name":"1","func":"msg.payload = \"20\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":580,"wires":[["60b97aff.bb1c44"]]},{"id":"c6291ff3.599ef","type":"function","z":"1bec2846.4029b8","name":"2","func":"msg.payload = \"30\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":620,"wires":[["60b97aff.bb1c44"]]},{"id":"b7b01075.d8be1","type":"function","z":"1bec2846.4029b8","name":"3","func":"msg.payload = \"40\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":660,"wires":[["60b97aff.bb1c44"]]},{"id":"b6157f8f.627c5","type":"function","z":"1bec2846.4029b8","name":"4","func":"msg.payload = \"50\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":700,"wires":[["60b97aff.bb1c44"]]},{"id":"30b07e62.f97242","type":"function","z":"1bec2846.4029b8","name":"5","func":"msg.payload = \"60\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":740,"wires":[["60b97aff.bb1c44"]]},{"id":"891ef81f.ee5658","type":"function","z":"1bec2846.4029b8","name":"6","func":"msg.payload = \"70\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":780,"wires":[["60b97aff.bb1c44"]]},{"id":"973b8c5d.93721","type":"function","z":"1bec2846.4029b8","name":"7","func":"msg.payload = \"80\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":820,"wires":[["60b97aff.bb1c44"]]},{"id":"f87a7bcc.c586f8","type":"function","z":"1bec2846.4029b8","name":"8","func":"msg.payload = \"90\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":860,"wires":[["60b97aff.bb1c44"]]},{"id":"f1f5ac1.ae1635","type":"function","z":"1bec2846.4029b8","name":"9","func":"msg.payload = \"100\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":900,"wires":[["60b97aff.bb1c44"]]},{"id":"93ce04c9.c2eed8","type":"function","z":"1bec2846.4029b8","name":"off","func":"msg.payload = \"0\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":500,"wires":[["60b97aff.bb1c44"]]},{"id":"1314a3fb.3b437c","type":"mqtt in","z":"1bec2846.4029b8","name":"MQTT Luchtververser","topic":"zigbee2mqtt/Luchtververser","qos":"2","datatype":"auto","broker":"4d2ff189.666908","nl":false,"rap":false,"x":140,"y":660,"wires":[["61b53324.261dac"]]},{"id":"dd302328.678d5","type":"debug","z":"1bec2846.4029b8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1080,"y":780,"wires":[]},{"id":"61b53324.261dac","type":"json","z":"1bec2846.4029b8","name":"","property":"payload","action":"","pretty":false,"x":330,"y":660,"wires":[["88e4601.78b52a"]]},{"id":"4d2ff189.666908","type":"mqtt-broker","name":"192.168.2.4","broker":"192.168.2.4","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"protocolVersion":"4","keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by solarboy »

I've just bought this fan and although zigbee2mqtt works the fan selector and on/off switch are not discovered correctly. The sensors are however discovered correctly. I do have nodered installed but I have never used it. Could you provide an "idiots guide" to how I can import your flow into my system?

I am able to create the selector switch with the correct values but the rest is a bit of a mystery to me.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
FireWizard
Posts: 1770
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by FireWizard »

Hello @solarboy,

You wrote:
I do have nodered installed but I have never used it.
I recommend watching this playlist: https://www.youtube.com/playlist?list=P ... qFcXBkHy-6.
The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Regards
User avatar
waltervl
Posts: 5396
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by waltervl »

A better solution if you know how MQTT works is to create a Domoticz GitHub issue withe the Zigbee2MQTT config and state topics and get these fan devices supported with MQTT Auto discover gateway.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by gizmocuz »

I do own one myself and already created an issue on the zigbee2mqtt repository

https://github.com/Koenkk/zigbee-herdsm ... ssues/6312

As you can see with MQTT explorer, the modes field only contains one option
Quality outlives Quantity!
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by solarboy »

FireWizard wrote: Tuesday 31 October 2023 16:29 Hello @solarboy,

You wrote:
I do have nodered installed but I have never used it.
I recommend watching this playlist: https://www.youtube.com/playlist?list=P ... qFcXBkHy-6.
The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Regards
Brilliant, thank you will do. Would be nice to save energy by turning if off when nobody is at home. It's a nice device at a good price.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by gizmocuz »

Please try the latest beta version
After the update, you might have to disable the MQTT-AD hardware, delete the selector switch with the single 'Auto' mode, then enable the MQTT-AD hardware again so you get the new switch with all the modes
Quality outlives Quantity!
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by gizmocuz »

@solarboy, the 'idea' of this device is to make sure that your room is having good quality air.
If you 'disable' this device and the quality is bad, and you come home, it is still bad.
If it fixes the quality, it will turn itself off (auto mode)
Quality outlives Quantity!
solarboy
Posts: 320
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: STARKVIND Domoticz to Zigbee2MQTT

Post by solarboy »

gizmocuz wrote: Saturday 25 November 2023 9:03 @solarboy, the 'idea' of this device is to make sure that your room is having good quality air.
If you 'disable' this device and the quality is bad, and you come home, it is still bad.
If it fixes the quality, it will turn itself off (auto mode)
Yes, this is how I run it now , but often I simply open a window and I would like it to turn off when I do that, no point it cleaning at that point, and turn back on when the window is closed again. I do the same with AC and dehumidifiers.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests