Resultados 76 al 100 de 194
- 27/09/2021, 07:46 #76Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Lo de los enchufes Tuya en Nodered lo conocía, pero pensé que estos enchufes no trabajaban con Tuya, aun así si tienen un esp82xx seguramente sería posible ponerles tasmota.
Por cierto si queréis cortar realmente la telemetría del "amigo oriental" , tenéis que cortar el tráfico de estos dispositivos hacia internet, esto no impedirá que los puedas usar desde internet usando Nodered, si queréis un día tocamos el tema de las conexiones seguras y las VPMs , de otra forma como continúan teniendo el mismo firmware, continúan pudiendo salir a internet. Que ya no estén en la nube no quiere decir que no se puedan monitorizar, son cosas distintas. Mi experiencia con dispositivos de este tipo y de muchos otros, es que en la mayoría de los casos, generar tráfico no solicitado con destino Asia, o la nube de Amazon, para mí esto es inaceptable, es como dejar que los fabricantes de la cerradura de tu casa, entren en casa periódicamente para ver que hay ... : Nos falta aún mucha cultura digital, y lo malo es que las nuevas generaciones están siendo "entrenadas" en que todo es fácil y seguro si está en la nube ... Error tremendo.
-
- 27/09/2021, 09:32 #77Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Me alegra que aprecies positivamente mi forma de explicar, creo que es mucho más útil y satisfactorio aprender un poco, de otra forma, solo copiar y pegar, terminas con algo que no entiendes y que te limita muchísimo si no hace exacto lo que quieres (cosa casi imposible) o si se estropea .. etc, si aprendes los rudimentos, ya te puedes mover y cosa muy importante ya puedes pedir ayuda sobre un problema y orientar al ayudante, parece una tontería, pero no lo es.
Te refieres al reinicio de la Raspberry , no te arranca sin monitor? o no inicia el VNC si no es de forma manual, que es distinto, yo instale el servicio vnc (y digo servicio) y todas mis rasp están sin monitor.... no se muy bien que es lo que te pasa, dame más detalles
Bueno, para entender bien este tema, sería interesante que tuvieseis claros algunos conceptos generales de NodeRed, pero asumo que ya los tenéis o que de no tenerlos , mirando la documentación que adjunto, lo entenderéis.
El tema no es difícil, pero necesita de un tiempo y algunas pruebas para controlarlo.
Básicamente se puede almacenar información en forma de "variable" con un determinado alcance, y de manera volátil o permanente, el alcance hace referencia a las partes de nodered donde se tendrá acceso a las variables.
Contexto – solo para el nodo .
Flujo – solo el flujo.
Globales – para todo nodered.
Para que lo almacenado permanezca después de un reinicio de nodered, es necesario hacer una modificación del fichero de configuración de nodered.
Lecturas muy recomendables
https://aprendiendoarduino.wordpress...o-en-node-red/
https://nodered.org/docs/user-guide/context
un ejemplo sencillo
Código:[ { "id": "c09a8892703b373a", "type": "inject", "z": "f6f2187d.f17ca8", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payloadType": "date", "x": 120, "y": 260, "wires": [ [ "bf04e1c7564a9c09" ] ] }, { "id": "bf04e1c7564a9c09", "type": "change", "z": "f6f2187d.f17ca8", "name": "flow", "rules": [ { "t": "set", "p": "dato010", "pt": "flow", "to": "10000", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 310, "y": 260, "wires": [ [ "f781a094da0cd046", "e3dbdfb2014db1fa", "0e656a2953d6bea9" ] ] }, { "id": "0e656a2953d6bea9", "type": "function", "z": "f6f2187d.f17ca8", "name": "", "func": "//var primerdato = flow.get(\"dato010\");\n//var segundodato = flow.get(\"dato02\");\n msg.payload = flow.get(\"dato010\") + 50;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 540, "y": 420, "wires": [ [ "6edacba6faa8d03c" ] ] }, { "id": "f781a094da0cd046", "type": "debug", "z": "f6f2187d.f17ca8", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 790, "y": 260, "wires": [] }, { "id": "e3dbdfb2014db1fa", "type": "change", "z": "f6f2187d.f17ca8", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "dato010", "tot": "flow" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 560, "y": 320, "wires": [ [ "5f223e920ea81dc0" ] ] }, { "id": "5f223e920ea81dc0", "type": "debug", "z": "f6f2187d.f17ca8", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 790, "y": 320, "wires": [] }, { "id": "6edacba6faa8d03c", "type": "debug", "z": "f6f2187d.f17ca8", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 790, "y": 420, "wires": [] }, { "id": "77a388bd8c76e078", "type": "inject", "z": "f6f2187d.f17ca8", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payloadType": "date", "x": 120, "y": 560, "wires": [ [ "c9df07fe37caaf81" ] ] }, { "id": "c9df07fe37caaf81", "type": "change", "z": "f6f2187d.f17ca8", "name": "flow , flow", "rules": [ { "t": "set", "p": "dato010", "pt": "flow", "to": "10", "tot": "num" }, { "t": "set", "p": "dato0100", "pt": "flow", "to": "100", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 320, "y": 560, "wires": [ [ "50b40e5e09bcbfbf", "d6097fbf23f0ba10", "b4a379144d90a42b" ] ] }, { "id": "b4a379144d90a42b", "type": "function", "z": "f6f2187d.f17ca8", "name": "", "func": "\n msg.payload = flow.get(\"dato010\") + flow.get(\"dato0100\");\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 540, "y": 720, "wires": [ [ "11b9bc9475aebe0f" ] ] }, { "id": "50b40e5e09bcbfbf", "type": "debug", "z": "f6f2187d.f17ca8", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 790, "y": 560, "wires": [] }, { "id": "d6097fbf23f0ba10", "type": "change", "z": "f6f2187d.f17ca8", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "dato010", "tot": "flow" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 560, "y": 620, "wires": [ [ "afd1e853cdbe0e60" ] ] }, { "id": "afd1e853cdbe0e60", "type": "debug", "z": "f6f2187d.f17ca8", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 790, "y": 620, "wires": [] }, { "id": "11b9bc9475aebe0f", "type": "debug", "z": "f6f2187d.f17ca8", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 790, "y": 720, "wires": [] } ]
Bueno .. Esto es harina de otro costal... sería interesante cerrar un tema antes de meternos en otro... (digo yo) pero resumidamente , se necesita instalar influxdb y grafana para poder tener graficas, y mosquito, para disponer de mqtt en tu red, inicialmente nada de esto tiene que suponer un problema , pero ... y esto es solo una recomendación, si ya tienes la máquina con ssd y es la que tendrás en producción , yo realizaría pruebas en otra máquina antes, por aquello de no "enguarrar" la de producción con intentos y fallos o líos... ya sabes
Sobre tutoriales... tienen que existir muchos,, si me das algún tiempo buscaré alguno que tenga buena pinta, aunque antes es mejor dirigirse a las webs respectivas de cada proyecto, donde se suele encontrar la información "oficial" y después con la idea general, ya te puedes pasear por videos tutoriales etc, conociendo al menos que estás buscando, piensa que no es raro al caso de estar 3 días rompiéndote el coco con alguna instalación siguiendo un tutorial, cuando te das cuenta de que está desactualizado y por eso no funciona, por eso es fundamental adquirir un poco de info de la fuente antes de nada.
PD
Gracias el señor administrador por solucionar el tema de la edición de código, no crea que cae en saco roto ¡¡ ;-)
- 27/09/2021, 14:57 #78Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Por cierto... según como lo estés haciendo, puede que te resulte mas fácil unir los flujos en uno, mírate esto.
https://cookbook.nodered.org/basic/join-streams
- 27/09/2021, 16:05 #79Forero
- Fecha de ingreso
- mar 2021
- Ubicación
- Navarra
- Mensajes
- 238
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Gracias a ambos!
Fue muy buena noticia la de ayer de ElFrisky, ayer hice todos los pasos y tengo ya un enchufe conectado a la app, pero la key no hay forma de saberla... la id es ok, la ip también pero la clave que me da el sistema parece que no es, a pesar de que en la web sale como vinculada...
Si compro funciona, compraré los que me recomendaste AU y haré lo de Tasmota, es que los que tengo no se pueden desmontar si no es con un martillo...
- - - - - - - - - - - - - - - - - - -
Totalmente de acuerdo con el método AU!
Hoy sin más he detectado un pequeño fallo, como el Float de uno de los inversores estaba a 54.4, no respondía a la bajada de tensión de carga de 54v... pero al ver el nodo y entender los debug, pues lo he encontrado...
Lo que si que no puedo es con el tema de las dichosas sumas! mira que he hecho pruebas pero para sumar la producción de los tres strings no hago carrera!
A ver si pego bien la exportación de la chapuza de suma que he hecho...
[{"id":"77a388bd8c76e078","type":"inject","z":"c642 76cc.982158","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay" :0.1,"topic":"","payloadType":"date","x":180,"y":3 00,"wires":[["c9df07fe37caaf81"]]},{"id":"c9df07fe37caaf81","type":"change","z":"c6 4276cc.982158","name":"flow , flow","rules":[{"t":"set","p":"dato010","pt":"flow","to":"10","to t":"num"},{"t":"set","p":"dato0100","pt":"flow","t o":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg" :false,"x":380,"y":300,"wires":[["50b40e5e09bcbfbf","d6097fbf23f0ba10","b4a379144d9 0a42b"]]},{"id":"b4a379144d90a42b","type":"function","z":" c64276cc.982158","name":"","func":"\n msg.payload = flow.get("dato010") + flow.get("dato0100");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","final ize":"","libs":[],"x":600,"y":460,"wires":[["11b9bc9475aebe0f"]]},{"id":"50b40e5e09bcbfbf","type":"debug","z":"c64 276cc.982158","name":"","active":true,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":300,"wires":[]},{"id":"d6097fbf23f0ba10","type":"change","z":"c6 4276cc.982158","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"dato010" ,"tot":"flow"}],"action":"","property":"","from":"","to":"","reg" :false,"x":620,"y":360,"wires":[["afd1e853cdbe0e60"]]},{"id":"afd1e853cdbe0e60","type":"debug","z":"c64 276cc.982158","name":"","active":true,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":360,"wires":[]},{"id":"11b9bc9475aebe0f","type":"debug","z":"c64 276cc.982158","name":"","active":true,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":460,"wires":[]},{"id":"55f8fa37.0b1e54","type":"link in","z":"c64276cc.982158","name":"Graficos consolidados","links":["7045423e.190d0c","cc917e2c.d56b2","1c8e78b7.680ba 7"],"x":195,"y":520,"wires":[["410133ba.1896cc","c8445488.afc358"]]},{"id":"410133ba.1896cc","type":"change","z":"c64 276cc.982158","name":"flow , flow","rules":[{"t":"set","p":"StringSSO1","pt":"flow","to":"payl oad.potenciaenplaca","tot":"msg"},{"t":"set","p":" StringSSO2","pt":"flow","to":"potenciaenplaca2","t ot":"msg"}],"action":"","property":"","from":"","to":"","reg" :false,"x":380,"y":520,"wires":[["5b04adb5.a444c4","c74a06b8.a1ef28","c07a7a3a.27ce e8","5c7dacd1.02c614"]]},{"id":"c07a7a3a.27cee8","type":"function","z":"c 64276cc.982158","name":"","func":"\n msg.payload = flow.get("StringSSO1") + flow.get("StringSSO2");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","final ize":"","libs":[],"x":600,"y":680,"wires":[["920d7fc2.ffd9d"]]},{"id":"5b04adb5.a444c4","type":"debug","z":"c642 76cc.982158","name":"","active":false,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":520,"wires":[]},{"id":"c74a06b8.a1ef28","type":"change","z":"c64 276cc.982158","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"stringSS O1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg" :false,"x":620,"y":580,"wires":[["12251862.33af68"]]},{"id":"12251862.33af68","type":"debug","z":"c642 76cc.982158","name":"","active":true,"tosidebar":t rue,"console":false,"tostatus":false,"complete":"f alse","statusVal":"","statusType":"auto","x":850," y":580,"wires":[]},{"id":"920d7fc2.ffd9d","type":"debug","z":"c6427 6cc.982158","name":"","active":true,"tosidebar":tr ue,"console":false,"tostatus":false,"complete":"fa lse","statusVal":"","statusType":"auto","x":850,"y ":680,"wires":[]},{"id":"c8445488.afc358","type":"debug","z":"c642 76cc.982158","name":"","active":true,"tosidebar":t rue,"console":false,"tostatus":false,"complete":"f alse","statusVal":"","statusType":"auto","x":330," y":620,"wires":[]},{"id":"5c7dacd1.02c614","type":"function","z":"c 64276cc.982158","name":"","func":"\n msg.payload = flow.get("StringSSO1");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","final ize":"","libs":[],"x":600,"y":640,"wires":[["e41e81c6.c999f"]]},{"id":"e41e81c6.c999f","type":"debug","z":"c6427 6cc.982158","name":"","active":true,"tosidebar":tr ue,"console":false,"tostatus":false,"complete":"fa lse","statusVal":"","statusType":"auto","x":850,"y ":640,"wires":[]}]
Totalmente de acuerdo con el método AU!
Hoy sin más he detectado un pequeño fallo, como el Float de uno de los inversores estaba a 54.4, no respondía a la bajada de tensión de carga de 54v... pero al ver el nodo y entender los debug, pues lo he encontrado...
Lo que si que no puedo es con el tema de las dichosas sumas! mira que he hecho pruebas pero para sumar la producción de los tres strings no hago carrera!
A ver si pego bien la exportación de la chapuza de suma que he hecho...
[{"id":"77a388bd8c76e078","type":"inject","z":"c642 76cc.982158","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay" :0.1,"topic":"","payloadType":"date","x":180,"y":3 00,"wires":[["c9df07fe37caaf81"]]},{"id":"c9df07fe37caaf81","type":"change","z":"c6 4276cc.982158","name":"flow , flow","rules":[{"t":"set","p":"dato010","pt":"flow","to":"10","to t":"num"},{"t":"set","p":"dato0100","pt":"flow","t o":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg" :false,"x":380,"y":300,"wires":[["50b40e5e09bcbfbf","d6097fbf23f0ba10","b4a379144d9 0a42b"]]},{"id":"b4a379144d90a42b","type":"function","z":" c64276cc.982158","name":"","func":"\n msg.payload = flow.get("dato010") + flow.get("dato0100");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","final ize":"","libs":[],"x":600,"y":460,"wires":[["11b9bc9475aebe0f"]]},{"id":"50b40e5e09bcbfbf","type":"debug","z":"c64 276cc.982158","name":"","active":true,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":300,"wires":[]},{"id":"d6097fbf23f0ba10","type":"change","z":"c6 4276cc.982158","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"dato010" ,"tot":"flow"}],"action":"","property":"","from":"","to":"","reg" :false,"x":620,"y":360,"wires":[["afd1e853cdbe0e60"]]},{"id":"afd1e853cdbe0e60","type":"debug","z":"c64 276cc.982158","name":"","active":true,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":360,"wires":[]},{"id":"11b9bc9475aebe0f","type":"debug","z":"c64 276cc.982158","name":"","active":true,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":460,"wires":[]},{"id":"55f8fa37.0b1e54","type":"link in","z":"c64276cc.982158","name":"Graficos consolidados","links":["7045423e.190d0c","cc917e2c.d56b2","1c8e78b7.680ba 7"],"x":195,"y":520,"wires":[["410133ba.1896cc","c8445488.afc358"]]},{"id":"410133ba.1896cc","type":"change","z":"c64 276cc.982158","name":"flow , flow","rules":[{"t":"set","p":"StringSSO1","pt":"flow","to":"payl oad.potenciaenplaca","tot":"msg"},{"t":"set","p":" StringSSO2","pt":"flow","to":"potenciaenplaca2","t ot":"msg"}],"action":"","property":"","from":"","to":"","reg" :false,"x":380,"y":520,"wires":[["5b04adb5.a444c4","c74a06b8.a1ef28","c07a7a3a.27ce e8","5c7dacd1.02c614"]]},{"id":"c07a7a3a.27cee8","type":"function","z":"c 64276cc.982158","name":"","func":"\n msg.payload = flow.get("StringSSO1") + flow.get("StringSSO2");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","final ize":"","libs":[],"x":600,"y":680,"wires":[["920d7fc2.ffd9d"]]},{"id":"5b04adb5.a444c4","type":"debug","z":"c642 76cc.982158","name":"","active":false,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":520,"wires":[]},{"id":"c74a06b8.a1ef28","type":"change","z":"c64 276cc.982158","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"stringSS O1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg" :false,"x":620,"y":580,"wires":[["12251862.33af68"]]},{"id":"12251862.33af68","type":"debug","z":"c642 76cc.982158","name":"","active":true,"tosidebar":t rue,"console":false,"tostatus":false,"complete":"f alse","statusVal":"","statusType":"auto","x":850," y":580,"wires":[]},{"id":"920d7fc2.ffd9d","type":"debug","z":"c6427 6cc.982158","name":"","active":true,"tosidebar":tr ue,"console":false,"tostatus":false,"complete":"fa lse","statusVal":"","statusType":"auto","x":850,"y ":680,"wires":[]},{"id":"c8445488.afc358","type":"debug","z":"c642 76cc.982158","name":"","active":true,"tosidebar":t rue,"console":false,"tostatus":false,"complete":"f alse","statusVal":"","statusType":"auto","x":330," y":620,"wires":[]},{"id":"5c7dacd1.02c614","type":"function","z":"c 64276cc.982158","name":"","func":"\n msg.payload = flow.get("StringSSO1");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","final ize":"","libs":[],"x":600,"y":640,"wires":[["e41e81c6.c999f"]]},{"id":"e41e81c6.c999f","type":"debug","z":"c6427 6cc.982158","name":"","active":true,"tosidebar":tr ue,"console":false,"tostatus":false,"complete":"fa lse","statusVal":"","statusType":"auto","x":850,"y ":640,"wires":[]}]
- 27/09/2021, 16:19 #80Forero
- Fecha de ingreso
- feb 2012
- Ubicación
- Un pueblecito de Granada
- Mensajes
- 196
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Casi lo tienes!!
Primero tendrás que instalarte el tuyaapi en la rasp:
npm i @tuyapi/cli -g
Luego solo tienes que meterte en la página esta:
y cogerte lo que te vaya pidiendo el cli cuando corras el códigoCódigo:tuya-cli wizard
Y con eso ya lo tienes!
- 27/09/2021, 16:30 #81Forero
- Fecha de ingreso
- mar 2021
- Ubicación
- Navarra
- Mensajes
- 238
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Gracias!!!! Es que faltaba instalar en la rasp el programa! Ya decía yo: "dónde leches meto yo el tuya-cli wizard!!!!!"
Ahora se me ha puesto el inversor a ecualizar... a ver cómo lo quito!
- - - - - - - - - - - - - - - - - - -
Gracias!!!! Es que faltaba instalar en la rasp el programa! Ya decía yo: "dónde leches meto yo el tuya-cli wizard!!!!!"
Ahora se me ha puesto el inversor a ecualizar... a ver cómo lo quito!
- 27/09/2021, 18:05 #82Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
asl12 .. Últimamente tienes eco ¡¡¡ jajajaja ;-), por alguna razón tus mensajes aparecen dobles ¡
Para publicar código usa la etiqueta code.
Sobre los enchufes si puedes aprovecha los que tienes, si no ya le metemos mano al tema y vemos que tal.
Le echo un vistazo al código que mandas... y te digo.
- - - - - - - - - - - - - - - - - - -
Me temo que el código que publicaste da error , no lo puedo importar, intenta exportarlo, y pegarlo dentro de una etiqueta CODE
- - - - - - - - - - - - - - - - - - -
Si quieres puedes comprobar si al pegarlo queda bien, entras en (Ir a avanzado ) en la web usa el # y pegas el código, le das a (vista previa del mensaje), y podrás ver el resultado, si en ese momento lo copias y lo pegas en nodered, en importación sin darla a aceptar para no duplicar al código, veras si acepta el formato o no.
- - - - - - - - - - - - - - - - - - -
La ecualización tendría que estar desactivada, es muy mala idea ecualizar las batería de litio. Repasa la config , o tocaste algo, o la tienes activa desde siempre
- - - - - - - - - - - - - - - - - - -
PD
Señor Admin .. parece que tenemos echo en las respuestas múltiples ... ¡¡¡¡Última edición por Au-PRX; 28/09/2021 a las 07:40
-
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Efectivamente Au-PRX, estamos trabajando en ello. A ver si logramos solucionarlo pronto.
Más info aquí Problema con mensajes duplicados
Gracias por vuestra paciencia!
-
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Efectivamente Au-PRX, estamos trabajando en ello. A ver si logramos solucionarlo pronto.
Más info aquí Problema con mensajes duplicados
Gracias por vuestra paciencia!
- 27/09/2021, 21:52 #85Forero
- Fecha de ingreso
- mar 2021
- Ubicación
- Navarra
- Mensajes
- 238
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Hola!
Lo conseguí!!!! he de reconocer que todos mis puntos de bloqueo han sido por no seguir las instrucciones al pie de la letra que se incluían en el post del Elfriski...
https://github.com/codetheweb/tuyapi.../docs/SETUP.md
Ahora, que ya tengo localizado el enchufe de pruebas me queda hacerlo funcionar en el nodo... pero ya para mañana!
- 28/09/2021, 12:13 #86Forero
- Fecha de ingreso
- mar 2021
- Ubicación
- Navarra
- Mensajes
- 238
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Hola!
Te adjunto el flow:
[{"id":"77a388bd8c76e078","type":"inject","z":"c642 76cc.982158","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay" :0.1,"topic":"","payloadType":"date","x":180,"y":3 00,"wires":[["c9df07fe37caaf81"]]},{"id":"c9df07fe37caaf81","type":"change","z":"c6 4276cc.982158","name":"flow , flow","rules":[{"t":"set","p":"dato010","pt":"flow","to":"10","to t":"num"},{"t":"set","p":"dato0100","pt":"flow","t o":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg" :false,"x":380,"y":300,"wires":[["50b40e5e09bcbfbf","d6097fbf23f0ba10","b4a379144d9 0a42b"]]},{"id":"b4a379144d90a42b","type":"function","z":" c64276cc.982158","name":"","func":"\n msg.payload = flow.get("dato010") + flow.get("dato0100");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","final ize":"","libs":[],"x":600,"y":460,"wires":[["11b9bc9475aebe0f"]]},{"id":"50b40e5e09bcbfbf","type":"debug","z":"c64 276cc.982158","name":"","active":true,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":300,"wires":[]},{"id":"d6097fbf23f0ba10","type":"change","z":"c6 4276cc.982158","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"dato010" ,"tot":"flow"}],"action":"","property":"","from":"","to":"","reg" :false,"x":620,"y":360,"wires":[["afd1e853cdbe0e60"]]},{"id":"afd1e853cdbe0e60","type":"debug","z":"c64 276cc.982158","name":"","active":true,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":360,"wires":[]},{"id":"11b9bc9475aebe0f","type":"debug","z":"c64 276cc.982158","name":"","active":true,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":460,"wires":[]},{"id":"55f8fa37.0b1e54","type":"link in","z":"c64276cc.982158","name":"Graficos consolidados","links":["7045423e.190d0c","cc917e2c.d56b2","1c8e78b7.680ba 7"],"x":195,"y":520,"wires":[["410133ba.1896cc","c8445488.afc358"]]},{"id":"410133ba.1896cc","type":"change","z":"c64 276cc.982158","name":"flow , flow","rules":[{"t":"set","p":"StringSSO1","pt":"flow","to":"payl oad.potenciaenplaca","tot":"msg"},{"t":"set","p":" StringSSO2","pt":"flow","to":"potenciaenplaca2","t ot":"msg"}],"action":"","property":"","from":"","to":"","reg" :false,"x":380,"y":520,"wires":[["5b04adb5.a444c4","c74a06b8.a1ef28","c07a7a3a.27ce e8","5c7dacd1.02c614"]]},{"id":"c07a7a3a.27cee8","type":"function","z":"c 64276cc.982158","name":"","func":"\n msg.payload = flow.get("StringSSO1") + flow.get("StringSSO2");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","final ize":"","libs":[],"x":600,"y":680,"wires":[["920d7fc2.ffd9d"]]},{"id":"5b04adb5.a444c4","type":"debug","z":"c642 76cc.982158","name":"","active":false,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":520,"wires":[]},{"id":"c74a06b8.a1ef28","type":"change","z":"c64 276cc.982158","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"stringSS O1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg" :false,"x":620,"y":580,"wires":[["12251862.33af68"]]},{"id":"12251862.33af68","type":"debug","z":"c642 76cc.982158","name":"","active":false,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":850, "y":580,"wires":[]},{"id":"920d7fc2.ffd9d","type":"debug","z":"c6427 6cc.982158","name":"","active":false,"tosidebar":t rue,"console":false,"tostatus":false,"complete":"f alse","statusVal":"","statusType":"auto","x":850," y":680,"wires":[]},{"id":"c8445488.afc358","type":"debug","z":"c642 76cc.982158","name":"","active":false,"tosidebar": true,"console":false,"tostatus":false,"complete":" false","statusVal":"","statusType":"auto","x":330, "y":620,"wires":[]},{"id":"5c7dacd1.02c614","type":"function","z":"c 64276cc.982158","name":"","func":"\n msg.payload = flow.get("StringSSO1");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","final ize":"","libs":[],"x":600,"y":640,"wires":[["e41e81c6.c999f"]]},{"id":"e41e81c6.c999f","type":"debug","z":"c6427 6cc.982158","name":"","active":false,"tosidebar":t rue,"console":false,"tostatus":false,"complete":"f alse","statusVal":"","statusType":"auto","x":850," y":640,"wires":[]}]
PD: Ayer no le di a enviar...
-
- 28/09/2021, 17:24 #87Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
asl12.
Algo estas haciendo mal ... tus códigos no funcionan, no me permite importarlo, tienes que fijarte bien como los metes en la web, usa la etiqueta CODE , las de la almohadilla #, tienes que meter el código dentro de esa etiqueta y te tienen que aparecer en una sola lineal, si no es así, no lo estas haciendo bien. " [C0DE]este es el lugar para meter el código [/C0DE] " no copies mis etiquetas, usa el # desde avanzado o escríbelas
- 28/09/2021, 17:40 #88Forero
- Fecha de ingreso
- mar 2021
- Ubicación
- Navarra
- Mensajes
- 238
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Código:[{"id":"89f19619.d2ca78","type":"inject","z":"9a343e99.9e8ef","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":380,"y":240,"wires":[["111bf307.b8c9bd"]]},{"id":"111bf307.b8c9bd","type":"change","z":"9a343e99.9e8ef","name":"flow , flow","rules":[{"t":"set","p":"dato010","pt":"flow","to":"10","tot":"num"},{"t":"set","p":"dato0100","pt":"flow","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":240,"wires":[["fbaf368.e3c10c8","e21af482.0f52f8","ad58e06b.b8392"]]},{"id":"ad58e06b.b8392","type":"function","z":"9a343e99.9e8ef","name":"","func":"\n msg.payload = flow.get(\"dato010\") + flow.get(\"dato0100\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":400,"wires":[["d8c47f60.99f26"]]},{"id":"fbaf368.e3c10c8","type":"debug","z":"9a343e99.9e8ef","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":240,"wires":[]},{"id":"e21af482.0f52f8","type":"change","z":"9a343e99.9e8ef","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"dato010","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":300,"wires":[["8ae7e4cf.044398"]]},{"id":"8ae7e4cf.044398","type":"debug","z":"9a343e99.9e8ef","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":300,"wires":[]},{"id":"d8c47f60.99f26","type":"debug","z":"9a343e99.9e8ef","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":400,"wires":[]},{"id":"9b9c9193.e2a9a","type":"link in","z":"9a343e99.9e8ef","name":"Graficos consolidados","links":["7045423e.190d0c","cc917e2c.d56b2","1c8e78b7.680ba7"],"x":395,"y":460,"wires":[["e3827b41.d1e5f8","659f3796.35f778"]]},{"id":"e3827b41.d1e5f8","type":"change","z":"9a343e99.9e8ef","name":"flow , flow","rules":[{"t":"set","p":"StringSSO1","pt":"flow","to":"payload.potenciaenplaca","tot":"msg"},{"t":"set","p":"StringSSO2","pt":"flow","to":"potenciaenplaca2","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":460,"wires":[["43b7104f.ffa6a","d7ed8427.c41598","8794f7ff.8cad38","f4a07cff.b74ff"]]},{"id":"8794f7ff.8cad38","type":"function","z":"9a343e99.9e8ef","name":"","func":"\n msg.payload = flow.get(\"StringSSO1\") + flow.get(\"StringSSO2\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":620,"wires":[["eeeaf6f1.8fdd88"]]},{"id":"43b7104f.ffa6a","type":"debug","z":"9a343e99.9e8ef","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":460,"wires":[]},{"id":"d7ed8427.c41598","type":"change","z":"9a343e99.9e8ef","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"stringSSO1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":520,"wires":[["41b85dac.834f54"]]},{"id":"41b85dac.834f54","type":"debug","z":"9a343e99.9e8ef","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":520,"wires":[]},{"id":"eeeaf6f1.8fdd88","type":"debug","z":"9a343e99.9e8ef","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":620,"wires":[]},{"id":"659f3796.35f778","type":"debug","z":"9a343e99.9e8ef","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":560,"wires":[]},{"id":"f4a07cff.b74ff","type":"function","z":"9a343e99.9e8ef","name":"","func":"\n msg.payload = flow.get(\"StringSSO1\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":580,"wires":[["1b3d0d14.e8e0a3"]]},{"id":"1b3d0d14.e8e0a3","type":"debug","z":"9a343e99.9e8ef","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":580,"wires":[]}]
- 28/09/2021, 21:26 #89Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Ok ya lo puedo importar ... le echo un vistazo y te digo
- - - - - - - - - - - - - - - - - - -
Ok ya lo puedo importar ... le echo un vistazo y te digo
Pero así sin mas... ya veo algo que no parece correcto, seguro que es (msg.potenciaenplaca2) y no (msg.payload.potenciaenplaca2) ?
Después continuo
- 29/09/2021, 07:21 #90Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Si no pones el flujo completo, necesito ver los valores que llegan al inicio de la porción de flujo que pones, mira el primer node debug, que valores están saliendo por él.
- 29/09/2021, 08:28 #91Forero
- Fecha de ingreso
- mar 2021
- Ubicación
- Navarra
- Mensajes
- 238
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Gracias!
Ya corregí el payload de antes, no sé si se me escapó o con tanto cambio lo puse mal...
Adunto los valores que salen, es pronto y marca 0 pero bueno...
Le he dado vueltas y tal vez sea porque los valores no llegan simultáneamente, es decir, llega uno y el otro no está y al llegar el segundo string, no está el primer dato...
- 29/09/2021, 10:19 #92Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Bueno continuo sin ver los dos valores, solo veo potenciaplaca2 que es 0
Tienes que asegurarte que están llegando los dos, da los mismo si llega antes o después eso se puede solucionar, pero tienen que llegar los dos.
Y no me queda claro lo que estás intentado ... Quieres sumar la potencia en placas de los dos inversores ? o los setring de un mismo inversor, porque los valores de potenciaplaca y potenciaplaca2, así tan cuál pueden muy bien pertenecer al mismo inversor. Seguiste mi recomendación de escribir lo que quieres hacer antes de hacerlo? ... Es fundamental tener la lógica clara y correcta antes de pulsar una tecla... Si no te vuelves loco.
Cada inversor puede tener dos grupos de placas y sus potencias son potenciaplaca y potenciaplaca2
Hay otra forma que aún es más sencilla y no te lías con la programación por el momento, así que te dé tiempo a empaparte más, porque te terminaras liando.
La otra forma es mandar los valores de cada inversor a mosquito. y después puedes leerlos y sumarlos sin problemas.. Teóricamente.
Lo que hace mosquito.. (mqtt) es recopilar valores relacionados con un tema, por ejemplo, el tema inversor01/potenciaplaca y inversor01/potenciaplaca2 etc .. lo bueno es que estos valores estaran diponibles para cualquier aplicación en red que los necesite, solo hay que interrogarlo con lo que necesitas y el te manda el valor almacenado, nada mas hay que tener en cuenta cada cuanto se actualizan los valores, los refrescos que estemos manejando, pero no hacer falsas lecturas, ya que si se interrumpe la actualización de valores en mosquito, por ejemplo , el inversor se para, mosquito continuara respondiendo con el ultimo valor almacenado, pero esto es muy sencillo de solucionar.
Por cierto, si no conoces este canal míralo, porque este señor toca muchos de los temas que te interesan, él trabaja usando contenedores (docker) que no es mala idea, yo también trabajo así con algunas diferencia importantes, yo no uso una raspbery para las bases de datos y las graficas, desde mi punto de vista eso es un error si pretendes mantener información de mucho tiempo, yo lo tengo montado en un servidor, pero todo lo que tiene es muy interesante y te puede ayudar bastante.
https://www.youtube.com/channel/UCQo...-fESW3w80OUlmA
El uso de contenedores te facilita muchísimo poder sacar tus programas de un equipo para llevarlos a otro en muy poco tiempo, y esto es oro ¡¡ informaticamente hablando.
- - - - - - - - - - - - - - - - - - -
Bueno continuo sin ver los dos valores, solo veo potenciaplaca2 que es 0
Tienes que asegurarte que están llegando los dos, da los mismo si llega antes o después eso se puede solucionar, pero tienen que llegar los dos.
Y no me queda claro lo que estás intentado ... Quieres sumar la potencia en placas de los dos inversores ? o los setring de un mismo inversor, porque los valores de potenciaplaca y potenciaplaca2, así tan cuál pueden muy bien pertenecer al mismo inversor. Seguiste mi recomendación de escribir lo que quieres hacer antes de hacerlo? ... Es fundamental tener la lógica clara y correcta antes de pulsar una tecla... Si no te vuelves loco.
Cada inversor puede tener dos grupos de placas y sus potencias son potenciaplaca y potenciaplaca2
Hay otra forma que aún es más sencilla y no te lías con la programación por el momento, así que te dé tiempo a empaparte más, porque te terminaras liando.
La otra forma es mandar los valores de cada inversor a mosquito. y después puedes leerlos y sumarlos sin problemas.. Teóricamente.
Lo que hace mosquito.. (mqtt) es recopilar valores relacionados con un tema, por ejemplo, el tema inversor01/potenciaplaca y inversor01/potenciaplaca2 etc .. lo bueno es que estos valores estaran diponibles para cualquier aplicación en red que los necesite, solo hay que interrogarlo con lo que necesitas y el te manda el valor almacenado, nada mas hay que tener en cuenta cada cuanto se actualizan los valores, los refrescos que estemos manejando, pero no hacer falsas lecturas, ya que si se interrumpe la actualización de valores en mosquito, por ejemplo , el inversor se para, mosquito continuara respondiendo con el ultimo valor almacenado, pero esto es muy sencillo de solucionar.
Por cierto, si no conoces este canal míralo, porque este señor toca muchos de los temas que te interesan, él trabaja usando contenedores (docker) que no es mala idea, yo también trabajo así con algunas diferencia importantes, yo no uso una raspbery para las bases de datos y las graficas, desde mi punto de vista eso es un error si pretendes mantener información de mucho tiempo, yo lo tengo montado en un servidor, pero todo lo que tiene es muy interesante y te puede ayudar bastante.
https://www.youtube.com/channel/UCQo...-fESW3w80OUlmA
El uso de contenedores te facilita muchísimo poder sacar tus programas de un equipo para llevarlos a otro en muy poco tiempo, y esto es oro ¡¡ informaticamente hablando.
- 29/09/2021, 11:18 #93Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Si te parece bien, cambiamos de enfoque y ya regresaremos a la variable en otro momento... porque nos encallamos ...
Por favor publica todo el código que tengas para qué lo puede examinar bien... veo un nodo rbe que no recuerdo y es posible que interese eliminar algunas lecturas antes de meterlas en mosquito
Pero de una forma general lo que tienes que hacer es donde pone TodasLecturasAXPERTMAX7.2 le metes un nodo debug, le echamos un ojo y si sale todo lo que nos interesa le metemos un nodo mqtt out, claro tienes que tener un servidor mosquito funcionando antes. la configuración del nodo mqtt es muy simple, solo tienes que meterlos datos del servidor, IP clave de acceso y nombre , y el Topic, que es el tema con el que publicaras la información, en el caso de inversor 1, pues puedes poner inversor_01 o lo que quieras, mosquito almacenara los datos tipo inversor_01/potenciaplaca etc etc.
Para leerlos es tan fácil como poner en este nodered o cualquier otro de tu red, un nodo (mtrr in) y configurarlos con los datos del servidor y el topic que quieres leer , si es el anterior ya sabes inversor_01/potenciaplaca, como respuesta de dará un msg.payload con el valor que contenga
Código PHP:[ { "id": "c08a71a355ccbe9a", "type": "tab", "label": "Flow 2", "disabled": false, "info": "" }, { "id": "61625de3d6831d73", "type": "mqtt in", "z": "c08a71a355ccbe9a", "name": "", "topic": "Max-02", "qos": "0", "datatype": "auto", "broker": "4c5b31d3eecd2fbe", "nl": false, "rap": true, "rh": 0, "x": 170, "y": 600, "wires": [ [ "675303c43c1407a3" ] ] }, { "id": "675303c43c1407a3", "type": "json", "z": "c08a71a355ccbe9a", "name": "", "property": "payload", "action": "", "pretty": false, "x": 340, "y": 600, "wires": [ [ "34f8703d9066114d" ] ] }, { "id": "42d3cfa30c4d4af8", "type": "mqtt in", "z": "c08a71a355ccbe9a", "name": "", "topic": "Max-01", "qos": "0", "datatype": "auto", "broker": "4c5b31d3eecd2fbe", "nl": false, "rap": true, "rh": 0, "x": 170, "y": 700, "wires": [ [ "f298f093bbbd853b" ] ] }, { "id": "f298f093bbbd853b", "type": "json", "z": "c08a71a355ccbe9a", "name": "", "property": "payload", "action": "", "pretty": false, "x": 340, "y": 700, "wires": [ [ "9f3b110d01fe72da" ] ] }, { "id": "34f8703d9066114d", "type": "function", "z": "c08a71a355ccbe9a", "name": "", "func": "msg.topic = \"Max1\"\nmsg.payload = \n{\n \"max1_potenciaenplacatotal\": msg.payload.potenciaenplaca + msg.payload.potenciaenplaca2,\n \"max1_potenciaenplaca\": msg.payload.potenciaenplaca,\n \"max1_potenciaenplaca2\": msg.payload.potenciaenplaca2,\n}\n\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 540, "y": 600, "wires": [ [ "a5cc7f8bab4c322c" ] ] }, { "id": "9f3b110d01fe72da", "type": "function", "z": "c08a71a355ccbe9a", "name": "", "func": "msg.topic = \"Max2\"\nmsg.payload =\n{\n \"max2_potenciaenplacatotal\": msg.payload.potenciaenplaca + msg.payload.potenciaenplaca2,\n \"max2_potenciaenplaca\": msg.payload.potenciaenplaca,\n \"max2_potenciaenplaca2\": msg.payload.potenciaenplaca2,\n}\n\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 540, "y": 680, "wires": [ [ "a5cc7f8bab4c322c" ] ] }, { "id": "d8bb4f83be006676", "type": "debug", "z": "c08a71a355ccbe9a", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 1050, "y": 640, "wires": [] }, { "id": "a5cc7f8bab4c322c", "type": "join", "z": "c08a71a355ccbe9a", "name": "Max", "mode": "custom", "build": "object", "property": "payload", "propertyType": "msg", "key": "topic", "joiner": "\\n", "joinerType": "str", "accumulate": false, "timeout": "4", "count": "", "reduceRight": false, "reduceExp": "", "reduceInit": "", "reduceInitType": "", "reduceFixup": "", "x": 770, "y": 640, "wires": [ [ "d8bb4f83be006676", "5a633a94ec16ff58" ] ] }, { "id": "5a633a94ec16ff58", "type": "function", "z": "c08a71a355ccbe9a", "name": "suma", "func": "var total = msg.payload.Max1.max1_potenciaenplacatotal + msg.payload.Max2.max2_potenciaenplacatotal\nmsg.payload = total\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 890, "y": 720, "wires": [ [ "a80f79daf1ea4e5c" ] ] }, { "id": "a80f79daf1ea4e5c", "type": "debug", "z": "c08a71a355ccbe9a", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 1050, "y": 720, "wires": [] }, { "id": "4c5b31d3eecd2fbe", "type": "mqtt-broker", "name": "Mosquito", "broker": "192.168.3.10", "port": "1883", "clientid": "", "usetls": false, "protocolVersion": "4", "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "birthMsg": {}, "closeTopic": "", "closeQos": "0", "closePayload": "", "closeMsg": {}, "willTopic": "", "willQos": "0", "willPayload": "", "willMsg": {}, "sessionExpiry": "" } ]
Parece que falla otra vez le el formateo de código.Última edición por solarweb; 29/09/2021 a las 14:38
-
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
- 29/09/2021, 18:56 #95Forero
- Fecha de ingreso
- mar 2021
- Ubicación
- Navarra
- Mensajes
- 238
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Gracias por tu tiempo!
Igual mejor es pasar a mqtt, lo de la programación me va grande...
Si que conozco a Luis de Domotica.Solar, estuve comentando por mail con él la posibilidad de hacer un prediseño para los MAX, pero era complicado... en el fondo estamos haciéndolo contigo aquí...
Ya he instalado el mosquitto, pero a ver si lo hago funcionar que estoy muy pez... y eso que me he visto el video de Luis en relación al tema 3 veces...Código:[{"id":"d6f0bdfd.25185","type":"tab","label":"BMV","disabled":false,"info":""},{"id":"5f6fa704.5343c8","type":"tab","label":"Axpert MAX 8kw","disabled":false,"info":""},{"id":"510263c3.2cdeec","type":"tab","label":"Axpert Max 7.2","disabled":false,"info":""},{"id":"48e226e1.799b28","type":"tab","label":"Graficos Consolidados","disabled":false,"info":""},{"id":"c64276cc.982158","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"ffbd59f8.ae8598","type":"serial-port","serialport":"/dev/ttyUSB1","serialbaud":"2400","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"},{"id":"402daa81.d7ced4","type":"ui_tab","name":"Casa","icon":"dashboard","disabled":false,"hidden":false},{"id":"5aed39d4.76a0e8","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#0094CE","value":"#0094CE","edited":false},"page-titlebar-backgroundColor":{"value":"#0094CE","edited":false},"page-backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#1bbfff","edited":false},"group-borderColor":{"value":"#ffffff","edited":false},"group-backgroundColor":{"value":"#ffffff","edited":false},"widget-textColor":{"value":"#111111","edited":false},"widget-backgroundColor":{"value":"#0094ce","edited":false},"widget-borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey","palette":"light"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"f9547d33.f6aae","type":"ui_group","name":"Grupo pruebas","tab":"402daa81.d7ced4","order":1,"disp":true,"width":"6","collapse":true,"className":""},{"id":"d3cff94b.22fad8","type":"telegrambot-config","botname":"MiBotTelegram","usernames":"","chatIds":"1691980307","pollInterval":"30"},{"id":"19f77576.0c356b","type":"serial-port","serialport":"/dev/ttyUSB0","serialbaud":"19200","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"},{"id":"15069ddb.963d52","type":"serial-port","serialport":"/dev/ttyUSB2","serialbaud":"2400","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"},{"id":"f0f0092e.8794b8","type":"ui_group","name":"Bateria","tab":"402daa81.d7ced4","order":2,"disp":true,"width":"6","collapse":false,"className":""},{"id":"1940745e.8b2d0c","type":"ui_group","name":"Generación","tab":"402daa81.d7ced4","order":3,"disp":true,"width":"6","collapse":false,"className":""},{"id":"a5ca3b79.b7e978","type":"ui_group","name":"Consumo","tab":"402daa81.d7ced4","order":4,"disp":true,"width":"6","collapse":false,"className":""},{"id":"c44c96ba.8c4278","type":"ui_group","name":"Otros","tab":"402daa81.d7ced4","order":5,"disp":true,"width":"6","collapse":true,"className":""},{"id":"118c40b3.3c7d6f","type":"ui_group","name":"Acciones","tab":"402daa81.d7ced4","order":6,"disp":true,"width":"6","collapse":false,"className":""},{"id":"b5a59274.ca4dc","type":"ui_group","name":"Control","tab":"402daa81.d7ced4","order":7,"disp":true,"width":"6","collapse":false,"className":""},{"id":"f30b94ba.8c7148","type":"mqtt-broker","name":"Mosquitto7200","broker":"192.168.10.126","port":"1883","clientid":"","usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"90de9d2.931da6","type":"function","z":"5f6fa704.5343c8","name":"CRCTJ 8000w","func":" // Algoritmo para lanzar los comandos hacia Voltronics con CRC propietario\n // Algoritmo realizado por Tejota \n var topic = (msg.payload) + (\" \") + (msg.topic); // Topic con el comando string y posible descripcion\n var comandobuffer = Buffer.from(msg.payload); // pasando a buffer el string del comando \n var crc = 0x0000; // inicio del crc\n for (tj = 0; tj < comandobuffer.length; tj++) // scaneo del buffer\n {\n const byte = comandobuffer[tj]; // analizando el byte para aplicarle el crc16xmodem\n tejota = (crc >>> 8) & 0xff;\n tejota ^= byte & 0xff;\n tejota ^= tejota >>> 4;\n crc = (crc << 8) & 0xffff; // Algoritmo\n crc ^= tejota; // crc16 xmodem \n tejota = (tejota << 5) & 0xffff; // sin tabla estatica\n crc ^= tejota;\n tejota = (tejota << 7) & 0xffff;\n crc ^= tejota;\n } // resultante crc numerico \n var crchexastring = crc.toString(16).padStart(4,'0'); // crc numerico a string hexa añadiendo ceros a izquierda si es preciso\n var crchexabuffer = Buffer.from(crchexastring, \"hex\"); // buffer del crchexa\n for (mdk=0; mdk < crchexabuffer.length; mdk++) // scaneo del buffer\n {\n if (crchexabuffer[mdk]==10 || crchexabuffer[mdk]==13 || crchexabuffer[mdk]==40) // Exceptuando estos bytes mdk \n {\n crchexabuffer[mdk]++; // se pone el byte siguiente si es alguno de las excepciones mdk\n }\n } \n const retornodecarro = Buffer.from(\"\\r\");\n var crctotalbuffer = [comandobuffer, crchexabuffer, retornodecarro]; // construyendo el buffer final hacia el hibrido\n msg.payload = Buffer.concat(crctotalbuffer);\n msg.topic = topic;\n return msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1040,"y":640,"wires":[["3e667064.addb2"]]},{"id":"2838ecfd.8cd944","type":"debug","z":"5f6fa704.5343c8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1590,"y":160,"wires":[]},{"id":"ed377b98.17a4c8","type":"link out","z":"5f6fa704.5343c8","name":"Respuesta Puerto serie","links":["fff6813.db9dc8"],"x":1450,"y":640,"wires":[],"l":true},{"id":"c72cb93.ee09c48","type":"comment","z":"5f6fa704.5343c8","name":"Comunicacion Puerto Serie","info":"","x":1190,"y":600,"wires":[]},{"id":"5a096377.3f3e4c","type":"switch","z":"5f6fa704.5343c8","name":"Repartidor Datos Lecturas","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"QID Numero de Serie","vt":"str"},{"t":"eq","v":"QPIGS Estado General","vt":"str"},{"t":"eq","v":"QVFW Version CPU1","vt":"str"},{"t":"eq","v":"QVFW3 Firmware CPU3","vt":"str"},{"t":"eq","v":"QFLAG Miscelanea","vt":"str"},{"t":"eq","v":"QPIRI Configuracion","vt":"str"},{"t":"eq","v":"QBEQI Ecualizacion Bateria","vt":"str"},{"t":"eq","v":"QPIWS Informacion Warnings","vt":"str"},{"t":"eq","v":"QMOD Modo de Trabajo","vt":"str"},{"t":"eq","v":"QPIGS2 Campo2","vt":"str"},{"t":"eq","v":"QLED Barra LED","vt":"str"},{"t":"cont","v":"energiaproducidadiaria","vt":"str"},{"t":"cont","v":"cargadiariaentregada","vt":"str"}],"checkall":"true","repair":false,"outputs":13,"x":810,"y":280,"wires":[["ff95ff18.ec85b"],["ff810834.c7d798"],["48c39a8a.d5d724"],["cb2f936d.00a01"],["4cc3d780.8ad4b8"],["e396b2a1.c4d23"],["b8cc5876.875448"],["a89ce5d5.85a738"],["e1c0a56c.8678a8"],["cdde61a7.1f9a8"],["f36403bf.023e9"],["1b560e4c.bd9052"],["9c4f60e9.5de2a"]]},{"id":"a92101ff.0be36","type":"comment","z":"5f6fa704.5343c8","name":"Repartiendo por topic","info":"","x":820,"y":160,"wires":[]},{"id":"4cc3d780.8ad4b8","type":"function","z":"5f6fa704.5343c8","name":"QFLAGExtraccion","func":"var output = msg.payload.substr(1, 11);\nvar E = output.indexOf(\"E\")+1;\nvar D = output.indexOf(\"D\");\nvar enables = output.substr(E, (D-E));\nvar disables = output.substr(D+1);\nswitch (enables.includes(\"a\")){\n case true:\n buzzer = 1;\n break;\n case false: \n buzzer = 0;\n} \nswitch (enables.includes(\"b\")){\n case true:\n bypassoverload = 1;\n break;\n case false:\n bypassoverload = 0;\n break;\n} \nswitch (enables.includes(\"k\")){\n case true:\n guardapantallalcd = 1;\n break;\n case false: \n guardapantallalcd = 0;\n} \nswitch (enables.includes(\"j\")){\n case true:\n powersaving = 1;\n break;\n case false:\n powersaving = 0;\n break;\n} \nswitch (enables.includes(\"u\")){\n case true:\n overloadrestart = 1;\n break;\n case false: \n overloadrestart = 0;\n} \nswitch (enables.includes(\"v\")){\n case true:\n overtemperaturerestart = 1;\n break;\n case false:\n overtemperaturerestart = 0;\n break;\n}\nswitch (enables.includes(\"x\")){\n case true:\n luzlcd = 1;\n break;\n case false:\n luzlcd = 0;\n break;\n} \nswitch (enables.includes(\"y\")){\n case true:\n pitidosifuenteprimariafalla = 1;\n break;\n case false:\n pitidosifuenteprimariafalla = 0;\n break;\n} \nswitch (enables.includes(\"z\")){\n case true:\n grabarerrores = 1;\n break;\n case false:\n grabarerrores = 0;\n break;\n} \nreturn [\n {\n payload: {\n buzzer: buzzer,\n bypassoverload: bypassoverload,\n guardapantallalcd: guardapantallalcd,\n powersaving: powersaving,\n overloadrestart: overloadrestart,\n overtemperaturerestart: overtemperaturerestart,\n luzlcd: luzlcd,\n pitidosifuenteprimariafalla: pitidosifuenteprimariafalla,\n grabarerrores: grabarerrores,\n }\n }\n]\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":220,"wires":[["ff6877d4.d59a38"]]},{"id":"ff810834.c7d798","type":"function","z":"5f6fa704.5343c8","name":"QPIGSExtraccion","func":"var output = msg.payload.split(\" \");\nlet voltajered = parseFloat(output[0].slice(1, 5));\nlet frecuenciared = parseFloat(output[1]);\nlet voltajesalida = parseFloat(output[2]);\nlet frecuenciasalida = parseFloat(output[3]);\nlet potenciaparentesalida = parseInt(output[4]);\nlet potenciaactivasalida = parseInt(output[5]);\nlet porcentajecargasalida = parseInt(output[6]);\nlet voltajebusalta = parseInt(output[7]);\nlet voltajebateria = parseFloat(output[8]);\nlet amperioscargabat = parseInt(output[9]);\nlet capacidadbateria = parseInt(output[10]);\nlet temperaturainversor = parseInt(output[11]);\nlet amperiosenplaca = parseInt(output[12]);\nlet voltajeenplaca = parseInt(output[13]);\nlet voltajescc = parseFloat(output[14]);\nlet amperiosdescargabat = parseInt(output[15]);\nlet prioridadSBU = parseInt(output[16].slice(0,1));\nlet estadoconf = parseInt(output[16].slice(1,2));\nlet estadoscc = parseInt(output[16].slice(2,3));\nlet cargasconectadas = parseInt(output[16].slice(3,4));\nlet voltajeconstantemientrascarga = parseInt(output[16].slice(4,5));\nlet estadodecargageneral = parseInt(output[16].slice(5,6));\nlet estadodecargasolar = parseInt(output[16].slice(6,7));\nlet estadodecargared = parseInt(output[16].slice(7,9));\nlet potenciaenplaca = parseInt(output[19]);\nlet estadodelmppt = parseInt(output[20].slice(0,1));\nlet estadodelswitch = parseInt(output[20].slice(1,2));\nreturn [\n {\n payload: {\n voltajered: voltajered,\n frecuenciared: frecuenciared,\n voltajesalida: voltajesalida,\n frecuenciasalida: frecuenciasalida,\n potenciaparentesalida: potenciaparentesalida,\n potenciaactivasalida: potenciaactivasalida,\n porcentajecargasalida: porcentajecargasalida,\n voltajebateria: voltajebateria,\n amperiosdescargabat: amperiosdescargabat,\n amperioscargabat: amperioscargabat,\n temperaturainversor: temperaturainversor,\n potenciaenplaca: potenciaenplaca,\n voltajeenplaca: voltajeenplaca,\n estadodelmppt: estadodelmppt,\n cargasconectadas: cargasconectadas,\n voltajebusalta: voltajebusalta,\n capacidadbateria: capacidadbateria,\n amperiosenplaca: amperiosenplaca, \n voltajescc: voltajescc,\n prioridadSBU: prioridadSBU,\n estadoconf: estadoconf,\n estadoscc: estadoscc,\n voltajeconstantemientrascarga: voltajeconstantemientrascarga,\n estadodecargageneral: estadodecargageneral,\n estadodecargasolar: estadodecargasolar,\n estadodecargared: estadodecargared,\n estadodelswitch: estadodelswitch\n }\n }\n];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":100,"wires":[["ff6877d4.d59a38","cc917e2c.d56b2","c214e600.280288"]]},{"id":"e396b2a1.c4d23","type":"function","z":"5f6fa704.5343c8","name":"QPIRIExtraccion","func":"var output = msg.payload.split(\" \");\nlet voltajeredconf = parseFloat((output[0].slice(1, 5)));\nlet amperiosredmaxconf = parseFloat(output[1]);\nlet voltajesalidaconf = parseFloat(output[2]);\nlet frecuenciasalidaconf = parseFloat(output[3]);\nlet amperiossalidaconf = parseFloat(output[4]);\nlet potenciaaparentesalidaconf = parseFloat(output[5]);\nlet potenciaactivasalidaconf = parseFloat(output[6]);\nlet voltajebateriaconf = parseInt(output[7]);\nlet voltajelimitedescargabatconf = parseFloat(output[8]);\nlet voltajelimiterecargabatconf = parseFloat(output[22]);\nlet voltajeminimoparacorteconf = parseFloat(output[9]);\nlet voltajeabsorcionconf = parseFloat(output[10]);\nlet voltajeflotacionconf = parseFloat(output[11]);\nlet tipodebateriaconf = parseInt(output[12]);\nlet amperiosmaxcargadorbatconf = parseInt(output[13]);\nlet amperiosmaxtotalesabatconf = parseInt(output[14]);\nlet rangovoltajedentradaconf = parseInt(output[15]);\nlet prioridadfuentesalidaconf = parseInt(output[16]);\nlet prioridadcargadorbatconf = parseInt(output[17]);\nlet maximonumeroparalelosconf = parseInt(output[18]);\nlet tipodemaquina = parseInt(output[19]);\nlet tipodehibridoconf = parseInt(output[20]);\nlet tipodesalidaparaleloconf = parseInt(output[21]);\nlet potenciasolarparaleloconf = parseInt(output[23]);\nlet potenciasolarbalanceconf = parseInt(output[24]);\nglobal.set('voltajeabsorcionconfmax0' , voltajeabsorcionconf);\nglobal.set('voltajeflotacionconfmax0' , voltajeflotacionconf);\nreturn [\n {\n payload: {\n voltajeredconf: voltajeredconf,\n amperiosredmaxconf: amperiosredmaxconf,\n voltajesalidaconf: voltajesalidaconf,\n frecuenciasalidaconf: frecuenciasalidaconf,\n amperiossalidaconf: amperiossalidaconf,\n potenciaaparentesalidaconf: potenciaaparentesalidaconf,\n potenciaactivasalidaconf: potenciaactivasalidaconf,\n voltajebateriaconf: voltajebateriaconf,\n voltajelimiterecargabatconf: voltajelimiterecargabatconf,\n voltajelimitedescargabatconf: voltajelimitedescargabatconf,\n voltajeminimoparacorteconf: voltajeminimoparacorteconf,\n voltajeabsorcionconf: voltajeabsorcionconf,\n voltajeflotacionconf: voltajeflotacionconf,\n tipodebateriaconf: tipodebateriaconf,\n amperiosmaxcargadorbatconf: amperiosmaxcargadorbatconf,\n amperiosmaxtotalesabatconf: amperiosmaxtotalesabatconf,\n rangovoltajedentradaconf: rangovoltajedentradaconf,\n prioridadfuentesalidaconf: prioridadfuentesalidaconf,\n prioridadcargadorbatconf: prioridadcargadorbatconf,\n maximonumeroparalelosconf: maximonumeroparalelosconf,\n tipodemaquina: tipodemaquina,\n tipodehibridoconf: tipodehibridoconf,\n tipodesalidaparaleloconf: tipodesalidaparaleloconf,\n potenciasolarparaleloconf: potenciasolarparaleloconf,\n potenciasolarbalanceconf: potenciasolarbalanceconf\n }\n }\n]","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":260,"wires":[["ff6877d4.d59a38","2838ecfd.8cd944","8734f229.c8f36","e5ff4759.bffe78"]]},{"id":"48c39a8a.d5d724","type":"function","z":"5f6fa704.5343c8","name":"QVFW Extraccion U1","func":"var output = msg.payload;\nlet Firmware = (output.slice(10, 15));\nreturn [\n {\n payload: {\n Firmware: Firmware\n }\n }\n]","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":140,"wires":[["ff6877d4.d59a38"]]},{"id":"cb2f936d.00a01","type":"function","z":"5f6fa704.5343c8","name":"QVFW3 Firmware U3","func":"var output = msg.payload;\nlet Firmware3 = (output.slice(10, 15));\nreturn [\n {\n payload: {\n Firmware3: Firmware3\n }\n }\n]","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1080,"y":180,"wires":[["ff6877d4.d59a38"]]},{"id":"b8cc5876.875448","type":"function","z":"5f6fa704.5343c8","name":"QBEQI Ecu Extrac","func":"var output = msg.payload.split(\" \");\nlet activacionecualizacion = parseInt(output[0].slice(1, 2));\nlet tiempoecualizacion = parseInt(output[1]);\nlet diasentreecualizaciones = parseInt(output[2]);\nlet maxamperiosparaecualizar = parseInt(output[3]);\nlet diasquefaltanparaecualizar = parseInt(output[4]);\nlet voltajedeecualizacion = parseFloat(output[5]);\nlet tiempodeabsorcion = parseInt(output[6]);\nlet timeoutecualizacion = parseInt(output[7]);\nreturn [\n {\n payload: {\n activacionecualizacion: activacionecualizacion,\n tiempoecualizacion: tiempoecualizacion,\n diasentreecualizaciones: diasentreecualizaciones,\n maxamperiosparaecualizar: maxamperiosparaecualizar,\n diasquefaltanparaecualizar: diasquefaltanparaecualizar,\n voltajedeecualizacion: voltajedeecualizacion,\n tiempodeabsorcion: tiempodeabsorcion,\n timeoutecualizacion: timeoutecualizacion\n }\n }\n]","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":300,"wires":[["ff6877d4.d59a38"]]},{"id":"ff95ff18.ec85b","type":"function","z":"5f6fa704.5343c8","name":"QID Nº Serie Extrac","func":"var numerodeserie = msg.payload.slice(1, 15);\nflow.set('numerodeserie', numerodeserie);\nreturn [\n {\n payload: {\n numerodeserie: numerodeserie\n }\n }\n];\n// Numero de Serie va a flow o incluso podria ir a global para identificar en paralelos ","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":60,"wires":[["ff6877d4.d59a38"]]},{"id":"bd9e19f5.d19bf8","type":"comment","z":"5f6fa704.5343c8","name":"Extractores","info":"","x":1070,"y":20,"wires":[]},{"id":"a89ce5d5.85a738","type":"function","z":"5f6fa704.5343c8","name":"QPIWS Warnings Extrac","func":"var output = msg.payload;\nlet reservado = parseInt(output.slice(1, 2));\nlet falloinversor = parseInt(output.slice(2, 3));\nlet fallo08voltajebusalto = parseInt(output.slice(3, 4));\nlet fallo52voltajebusbajo = parseInt(output.slice(4, 5));\nlet fallo09softwarebus = parseInt(output.slice(5, 6));\nlet peligronoacinput = parseFloat(output.slice(6, 7));\nlet peligrocortopv = parseInt(output.slice(7, 8));\nlet fallo58voltajeinversorbajo = parseInt(output.slice(8, 9));\nlet fallo06voltajeinversoralto = parseInt(output.slice(9, 10));\nlet peligro02sobretemperatura = parseInt(output.slice(10, 11));\nlet peligro01ventilador = parseInt(output.slice(11, 12));\nlet peligro03altovoltajebateria = parseInt(output.slice(12, 13));\nlet peligro04bajovoltajebateria = parseInt(output.slice(13, 14));\nlet peligro07sobrecargar = parseInt(output.slice(14, 15));\nlet peligrobateriashutdown = parseInt(output.slice(15, 16));\nlet peligro10bateriaderating = parseInt(output.slice(16, 17));\nlet peligroeeprom = parseInt(output.slice(17, 18));\nlet fallo51sobrecorriente = parseInt(output.slice(18, 19));\nlet fallosoftwareinversor = parseInt(output.slice(19, 20));\nlet falloautotest = parseInt(output.slice(20, 21));\nlet fallo55continuaenac = parseInt(output.slice(21, 22));\nlet fallo56bateriaabierta = parseInt(output.slice(22, 23));\nlet fallo57sensorcorriente = parseInt(output.slice(23, 24));\nlet fallocortobateria = parseInt(output.slice(24, 25));\nlet peligrolimitepotencia = parseInt(output.slice(25, 26));\nlet peligro13altovoltajeplaca = parseInt(output.slice(26, 27));\nlet fallompptsobrecarga = parseInt(output.slice(27, 28));\nlet peligro14mpptsobrecarga = parseInt(output.slice(28, 29));\nlet peligro12bateriabajaparamppt = parseInt(output.slice(29, 30));\nreturn [\n {\n payload: {\n falloinversor: falloinversor,\n fallo08voltajebusalto: fallo08voltajebusalto,\n fallo52voltajebusbajo: fallo52voltajebusbajo,\n fallo09softwarebus: fallo09softwarebus,\n peligronoacinput: peligronoacinput,\n peligrocortopv: peligrocortopv,\n fallo58voltajeinversorbajo: fallo58voltajeinversorbajo,\n fallo06voltajeinversoralto: fallo06voltajeinversoralto,\n peligro02sobretemperatura: peligro02sobretemperatura,\n peligro01ventilador: peligro01ventilador,\n peligro03altovoltajebateria: peligro03altovoltajebateria,\n peligro04bajovoltajebateria: peligro04bajovoltajebateria,\n peligro07sobrecargar: peligro07sobrecargar,\n peligrobateriashutdown: peligrobateriashutdown,\n peligro10bateriaderating: peligro10bateriaderating,\n peligroeeprom: peligroeeprom,\n fallo51sobrecorriente: fallo51sobrecorriente,\n fallosoftwareinversor: fallosoftwareinversor,\n falloautotest: falloautotest,\n fallo55continuaenac: fallo55continuaenac,\n fallo56bateriaabierta: fallo56bateriaabierta,\n fallo57sensorcorriente: fallo57sensorcorriente,\n fallocortobateria: fallocortobateria,\n peligro13altovoltajeplaca: peligro13altovoltajeplaca,\n fallompptsobrecarga: fallompptsobrecarga,\n peligro14mpptsobrecarga: peligro14mpptsobrecarga,\n peligro12bateriabajaparamppt: peligro12bateriabajaparamppt\n }\n }\n]","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1090,"y":340,"wires":[["2ca6f10d.d07c5e"]]},{"id":"ff6877d4.d59a38","type":"join","z":"5f6fa704.5343c8","name":"Juntando Todo 4 s","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"4","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1350,"y":280,"wires":[["a3adf839.650c38"]]},{"id":"e1c0a56c.8678a8","type":"function","z":"5f6fa704.5343c8","name":"QMOD Extractor","func":"var output = msg.payload;\nlet mdts = output.slice(1, 2);\nlet mododetrabajo;\nif (mdts === \"P\") {\n mododetrabajo = 0;\n} else if (mdts === \"S\") {\n mododetrabajo = 1;\n} else if (mdts === \"L\") {\n mododetrabajo = 2;\n} else if (mdts === \"B\") {\n mododetrabajo = 3;\n} else if (mdts === \"F\") {\n mododetrabajo = 4;\n} else if (mdts === \"H\") {\n mododetrabajo = 5;\n} \nreturn [{\n payload: {\n mododetrabajo: mododetrabajo\n }\n }\n ];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":380,"wires":[["ff6877d4.d59a38"]]},{"id":"cdde61a7.1f9a8","type":"function","z":"5f6fa704.5343c8","name":"QPIGS2Extraccion","func":"var output = msg.payload.split(\" \");\nlet amperiosenplaca2 = parseInt(output[0].slice(1, 5));\nlet voltajeenplaca2 = parseInt(output[1]);\nlet potenciaenplaca2 = parseInt(output[2]);\nreturn [\n {\n payload: {\n potenciaenplaca2: potenciaenplaca2,\n voltajeenplaca2: voltajeenplaca2,\n amperiosenplaca2: amperiosenplaca2\n }\n }\n];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":420,"wires":[["ff6877d4.d59a38"]]},{"id":"f36403bf.023e9","type":"function","z":"5f6fa704.5343c8","name":"QLEDExtraccion","func":"var output = msg.payload.split(\" \");\nlet led = parseInt(output[0].slice(1, 2));\nlet ledvelocidad = parseInt(output[1]);\nlet ledefectos = parseInt(output[2]);\nlet ledbrillo = parseInt(output[3]);\nlet ledcosa = parseInt(output[4]);\nlet colorred = (output[5].slice(0,9));\nlet colorsolar = (output[5].slice(9,18));\nlet colorbateria = (output[5].slice(18,27));\nreturn [\n {\n payload: {\n led: led,\n ledvelocidad: ledvelocidad,\n ledefectos: ledefectos,\n ledbrillo: ledbrillo,\n ledcosa: ledcosa,\n colorred: colorred,\n colorsolar: colorsolar,\n colorbateria: colorbateria\n }\n }\n];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":460,"wires":[["ff6877d4.d59a38"]]},{"id":"1b560e4c.bd9052","type":"function","z":"5f6fa704.5343c8","name":"QED Energia diaria producida","func":"var energiadiaria = parseInt(msg.payload.slice(1, 9));\nreturn [\n {\n payload: {\n energiadiaria: energiadiaria\n }\n }\n];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1110,"y":500,"wires":[["ff6877d4.d59a38","a7fc23a6.4868c","cc917e2c.d56b2"]]},{"id":"9c4f60e9.5de2a","type":"function","z":"5f6fa704.5343c8","name":"QLD Carga diaria entregada","func":"var cargadiariaentregada = parseInt(msg.payload.slice(1, 9));\nreturn [\n {\n payload: {\n cargadiariaentregada: cargadiariaentregada\n }\n }\n];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1100,"y":540,"wires":[["ff6877d4.d59a38"]]},{"id":"138a90d.41cf56f","type":"inject","z":"5f6fa704.5343c8","name":"QPIRI Configuracion","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Configuracion","payload":"QPIRI","payloadType":"str","x":160,"y":280,"wires":[["e84d8567.2375c8"]]},{"id":"c7d358b5.81ec78","type":"inject","z":"5f6fa704.5343c8","name":"QFLAG Miscelanea","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Miscelanea","payload":"QFLAG","payloadType":"str","x":160,"y":240,"wires":[["e84d8567.2375c8"]]},{"id":"628b9d49.5d93c4","type":"inject","z":"5f6fa704.5343c8","name":"QBEQI Ecualizacion Bateria","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Ecualizacion Bateria","payload":"QBEQI","payloadType":"str","x":190,"y":320,"wires":[["e84d8567.2375c8"]]},{"id":"d6bda6e7.f3a5a8","type":"inject","z":"5f6fa704.5343c8","name":"QPIWS Informacion Warnings","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Informacion Warnings","payload":"QPIWS","payloadType":"str","x":190,"y":360,"wires":[["e84d8567.2375c8"]]},{"id":"25944b24.1ec0f4","type":"inject","z":"5f6fa704.5343c8","name":"QPIGS Estado General","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Estado General","payload":"QPIGS","payloadType":"str","x":170,"y":120,"wires":[["e84d8567.2375c8"]]},{"id":"cf91d079.a0f67","type":"inject","z":"5f6fa704.5343c8","name":"QID Numero de Serie","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Numero de Serie","payload":"QID","payloadType":"str","x":160,"y":80,"wires":[["e84d8567.2375c8"]]},{"id":"fdb2a02f.70e9e","type":"inject","z":"5f6fa704.5343c8","name":"QVFW Firmware CPU1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Version CPU1","payload":"QVFW","payloadType":"str","x":170,"y":160,"wires":[["e84d8567.2375c8"]]},{"id":"a67ae929.0c85b8","type":"inject","z":"5f6fa704.5343c8","name":"QVFW3 Firmware CPU3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Firmware CPU3","payload":"QVFW3","payloadType":"str","x":170,"y":200,"wires":[["e84d8567.2375c8"]]},{"id":"e84d8567.2375c8","type":"link out","z":"5f6fa704.5343c8","name":"EntradaalCRC","links":["a5275ddf.550e2"],"x":580,"y":360,"wires":[],"l":true},{"id":"900581bc.d5902","type":"comment","z":"5f6fa704.5343c8","name":"Comandos de monitorizacion cada 4 segundos","info":"Comandos de Monitorizacion","x":220,"y":40,"wires":[]},{"id":"dfd4154f.588708","type":"inject","z":"5f6fa704.5343c8","name":"QMOD Modo de Trabajo","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Modo de Trabajo","payload":"QMOD","payloadType":"str","x":170,"y":400,"wires":[["e84d8567.2375c8"]]},{"id":"a0215de0.41bc8","type":"inject","z":"5f6fa704.5343c8","name":"QPIGS2 Segundo Campo","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Campo2","payload":"QPIGS2","payloadType":"str","x":180,"y":440,"wires":[["e84d8567.2375c8"]]},{"id":"fd9d8f04.d452f","type":"inject","z":"5f6fa704.5343c8","name":"DAT Ajuste de Fecha","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 04 * * *","once":false,"onceDelay":0.1,"topic":"ajustedetiempo","payload":"DAT","payloadType":"str","x":160,"y":480,"wires":[["af5a95e6.1d7918"]]},{"id":"3ed79ad8.e27b46","type":"function","z":"5f6fa704.5343c8","name":"FormatoTiempo","func":"var comando = msg.payload;\nvar aa = msg.myyear.slice(2,4);\nvar mm = msg.mymonthn;\nvar dd = msg.mydom;\nvar hh = msg.myhour;\nvar ff = msg.myminute;\nvar ss = msg.mysecond;\nmsg.payload = comando + aa + mm + dd + hh + ff + ss;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":300,"y":520,"wires":[["e84d8567.2375c8"]]},{"id":"e4a4940.7fd347","type":"inject","z":"5f6fa704.5343c8","name":"QLED Barra LED","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Barra LED","payload":"QLED","payloadType":"str","x":150,"y":560,"wires":[["e84d8567.2375c8"]]},{"id":"f00b4f81.3cfd","type":"inject","z":"5f6fa704.5343c8","name":"Energiaproducidadiaria","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"energiaproducidadiaria","payload":"QED","payloadType":"str","x":170,"y":600,"wires":[["e4bfb236.18d77"]]},{"id":"f2b0bbcc.15e778","type":"inject","z":"5f6fa704.5343c8","name":"Cargadiariaentregada","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"cargadiariaentregada","payload":"QLD","payloadType":"str","x":170,"y":640,"wires":[["569de281.cf229c"]]},{"id":"c6f088c5.f41688","type":"function","z":"5f6fa704.5343c8","name":"FormatoTiempo","func":"var comando = msg.payload;\nvar aa = msg.myyear;\nvar mm = msg.mymonthn;\nvar dd = msg.mydom;\nmsg.payload = comando + aa + mm + dd;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":600,"wires":[["e84d8567.2375c8"]]},{"id":"afb34080.0d113","type":"function","z":"5f6fa704.5343c8","name":"FormatoTiempo","func":"var comando = msg.payload;\nvar aa = msg.myyear;\nvar mm = msg.mymonthn;\nvar dd = msg.mydom;\nmsg.payload = comando + aa + mm + dd;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":540,"y":640,"wires":[["e84d8567.2375c8"]]},{"id":"afce398d.6bbd38","type":"comment","z":"5f6fa704.5343c8","name":"Monitorizacion para Hibrido AXPERT MAX SINGLE ","info":"","x":690,"y":40,"wires":[]},{"id":"56de60ad.ef543","type":"link out","z":"5f6fa704.5343c8","name":"TodasLecturasAXPERTMAX8.0","links":[],"x":1670,"y":340,"wires":[],"l":true},{"id":"e9f79a21.e58798","type":"comment","z":"5f6fa704.5343c8","name":"Creando Objeto con todas las lecturas del Hibrido","info":"","x":1440,"y":240,"wires":[]},{"id":"a3adf839.650c38","type":"function","z":"5f6fa704.5343c8","name":"Id en topic num serie","func":"var topic = flow.get('numerodeserie');\nmsg.topic = topic;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1560,"y":280,"wires":[["56de60ad.ef543"]]},{"id":"a5275ddf.550e2","type":"link in","z":"5f6fa704.5343c8","name":"EntradaalCRC","links":["e84d8567.2375c8"],"x":830,"y":640,"wires":[["90de9d2.931da6"]],"l":true},{"id":"fff6813.db9dc8","type":"link in","z":"5f6fa704.5343c8","name":"Respuesta Puerto serie","links":["ed377b98.17a4c8"],"x":580,"y":280,"wires":[["5a096377.3f3e4c"]],"l":true},{"id":"2ca6f10d.d07c5e","type":"rbe","z":"5f6fa704.5343c8","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":1310,"y":340,"wires":[["ff6877d4.d59a38"]]},{"id":"af5a95e6.1d7918","type":"simpletime","z":"5f6fa704.5343c8","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":130,"y":520,"wires":[["3ed79ad8.e27b46"]]},{"id":"e4bfb236.18d77","type":"simpletime","z":"5f6fa704.5343c8","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":370,"y":600,"wires":[["c6f088c5.f41688"]]},{"id":"569de281.cf229c","type":"simpletime","z":"5f6fa704.5343c8","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":370,"y":640,"wires":[["afb34080.0d113"]]},{"id":"3e667064.addb2","type":"serial request","z":"5f6fa704.5343c8","name":"","serial":"ffbd59f8.ae8598","x":1230,"y":640,"wires":[["ed377b98.17a4c8"]]},{"id":"8423697a.898838","type":"telegrambot-command","z":"5f6fa704.5343c8","name":"","bot":"d3cff94b.22fad8","command":"psalida","commandType":"str","commandCase":false,"x":450,"y":780,"wires":[["1e4ce9cf.a6e956"]]},{"id":"1e4ce9cf.a6e956","type":"telegrambot-switch","z":"5f6fa704.5343c8","name":"","bot":"d3cff94b.22fad8","chatId":"1691980","question":"Qué modo quieres activar?","answers":["USB","SUB","SBU","Salir sin cambios"],"outputs":4,"autoAnswerCallback":true,"verticalAnswers":false,"timeoutValue":"","timeoutUnits":"","x":640,"y":780,"wires":[["b6b342a1.a666f"],["68d38f53.8158"],["4003deac.132e2"],["3e4ea2f5.7cb58e"]]},{"id":"b6b342a1.a666f","type":"function","z":"5f6fa704.5343c8","name":"","func":"msg.payload=\"POP00\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":740,"wires":[["6e0818fb.df3818"]]},{"id":"68d38f53.8158","type":"function","z":"5f6fa704.5343c8","name":"","func":"msg.payload=\"POP01\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":780,"wires":[["fe78d59e.bbbf88"]]},{"id":"4003deac.132e2","type":"function","z":"5f6fa704.5343c8","name":"","func":"msg.payload=\"POP02\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":820,"wires":[["6d4b2bfb.0a1244"]]},{"id":"3e4ea2f5.7cb58e","type":"telegrambot-notify","z":"5f6fa704.5343c8","name":"","bot":"d3cff94b.22fad8","chatId":"1691980","message":"Adios...","parseMode":"","x":860,"y":860,"wires":[]},{"id":"fe78d59e.bbbf88","type":"debug","z":"5f6fa704.5343c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1030,"y":780,"wires":[]},{"id":"6e0818fb.df3818","type":"debug","z":"5f6fa704.5343c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1030,"y":740,"wires":[]},{"id":"6d4b2bfb.0a1244","type":"debug","z":"5f6fa704.5343c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1030,"y":820,"wires":[]},{"id":"a7fc23a6.4868c","type":"ui_gauge","z":"5f6fa704.5343c8","name":"","group":"c44c96ba.8c4278","order":4,"width":"3","height":"3","gtype":"gage","title":"Energia Generada MAX 8.0","label":"","format":"{{payload.energiadiaria}} wh","min":0,"max":"30000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1460,"y":500,"wires":[]},{"id":"a9e967a8.0de618","type":"function","z":"d6f0bdfd.25185","name":"ExtractorDatosBMV700","func":"var data = msg.payload.split(\"\\t\");\nswitch(data[0]) {\n case 'SOC':\n SOC = parseFloat(data[1]/10);\n break;\n case 'V':\n VoltajeBateria = parseFloat(data[1]/1000);\n break;\n case 'I':\n AmperiosBateria = parseFloat(data[1]/1000);\n break;\n case 'P':\n PotenciaInstantanea = parseInt(data[1]);\n break;\n case 'CE':\n Ahconsumidosinstantaneos = parseInt(data[1]/1000);\n break;\n case 'H2':\n Profundidadultimadescarga = parseInt(data[1]/1000);\n break;\n case 'H6':\n Ahdescargados = parseInt(data[1]/1000);\n break;\n case 'H9':\n Tiempodesdelaultimacargacompleta = parseInt(data[1]);\n break;\n case 'H17':\n kWhdescargadosbateria = parseInt(data[1]/100);\n break;\n case 'H18':\n kWhcargadosbateria = parseInt(data[1]/100);\n break;\n }\nreturn [\n {\n payload: {\n SOC: SOC,\n VoltajeBateria: VoltajeBateria,\n AmperiosBateria: AmperiosBateria,\n PotenciaInstantanea: PotenciaInstantanea,\n Ahconsumidosinstantaneos: Ahconsumidosinstantaneos,\n Profundidadultimadescarga: Profundidadultimadescarga,\n Ahdescargados: Ahdescargados,\n Tiempodesdelaultimacargacompleta: Tiempodesdelaultimacargacompleta,\n kWhdescargadosbateria: kWhdescargadosbateria,\n kWhcargadosbateria: kWhcargadosbateria\n }\n }\n]","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":100,"wires":[["ac020f40.223b8"]]},{"id":"ac020f40.223b8","type":"delay","z":"d6f0bdfd.25185","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":610,"y":100,"wires":[["b441b320.82186","65aa94db.953bfc","1273abf0.344114","fe001a4f.4b4668","9ea21f5b.2f907","76d3ff8e.4b20c","b1da3104.08222"]]},{"id":"b441b320.82186","type":"ui_gauge","z":"d6f0bdfd.25185","name":"","group":"f0f0092e.8794b8","order":3,"width":"6","height":"3","gtype":"gage","title":"SoC","label":"","format":"{{msg.payload.SOC}} %","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":810,"y":40,"wires":[]},{"id":"729a9a9d.94ce64","type":"comment","z":"d6f0bdfd.25185","name":"BMV Bateria","info":"","x":390,"y":60,"wires":[]},{"id":"4947b31f.f0abec","type":"serial in","z":"d6f0bdfd.25185","name":"","serial":"19f77576.0c356b","x":180,"y":100,"wires":[["a9e967a8.0de618"]]},{"id":"65aa94db.953bfc","type":"switch","z":"d6f0bdfd.25185","name":"Tension de carga","property":"payload.SOC","propertyType":"msg","rules":[{"t":"lt","v":"92","vt":"num"},{"t":"gt","v":"92","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":190,"y":280,"wires":[["d0c699ea.27d8e8"],["94d49443.dcb348"]]},{"id":"d0c699ea.27d8e8","type":"function","z":"d6f0bdfd.25185","name":"","func":"msg.payload=\"PCVV56.0\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":260,"wires":[["99d3ae08.467bd"]]},{"id":"94d49443.dcb348","type":"function","z":"d6f0bdfd.25185","name":"","func":"msg.payload=\"PCVV54.0\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":300,"wires":[["4ce051b8.3ce8d"]]},{"id":"99d3ae08.467bd","type":"delay","z":"d6f0bdfd.25185","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"300","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":260,"wires":[["cbc6a793.a19bb8"]]},{"id":"4ce051b8.3ce8d","type":"delay","z":"d6f0bdfd.25185","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"300","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":300,"wires":[["cbc6a793.a19bb8"]]},{"id":"1273abf0.344114","type":"switch","z":"d6f0bdfd.25185","name":"Prioridad por SOC","property":"payload.SOC","propertyType":"msg","rules":[{"t":"lt","v":"20","vt":"num"},{"t":"gt","v":"25","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":190,"y":360,"wires":[["c57160fc.9f173"],["fafefa5b.fdb6f8"]]},{"id":"c57160fc.9f173","type":"function","z":"d6f0bdfd.25185","name":"","func":"msg.payload=\"POP01\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":340,"wires":[["7ab8ec65.400a04"]]},{"id":"fafefa5b.fdb6f8","type":"function","z":"d6f0bdfd.25185","name":"","func":"msg.payload=\"POP02\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":380,"wires":[["13683db8.8464c2"]]},{"id":"7ab8ec65.400a04","type":"delay","z":"d6f0bdfd.25185","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"600","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":340,"wires":[["cbc6a793.a19bb8"]]},{"id":"13683db8.8464c2","type":"delay","z":"d6f0bdfd.25185","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"600","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":380,"wires":[["cbc6a793.a19bb8"]]},{"id":"236eea96.58b066","type":"rpi-gpio out","z":"d6f0bdfd.25185","name":"Termo 80L","pin":"26","set":true,"level":"0","freq":"","out":"out","x":930,"y":640,"wires":[]},{"id":"b1da3104.08222","type":"switch","z":"d6f0bdfd.25185","name":"Termo Agua 80L","property":"payload.SOC","propertyType":"msg","rules":[{"t":"gt","v":"67","vt":"num"},{"t":"lt","v":"65","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":180,"y":660,"wires":[["2dba1d7e.ef6512"],["6d9041e4.72b7"]]},{"id":"2dba1d7e.ef6512","type":"delay","z":"d6f0bdfd.25185","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"60","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":400,"y":640,"wires":[["94a70092.05924"]]},{"id":"6d9041e4.72b7","type":"delay","z":"d6f0bdfd.25185","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"45","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":400,"y":680,"wires":[["e8b59718.ad4538"]]},{"id":"ceeaa1bb.77409","type":"rpi-gpio out","z":"d6f0bdfd.25185","name":"Termo 200L","pin":"24","set":true,"level":"0","freq":"","out":"out","x":930,"y":740,"wires":[]},{"id":"76d3ff8e.4b20c","type":"switch","z":"d6f0bdfd.25185","name":"Termo Agua 200L","property":"payload.SOC","propertyType":"msg","rules":[{"t":"gt","v":"87","vt":"num"},{"t":"lt","v":"86","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":190,"y":740,"wires":[["52c19fd6.9e7a2"],["8d2d3752.f15ce8"]]},{"id":"52c19fd6.9e7a2","type":"delay","z":"d6f0bdfd.25185","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"60","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":400,"y":720,"wires":[["93af6eb5.c55c2"]]},{"id":"8d2d3752.f15ce8","type":"delay","z":"d6f0bdfd.25185","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"45","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":400,"y":760,"wires":[["1718d1b6.59c8fe"]]},{"id":"b6789c2e.15351","type":"comment","z":"d6f0bdfd.25185","name":"Controles en base a SoC","info":"","x":430,"y":180,"wires":[]},{"id":"93af6eb5.c55c2","type":"timerswitch","z":"d6f0bdfd.25185","name":"","ontopic":"","offtopic":"","onpayload":"1","offpayload":"0","disabled":false,"schedules":[{"on_h":"11","on_m":"00","on_s":"00","off_h":"17","off_m":"20","off_s":"00","valid":true}],"x":590,"y":740,"wires":[["6c7543e7.6ca8ac","ceeaa1bb.77409"]]},{"id":"bfb6c218.cd8e","type":"function","z":"510263c3.2cdeec","name":"CRCTJ 7200w","func":" // Algoritmo para lanzar los comandos hacia Voltronics con CRC propietario\n // Algoritmo realizado por Tejota \n var topic = (msg.payload) + (\" \") + (msg.topic); // Topic con el comando string y posible descripcion\n var comandobuffer = Buffer.from(msg.payload); // pasando a buffer el string del comando \n var crc = 0x0000; // inicio del crc\n for (tj = 0; tj < comandobuffer.length; tj++) // scaneo del buffer\n {\n const byte = comandobuffer[tj]; // analizando el byte para aplicarle el crc16xmodem\n tejota = (crc >>> 8) & 0xff;\n tejota ^= byte & 0xff;\n tejota ^= tejota >>> 4;\n crc = (crc << 8) & 0xffff; // Algoritmo\n crc ^= tejota; // crc16 xmodem \n tejota = (tejota << 5) & 0xffff; // sin tabla estatica\n crc ^= tejota;\n tejota = (tejota << 7) & 0xffff;\n crc ^= tejota;\n } // resultante crc numerico \n var crchexastring = crc.toString(16).padStart(4,'0'); // crc numerico a string hexa añadiendo ceros a izquierda si es preciso\n var crchexabuffer = Buffer.from(crchexastring, \"hex\"); // buffer del crchexa\n for (mdk=0; mdk < crchexabuffer.length; mdk++) // scaneo del buffer\n {\n if (crchexabuffer[mdk]==10 || crchexabuffer[mdk]==13 || crchexabuffer[mdk]==40) // Exceptuando estos bytes mdk \n {\n crchexabuffer[mdk]++; // se pone el byte siguiente si es alguno de las excepciones mdk\n }\n } \n const retornodecarro = Buffer.from(\"\\r\");\n var crctotalbuffer = [comandobuffer, crchexabuffer, retornodecarro]; // construyendo el buffer final hacia el hibrido\n msg.payload = Buffer.concat(crctotalbuffer);\n msg.topic = topic;\n return msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":660,"wires":[["68a41506.e847bc"]]},{"id":"a718fcb0.1511d","type":"link out","z":"510263c3.2cdeec","name":"Respuesta Puerto serie","links":["727c0ad6.915784"],"x":1470,"y":660,"wires":[],"l":true},{"id":"e109da12.e0f838","type":"comment","z":"510263c3.2cdeec","name":"Comunicacion Puerto Serie","info":"","x":1210,"y":620,"wires":[]},{"id":"a59749c7.670148","type":"switch","z":"510263c3.2cdeec","name":"Repartidor Datos Lecturas","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"QID Numero de Serie","vt":"str"},{"t":"eq","v":"QPIGS Estado General","vt":"str"},{"t":"eq","v":"QVFW Version CPU1","vt":"str"},{"t":"eq","v":"QVFW3 Firmware CPU3","vt":"str"},{"t":"eq","v":"QFLAG Miscelanea","vt":"str"},{"t":"eq","v":"QPIRI Configuracion","vt":"str"},{"t":"eq","v":"QBEQI Ecualizacion Bateria","vt":"str"},{"t":"eq","v":"QPIWS Informacion Warnings","vt":"str"},{"t":"eq","v":"QMOD Modo de Trabajo","vt":"str"},{"t":"eq","v":"QPIGS2 Campo2","vt":"str"},{"t":"eq","v":"QLED Barra LED","vt":"str"},{"t":"cont","v":"energiaproducidadiaria","vt":"str"},{"t":"cont","v":"cargadiariaentregada","vt":"str"}],"checkall":"true","repair":false,"outputs":13,"x":830,"y":300,"wires":[["f1e91b17.6285d8"],["5911b409.bac47c"],["530a2970.2ceec8"],["6246b51a.6fa9fc"],["853c6ff8.f80b"],["bda4136b.8efde"],["1805a453.7a3b8c"],["e6bce707.5ee798"],["56939100.8b6c7"],["36bf2160.ae7dae"],["e191d503.991798"],["6022d36e.b8765c"],["6a936fd6.d5bf8"]]},{"id":"dc95b930.397b48","type":"comment","z":"510263c3.2cdeec","name":"Repartiendo por topic","info":"","x":840,"y":180,"wires":[]},{"id":"853c6ff8.f80b","type":"function","z":"510263c3.2cdeec","name":"QFLAGExtraccion","func":"var output = msg.payload.substr(1, 11);\nvar E = output.indexOf(\"E\")+1;\nvar D = output.indexOf(\"D\");\nvar enables = output.substr(E, (D-E));\nvar disables = output.substr(D+1);\nswitch (enables.includes(\"a\")){\n case true:\n buzzer = 1;\n break;\n case false: \n buzzer = 0;\n} \nswitch (enables.includes(\"b\")){\n case true:\n bypassoverload = 1;\n break;\n case false:\n bypassoverload = 0;\n break;\n} \nswitch (enables.includes(\"k\")){\n case true:\n guardapantallalcd = 1;\n break;\n case false: \n guardapantallalcd = 0;\n} \nswitch (enables.includes(\"j\")){\n case true:\n powersaving = 1;\n break;\n case false:\n powersaving = 0;\n break;\n} \nswitch (enables.includes(\"u\")){\n case true:\n overloadrestart = 1;\n break;\n case false: \n overloadrestart = 0;\n} \nswitch (enables.includes(\"v\")){\n case true:\n overtemperaturerestart = 1;\n break;\n case false:\n overtemperaturerestart = 0;\n break;\n}\nswitch (enables.includes(\"x\")){\n case true:\n luzlcd = 1;\n break;\n case false:\n luzlcd = 0;\n break;\n} \nswitch (enables.includes(\"y\")){\n case true:\n pitidosifuenteprimariafalla = 1;\n break;\n case false:\n pitidosifuenteprimariafalla = 0;\n break;\n} \nswitch (enables.includes(\"z\")){\n case true:\n grabarerrores = 1;\n break;\n case false:\n grabarerrores = 0;\n break;\n} \nreturn [\n {\n payload: {\n buzzer: buzzer,\n bypassoverload: bypassoverload,\n guardapantallalcd: guardapantallalcd,\n powersaving: powersaving,\n overloadrestart: overloadrestart,\n overtemperaturerestart: overtemperaturerestart,\n luzlcd: luzlcd,\n pitidosifuenteprimariafalla: pitidosifuenteprimariafalla,\n grabarerrores: grabarerrores,\n }\n }\n]\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1090,"y":240,"wires":[["cfde637b.5b64d"]]},{"id":"5911b409.bac47c","type":"function","z":"510263c3.2cdeec","name":"QPIGSExtraccion","func":"var output = msg.payload.split(\" \");\nlet voltajered = parseFloat(output[0].slice(1, 5));\nlet frecuenciared = parseFloat(output[1]);\nlet voltajesalida = parseFloat(output[2]);\nlet frecuenciasalida = parseFloat(output[3]);\nlet potenciaparentesalida = parseInt(output[4]);\nlet potenciaactivasalida = parseInt(output[5]);\nlet porcentajecargasalida = parseInt(output[6]);\nlet voltajebusalta = parseInt(output[7]);\nlet voltajebateria = parseFloat(output[8]);\nlet amperioscargabat = parseInt(output[9]);\nlet capacidadbateria = parseInt(output[10]);\nlet temperaturainversor = parseInt(output[11]);\nlet amperiosenplaca = parseInt(output[12]);\nlet voltajeenplaca = parseInt(output[13]);\nlet voltajescc = parseFloat(output[14]);\nlet amperiosdescargabat = parseInt(output[15]);\nlet prioridadSBU = parseInt(output[16].slice(0,1));\nlet estadoconf = parseInt(output[16].slice(1,2));\nlet estadoscc = parseInt(output[16].slice(2,3));\nlet cargasconectadas = parseInt(output[16].slice(3,4));\nlet voltajeconstantemientrascarga = parseInt(output[16].slice(4,5));\nlet estadodecargageneral = parseInt(output[16].slice(5,6));\nlet estadodecargasolar = parseInt(output[16].slice(6,7));\nlet estadodecargared = parseInt(output[16].slice(7,9));\nlet potenciaenplaca = parseInt(output[19]);\nlet estadodelmppt = parseInt(output[20].slice(0,1));\nlet estadodelswitch = parseInt(output[20].slice(1,2));\nreturn [\n {\n payload: {\n voltajered: voltajered,\n frecuenciared: frecuenciared,\n voltajesalida: voltajesalida,\n frecuenciasalida: frecuenciasalida,\n potenciaparentesalida: potenciaparentesalida,\n potenciaactivasalida: potenciaactivasalida,\n porcentajecargasalida: porcentajecargasalida,\n voltajebateria: voltajebateria,\n amperiosdescargabat: amperiosdescargabat,\n amperioscargabat: amperioscargabat,\n temperaturainversor: temperaturainversor,\n potenciaenplaca: potenciaenplaca,\n voltajeenplaca: voltajeenplaca,\n estadodelmppt: estadodelmppt,\n cargasconectadas: cargasconectadas,\n voltajebusalta: voltajebusalta,\n capacidadbateria: capacidadbateria,\n amperiosenplaca: amperiosenplaca, \n voltajescc: voltajescc,\n prioridadSBU: prioridadSBU,\n estadoconf: estadoconf,\n estadoscc: estadoscc,\n voltajeconstantemientrascarga: voltajeconstantemientrascarga,\n estadodecargageneral: estadodecargageneral,\n estadodecargasolar: estadodecargasolar,\n estadodecargared: estadodecargared,\n estadodelswitch: estadodelswitch\n }\n }\n];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1090,"y":120,"wires":[["cfde637b.5b64d","9dc14f57.de8c3","7045423e.190d0c","e2380980.b95918","5b8594c.e18336c"]]},{"id":"bda4136b.8efde","type":"function","z":"510263c3.2cdeec","name":"QPIRIExtraccion","func":"var output = msg.payload.split(\" \");\nlet voltajeredconf = parseFloat((output[0].slice(1, 5)));\nlet amperiosredmaxconf = parseFloat(output[1]);\nlet voltajesalidaconf = parseFloat(output[2]);\nlet frecuenciasalidaconf = parseFloat(output[3]);\nlet amperiossalidaconf = parseFloat(output[4]);\nlet potenciaaparentesalidaconf = parseFloat(output[5]);\nlet potenciaactivasalidaconf = parseFloat(output[6]);\nlet voltajebateriaconf = parseInt(output[7]);\nlet voltajelimitedescargabatconf = parseFloat(output[8]);\nlet voltajelimiterecargabatconf = parseFloat(output[22]);\nlet voltajeminimoparacorteconf = parseFloat(output[9]);\nlet voltajeabsorcionconf = parseFloat(output[10]);\nlet voltajeflotacionconf = parseFloat(output[11]);\nlet tipodebateriaconf = parseInt(output[12]);\nlet amperiosmaxcargadorbatconf = parseInt(output[13]);\nlet amperiosmaxtotalesabatconf = parseInt(output[14]);\nlet rangovoltajedentradaconf = parseInt(output[15]);\nlet prioridadfuentesalidaconf = parseInt(output[16]);\nlet prioridadcargadorbatconf = parseInt(output[17]);\nlet maximonumeroparalelosconf = parseInt(output[18]);\nlet tipodemaquina = parseInt(output[19]);\nlet tipodehibridoconf = parseInt(output[20]);\nlet tipodesalidaparaleloconf = parseInt(output[21]);\nlet potenciasolarparaleloconf = parseInt(output[23]);\nlet potenciasolarbalanceconf = parseInt(output[24]);\nglobal.set('voltajeabsorcionconfmax0' , voltajeabsorcionconf);\nglobal.set('voltajeflotacionconfmax0' , voltajeflotacionconf);\nreturn [\n {\n payload: {\n voltajeredconf: voltajeredconf,\n amperiosredmaxconf: amperiosredmaxconf,\n voltajesalidaconf: voltajesalidaconf,\n frecuenciasalidaconf: frecuenciasalidaconf,\n amperiossalidaconf: amperiossalidaconf,\n potenciaaparentesalidaconf: potenciaaparentesalidaconf,\n potenciaactivasalidaconf: potenciaactivasalidaconf,\n voltajebateriaconf: voltajebateriaconf,\n voltajelimiterecargabatconf: voltajelimiterecargabatconf,\n voltajelimitedescargabatconf: voltajelimitedescargabatconf,\n voltajeminimoparacorteconf: voltajeminimoparacorteconf,\n voltajeabsorcionconf: voltajeabsorcionconf,\n voltajeflotacionconf: voltajeflotacionconf,\n tipodebateriaconf: tipodebateriaconf,\n amperiosmaxcargadorbatconf: amperiosmaxcargadorbatconf,\n amperiosmaxtotalesabatconf: amperiosmaxtotalesabatconf,\n rangovoltajedentradaconf: rangovoltajedentradaconf,\n prioridadfuentesalidaconf: prioridadfuentesalidaconf,\n prioridadcargadorbatconf: prioridadcargadorbatconf,\n maximonumeroparalelosconf: maximonumeroparalelosconf,\n tipodemaquina: tipodemaquina,\n tipodehibridoconf: tipodehibridoconf,\n tipodesalidaparaleloconf: tipodesalidaparaleloconf,\n potenciasolarparaleloconf: potenciasolarparaleloconf,\n potenciasolarbalanceconf: potenciasolarbalanceconf\n }\n }\n]","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":280,"wires":[["cfde637b.5b64d","19407807.7a9508","70bed45a.0989ec"]]},{"id":"530a2970.2ceec8","type":"function","z":"510263c3.2cdeec","name":"QVFW Extraccion U1","func":"var output = msg.payload;\nlet Firmware = (output.slice(10, 15));\nreturn [\n {\n payload: {\n Firmware: Firmware\n }\n }\n]","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1100,"y":160,"wires":[["cfde637b.5b64d"]]},{"id":"6246b51a.6fa9fc","type":"function","z":"510263c3.2cdeec","name":"QVFW3 Firmware U3","func":"var output = msg.payload;\nlet Firmware3 = (output.slice(10, 15));\nreturn [\n {\n payload: {\n Firmware3: Firmware3\n }\n }\n]","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1100,"y":200,"wires":[["cfde637b.5b64d"]]},{"id":"1805a453.7a3b8c","type":"function","z":"510263c3.2cdeec","name":"QBEQI Ecu Extrac","func":"var output = msg.payload.split(\" \");\nlet activacionecualizacion = parseInt(output[0].slice(1, 2));\nlet tiempoecualizacion = parseInt(output[1]);\nlet diasentreecualizaciones = parseInt(output[2]);\nlet maxamperiosparaecualizar = parseInt(output[3]);\nlet diasquefaltanparaecualizar = parseInt(output[4]);\nlet voltajedeecualizacion = parseFloat(output[5]);\nlet tiempodeabsorcion = parseInt(output[6]);\nlet timeoutecualizacion = parseInt(output[7]);\nreturn [\n {\n payload: {\n activacionecualizacion: activacionecualizacion,\n tiempoecualizacion: tiempoecualizacion,\n diasentreecualizaciones: diasentreecualizaciones,\n maxamperiosparaecualizar: maxamperiosparaecualizar,\n diasquefaltanparaecualizar: diasquefaltanparaecualizar,\n voltajedeecualizacion: voltajedeecualizacion,\n tiempodeabsorcion: tiempodeabsorcion,\n timeoutecualizacion: timeoutecualizacion\n }\n }\n]","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1090,"y":320,"wires":[["cfde637b.5b64d"]]},{"id":"f1e91b17.6285d8","type":"function","z":"510263c3.2cdeec","name":"QID Nº Serie Extrac","func":"var numerodeserie = msg.payload.slice(1, 15);\nflow.set('numerodeserie', numerodeserie);\nreturn [\n {\n payload: {\n numerodeserie: numerodeserie\n }\n }\n];\n// Numero de Serie va a flow o incluso podria ir a global para identificar en paralelos ","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1100,"y":80,"wires":[["cfde637b.5b64d"]]},{"id":"94f71cfa.a2b7c","type":"comment","z":"510263c3.2cdeec","name":"Extractores","info":"","x":1090,"y":40,"wires":[]},{"id":"e6bce707.5ee798","type":"function","z":"510263c3.2cdeec","name":"QPIWS Warnings Extrac","func":"var output = msg.payload;\nlet reservado = parseInt(output.slice(1, 2));\nlet falloinversor = parseInt(output.slice(2, 3));\nlet fallo08voltajebusalto = parseInt(output.slice(3, 4));\nlet fallo52voltajebusbajo = parseInt(output.slice(4, 5));\nlet fallo09softwarebus = parseInt(output.slice(5, 6));\nlet peligronoacinput = parseFloat(output.slice(6, 7));\nlet peligrocortopv = parseInt(output.slice(7, 8));\nlet fallo58voltajeinversorbajo = parseInt(output.slice(8, 9));\nlet fallo06voltajeinversoralto = parseInt(output.slice(9, 10));\nlet peligro02sobretemperatura = parseInt(output.slice(10, 11));\nlet peligro01ventilador = parseInt(output.slice(11, 12));\nlet peligro03altovoltajebateria = parseInt(output.slice(12, 13));\nlet peligro04bajovoltajebateria = parseInt(output.slice(13, 14));\nlet peligro07sobrecargar = parseInt(output.slice(14, 15));\nlet peligrobateriashutdown = parseInt(output.slice(15, 16));\nlet peligro10bateriaderating = parseInt(output.slice(16, 17));\nlet peligroeeprom = parseInt(output.slice(17, 18));\nlet fallo51sobrecorriente = parseInt(output.slice(18, 19));\nlet fallosoftwareinversor = parseInt(output.slice(19, 20));\nlet falloautotest = parseInt(output.slice(20, 21));\nlet fallo55continuaenac = parseInt(output.slice(21, 22));\nlet fallo56bateriaabierta = parseInt(output.slice(22, 23));\nlet fallo57sensorcorriente = parseInt(output.slice(23, 24));\nlet fallocortobateria = parseInt(output.slice(24, 25));\nlet peligrolimitepotencia = parseInt(output.slice(25, 26));\nlet peligro13altovoltajeplaca = parseInt(output.slice(26, 27));\nlet fallompptsobrecarga = parseInt(output.slice(27, 28));\nlet peligro14mpptsobrecarga = parseInt(output.slice(28, 29));\nlet peligro12bateriabajaparamppt = parseInt(output.slice(29, 30));\nreturn [\n {\n payload: {\n falloinversor: falloinversor,\n fallo08voltajebusalto: fallo08voltajebusalto,\n fallo52voltajebusbajo: fallo52voltajebusbajo,\n fallo09softwarebus: fallo09softwarebus,\n peligronoacinput: peligronoacinput,\n peligrocortopv: peligrocortopv,\n fallo58voltajeinversorbajo: fallo58voltajeinversorbajo,\n fallo06voltajeinversoralto: fallo06voltajeinversoralto,\n peligro02sobretemperatura: peligro02sobretemperatura,\n peligro01ventilador: peligro01ventilador,\n peligro03altovoltajebateria: peligro03altovoltajebateria,\n peligro04bajovoltajebateria: peligro04bajovoltajebateria,\n peligro07sobrecargar: peligro07sobrecargar,\n peligrobateriashutdown: peligrobateriashutdown,\n peligro10bateriaderating: peligro10bateriaderating,\n peligroeeprom: peligroeeprom,\n fallo51sobrecorriente: fallo51sobrecorriente,\n fallosoftwareinversor: fallosoftwareinversor,\n falloautotest: falloautotest,\n fallo55continuaenac: fallo55continuaenac,\n fallo56bateriaabierta: fallo56bateriaabierta,\n fallo57sensorcorriente: fallo57sensorcorriente,\n fallocortobateria: fallocortobateria,\n peligro13altovoltajeplaca: peligro13altovoltajeplaca,\n fallompptsobrecarga: fallompptsobrecarga,\n peligro14mpptsobrecarga: peligro14mpptsobrecarga,\n peligro12bateriabajaparamppt: peligro12bateriabajaparamppt\n }\n }\n]","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1110,"y":360,"wires":[["60321c3c.aa1414"]]},{"id":"cfde637b.5b64d","type":"join","z":"510263c3.2cdeec","name":"Juntando Todo 4 s","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"4","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1370,"y":300,"wires":[["1536e556.d7e3cb"]]},{"id":"56939100.8b6c7","type":"function","z":"510263c3.2cdeec","name":"QMOD Extractor","func":"var output = msg.payload;\nlet mdts = output.slice(1, 2);\nlet mododetrabajo;\nif (mdts === \"P\") {\n mododetrabajo = 0;\n} else if (mdts === \"S\") {\n mododetrabajo = 1;\n} else if (mdts === \"L\") {\n mododetrabajo = 2;\n} else if (mdts === \"B\") {\n mododetrabajo = 3;\n} else if (mdts === \"F\") {\n mododetrabajo = 4;\n} else if (mdts === \"H\") {\n mododetrabajo = 5;\n} \nreturn [{\n payload: {\n mododetrabajo: mododetrabajo\n }\n }\n ];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":400,"wires":[["cfde637b.5b64d"]]},{"id":"36bf2160.ae7dae","type":"function","z":"510263c3.2cdeec","name":"QPIGS2Extraccion","func":"var output = msg.payload.split(\" \");\nlet amperiosenplaca2 = parseInt(output[0].slice(1, 5));\nlet voltajeenplaca2 = parseInt(output[1]);\nlet potenciaenplaca2 = parseInt(output[2]);\nreturn [\n {\n payload: {\n potenciaenplaca2: potenciaenplaca2,\n voltajeenplaca2: voltajeenplaca2,\n amperiosenplaca2: amperiosenplaca2\n }\n }\n];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1090,"y":440,"wires":[["cfde637b.5b64d","7045423e.190d0c","6b8a783e.67f588","5b8594c.e18336c"]]},{"id":"e191d503.991798","type":"function","z":"510263c3.2cdeec","name":"QLEDExtraccion","func":"var output = msg.payload.split(\" \");\nlet led = parseInt(output[0].slice(1, 2));\nlet ledvelocidad = parseInt(output[1]);\nlet ledefectos = parseInt(output[2]);\nlet ledbrillo = parseInt(output[3]);\nlet ledcosa = parseInt(output[4]);\nlet colorred = (output[5].slice(0,9));\nlet colorsolar = (output[5].slice(9,18));\nlet colorbateria = (output[5].slice(18,27));\nreturn [\n {\n payload: {\n led: led,\n ledvelocidad: ledvelocidad,\n ledefectos: ledefectos,\n ledbrillo: ledbrillo,\n ledcosa: ledcosa,\n colorred: colorred,\n colorsolar: colorsolar,\n colorbateria: colorbateria\n }\n }\n];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":480,"wires":[["cfde637b.5b64d"]]},{"id":"6022d36e.b8765c","type":"function","z":"510263c3.2cdeec","name":"QED Energia diaria producida","func":"var energiadiaria = parseInt(msg.payload.slice(1, 9));\nreturn [\n {\n payload: {\n energiadiaria: energiadiaria\n }\n }\n];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1130,"y":520,"wires":[["cfde637b.5b64d","9da412f7.298d3","7045423e.190d0c"]]},{"id":"6a936fd6.d5bf8","type":"function","z":"510263c3.2cdeec","name":"QLD Carga diaria entregada","func":"var cargadiariaentregada = parseInt(msg.payload.slice(1, 9));\nreturn [\n {\n payload: {\n cargadiariaentregada: cargadiariaentregada\n }\n }\n];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1120,"y":560,"wires":[["cfde637b.5b64d","cf24c175.93e22"]]},{"id":"bd4acf70.39a25","type":"inject","z":"510263c3.2cdeec","name":"QPIRI Configuracion","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Configuracion","payload":"QPIRI","payloadType":"str","x":180,"y":300,"wires":[["1ca333d9.5fedfc"]]},{"id":"2bbf93f9.a0f16c","type":"inject","z":"510263c3.2cdeec","name":"QFLAG Miscelanea","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Miscelanea","payload":"QFLAG","payloadType":"str","x":180,"y":260,"wires":[["1ca333d9.5fedfc"]]},{"id":"ba923259.13b94","type":"inject","z":"510263c3.2cdeec","name":"QBEQI Ecualizacion Bateria","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Ecualizacion Bateria","payload":"QBEQI","payloadType":"str","x":210,"y":340,"wires":[["1ca333d9.5fedfc"]]},{"id":"ac79947a.fc8128","type":"inject","z":"510263c3.2cdeec","name":"QPIWS Informacion Warnings","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Informacion Warnings","payload":"QPIWS","payloadType":"str","x":210,"y":380,"wires":[["1ca333d9.5fedfc"]]},{"id":"146e5805.f77c98","type":"inject","z":"510263c3.2cdeec","name":"QPIGS Estado General","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Estado General","payload":"QPIGS","payloadType":"str","x":190,"y":140,"wires":[["1ca333d9.5fedfc"]]},{"id":"23474f37.7e773","type":"inject","z":"510263c3.2cdeec","name":"QID Numero de Serie","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Numero de Serie","payload":"QID","payloadType":"str","x":180,"y":100,"wires":[["1ca333d9.5fedfc"]]},{"id":"733da488.b6129c","type":"inject","z":"510263c3.2cdeec","name":"QVFW Firmware CPU1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Version CPU1","payload":"QVFW","payloadType":"str","x":190,"y":180,"wires":[["1ca333d9.5fedfc"]]},{"id":"83a0a7a8.3127c8","type":"inject","z":"510263c3.2cdeec","name":"QVFW3 Firmware CPU3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Firmware CPU3","payload":"QVFW3","payloadType":"str","x":190,"y":220,"wires":[["1ca333d9.5fedfc"]]},{"id":"1ca333d9.5fedfc","type":"link out","z":"510263c3.2cdeec","name":"EntradaalCRC","links":["c4b0af1.d0bce5"],"x":600,"y":380,"wires":[],"l":true},{"id":"2f3caf61.4fac8","type":"comment","z":"510263c3.2cdeec","name":"Comandos de monitorizacion cada 4 segundos","info":"Comandos de Monitorizacion","x":240,"y":60,"wires":[]},{"id":"fa01b393.426c2","type":"inject","z":"510263c3.2cdeec","name":"QMOD Modo de Trabajo","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Modo de Trabajo","payload":"QMOD","payloadType":"str","x":190,"y":420,"wires":[["1ca333d9.5fedfc"]]},{"id":"91aa5689.9c9758","type":"inject","z":"510263c3.2cdeec","name":"QPIGS2 Segundo Campo","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Campo2","payload":"QPIGS2","payloadType":"str","x":200,"y":460,"wires":[["1ca333d9.5fedfc"]]},{"id":"1e5af6ec.c3f109","type":"inject","z":"510263c3.2cdeec","name":"DAT Ajuste de Fecha","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 04 * * *","once":false,"onceDelay":0.1,"topic":"ajustedetiempo","payload":"DAT","payloadType":"str","x":180,"y":500,"wires":[["f3d6a3c3.3da18"]]},{"id":"e7e718d0.481778","type":"function","z":"510263c3.2cdeec","name":"FormatoTiempo","func":"var comando = msg.payload;\nvar aa = msg.myyear.slice(2,4);\nvar mm = msg.mymonthn;\nvar dd = msg.mydom;\nvar hh = msg.myhour;\nvar ff = msg.myminute;\nvar ss = msg.mysecond;\nmsg.payload = comando + aa + mm + dd + hh + ff + ss;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":320,"y":540,"wires":[["1ca333d9.5fedfc"]]},{"id":"23d89fb5.a6423","type":"inject","z":"510263c3.2cdeec","name":"QLED Barra LED","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":false,"onceDelay":0.1,"topic":"Barra LED","payload":"QLED","payloadType":"str","x":170,"y":580,"wires":[["1ca333d9.5fedfc"]]},{"id":"e8345858.2f45f8","type":"inject","z":"510263c3.2cdeec","name":"Energiaproducidadiaria","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"energiaproducidadiaria","payload":"QED","payloadType":"str","x":190,"y":620,"wires":[["44b3130.5b42fec"]]},{"id":"6fe11148.ab85c","type":"inject","z":"510263c3.2cdeec","name":"Cargadiariaentregada","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"cargadiariaentregada","payload":"QLD","payloadType":"str","x":190,"y":660,"wires":[["81d1fced.16599"]]},{"id":"ec7f1ed7.67a94","type":"function","z":"510263c3.2cdeec","name":"FormatoTiempo","func":"var comando = msg.payload;\nvar aa = msg.myyear;\nvar mm = msg.mymonthn;\nvar dd = msg.mydom;\nmsg.payload = comando + aa + mm + dd;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":560,"y":620,"wires":[["1ca333d9.5fedfc"]]},{"id":"9af8d033.3243e","type":"function","z":"510263c3.2cdeec","name":"FormatoTiempo","func":"var comando = msg.payload;\nvar aa = msg.myyear;\nvar mm = msg.mymonthn;\nvar dd = msg.mydom;\nmsg.payload = comando + aa + mm + dd;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":560,"y":660,"wires":[["1ca333d9.5fedfc"]]},{"id":"99b605de.ca2aa8","type":"comment","z":"510263c3.2cdeec","name":"Monitorizacion para Hibrido AXPERT MAX SINGLE ","info":"","x":710,"y":60,"wires":[]},{"id":"ded361bb.5c984","type":"link out","z":"510263c3.2cdeec","name":"TodasLecturasAXPERTMAX7.2","links":["b0d4c74e.313558"],"x":1690,"y":360,"wires":[],"l":true},{"id":"6113564d.8b0ff8","type":"comment","z":"510263c3.2cdeec","name":"Creando Objeto con todas las lecturas del Hibrido","info":"","x":1460,"y":260,"wires":[]},{"id":"1536e556.d7e3cb","type":"function","z":"510263c3.2cdeec","name":"Id en topic num serie","func":"var topic = flow.get('numerodeserie');\nmsg.topic = topic;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1580,"y":300,"wires":[["ded361bb.5c984","4eb3d5c2.0fea4c"]]},{"id":"c4b0af1.d0bce5","type":"link in","z":"510263c3.2cdeec","name":"EntradaalCRC","links":["1ca333d9.5fedfc"],"x":850,"y":660,"wires":[["bfb6c218.cd8e"]],"l":true},{"id":"727c0ad6.915784","type":"link in","z":"510263c3.2cdeec","name":"Respuesta Puerto serie","links":["a718fcb0.1511d"],"x":600,"y":300,"wires":[["a59749c7.670148"]],"l":true},{"id":"60321c3c.aa1414","type":"rbe","z":"510263c3.2cdeec","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","x":1330,"y":360,"wires":[["cfde637b.5b64d"]]},{"id":"f3d6a3c3.3da18","type":"simpletime","z":"510263c3.2cdeec","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":150,"y":540,"wires":[["e7e718d0.481778"]]},{"id":"44b3130.5b42fec","type":"simpletime","z":"510263c3.2cdeec","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":390,"y":620,"wires":[["ec7f1ed7.67a94"]]},{"id":"81d1fced.16599","type":"simpletime","z":"510263c3.2cdeec","name":"","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":390,"y":660,"wires":[["9af8d033.3243e"]]},{"id":"68a41506.e847bc","type":"serial request","z":"510263c3.2cdeec","name":"","serial":"15069ddb.963d52","x":1250,"y":660,"wires":[["a718fcb0.1511d","ffd51bb6.44b048"]]},{"id":"9da412f7.298d3","type":"ui_gauge","z":"510263c3.2cdeec","name":"","group":"c44c96ba.8c4278","order":4,"width":"3","height":"3","gtype":"gage","title":"Energia Generada MAX 7.2","label":"","format":"{{payload.energiadiaria}} wh","min":0,"max":"30000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1480,"y":520,"wires":[]},{"id":"cf24c175.93e22","type":"ui_gauge","z":"510263c3.2cdeec","name":"","group":"c44c96ba.8c4278","order":5,"width":"3","height":"3","gtype":"gage","title":"Energía Consumida MAX 7.2","label":"","format":"{{payload.cargadiariaentregada}} wh","min":0,"max":"40000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1490,"y":560,"wires":[]},{"id":"cbc6a793.a19bb8","type":"link out","z":"d6f0bdfd.25185","name":"Control BMV OUT","links":["4d2d866e.4d33c8","ca9541cf.7b2a7","ef3e6756.0ab4c8"],"x":775,"y":320,"wires":[]},{"id":"fe001a4f.4b4668","type":"ui_gauge","z":"d6f0bdfd.25185","name":"","group":"f0f0092e.8794b8","order":9,"width":"3","height":"3","gtype":"gage","title":"Tension Bateria","label":"","format":"{{payload.VoltajeBateria}} V","min":"48","max":"56","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":840,"y":80,"wires":[]},{"id":"9ea21f5b.2f907","type":"ui_gauge","z":"d6f0bdfd.25185","name":"","group":"f0f0092e.8794b8","order":9,"width":"3","height":"3","gtype":"gage","title":"Potencia Bateria","label":"","format":"{{payload.PotenciaInstantanea}} W","min":"-6000","max":"6000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":850,"y":120,"wires":[]},{"id":"9dc14f57.de8c3","type":"ui_gauge","z":"510263c3.2cdeec","name":"","group":"a5ca3b79.b7e978","order":11,"width":"6","height":"3","gtype":"gage","title":"Potencia Salida","label":"","format":"{{payload.potenciaactivasalida}} W","min":0,"max":"7200","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1520,"y":120,"wires":[]},{"id":"4d2d866e.4d33c8","type":"link in","z":"5f6fa704.5343c8","name":"Control BMV IN","links":["cbc6a793.a19bb8"],"x":855,"y":600,"wires":[["90de9d2.931da6"]]},{"id":"94a70092.05924","type":"timerswitch","z":"d6f0bdfd.25185","name":"","ontopic":"","offtopic":"","onpayload":"1","offpayload":"0","disabled":false,"schedules":[{"on_h":"09","on_m":"00","on_s":"00","off_h":"14","off_m":"10","off_s":"00","valid":true}],"x":590,"y":640,"wires":[["b0c5111.86486f","236eea96.58b066"]]},{"id":"cc917e2c.d56b2","type":"link out","z":"5f6fa704.5343c8","name":"Graficos consolidados","links":["c287265.a52eed8","1fcac17a.52dcef","55f8fa37.0b1e54","9b9c9193.e2a9a","bb0e1917.055c58"],"x":1415,"y":140,"wires":[]},{"id":"7045423e.190d0c","type":"link out","z":"510263c3.2cdeec","name":"Graficos consolidados","links":["c287265.a52eed8","1fcac17a.52dcef","55f8fa37.0b1e54","9b9c9193.e2a9a","bb0e1917.055c58"],"x":1515,"y":200,"wires":[]},{"id":"c214e600.280288","type":"ui_gauge","z":"5f6fa704.5343c8","name":"","group":"1940745e.8b2d0c","order":3,"width":"3","height":"3","gtype":"gage","title":"String SE","label":"","format":"{{payload.potenciaenplaca}} W","min":0,"max":"4000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1440,"y":80,"wires":[]},{"id":"e2380980.b95918","type":"ui_gauge","z":"510263c3.2cdeec","name":"","group":"1940745e.8b2d0c","order":3,"width":"3","height":"3","gtype":"gage","title":"String SSO 1","label":"","format":"{{payload.potenciaenplaca}} W","min":0,"max":"4000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1530,"y":80,"wires":[]},{"id":"6b8a783e.67f588","type":"ui_gauge","z":"510263c3.2cdeec","name":"","group":"1940745e.8b2d0c","order":3,"width":"3","height":"3","gtype":"gage","title":"String SSO 2","label":"","format":"{{payload.potenciaenplaca2}} W","min":0,"max":"4000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1530,"y":160,"wires":[]},{"id":"b4a5db36.6700c8","type":"ui_gauge","z":"48e226e1.799b28","name":"","group":"1940745e.8b2d0c","order":3,"width":"3","height":"3","gtype":"gage","title":"Total Strings","label":"","format":"{{payload.potenciaenplaca2}+{payload.potenciaenplaca}}W","min":0,"max":"11000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":270,"y":240,"wires":[]},{"id":"419b78d.9b26188","type":"ui_button","z":"d6f0bdfd.25185","name":"","group":"118c40b3.3c7d6f","order":9,"width":"3","height":"1","passthru":false,"label":"SUB (1)","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"POP01","payloadType":"str","topic":"topic","topicType":"msg","x":720,"y":180,"wires":[["cbc6a793.a19bb8"]]},{"id":"f56fbc9.c15a34","type":"ui_button","z":"d6f0bdfd.25185","name":"","group":"118c40b3.3c7d6f","order":9,"width":"3","height":"1","passthru":false,"label":"SBU (2)","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"POP02","payloadType":"str","topic":"topic","topicType":"msg","x":720,"y":220,"wires":[["cbc6a793.a19bb8"]]},{"id":"1fcac17a.52dcef","type":"link in","z":"48e226e1.799b28","name":"Graficos consolidados","links":["7045423e.190d0c","cc917e2c.d56b2","1c8e78b7.680ba7"],"x":95,"y":140,"wires":[["6804ed1.e51b614","8f759eb4.d9b49"]]},{"id":"13c85d8f.cf0942","type":"debug","z":"48e226e1.799b28","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":590,"y":140,"wires":[]},{"id":"a4562811.033c58","type":"ui_gauge","z":"48e226e1.799b28","name":"","group":"c44c96ba.8c4278","order":4,"width":"3","height":"3","gtype":"gage","title":"Energia Generada total","label":"","format":"{{payload.energiadiaria}} wh","min":0,"max":"30000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":630,"y":180,"wires":[]},{"id":"6804ed1.e51b614","type":"join","z":"48e226e1.799b28","name":"Combinado para gráficos","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"10","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":330,"y":140,"wires":[["13c85d8f.cf0942","a4562811.033c58","ee92d2a1.2cb59"]]},{"id":"c0fc3e2c.1c48c","type":"ui_gauge","z":"48e226e1.799b28","name":"","group":"a5ca3b79.b7e978","order":11,"width":"3","height":"3","gtype":"gage","title":"Potencia combinada","label":"","format":"{{payload.potenciaactivasalida}+{payload.potenciaactivasalida}} ","min":0,"max":"9000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":620,"y":220,"wires":[]},{"id":"8f759eb4.d9b49","type":"debug","z":"48e226e1.799b28","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":310,"y":80,"wires":[]},{"id":"ee92d2a1.2cb59","type":"ui_gauge","z":"48e226e1.799b28","name":"","group":"a5ca3b79.b7e978","order":11,"width":"3","height":"3","gtype":"gage","title":"Potencia total","label":"","format":"","min":0,"max":"9000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":600,"y":260,"wires":[]},{"id":"ffd51bb6.44b048","type":"debug","z":"510263c3.2cdeec","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1440,"y":720,"wires":[]},{"id":"b0d4c74e.313558","type":"link in","z":"d6f0bdfd.25185","name":"Lecturas MAX7.2","links":["ded361bb.5c984"],"x":195,"y":520,"wires":[["d4b0ecb.658a31"]]},{"id":"d4b0ecb.658a31","type":"switch","z":"d6f0bdfd.25185","name":"Limitador de potencia","property":"payload.potenciaactivasalida","propertyType":"msg","rules":[{"t":"gt","v":"6500","vt":"num"},{"t":"lt","v":"6500","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":340,"y":520,"wires":[["76fa7947.a3ce28"],[]]},{"id":"76fa7947.a3ce28","type":"ui_button","z":"d6f0bdfd.25185","name":"","group":"118c40b3.3c7d6f","order":0,"width":0,"height":0,"passthru":false,"label":"Control de Potencia","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"0","payloadType":"num","topic":"topic","topicType":"msg","x":570,"y":520,"wires":[["236eea96.58b066","ceeaa1bb.77409"]]},{"id":"e8b59718.ad4538","type":"trigger","z":"d6f0bdfd.25185","name":"Apagado","op1":"0","op2":"0","op1type":"num","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":580,"y":700,"wires":[["236eea96.58b066"]]},{"id":"1718d1b6.59c8fe","type":"trigger","z":"d6f0bdfd.25185","name":"Apagado","op1":"0","op2":"0","op1type":"num","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":580,"y":800,"wires":[["ceeaa1bb.77409"]]},{"id":"6c7543e7.6ca8ac","type":"ui_switch","z":"d6f0bdfd.25185","name":"","label":"ACS 200L","tooltip":"","group":"118c40b3.3c7d6f","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","animate":false,"className":"","x":770,"y":780,"wires":[["ceeaa1bb.77409"]]},{"id":"b0c5111.86486f","type":"ui_switch","z":"d6f0bdfd.25185","name":"","label":"ACS 80L","tooltip":"","group":"118c40b3.3c7d6f","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","animate":false,"className":"","x":760,"y":600,"wires":[["236eea96.58b066"]]},{"id":"77a388bd8c76e078","type":"inject","z":"c64276cc.982158","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":180,"y":300,"wires":[["c9df07fe37caaf81"]]},{"id":"c9df07fe37caaf81","type":"change","z":"c64276cc.982158","name":"flow , flow","rules":[{"t":"set","p":"dato010","pt":"flow","to":"10","tot":"num"},{"t":"set","p":"dato0100","pt":"flow","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":300,"wires":[["50b40e5e09bcbfbf","d6097fbf23f0ba10","b4a379144d90a42b"]]},{"id":"b4a379144d90a42b","type":"function","z":"c64276cc.982158","name":"","func":"\n msg.payload = flow.get(\"dato010\") + flow.get(\"dato0100\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":460,"wires":[["11b9bc9475aebe0f"]]},{"id":"50b40e5e09bcbfbf","type":"debug","z":"c64276cc.982158","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":850,"y":300,"wires":[]},{"id":"d6097fbf23f0ba10","type":"change","z":"c64276cc.982158","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"dato010","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":360,"wires":[["afd1e853cdbe0e60"]]},{"id":"afd1e853cdbe0e60","type":"debug","z":"c64276cc.982158","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":850,"y":360,"wires":[]},{"id":"11b9bc9475aebe0f","type":"debug","z":"c64276cc.982158","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":850,"y":460,"wires":[]},{"id":"55f8fa37.0b1e54","type":"link in","z":"c64276cc.982158","name":"Graficos consolidados","links":["7045423e.190d0c","cc917e2c.d56b2","1c8e78b7.680ba7"],"x":195,"y":520,"wires":[["410133ba.1896cc","c8445488.afc358"]]},{"id":"410133ba.1896cc","type":"change","z":"c64276cc.982158","name":"flow , flow","rules":[{"t":"set","p":"StringSSO1","pt":"flow","to":"payload.potenciaenplaca","tot":"msg"},{"t":"set","p":"StringSSO2","pt":"flow","to":"potenciaenplaca2","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":520,"wires":[["5b04adb5.a444c4","c74a06b8.a1ef28","c07a7a3a.27cee8","5c7dacd1.02c614"]]},{"id":"c07a7a3a.27cee8","type":"function","z":"c64276cc.982158","name":"","func":"\n msg.payload = flow.get(\"StringSSO1\") + flow.get(\"StringSSO2\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":680,"wires":[["920d7fc2.ffd9d"]]},{"id":"5b04adb5.a444c4","type":"debug","z":"c64276cc.982158","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":850,"y":520,"wires":[]},{"id":"c74a06b8.a1ef28","type":"change","z":"c64276cc.982158","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"stringSSO1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":580,"wires":[["12251862.33af68"]]},{"id":"12251862.33af68","type":"debug","z":"c64276cc.982158","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":850,"y":580,"wires":[]},{"id":"920d7fc2.ffd9d","type":"debug","z":"c64276cc.982158","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":850,"y":680,"wires":[]},{"id":"c8445488.afc358","type":"debug","z":"c64276cc.982158","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":330,"y":620,"wires":[]},{"id":"5c7dacd1.02c614","type":"function","z":"c64276cc.982158","name":"","func":"\n msg.payload = flow.get(\"StringSSO1\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":640,"wires":[["e41e81c6.c999f"]]},{"id":"e41e81c6.c999f","type":"debug","z":"c64276cc.982158","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":850,"y":640,"wires":[]},{"id":"5b8594c.e18336c","type":"debug","z":"510263c3.2cdeec","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1670,"y":200,"wires":[]},{"id":"ef3e6756.0ab4c8","type":"link in","z":"510263c3.2cdeec","name":"Control BMV IN","links":["cbc6a793.a19bb8"],"x":915,"y":620,"wires":[["bfb6c218.cd8e"]]},{"id":"8734f229.c8f36","type":"ui_gauge","z":"5f6fa704.5343c8","name":"","group":"b5a59274.ca4dc","order":0,"width":"2","height":"2","gtype":"gage","title":"Tension carga MAX 8.0","label":"units","format":"{{payload.voltajeabsorcionconf}}","min":"53","max":"56","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1587,"y":405,"wires":[]},{"id":"19407807.7a9508","type":"ui_gauge","z":"510263c3.2cdeec","name":"","group":"b5a59274.ca4dc","order":0,"width":"2","height":"2","gtype":"gage","title":"Tension carga MAX 7.2","label":"units","format":"{{payload.voltajeabsorcionconf}}","min":"53","max":"56","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":1590,"y":420,"wires":[]},{"id":"70bed45a.0989ec","type":"ui_text","z":"510263c3.2cdeec","group":"b5a59274.ca4dc","order":2,"width":"3","height":"1","name":"","label":"Modo bateria MAX 7.2","format":"{{msg.payload.prioridadfuentesalidaconf}}","layout":"row-spread","className":"","x":1580,"y":460,"wires":[]},{"id":"e5ff4759.bffe78","type":"ui_text","z":"5f6fa704.5343c8","group":"b5a59274.ca4dc","order":2,"width":"3","height":"1","name":"","label":"Modo bateria MAX 8.0","format":"{{msg.payload.prioridadfuentesalidaconf}}","layout":"row-spread","className":"","x":1580,"y":440,"wires":[]},{"id":"cbae46a3.be1458","type":"inject","z":"d6f0bdfd.25185","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":580,"y":420,"wires":[["2c92dd2c.786092"]]},{"id":"2c92dd2c.786092","type":"function","z":"d6f0bdfd.25185","name":"","func":"msg.payload=\"PBFT53.0\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":740,"y":420,"wires":[["cbc6a793.a19bb8","99cd6c9e.b44ee"]]},{"id":"99cd6c9e.b44ee","type":"debug","z":"d6f0bdfd.25185","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":440,"wires":[]},{"id":"abfb5b2.74bf8a8","type":"function","z":"d6f0bdfd.25185","name":"","func":"msg.payload=\"PBFT53.9\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":740,"y":460,"wires":[["cbc6a793.a19bb8","99cd6c9e.b44ee"]]},{"id":"db3d3100.4c7d5","type":"inject","z":"d6f0bdfd.25185","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":580,"y":460,"wires":[["abfb5b2.74bf8a8"]]},{"id":"4eb3d5c2.0fea4c","type":"mqtt out","z":"510263c3.2cdeec","name":"","topic":"Inversor7200","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"f30b94ba.8c7148","x":1920,"y":300,"wires":[]},{"id":"822b9ba4.122878","type":"mqtt in","z":"48e226e1.799b28","name":"","topic":"Inversor7200","qos":"2","datatype":"auto","broker":"f30b94ba.8c7148","nl":false,"rap":true,"rh":0,"x":220,"y":400,"wires":[["eb239de2.b64f1","8551afec.d0216"]]},{"id":"eb239de2.b64f1","type":"ui_gauge","z":"48e226e1.799b28","name":"","group":"a5ca3b79.b7e978","order":11,"width":"6","height":"3","gtype":"gage","title":"Potencia Salida","label":"","format":"{{payload.potenciaactivasalida}} W","min":0,"max":"7200","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":400,"y":400,"wires":[]},{"id":"8551afec.d0216","type":"debug","z":"48e226e1.799b28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":400,"y":460,"wires":[]}]
- 29/09/2021, 19:17 #96Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
Esto es cuestión de paciencia y perseverancia, con un poco de tiempo y trabajando desde abajo, al final lograrás que funcione. Mosquito es muy sencillo de usar, lo más complicado (que no lo es) es instalarlo.
Te recomiendo que seas paciente y no corras, intenta en la medida de lo posible no hacer cosas que no entiendas, eso suele terminar mal, casi siempre, es mejor hacer pruebas repasar leer y cuando ya se entiende hacerlo, de esta forma se queda funcionando y con garantía de que si algo deja de funcionar, tienes alguna posibilidad de arreglarlo. Piensa que lo que estás montando, no te lo podrá administrar nadie, si tienes una avería , solo puedes recurrir a ti , así que más te vale saber como está todo montado. ¡¡¡
Saludos
- 29/09/2021, 19:56 #97Forero
- Fecha de ingreso
- mar 2021
- Ubicación
- Navarra
- Mensajes
- 238
- 29/09/2021, 20:04 #98Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
tienes que llamarlo desde node red con la ip de la maquina donde lo instalaste y el puerto por defecto es 1883.
Dentro de los nodos de mqtt tienes la configuración para el servidor . es la misma para todos los nodos mqtt y puedes tener varias claro. Solo tiene ip y puerto. después si pusiste clave pues clave y usuario
- 29/09/2021, 20:51 #99Forero
- Fecha de ingreso
- mar 2021
- Ubicación
- Navarra
- Mensajes
- 238
- 29/09/2021, 21:25 #100Forero
- Fecha de ingreso
- sep 2020
- Ubicación
- Cataluña
- Mensajes
- 316
Re: Tutorial Monitorización Voltronic MAX, Nodered, Grafana...
La barra en los Topic se usa cuando el nombre es complejo, si solo es un nombre se pone sin barra (iversor7200) y no (/inversor7200) si fuese el caso es posible usar (inversor7200/mascosas).
Supongo que en la pestaña securiry pusiste los datos de conexión.
Por cierto para trabajar con mqtt este programa te ayudará , es un cliente mqtt
https://mqttfx.jensd.de/
- - - - - - - - - - - - - - - - - - -