windkh / node-red-contrib-shelly

Shelly control nodes for node red.
MIT License
34 stars 21 forks source link

"Shelly type mismatch: SNDM-0013US" #131

Closed kskenyon closed 12 months ago

kskenyon commented 1 year ago

Still getting this error when set for Shelly Wall Dimmer. I have a Shelly Wall Dimmer Plus. Can this be added to Type 2 devices and have it work?

windkh commented 1 year ago

@kskenyon was a type in last fix ... sorry

kskenyon commented 1 year ago

That error is gone now but I can’t get it to accept any commands. What is the proper syntax for the json packet for the Wall Dimmer Plus?

Kevin

On Oct 25, 2023, at 5:53 PM, Karl-Heinz Wind @.***> wrote:

Closed #131 https://github.com/windkh/node-red-contrib-shelly/issues/131 as completed via c0f47af https://github.com/windkh/node-red-contrib-shelly/commit/c0f47afa487ed0dd581b86d2af4b0a7859e9888b.

— Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#event-10772705937, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTALYJM2G4P6Y56ICULYBGC63AVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG43TENZQGU4TGNY. You are receiving this because you authored the thread.

kskenyon commented 1 year ago

Should it be light:0 and not light0?

Kevin

On Oct 25, 2023, at 8:33 PM, Kevin Kenyon @.***> wrote:

That error is gone now but I can’t get it to accept any commands. What is the proper syntax for the json packet for the Wall Dimmer Plus?

Kevin

On Oct 25, 2023, at 5:53 PM, Karl-Heinz Wind @.***> wrote:

Closed #131 https://github.com/windkh/node-red-contrib-shelly/issues/131 as completed via c0f47af https://github.com/windkh/node-red-contrib-shelly/commit/c0f47afa487ed0dd581b86d2af4b0a7859e9888b.

— Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#event-10772705937, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTALYJM2G4P6Y56ICULYBGC63AVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG43TENZQGU4TGNY. You are receiving this because you authored the thread.

windkh commented 1 year ago

@kskenyon I do not have such a dimmer here for testing, but I would read the documentation here https://shelly-api-docs.shelly.cloud/gen2/Devices/ShellyPlusWallDimmer

and then adapt the switchplus example and replace the relevant parts: Switch.Set --> Light.Set and then add brightness. According to the documentation on and brightness is required. If that works, then I would try to add the additional property transition_duration.

Here is the original function block from https://github.com/windkh/node-red-contrib-shelly/blob/master/examples/switchplus.json

msg.payload = { method: "Switch.Set", parameters : { id : 0, on : true, toggle_after : 2 // optional flip back time in seconds } }; return msg;

kskenyon commented 1 year ago

OK, I got this much working. Dim and toggle don’t seem to work with this setup. Might be related to the unique innards in the Wall Plus Dimmer.

Kevin

[ { "id": "fbb7147cdbe00d15", "type": "tab", "label": "Shelly", "disabled": false, "info": "", "env": [] }, { "id": "5389b09ce6d34f01", "type": "debug", "z": "fbb7147cdbe00d15", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "x": 850, "y": 80, "wires": [] }, { "id": "aeb4c2cae80da838", "type": "function", "z": "fbb7147cdbe00d15", "name": "on", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: true,\n timer: 0\n // toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 290, "y": 100, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "cb63debaf7f8cc7a", "type": "function", "z": "fbb7147cdbe00d15", "name": "off", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: false,\n timer: 0\n // toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 290, "y": 140, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "a2c586bfef493ba4", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Turn On", "props": [ { "p": "payload", "v": "", "vt": "date" }, { "p": "topic", "v": "", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 130, "y": 100, "wires": [ [ "aeb4c2cae80da838" ] ] }, { "id": "aa0ecc89becb52b6", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Turn Off", "props": [ { "p": "payload", "v": "", "vt": "date" }, { "p": "topic", "v": "", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 130, "y": 140, "wires": [ [ "cb63debaf7f8cc7a" ] ] }, { "id": "2cf86b714691d6aa", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Poll Status", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "str", "x": 140, "y": 60, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "3340ffcb8fc86c54", "type": "function", "z": "fbb7147cdbe00d15", "name": "toggle", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n brightness: 100,\n toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 290, "y": 180, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "0ea0fceb5bc1b8f8", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Toggle", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 130, "y": 180, "wires": [ [ "3340ffcb8fc86c54" ] ] }, { "id": "e2e90ad3b39f30fb", "type": "function", "z": "fbb7147cdbe00d15", "name": "brightness 100%", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n brightness: 100\n // toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 330, "y": 220, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "5cd3246ee54df257", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Brightness", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 220, "wires": [ [ "e2e90ad3b39f30fb" ] ] }, { "id": "bbfe7de807db8d9d", "type": "function", "z": "fbb7147cdbe00d15", "name": "brightness 25%", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n brightness: 25\n // toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 320, "y": 260, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "c3dabccd82633861", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Brightness", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 260, "wires": [ [ "bbfe7de807db8d9d" ] ] }, { "id": "784a23f5f04fe49d", "type": "function", "z": "fbb7147cdbe00d15", "name": "turn on & set brightness 60%", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: true,\n brightness: 60\n // toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 360, "y": 300, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "84b0058013cd5e99", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Combined", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 300, "wires": [ [ "784a23f5f04fe49d" ] ] }, { "id": "cde543a45872eba4", "type": "function", "z": "fbb7147cdbe00d15", "name": "on 2s", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: true,\n brightness: 100,\n toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 290, "y": 340, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "f23c3049caf67f07", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Turn On", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 130, "y": 340, "wires": [ [ "cde543a45872eba4" ] ] }, { "id": "7fabbd56f1f22d2d", "type": "shelly-gen2", "z": "fbb7147cdbe00d15", "hostname": "192.168.2.124", "description": "", "mode": "polling", "server": "", "outputmode": "event", "uploadretryinterval": 5000, "pollinginterval": 5000, "pollstatus": false, "getstatusoncommand": true, "devicetype": "Dimmer", "outputs": 1, "x": 640, "y": 80, "wires": [ [ "5389b09ce6d34f01" ] ] } ]

On Oct 26, 2023, at 1:41 AM, Karl-Heinz Wind @.***> wrote:

@kskenyon https://github.com/kskenyon I do not have such a dimmer here for testing, but I would read the documentation here https://shelly-api-docs.shelly.cloud/gen2/Devices/ShellyPlusWallDimmer

and then adapt the switchplus example and replace the relevant parts: Switch.Set --> Light.Set and then add brightness. According to the documentation on and brightness is required. If that works, then I would try to add the additional property transition_duration.

Here is the original function block from https://github.com/windkh/node-red-contrib-shelly/blob/master/examples/switchplus.json

msg.payload = { method: "Switch.Set", parameters : { id : 0, on : true, toggle_after : 2 // optional flip back time in seconds } }; return msg;

— Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#issuecomment-1780449196, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTEEDNYI23SJTP7W4PTYBHZYZAVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBQGQ2DSMJZGY. You are receiving this because you were mentioned.

kskenyon commented 1 year ago

Light.Toggle does work without any parameters other than “id"

On Oct 26, 2023, at 1:35 PM, Kevin Kenyon @.***> wrote:

OK, I got this much working. Dim and toggle don’t seem to work with this setup. Might be related to the unique innards in the Wall Plus Dimmer.

Kevin

[ { "id": "fbb7147cdbe00d15", "type": "tab", "label": "Shelly", "disabled": false, "info": "", "env": [] }, { "id": "5389b09ce6d34f01", "type": "debug", "z": "fbb7147cdbe00d15", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "x": 850, "y": 80, "wires": [] }, { "id": "aeb4c2cae80da838", "type": "function", "z": "fbb7147cdbe00d15", "name": "on", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: true,\n timer: 0\n // toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 290, "y": 100, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "cb63debaf7f8cc7a", "type": "function", "z": "fbb7147cdbe00d15", "name": "off", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: false,\n timer: 0\n // toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 290, "y": 140, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "a2c586bfef493ba4", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Turn On", "props": [ { "p": "payload", "v": "", "vt": "date" }, { "p": "topic", "v": "", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 130, "y": 100, "wires": [ [ "aeb4c2cae80da838" ] ] }, { "id": "aa0ecc89becb52b6", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Turn Off", "props": [ { "p": "payload", "v": "", "vt": "date" }, { "p": "topic", "v": "", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 130, "y": 140, "wires": [ [ "cb63debaf7f8cc7a" ] ] }, { "id": "2cf86b714691d6aa", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Poll Status", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "str", "x": 140, "y": 60, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "3340ffcb8fc86c54", "type": "function", "z": "fbb7147cdbe00d15", "name": "toggle", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n brightness: 100,\n toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 290, "y": 180, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "0ea0fceb5bc1b8f8", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Toggle", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 130, "y": 180, "wires": [ [ "3340ffcb8fc86c54" ] ] }, { "id": "e2e90ad3b39f30fb", "type": "function", "z": "fbb7147cdbe00d15", "name": "brightness 100%", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n brightness: 100\n // toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 330, "y": 220, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "5cd3246ee54df257", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Brightness", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 220, "wires": [ [ "e2e90ad3b39f30fb" ] ] }, { "id": "bbfe7de807db8d9d", "type": "function", "z": "fbb7147cdbe00d15", "name": "brightness 25%", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n brightness: 25\n // toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 320, "y": 260, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "c3dabccd82633861", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Brightness", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 260, "wires": [ [ "bbfe7de807db8d9d" ] ] }, { "id": "784a23f5f04fe49d", "type": "function", "z": "fbb7147cdbe00d15", "name": "turn on & set brightness 60%", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: true,\n brightness: 60\n // toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 360, "y": 300, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "84b0058013cd5e99", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Combined", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 300, "wires": [ [ "784a23f5f04fe49d" ] ] }, { "id": "cde543a45872eba4", "type": "function", "z": "fbb7147cdbe00d15", "name": "on 2s", "func": "msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: true,\n brightness: 100,\n toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 290, "y": 340, "wires": [ [ "7fabbd56f1f22d2d" ] ] }, { "id": "f23c3049caf67f07", "type": "inject", "z": "fbb7147cdbe00d15", "name": "Turn On", "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 130, "y": 340, "wires": [ [ "cde543a45872eba4" ] ] }, { "id": "7fabbd56f1f22d2d", "type": "shelly-gen2", "z": "fbb7147cdbe00d15", "hostname": "192.168.2.124", "description": "", "mode": "polling", "server": "", "outputmode": "event", "uploadretryinterval": 5000, "pollinginterval": 5000, "pollstatus": false, "getstatusoncommand": true, "devicetype": "Dimmer", "outputs": 1, "x": 640, "y": 80, "wires": [ [ "5389b09ce6d34f01" ] ] } ]

On Oct 26, 2023, at 1:41 AM, Karl-Heinz Wind @.***> wrote:

@kskenyon https://github.com/kskenyon I do not have such a dimmer here for testing, but I would read the documentation here https://shelly-api-docs.shelly.cloud/gen2/Devices/ShellyPlusWallDimmer

and then adapt the switchplus example and replace the relevant parts: Switch.Set --> Light.Set and then add brightness. According to the documentation on and brightness is required. If that works, then I would try to add the additional property transition_duration.

Here is the original function block from https://github.com/windkh/node-red-contrib-shelly/blob/master/examples/switchplus.json

msg.payload = { method: "Switch.Set", parameters : { id : 0, on : true, toggle_after : 2 // optional flip back time in seconds } }; return msg;

— Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#issuecomment-1780449196, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTEEDNYI23SJTP7W4PTYBHZYZAVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBQGQ2DSMJZGY. You are receiving this because you were mentioned.

windkh commented 1 year ago

What is the response if it does not work?

kskenyon commented 1 year ago

No response. It doesn’t recognize dim commands. Just brightness setting. I guess it could be done in a function with some code.

On Oct 26, 2023, at 2:35 PM, Karl-Heinz Wind @.***> wrote:

What is the response if it does not work?

— Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#issuecomment-1781655645, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTGLJMEQC36D25QSZ4DYBKUOTAVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGY2TKNRUGU. You are receiving this because you were mentioned.

kskenyon commented 1 year ago

I think the dimmer control has it’s own chip and it can’t be accessed directly for some reason. Out of my pay grade.

On Oct 26, 2023, at 2:36 PM, Kevin Kenyon @.***> wrote:

No response. It doesn’t recognize dim commands. Just brightness setting. I guess it could be done in a function with some code.

On Oct 26, 2023, at 2:35 PM, Karl-Heinz Wind @.***> wrote:

What is the response if it does not work?

— Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#issuecomment-1781655645, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTGLJMEQC36D25QSZ4DYBKUOTAVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGY2TKNRUGU. You are receiving this because you were mentioned.

windkh commented 1 year ago

Hm I think that should not be a problem... give me a few minutes

windkh commented 1 year ago

Please try that and let me know: what is a dim command? According to the api documentation you have Light.Toggle Light.SetConfig Light.GetConfig Light.Set Light.GetStatus The only thing you can do is setting the transition_duration to have a "dim" effect

[{"id":"5389b09ce6d34f01","type":"debug","z":"fbb7147cdbe00d15","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":850,"y":80,"wires":[]},{"id":"aeb4c2cae80da838","type":"function","z":"fbb7147cdbe00d15","name":"on","func":"msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: true,\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":100,"wires":[["7fabbd56f1f22d2d"]]},{"id":"cb63debaf7f8cc7a","type":"function","z":"fbb7147cdbe00d15","name":"off","func":"msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: false,\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":140,"wires":[["7fabbd56f1f22d2d"]]},{"id":"a2c586bfef493ba4","type":"inject","z":"fbb7147cdbe00d15","name":"Turn On","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":100,"wires":[["aeb4c2cae80da838"]]},{"id":"aa0ecc89becb52b6","type":"inject","z":"fbb7147cdbe00d15","name":"Turn Off","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":140,"wires":[["cb63debaf7f8cc7a"]]},{"id":"2cf86b714691d6aa","type":"inject","z":"fbb7147cdbe00d15","name":"Poll Status","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":140,"y":60,"wires":[["7fabbd56f1f22d2d"]]},{"id":"3340ffcb8fc86c54","type":"function","z":"fbb7147cdbe00d15","name":"toggle","func":"msg.payload = {\n method: \"Light.Toggle\",\n parameters: {\n id: 0,\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":180,"wires":[["7fabbd56f1f22d2d"]]},{"id":"0ea0fceb5bc1b8f8","type":"inject","z":"fbb7147cdbe00d15","name":"Toggle","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":180,"wires":[["3340ffcb8fc86c54"]]},{"id":"e2e90ad3b39f30fb","type":"function","z":"fbb7147cdbe00d15","name":"brightness 100%","func":"msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n brightness: 100,\n transition_duration : 1, // 1 second\n // toggle_after : 1 <-- do not flip back\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":220,"wires":[["7fabbd56f1f22d2d"]]},{"id":"5cd3246ee54df257","type":"inject","z":"fbb7147cdbe00d15","name":"Brightness","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":220,"wires":[["e2e90ad3b39f30fb"]]},{"id":"bbfe7de807db8d9d","type":"function","z":"fbb7147cdbe00d15","name":"brightness 25%","func":"msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n brightness: 25,\n transition_duration: 1, // 1 second\n // toggle_after : 1 <-- do not flip back \n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":260,"wires":[["7fabbd56f1f22d2d"]]},{"id":"c3dabccd82633861","type":"inject","z":"fbb7147cdbe00d15","name":"Brightness","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":260,"wires":[["bbfe7de807db8d9d"]]},{"id":"784a23f5f04fe49d","type":"function","z":"fbb7147cdbe00d15","name":"turn on & set brightness 60%","func":"msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: true,\n brightness: 60,\n // toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":360,"y":300,"wires":[["7fabbd56f1f22d2d"]]},{"id":"84b0058013cd5e99","type":"inject","z":"fbb7147cdbe00d15","name":"Combined","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":300,"wires":[["784a23f5f04fe49d"]]},{"id":"cde543a45872eba4","type":"function","z":"fbb7147cdbe00d15","name":"on 2s","func":"msg.payload = {\n method: \"Light.Set\",\n parameters: {\n id: 0,\n on: true,\n brightness: 100,\n toggle_after: 2 // optional flip back time in seconds\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":340,"wires":[["7fabbd56f1f22d2d"]]},{"id":"f23c3049caf67f07","type":"inject","z":"fbb7147cdbe00d15","name":"Turn On","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":340,"wires":[["cde543a45872eba4"]]},{"id":"7fabbd56f1f22d2d","type":"shelly-gen2","z":"fbb7147cdbe00d15","hostname":"192.168.2.124","description":"","mode":"polling","server":"","outputmode":"event","uploadretryinterval":5000,"pollinginterval":5000,"pollstatus":false,"getstatusoncommand":true,"devicetype":"Dimmer","outputs":1,"x":640,"y":80,"wires":[["5389b09ce6d34f01"]]}]

windkh commented 1 year ago

ah one thing. The doc says "At least one of the on and brightness parameters is required."

You can try to remove the on : true and only set brightness to your desired level

windkh commented 1 year ago

@kskenyon can i close this issue or is there still something to solve/discuss/...?

kskenyon commented 1 year ago

Working OK now. Any limitations are with the device itself.  Thanks. KevinFatfingered from my iPhoneOn Nov 14, 2023, at 4:09 PM, Karl-Heinz Wind @.***> wrote: @kskenyon can i close this issue or is there still something to solve/discuss/...?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

windkh commented 12 months ago

ok perfect