Hi,
don't know about the shelly contrib node and would chime in with the others to use MQTT.
However, if I remember correctly you can use http directly to trigger actions, but you have to enable it in the settings of the shelly. Details are on this page:
EDIT: If I remember correectly the 2PM uses the gen2 API, hence you want to check this page:
An easy example for a flow using MQTT is below; it switches the shelly on and off periodically and I use it when putting citric acid in my kettle to remove calcium buildup
Sends on
or off
to shellies/<name of shelly>/relay/0/command
.
[{"id":"d5c5ba8d63bb2186","type":"trigger","z":"75ebbb57ee628544","name":"","op1":"on","op2":"off","op1type":"str","op2type":"str","duration":"10","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":830,"y":920,"wires":[["e369faaf92911375","58f20da1d9f9170b"]]},{"id":"58f20da1d9f9170b","type":"mqtt out","z":"75ebbb57ee628544","name":"","topic":"shellies/shellyplug-s-tee/relay/0/command","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"7eafd8c136b65839","x":1170,"y":920,"wires":[]},{"id":"ed5241a08ed97470","type":"inject","z":"75ebbb57ee628544","name":"Entkalker Cycle","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":920,"wires":[["98e23282de5934b0"]]},{"id":"e369faaf92911375","type":"debug","z":"75ebbb57ee628544","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1070,"y":880,"wires":[]},{"id":"98e23282de5934b0","type":"function","z":"75ebbb57ee628544","name":"create 15 msg","func":"const cycles = 15;\n\nfor (let i = 1; i < cycles; i++) {\n node.send(msg);\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":920,"wires":[["68e6d6c44a467569"]]},{"id":"68e6d6c44a467569","type":"rate-limiter","z":"75ebbb57ee628544","delay_action":"ratelimit","rate":"1","nbRateUnits":"1","rateUnits":"minute","drop_select":"queue","addcurrentcount":false,"name":"","outputs":"1","buffer_size":"30","buffer_drop":"buffer_drop_new","emit_msg_2nd":false,"control_topic":"control","version":0.0018,"x":590,"y":920,"wires":[["d5c5ba8d63bb2186"]]},{"id":"73032ea55d916e29","type":"inject","z":"75ebbb57ee628544","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"reset","payloadType":"str","x":350,"y":960,"wires":[["68e6d6c44a467569"]]},{"id":"7eafd8c136b65839","type":"mqtt-broker","name":"docker_mosquitto","broker":"mosquitto","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]