Beiträge von Ryantje
-
-
Yes i understand.
Only do you have perhaps have some mqtt commands?
Or better a node red flow?
-
Hi to all.
A WiFi button, very nice thing.
But I am looking for the mqqt commands.
Or a way to put it to good use.
Is there anyone who can read the button with mqtt?
Even better is a nodered flow with Domoticz, does anyone have one?
-
Do not understand what u mean?
Ip:port?
And there is no Pass or login for the mqqt server
-
Hi...
Use Shelly for a few years with a flow that make it possible to switch in Domoticz a dummy switch
With all older version of the firmware i get this working, only with the latest firmware and the shellyplus1 pm, i get not the flow with domoticz working.
The flow:
Code
Alles anzeigenvar idx_shelly_table = [ //[ domoticz idx, shelly name topic, relay ],// syntax //192.168.5.131 [15670, "shelly-plug-Dressoir-R-6EC6C7", 0], // Plug Kamer dressior rechts // 192.168.5.132 Jongens [12860, "Shelly-Jongens-25-C4D304", 0], // Dylan [12861, "Shelly-Jongens-25-C4D304", 1], // Ryan // 192.168.5.133 Garage [12706, "Shelly-Garage-25-C49121", 0], // Werkbank [12707, "Shelly-Garage-25-C49121", 1], // Garage // 192.168.5.134 Keuken [12635, "Shelly-Keuken-25-10521C0730A0", 0], // Nis [12636, "Shelly-Keuken-25-10521C0730A0", 1], // Aanrecht // 192.168.5.135 Slaapkamer [12863, "Shelly-Slaapkamer-25-C47EAA", 0], // Kaptafel [12862, "Shelly-Slaapkamer-25-C47EAA", 1], // Slaapkamer // 192.168.5.136 Terras [13217, "Shelly-Terras-25-84CCA89F6640", 0], // Terras keukenraam [13218, "Shelly-Terras-25-84CCA89F6640", 1], // Terras Bamboe // 192.168.5.137 [13219, "Shelly-Warmtepomp-25-C48DB3", 0], // Warmtepomp [13220, "Shelly-Warmtepomp-25-C48DB3", 1], // Over // 192.168.5.138 [16301, "Shelly-Over-98F4ABD0B793", 0], // Over //192.168.5.139 Poortlampje tuinkast [14363, "Shelly1pm-84CCA8A7FB2F", 0], // Sh Poort Lampje T [ tuinkast ] //192.168.5.140 [14199, "Shelly-Badkamer-25-84CCA8B1760E", 0], // over [14200, "Shelly-Badkamer-25-84CCA8B1760E", 1], // Spiegel //192.168.5.141 [15665, "shelly-1pm-gar-sol-E09806A9FCF6", 0], // Garage solar //192.168.5.142 [16307, "shelly-plus1-DakrandSolar-80646fe4555c", 0],// Dakrandsolar // Geen IP [13221, "1-1D929B", 0], // ], 98F4ABD0B793 Over shelly 1 ]; if ( msg.src == 'shelly' ) { //todo: support second relays var matches = msg.topic.match( /shellies\/(.*)\/relay\/(\d)/ ); if ( matches.length == 3 ) { var shelly_id = matches[1]; var shelly_relay = parseInt( matches[2] ); for ( var i = 0; i < idx_shelly_table.length; i++ ) { if ( idx_shelly_table[i][1] == shelly_id && idx_shelly_table[i][2] == shelly_relay ) { // convert to domoticz stuff var val = msg.payload == "on" ? 1 : 0; msg = { payload: { nvalue: val, command: "udevice", idx: idx_shelly_table[i][0], } } return [msg, null, null]; } } // shelly not found in table msg.shelly_id = shelly_id; msg.relay = shelly_relay; return [null, null, msg]; } } if ( msg.src == 'domoticz' ) { for ( var i = 0; i < idx_shelly_table.length; i++ ) { if ( idx_shelly_table[i][0] == parseInt(msg.payload.idx) ) { if ( msg.payload.nvalue == 1) msg.payload = "on"; else msg.payload = "off"; msg.topic = "shellies/" + idx_shelly_table[i][1] + "/relay/" + idx_shelly_table[i][2] + "/command"; return [null, msg, null ]; } } } // dismiss return [null, null, null];
Where the problem is in:
[16307, "shelly-plus1-DakrandSolar-80646fe4555c", 0],// Dakrandsolar
Mqtt explorer:
Settings:
Did try some tls other options, cloud on and off.
I think there is someting in the mqtt settings
Only i am a windows noob..
So hope there is some help.
Thanks
-
-
Dear all,
Is there perhaps some that have a good working flow or something to read the power and the usage from a shelly.
I see some plugins, they say no accurate readings.
I use two flows and very very strange value..
Node red:
Code[{"id":"be902481.2a6448","type":"tab","label":"WP Shelly Power","disabled":false,"info":""},{"id":"9d9cc95f.8db9e8","type":"mqtt in","z":"be902481.2a6448","name":"","topic":"shellies/Shelly-Warmtepomp-25-C48DB3/relay/0/power","qos":"2","datatype":"json","broker":"431d199a.2afdf8","x":200,"y":160,"wires":[["b955eed5.75194"]]},{"id":"96e4cdc0.eec47","type":"debug","z":"be902481.2a6448","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1130,"y":160,"wires":[]},{"id":"6bfda6c1.9f51d8","type":"mqtt out","z":"be902481.2a6448","name":"","topic":"domoticz/in","qos":"","retain":"","broker":"f6628dbd.b9935","x":1150,"y":100,"wires":[]},{"id":"204e7cbb.33d7b4","type":"mqtt in","z":"be902481.2a6448","name":"","topic":"shellies/Shelly-Warmtepomp-25-C48DB3/relay/0/energy","qos":"2","datatype":"json","broker":"f6628dbd.b9935","x":200,"y":100,"wires":[["c8cf6abf.2bf2b8"]]},{"id":"8cb89a55.a0f8d8","type":"function","z":"be902481.2a6448","name":"Filter","func":"var watt = parseInt(msg.payload.power)\n\nvar kw = msg.payload.energy \nvar sval = watt.toString() + \";\" + kw.toString()\n\nmsg.payload = { \n \"idx\" :13501,\n \"nvalue\" :0,\n \"svalue\" :sval\n \n}\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":100,"wires":[["6bfda6c1.9f51d8","96e4cdc0.eec47"]]},{"id":"1b0dda24.8f42d6","type":"join","z":"be902481.2a6448","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":670,"y":100,"wires":[["26b387be.7e0378"]]},{"id":"c8cf6abf.2bf2b8","type":"function","z":"be902481.2a6448","name":"","func":"msg.topic = \"energy\"\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":100,"wires":[["1b0dda24.8f42d6"]]},{"id":"b955eed5.75194","type":"function","z":"be902481.2a6448","name":"","func":"msg.topic = \"power\"\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":160,"wires":[["1b0dda24.8f42d6"]]},{"id":"8fa38b68.437928","type":"comment","z":"be902481.2a6448","d":true,"name":"Warmtepomp Shelly 2.5 in de bijkeuken","info":"","x":590,"y":60,"wires":[]},{"id":"26b387be.7e0378","type":"delay","z":"be902481.2a6448","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":800,"y":160,"wires":[["8cb89a55.a0f8d8"]]},{"id":"366dc1a6.0169de","type":"mqtt in","z":"be902481.2a6448","name":"","topic":"shellies/Shelly-Keuken-25-C4FB16/relay/1/power","qos":"2","datatype":"json","broker":"431d199a.2afdf8","x":180,"y":340,"wires":[["e9755c4a.0024f"]]},{"id":"151caaea.742415","type":"debug","z":"be902481.2a6448","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1150,"y":340,"wires":[]},{"id":"529184d.ab9c57c","type":"mqtt out","z":"be902481.2a6448","name":"","topic":"domoticz/in","qos":"","retain":"","broker":"f6628dbd.b9935","x":1150,"y":280,"wires":[]},{"id":"733674c6.94667c","type":"mqtt in","z":"be902481.2a6448","name":"","topic":"shellies/Shelly-Keuken-25-C4FB16/relay/1/energy","qos":"2","datatype":"json","broker":"f6628dbd.b9935","x":180,"y":280,"wires":[["b72f04c7.7bede8"]]},{"id":"ae1813b0.60704","type":"function","z":"be902481.2a6448","name":"Filter","func":"var watt = parseInt(msg.payload.power)\n\nvar kw = msg.payload.energy \nvar sval = watt.toString() + \";\" + kw.toString()\n\nmsg.payload = { \n \"idx\" :13500,\n \"nvalue\" :0,\n \"svalue\" :sval\n \n}\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":280,"wires":[["529184d.ab9c57c","151caaea.742415"]]},{"id":"7aaef34f.87460c","type":"join","z":"be902481.2a6448","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":670,"y":280,"wires":[["8cb99172.897c7"]]},{"id":"b72f04c7.7bede8","type":"function","z":"be902481.2a6448","name":"","func":"msg.topic = \"energy\"\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":280,"wires":[["7aaef34f.87460c"]]},{"id":"e9755c4a.0024f","type":"function","z":"be902481.2a6448","name":"","func":"msg.topic = \"power\"\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":340,"wires":[["7aaef34f.87460c"]]},{"id":"fcaea9b9.930b08","type":"comment","z":"be902481.2a6448","d":true,"name":"Keuken: Aanrecht Shelly 2.5 ","info":"","x":560,"y":240,"wires":[]},{"id":"8cb99172.897c7","type":"delay","z":"be902481.2a6448","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":800,"y":340,"wires":[["ae1813b0.60704"]]},{"id":"431d199a.2afdf8","type":"mqtt-broker","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":15,"cleansession":true,"birthQos":"0","willQos":"0"},{"id":"f6628dbd.b9935","type":"mqtt-broker","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":15,"cleansession":true,"birthQos":"0","willQos":"0"}]
And a other flow:
Code[{"id":"3a35ccf9.639e84","type":"tab","label":"TEst Flow 1","disabled":true,"info":""},{"id":"9ddcc33d.7eea6","type":"mqtt in","z":"3a35ccf9.639e84","name":"Energy","topic":"shellies/Shelly-Warmtepomp-25-C48DB3/relay/0/energy","qos":"2","datatype":"json","broker":"16f4f882.1d4c57","x":150,"y":120,"wires":[["983ae345.00171","3079426e.95358e"]]},{"id":"6646efdd.121c","type":"mqtt in","z":"3a35ccf9.639e84","name":"Power","topic":"shellies/Shelly-Warmtepomp-25-C48DB3/relay/0/power","qos":"2","datatype":"json","broker":"15a65981.63a046","x":150,"y":180,"wires":[["983ae345.00171","9ea1752b.49a3a8"]]},{"id":"52b55353.0b4f6c","type":"inject","z":"3a35ccf9.639e84","name":"Inject Energy","topic":"shellies/Shelly-Warmtepomp-25-C48DB3/relay/0/energy","payload":"336743","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":60,"wires":[["983ae345.00171"]]},{"id":"af02f1f6.73e2a","type":"inject","z":"3a35ccf9.639e84","name":"Inject Power","topic":"shellies/Shelly-Warmtepomp-25-C48DB3/relay/0/power","payload":"20.07","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":240,"wires":[["983ae345.00171"]]},{"id":"a4d7a389.483f5","type":"function","z":"3a35ccf9.639e84","name":"","func":"var power = {};\nvar energy = {};\nif (msg.topic == \"shellies/Shelly-Warmtepomp-25-C48DB3/relay/0/power\") {\n power = msg.payload[1].toString();\n energy = msg.payload[0].toString();\n}\nif (msg.topic == \"shellies/Shelly-Warmtepomp-25-C48DB3/relay/0/energy\") {\n power = msg.payload[0].toString(); \n energy = msg.payload[1].toString();\n}\nmsg.payload = {\"command\":\"udevice\",\"idx\":13511,\"nvalue\":0,\"svalue\":power + \";\" + energy};\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":160,"wires":[["efa41c13.56722","8c1110cf.4ba3d"]]},{"id":"9ea1752b.49a3a8","type":"debug","z":"3a35ccf9.639e84","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":410,"y":240,"wires":[]},{"id":"983ae345.00171","type":"join","z":"3a35ccf9.639e84","name":"Merge Power and Energy","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":370,"y":146,"wires":[["30945ea3.6fcce2"]]},{"id":"3079426e.95358e","type":"debug","z":"3a35ccf9.639e84","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":610,"y":100,"wires":[]},{"id":"efa41c13.56722","type":"mqtt out","z":"3a35ccf9.639e84","name":"","topic":"domoticz/in","qos":"1","retain":"","broker":"f6628dbd.b9935","x":910,"y":160,"wires":[]},{"id":"8c1110cf.4ba3d","type":"debug","z":"3a35ccf9.639e84","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":910,"y":220,"wires":[]},{"id":"30945ea3.6fcce2","type":"delay","z":"3a35ccf9.639e84","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":560,"y":200,"wires":[["a4d7a389.483f5"]]},{"id":"16f4f882.1d4c57","type":"mqtt-broker","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":15,"cleansession":true,"birthQos":"0","willQos":"0"},{"id":"15a65981.63a046","type":"mqtt-broker","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":15,"cleansession":true,"birthQos":"0","willQos":"0"},{"id":"f6628dbd.b9935","type":"mqtt-broker","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":15,"cleansession":true,"birthQos":"0","willQos":"0"}]
And a plugin that says no good reading:
So i hope some can help me to make the good power reading working..
-
Dear all.
perhaps someone has a working node-red flowWith some home automation.
Perhaps inlc all options like in the api.
power use and all the use etc etc
-
Dear...
I see into to the webui and then in the switch setting also options voor http
Do i need to set here the http with login and pas you give me?
Of what kan i do with this option?
-
Dear 66er
I do have a login on my shelly server.
login
pass
http://192.168.5.231/relay/0?turn=on [ or off ]
Is not working..
Is there a other option for a http login