SveinHa Skrevet 18. februar 2023 Skrevet 18. februar 2023 (endret) Denne her har jeg grublet en stund på men nå har jeg funnet en god løsning. Der er flere problemstillinger involvert: Automatisk åpne 2 nettlesere og plassere de på hver sin skjerm i fullskjermmodus ved boot. Vise en dashboard-tab på ene skjermen og en annen på den andre. NR-Dashboard kan styres fra NodeRed men styrer alle skjermer samtidig med mindre kommandoer sendes til en bestemt SocketID (SocketID endrer seg ved refresh i browser, boot og litt tilfeldig i andre sammenhenger). 1: Automatisk åpne nettlesere (På RPi). Opprett en tekstfil med følgende innhold: Sitat chromium-browser --window-position=0,0 --kiosk --user-data-dir="/home/pi/Documents/Profiles/0" http://172.16.0.94:1880/ui/ & chromium-browser --window-position=1920,0 --kiosk --user-data-dir="/home/pi/Documents/Profiles/1" http://172.16.0.94:1880/ui/ & Jeg kalte den "ChromX2.sh" og la den på Desktop. Filen må gjøres kjørbar (chmod +x /home/pi/Desktop/ChromX2.sh). Innholdet sier seg noenlunde selv. Posisjon tilpasses den oppløsningen du selv har (jeg bruker 1920x1080). Kiosk-mode gir fullskjerm. User data må legges på eget område for hver browser. IP-adresse er NodeRed server. "&" tegnet på slutten MÅ være der ellers utføres ikke neste linje. Kjør filen og se om den virker som tenkt. Menylinjen forsvinner i kiosk mode men trykk <Ctrl><Esc> så dukker i alle fall startmenyen opp. Automatisk kjøre "ChromX2.sh" ved boot: Sitat sudo nano /etc/xdg/lxsession/LXDE-pi/autostart Legg inn "/home/pi/Desktop/ChromX2.sh" i slutten av filen, lagre og lukk Reboot og sjekk at det virker som tenkt. 2: Vise 2 forskjellige dashboard tabs. Først må en finne og ta vare på SocketID for begge nettlesere. Jeg har 2 muligheter her. Fra starten av laget jeg 2 trykknapper i et bilde, en "Venstre" og en "Høyre". Ved å trykke på "Venstre" på venstre skjerm lagret jeg SocketID for venstre skjerm i flow.variable, tilsvarende for høyre. Dette fungerer helt fint helt til SocketID endrer seg, da må en trykke på de nevnte knapper igjen... Først trykknappene, så filtreres alt bort bortsett fra den IP som RPien har (om en trykker på disse knappene i en annen nettleser så ignoreres det) og til slutt lagres SocketID i flow. All nødvendig informasjon ligger i msg fra trykknapp. [{"id":"12c333975644cb20","type":"ui_button","z":"4d395651357ab1b1","name":"","group":"0cf69380855e1696","order":12,"width":"3","height":"1","passthru":false,"label":"Venstre","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"","payloadType":"date","topic":"topic","topicType":"msg","x":1120,"y":1190,"wires":[["991fa4955520b550"]]},{"id":"7fa7787facca58ea","type":"change","z":"4d395651357ab1b1","name":"set flow.sock1","rules":[{"t":"set","p":"sock1","pt":"flow","to":"socketid","tot":"msg","dc":true},{"t":"set","p":"sock1lastUpdate","pt":"flow","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1480,"y":1190,"wires":[[]]},{"id":"983e3e4679f69cd1","type":"ui_button","z":"4d395651357ab1b1","name":"","group":"0cf69380855e1696","order":13,"width":"3","height":"1","passthru":false,"label":"Høyre","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"","payloadType":"date","topic":"topic","topicType":"msg","x":1110,"y":1240,"wires":[["2d77526d1dede3a3"]]},{"id":"f4e01bff12906cf9","type":"change","z":"4d395651357ab1b1","name":"set flow.sock2","rules":[{"t":"set","p":"sock2","pt":"flow","to":"socketid","tot":"msg","dc":true},{"t":"set","p":"sock2lastUpdate","pt":"flow","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1480,"y":1240,"wires":[[]]},{"id":"991fa4955520b550","type":"switch","z":"4d395651357ab1b1","name":"IP ...132","property":"socketip","propertyType":"msg","rules":[{"t":"eq","v":"172.16.0.132","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1290,"y":1190,"wires":[["7fa7787facca58ea"]]},{"id":"2d77526d1dede3a3","type":"switch","z":"4d395651357ab1b1","name":"IP ...132","property":"socketip","propertyType":"msg","rules":[{"t":"eq","v":"172.16.0.132","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1290,"y":1240,"wires":[["f4e01bff12906cf9"]]},{"id":"21833df567cffbb7","type":"comment","z":"4d395651357ab1b1","name":"Lagre socketid manuelt, kun for V + H skjerm under TV","info":"","x":1260,"y":1150,"wires":[]},{"id":"0cf69380855e1696","type":"ui_group","name":"Video","tab":"8f4c3716a72a96a8","order":1,"disp":false,"width":"30","collapse":false,"className":""},{"id":"8f4c3716a72a96a8","type":"ui_tab","name":"Kamera","icon":"videocam","order":12,"disabled":false,"hidden":false}] For å vise en bestemt tab på venstre skjerm: [{"id":"dc3ca5d7f364bdfe","type":"change","z":"4d395651357ab1b1","name":"Garasje","rules":[{"t":"set","p":"payload","pt":"msg","to":"Garasje","tot":"str"},{"t":"set","p":"socketid","pt":"msg","to":"sock1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1470,"y":710,"wires":[["e3be770ddac7f6f7"]]},{"id":"5595414b58551dce","type":"inject","z":"4d395651357ab1b1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1320,"y":710,"wires":[["dc3ca5d7f364bdfe"]]},{"id":"e3be770ddac7f6f7","type":"ui_ui_control","z":"4d395651357ab1b1","name":"ui control","events":"connect","x":1620,"y":710,"wires":[[]]},{"id":"7ec2e1019c1cfd8d","type":"change","z":"4d395651357ab1b1","name":"Pool","rules":[{"t":"set","p":"payload","pt":"msg","to":"Pool","tot":"str"},{"t":"set","p":"socketid","pt":"msg","to":"sock1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1460,"y":750,"wires":[["e3be770ddac7f6f7"]]},{"id":"d1a1d4c032f162ea","type":"inject","z":"4d395651357ab1b1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1320,"y":750,"wires":[["7ec2e1019c1cfd8d"]]}] 3: Automatisk hente inn SocketID for begge nettlesere. Her sliter jeg med å vite hvem som er venstre og hvem som er høyre men det betyr nå ikke så veldig mye, det viktigste er å vite at jeg har 2 unike aktive SocketID lagret. Dersom begge nettlesere rapporterer ny socketID innenfor 5 sek (ved boot går der typisk innefor 250mS mellom mottak av begge SocketID men greit med litt spillerom her, tar også gjerne litt tid å laste siden) lagres de i flow.sock1 og flow.sock2 "Strømpris" og "Solar" er standard-tabene som vises automatisk når ny SockerID er mottatt fra begge nettlesere. Toggle og 2true/2false nodene er bare for å lagre annenhver SocketID i hhv sock1 og sock2 og det er her jeg ikke klarer å skille på høyre eller venstre skjerm. [{"id":"dc3ca5d7f364bdfe","type":"change","z":"4d395651357ab1b1","name":"Garasje","rules":[{"t":"set","p":"payload","pt":"msg","to":"Garasje","tot":"str"},{"t":"set","p":"socketid","pt":"msg","to":"sock1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1770,"y":550,"wires":[["e3be770ddac7f6f7"]]},{"id":"5595414b58551dce","type":"inject","z":"4d395651357ab1b1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1620,"y":550,"wires":[["dc3ca5d7f364bdfe"]]},{"id":"e3be770ddac7f6f7","type":"ui_ui_control","z":"4d395651357ab1b1","name":"ui control","events":"connect","x":1920,"y":550,"wires":[["92b8218ed302d655"]]},{"id":"7ec2e1019c1cfd8d","type":"change","z":"4d395651357ab1b1","name":"Pool","rules":[{"t":"set","p":"payload","pt":"msg","to":"Pool","tot":"str"},{"t":"set","p":"socketid","pt":"msg","to":"sock1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1760,"y":590,"wires":[["e3be770ddac7f6f7"]]},{"id":"d1a1d4c032f162ea","type":"inject","z":"4d395651357ab1b1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1620,"y":590,"wires":[["7ec2e1019c1cfd8d"]]},{"id":"92b8218ed302d655","type":"switch","z":"4d395651357ab1b1","name":"IP ...132","property":"socketip","propertyType":"msg","rules":[{"t":"eq","v":"172.16.0.132","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":2070,"y":550,"wires":[["e0a957ccf246b3ab"]]},{"id":"e0a957ccf246b3ab","type":"switch","z":"4d395651357ab1b1","name":"toggle","property":"SessID_toggle","propertyType":"flow","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":1600,"y":660,"wires":[["c7f5ecd6fa318894"],["eb953c2216749af0"]]},{"id":"c7f5ecd6fa318894","type":"change","z":"4d395651357ab1b1","name":"2false","rules":[{"t":"set","p":"SessID_toggle","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1760,"y":650,"wires":[["bd1be74d2e460943","be71680e3306e128"]]},{"id":"eb953c2216749af0","type":"change","z":"4d395651357ab1b1","name":"2true","rules":[{"t":"set","p":"SessID_toggle","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1760,"y":680,"wires":[["bd1be74d2e460943","2e2cd87801046062"]]},{"id":"94699f674c8fe770","type":"delay","z":"4d395651357ab1b1","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2100,"y":660,"wires":[["582beb75912af2fd"]]},{"id":"bd1be74d2e460943","type":"function","z":"4d395651357ab1b1","name":"Reset delay","func":"//msg.delay = 600000;\nvar m1 = {reset:true};\nreturn [[m1,msg]];","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1950,"y":660,"wires":[["94699f674c8fe770"]]},{"id":"582beb75912af2fd","type":"function","z":"4d395651357ab1b1","name":"Ny socketID for begge?","func":"var sock1t = flow.get(\"sock1lastUpdate\");\nvar sock2t = flow.get(\"sock2lastUpdate\");\nif (Math.abs(sock1t - sock2t) < 5000){\n node.warn(\"TimeDiff: \" + (sock1t - sock2t));\n node.send(msg);\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2300,"y":660,"wires":[["0561d71505d376ae","c1fb16b8ae61f341"]]},{"id":"be71680e3306e128","type":"change","z":"4d395651357ab1b1","name":"set flow.sock1","rules":[{"t":"set","p":"sock1","pt":"flow","to":"socketid","tot":"msg","dc":true},{"t":"set","p":"sock1lastUpdate","pt":"flow","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1960,"y":620,"wires":[[]]},{"id":"2e2cd87801046062","type":"change","z":"4d395651357ab1b1","name":"set flow.sock2","rules":[{"t":"set","p":"sock2","pt":"flow","to":"socketid","tot":"msg","dc":true},{"t":"set","p":"sock2lastUpdate","pt":"flow","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1960,"y":700,"wires":[[]]},{"id":"c1fb16b8ae61f341","type":"change","z":"4d395651357ab1b1","name":"Strømpris","rules":[{"t":"set","p":"payload","pt":"msg","to":"Strømpris","tot":"str"},{"t":"set","p":"socketid","pt":"msg","to":"sock2","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":2050,"y":390,"wires":[["e3be770ddac7f6f7"]]},{"id":"0561d71505d376ae","type":"change","z":"4d395651357ab1b1","name":"Solar","rules":[{"t":"set","p":"payload","pt":"msg","to":"Solar","tot":"str"},{"t":"set","p":"socketid","pt":"msg","to":"sock1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":2040,"y":430,"wires":[["e3be770ddac7f6f7"]]}] Det er jo enkelt å manuelt bytte SocketID i en funksjonsblokk men jeg tror ikke det går an å gjøre det automatisk: Sitat var sock1 = flow.get("sock1"); var sock2 = flow.get("sock2"); flow.set("sock2", sock1); flow.set("sock1", sock2); return msg; Flow variablene: Disse flowene er litt forenklet men burde være greie å forstå. Hele greiene mine med automatisk visning av 3 videotabs basert på bevegelsessensorer/knapper i videobilde, tab-valg med zigbee fjernkontroll ser slik ut: Endret 19. februar 2023 av SveinHa 1 1 Siter
SveinHa Skrevet 9. desember 2023 Forfatter Skrevet 9. desember 2023 Etter å ha funnet triggemeldinger fra BlueIris har jeg strømlinjeformet kamerakontrollen litt. Kort fortalt er endringene gjort slik: Når BlueIris detekterer bevegelse popper levende video opp på en (eller evt flere) forvalgt skjerm (trigger="ON"). Om flere kamera detekterer bevegelse er det alltid det som sist detekterte som vises. Først når ingen bevegelse er detektert på noen kamera (trigger="OFF" på alle kamera) returneres til standardbilde for den aktuelle skjermen (siste bilde som var manuelt valgt). Hvor lenge kamera skal vises settes i triggeren i BlueIris og kan være forskjellig fra kamera til kamera. BlueIris lagrer video i høy oppløsning (stream1) mens i NodeRed Dashboard brukes lav oppløsning (stream2) fordi det er rikelig godt nok og gir langt bedre respons i systemet. Som tidligere (men en del forenklet) lagres socketID for begge skjermer på den PC som viser Dashboard/kamerabilder (filtrert på IP ...149 og lagres i flow). Den er nå skiftet ut med en NUC da RPi sleit litt med ytelsen med 2 nettlesere samtidig. "ui control" noden, socketid og socketip er nøkkelen i det hele for alle nettlesere som viser dashboard bilder (selv om der er flere nettlesere på samme PC) har sin egen socketid og den vil endres automatisk i ny og ne så da må den også lagres autmatisk. Jeg har fremdeles ikke helt kontroll med hvilken skjerm som er høyre/venstre så når de en gang i blant skifter side har jeg et par strategisk plasserte knapper som manuelt bytter tilbake til slik jeg vil ha det. [{"id":"1f60f8c7a87b2a58","type":"change","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Helmut","rules":[{"t":"set","p":"url","pt":"msg","to":"http://172.16.0.101:10101/mjpg/Helmut/stream2","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Helmut","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":870,"wires":[["45ac8bf1953431e8"]]},{"id":"0df19d355f830242","type":"ui_button","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"","group":"0cf69380855e1696","order":9,"width":"3","height":"2","passthru":false,"label":"Innkjørsel","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"3","payloadType":"num","topic":"topic","topicType":"msg","x":510,"y":930,"wires":[["763dbff3c82d79a6"]]},{"id":"a67ce842921deee2","type":"function","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Set color","func":"var input=msg.payload;\n\nmsg.tooltip = \"Cam Innkjørsel\";\n\nif (input==3){\n msg.color = \"BLACK\";\n msg.background = \"GREEN\";\n} else {\n msg.color = \"GREEN\";\n msg.background = \"LIGHTGREY\";\n }\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":930,"wires":[["0df19d355f830242"]]},{"id":"9a231b6be2b68509","type":"ui_button","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"","group":"0cf69380855e1696","order":7,"width":"3","height":"2","passthru":false,"label":"Helmut","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"2","payloadType":"num","topic":"topic","topicType":"msg","x":510,"y":890,"wires":[["763dbff3c82d79a6"]]},{"id":"d0d4164fb636ce80","type":"function","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Set color","func":"var input=msg.payload;\n\nmsg.tooltip = \"Cam Helmut\";\n\nif (input==2){\n msg.color = \"BLACK\";\n msg.background = \"GREEN\";\n} else {\n msg.color = \"GREEN\";\n msg.background = \"LIGHTGREY\";\n }\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":890,"wires":[["9a231b6be2b68509"]]},{"id":"1dc3f5177c79d414","type":"ui_button","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"","group":"0cf69380855e1696","order":5,"width":"3","height":"2","passthru":false,"label":"Gårdsplass","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"1","payloadType":"num","topic":"topic","topicType":"msg","x":520,"y":850,"wires":[["763dbff3c82d79a6"]]},{"id":"021836c0a3cb5736","type":"function","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Set color","func":"var input=msg.payload;\n\nmsg.tooltip = \"Cam Gårdsplass\";\n\nif (input==1){\n msg.color = \"BLACK\";\n msg.background = \"GREEN\";\n} else {\n msg.color = \"GREEN\";\n msg.background = \"LIGHTGREY\";\n }\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":850,"wires":[["1dc3f5177c79d414"]]},{"id":"befcb9dccceb743b","type":"ui_button","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"","group":"0cf69380855e1696","order":3,"width":"3","height":"2","passthru":false,"label":"Entre","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"0","payloadType":"num","topic":"topic","topicType":"msg","x":500,"y":810,"wires":[["763dbff3c82d79a6"]]},{"id":"a5d21a5f891a7d69","type":"function","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Set color","func":"var input=msg.payload;\n\nif (input==0){\n msg.color = \"BLACK\";\n msg.background = \"GREEN\";\n msg.tooltip = \"Cam Entre\";\n} else {\n msg.color = \"GREEN\";\n msg.background = \"LIGHTGREY\";\n msg.tooltip = \"Cam Entre\";\n }\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":810,"wires":[["befcb9dccceb743b"]]},{"id":"47c94e391127dd8a","type":"show-value","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"","path":"","x":110,"y":810,"wires":[["a5d21a5f891a7d69","021836c0a3cb5736","d0d4164fb636ce80","a67ce842921deee2","72d07590ecbf9172","3b143a2cb8d94c86","2c703bd5a266ff09","d72107edc36361cd"]]},{"id":"763dbff3c82d79a6","type":"change","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"","rules":[{"t":"set","p":"CamValg","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":810,"wires":[["47c94e391127dd8a","8ac2381fb1960cd9"]]},{"id":"36f82dc7dd8f6f5f","type":"change","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"GarCam","rules":[{"t":"set","p":"url","pt":"msg","to":"http://172.16.0.101:10101/mjpg/GarInne/video.mjpg?q=40&s=100","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Innkjørsel","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":1020,"wires":[["45ac8bf1953431e8"]]},{"id":"6fddbfa449f07dfa","type":"change","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Gårdspalss","rules":[{"t":"set","p":"url","pt":"msg","to":"http://172.16.0.101:10101/mjpg/D40vest/stream2","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Gårdsplass","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":840,"wires":[["45ac8bf1953431e8"]]},{"id":"11a146e73216f244","type":"ui_button","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"","group":"0cf69380855e1696","order":12,"width":"3","height":"1","passthru":false,"label":"Eldhus","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"5","payloadType":"num","topic":"topic","topicType":"msg","x":500,"y":1010,"wires":[["763dbff3c82d79a6"]]},{"id":"3b143a2cb8d94c86","type":"function","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Set color","func":"var input=msg.payload;\n\nmsg.tooltip = \"Cam Eldhus\";\n\nif (input==5){\n msg.color = \"BLACK\";\n msg.background = \"GREEN\";\n} else {\n msg.color = \"GREEN\";\n msg.background = \"LIGHTGREY\";\n }\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":1010,"wires":[["11a146e73216f244"]]},{"id":"56468a2d41f97cc3","type":"ui_button","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"","group":"0cf69380855e1696","order":14,"width":"3","height":"1","passthru":false,"label":"Skrivestua","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"4","payloadType":"num","topic":"topic","topicType":"msg","x":520,"y":970,"wires":[["763dbff3c82d79a6"]]},{"id":"72d07590ecbf9172","type":"function","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Set color","func":"var input=msg.payload;\n\nmsg.tooltip = \"Cam Skrivestua\";\n\nif (input==4){\n msg.color = \"BLACK\";\n msg.background = \"GREEN\";\n} else {\n msg.color = \"GREEN\";\n msg.background = \"LIGHTGREY\";\n }\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":970,"wires":[["56468a2d41f97cc3"]]},{"id":"25a62b5a49a2a1b0","type":"change","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Skrivestua","rules":[{"t":"set","p":"url","pt":"msg","to":"http://172.16.0.101:10101/mjpg/Skriv/video.mjpg?q=40&s=100","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Skrivestua","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":930,"wires":[["45ac8bf1953431e8"]]},{"id":"046c4ea3981b7778","type":"change","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Eldhus","rules":[{"t":"set","p":"url","pt":"msg","to":"http://172.16.0.101:10101/mjpg/Eldhus/video.mjpg?q=40&s=100","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Eldhus","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1160,"y":960,"wires":[["45ac8bf1953431e8"]]},{"id":"e85330cac7aa4715","type":"ui_button","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"","group":"0cf69380855e1696","order":15,"width":"3","height":"1","passthru":false,"label":"Nøtteliten","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"6","payloadType":"num","topic":"topic","topicType":"msg","x":510,"y":1090,"wires":[["763dbff3c82d79a6"]]},{"id":"2c703bd5a266ff09","type":"function","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Set color","func":"var input=msg.payload;\n\nmsg.tooltip = \"Nøtteliten\";\n\nif (input==6){\n msg.color = \"BLACK\";\n msg.background = \"GREEN\";\n} else {\n msg.color = \"GREEN\";\n msg.background = \"LIGHTGREY\";\n }\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":1090,"wires":[["e85330cac7aa4715"]]},{"id":"b1d805659b4b7913","type":"change","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Nøtteliten matboks","rules":[{"t":"set","p":"url","pt":"msg","to":"http://sveinha.com/bilder/Ekorn.jpeg","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Notteliten","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":990,"wires":[["45ac8bf1953431e8"]]},{"id":"b01cf904c397ac7e","type":"ui_button","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"","group":"0cf69380855e1696","order":13,"width":"3","height":"1","passthru":false,"label":"Garasje","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"7","payloadType":"num","topic":"topic","topicType":"msg","x":510,"y":1050,"wires":[["763dbff3c82d79a6"]]},{"id":"d72107edc36361cd","type":"function","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Set color","func":"var input=msg.payload;\n\nmsg.tooltip = \"Nøtteliten\";\n\nif (input==7){\n msg.color = \"BLACK\";\n msg.background = \"GREEN\";\n} else {\n msg.color = \"GREEN\";\n msg.background = \"LIGHTGREY\";\n }\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":1050,"wires":[["b01cf904c397ac7e"]]},{"id":"84bccfac0f47e580","type":"change","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"InnkjCam","rules":[{"t":"set","p":"url","pt":"msg","to":"http://172.16.0.101:10101/mjpg/Innk/stream2","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Innkjørsel","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":900,"wires":[["45ac8bf1953431e8"]]},{"id":"44c6ed39e8d26727","type":"change","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Entre","rules":[{"t":"set","p":"url","pt":"msg","to":"http://172.16.0.101:10101/mjpg/Entre/stream2","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Entre","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1160,"y":810,"wires":[["45ac8bf1953431e8"]]},{"id":"8ac2381fb1960cd9","type":"switch","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"7","vt":"str"}],"checkall":"true","repair":false,"outputs":8,"x":970,"y":870,"wires":[["44c6ed39e8d26727"],["6fddbfa449f07dfa"],["1f60f8c7a87b2a58"],["84bccfac0f47e580"],["25a62b5a49a2a1b0"],["046c4ea3981b7778"],["b1d805659b4b7913"],["36f82dc7dd8f6f5f"]]},{"id":"9dd6877fda1686df","type":"comment","z":"4d395651357ab1b1","g":"cf25b68b95475def","name":"Knapper for kameravalg i kamerabildet","info":"","x":190,"y":770,"wires":[]},{"id":"45ac8bf1953431e8","type":"junction","z":"4d395651357ab1b1","g":"cf25b68b95475def","x":1360,"y":790,"wires":[["cb103a74ef075150"]]},{"id":"cb103a74ef075150","type":"junction","z":"4d395651357ab1b1","g":"cf25b68b95475def","x":570,"y":750,"wires":[["c497a8c4fd5e8c4b"]]},{"id":"692834acf3e6e546","type":"group","z":"4d395651357ab1b1","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["65714580ac77bb4e","03be2d2fad62c467","8a077aad36972ab1","b2d27f9d1c4b6338","21aa3b1f2cfe2888","b78992ea5f85c2ed","01af4105ea2a6e7a","eaa6ce4bec5d8092","23054d5281735d99","8dfe26c5e0e42da4","a4751682b9fee3dc","492709a9da902e88","8abdb4d16048f09c","d13fce9cc80bd228","39b5581e38da10e5","7241f606a3dd829a","f792415022ed1a5a","cc65f9d5b9fae892","7b1212970f390799","703548626e0504f3","80a7d345b33a142e","d91b61cd2f35ef89","eb549c22db82a913","74f044ba52f73339","0ca5043ebbd823c9","c497a8c4fd5e8c4b","1e9bf879483b0bd3","3702083286079bde","06758b1ca6cc9b18","809b154c6b6ea105"],"x":14,"y":69,"w":1182,"h":382},{"id":"65714580ac77bb4e","type":"ui_switch","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"Entre LED","label":"","tooltip":"","group":"0cf69380855e1696","order":4,"width":"1","height":"1","passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"ON","onvalueType":"str","onicon":"directions_walk","oncolor":"#6666FF","offvalue":"OFF","offvalueType":"str","officon":"panorama_fisheye","offcolor":"grey","animate":true,"className":"","x":510,"y":150,"wires":[["d13fce9cc80bd228","eb549c22db82a913"]]},{"id":"03be2d2fad62c467","type":"mqtt in","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"","topic":"BlueIris/Entre/Status","qos":"2","datatype":"json","broker":"6db118ed1b0c56de","nl":false,"rap":true,"rh":0,"inputs":0,"x":130,"y":150,"wires":[["8a077aad36972ab1"]]},{"id":"8a077aad36972ab1","type":"change","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.trigger","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":150,"wires":[["65714580ac77bb4e"]]},{"id":"b2d27f9d1c4b6338","type":"ui_switch","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"Gårdsplass LED","label":"","tooltip":"","group":"0cf69380855e1696","order":6,"width":"1","height":"1","passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"ON","onvalueType":"str","onicon":"directions_walk","oncolor":"#6666FF","offvalue":"OFF","offvalueType":"str","officon":"panorama_fisheye","offcolor":"grey","animate":true,"className":"","x":520,"y":200,"wires":[["7241f606a3dd829a","eb549c22db82a913"]]},{"id":"21aa3b1f2cfe2888","type":"mqtt in","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"","topic":"BlueIris/D40vest/Status","qos":"2","datatype":"json","broker":"6db118ed1b0c56de","nl":false,"rap":true,"rh":0,"inputs":0,"x":140,"y":200,"wires":[["b78992ea5f85c2ed"]]},{"id":"b78992ea5f85c2ed","type":"change","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.trigger","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":200,"wires":[["b2d27f9d1c4b6338"]]},{"id":"01af4105ea2a6e7a","type":"ui_switch","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"Helmut LED","label":"","tooltip":"","group":"0cf69380855e1696","order":8,"width":"1","height":"1","passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"ON","onvalueType":"str","onicon":"directions_walk","oncolor":"#6666FF","offvalue":"OFF","offvalueType":"str","officon":"panorama_fisheye","offcolor":"grey","animate":true,"className":"","x":510,"y":250,"wires":[["cc65f9d5b9fae892","eb549c22db82a913"]]},{"id":"eaa6ce4bec5d8092","type":"mqtt in","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"","topic":"BlueIris/Helmut/Status","qos":"2","datatype":"json","broker":"6db118ed1b0c56de","nl":false,"rap":true,"rh":0,"inputs":0,"x":140,"y":250,"wires":[["23054d5281735d99"]]},{"id":"23054d5281735d99","type":"change","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.trigger","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":250,"wires":[["01af4105ea2a6e7a"]]},{"id":"8dfe26c5e0e42da4","type":"ui_switch","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"Innkj LED","label":"","tooltip":"","group":"0cf69380855e1696","order":10,"width":"1","height":"1","passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"ON","onvalueType":"str","onicon":"directions_walk","oncolor":"#6666FF","offvalue":"OFF","offvalueType":"str","officon":"panorama_fisheye","offcolor":"grey","animate":true,"className":"","x":500,"y":300,"wires":[["7b1212970f390799","eb549c22db82a913"]]},{"id":"a4751682b9fee3dc","type":"mqtt in","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"","topic":"BlueIris/Innk/Status","qos":"2","datatype":"json","broker":"6db118ed1b0c56de","nl":false,"rap":true,"rh":0,"inputs":0,"x":130,"y":300,"wires":[["492709a9da902e88"]]},{"id":"492709a9da902e88","type":"change","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.trigger","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":300,"wires":[["8dfe26c5e0e42da4"]]},{"id":"8abdb4d16048f09c","type":"change","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"EntreCam","rules":[{"t":"set","p":"url","pt":"msg","to":"http://172.16.0.101:10101/mjpg/Entre/stream2","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Entre","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":910,"y":150,"wires":[["74f044ba52f73339"]]},{"id":"d13fce9cc80bd228","type":"switch","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"ON/OFF","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"},{"t":"eq","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":720,"y":150,"wires":[["8abdb4d16048f09c"],[]]},{"id":"39b5581e38da10e5","type":"change","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"Gårdspalss","rules":[{"t":"set","p":"url","pt":"msg","to":"http://172.16.0.101:10101/mjpg/D40vest/stream2","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Gårdsplass","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":200,"wires":[["74f044ba52f73339"]]},{"id":"7241f606a3dd829a","type":"switch","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"ON/OFF","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"},{"t":"eq","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":720,"y":200,"wires":[["39b5581e38da10e5"],[]]},{"id":"f792415022ed1a5a","type":"change","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"Helmut","rules":[{"t":"set","p":"url","pt":"msg","to":"http://172.16.0.101:10101/mjpg/Helmut/stream2","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Helmut","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":910,"y":250,"wires":[["74f044ba52f73339"]]},{"id":"cc65f9d5b9fae892","type":"switch","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"ON/OFF","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"},{"t":"eq","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":720,"y":250,"wires":[["f792415022ed1a5a"],[]]},{"id":"7b1212970f390799","type":"switch","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"ON/OFF","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"},{"t":"eq","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":720,"y":300,"wires":[["703548626e0504f3"],[]]},{"id":"703548626e0504f3","type":"change","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"InnkjCam","rules":[{"t":"set","p":"url","pt":"msg","to":"http://172.16.0.101:10101/mjpg/Innk/stream2","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Innkjørsel","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":910,"y":300,"wires":[["74f044ba52f73339"]]},{"id":"80a7d345b33a142e","type":"comment","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"BlueIris trigger","info":"","x":110,"y":110,"wires":[]},{"id":"d91b61cd2f35ef89","type":"junction","z":"4d395651357ab1b1","g":"692834acf3e6e546","x":320,"y":190,"wires":[[]]},{"id":"eb549c22db82a913","type":"junction","z":"4d395651357ab1b1","g":"692834acf3e6e546","x":660,"y":350,"wires":[["0ca5043ebbd823c9"]]},{"id":"74f044ba52f73339","type":"junction","z":"4d395651357ab1b1","g":"692834acf3e6e546","x":1030,"y":310,"wires":[["1e9bf879483b0bd3","3702083286079bde"]]},{"id":"0ca5043ebbd823c9","type":"function","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"Vent til alle cam er utrigged","func":"var top = msg.topic.slice(9,-7);\ncontext.set(top, msg.payload);\n\nvar res = \"OFF\";\ncontext.keys().forEach(function(element) {\n if (context.get(element) != \"OFF\") res = \"--\";\n})\nif (res == \"OFF\") return msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":190,"y":410,"wires":[["bf011d24729fd552"]]},{"id":"c497a8c4fd5e8c4b","type":"change","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"Show Videopage","rules":[{"t":"set","p":"payload","pt":"msg","to":"Kamera","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":410,"wires":[["06758b1ca6cc9b18"]]},{"id":"1e9bf879483b0bd3","type":"change","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"add socketid høyre","rules":[{"t":"set","p":"socketid","pt":"msg","to":"sock2","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":410,"wires":[["c497a8c4fd5e8c4b"]]},{"id":"3702083286079bde","type":"link out","z":"4d395651357ab1b1","g":"692834acf3e6e546","name":"MonitorerPåBI Out","mode":"link","links":["bcf9c82e2eceeb0a"],"x":985,"y":370,"wires":[]},{"id":"06758b1ca6cc9b18","type":"junction","z":"4d395651357ab1b1","g":"692834acf3e6e546","x":860,"y":410,"wires":[["ceda17c01d6cf547","809b154c6b6ea105"]]},{"id":"809b154c6b6ea105","type":"ui_iframe","z":"4d395651357ab1b1","g":"692834acf3e6e546","group":"0cf69380855e1696","name":"Videovindu","order":2,"width":"36","height":"23","url":"","origin":"*","scale":"78","x":1100,"y":410,"wires":[[]]},{"id":"6db118ed1b0c56de","type":"mqtt-broker","name":"DaleMQTT","broker":"172.16.0.94","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"5","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"761946585bab10f8","type":"group","z":"4d395651357ab1b1","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["a2749f7f9e3d72b0","c938750bba76d43a","fc0679900e5a0e06","d6f6e32a7210a870","5d8b7e465e93b302","565da2f81f8d9ab9","bf011d24729fd552"],"x":324,"y":459,"w":532,"h":282},{"id":"a2749f7f9e3d72b0","type":"function","z":"4d395651357ab1b1","g":"761946585bab10f8","name":"Vis std bilde venstre","func":"var bv = flow.get(\"BildeValgV\")||\"Solar\"\nvar svar = {payload:bv};\nreturn svar;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":580,"wires":[["c938750bba76d43a"]]},{"id":"c938750bba76d43a","type":"change","z":"4d395651357ab1b1","g":"761946585bab10f8","name":"add socketid venstre","rules":[{"t":"set","p":"socketid","pt":"msg","to":"sock1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":580,"wires":[["06758b1ca6cc9b18"]]},{"id":"fc0679900e5a0e06","type":"function","z":"4d395651357ab1b1","g":"761946585bab10f8","name":"Vis std bilde høyre","func":"var bv = flow.get(\"BildeValgH\")||\"Sol + diesel\"\nvar svar = {payload:bv};\nreturn svar;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":630,"wires":[["d6f6e32a7210a870"]]},{"id":"d6f6e32a7210a870","type":"change","z":"4d395651357ab1b1","g":"761946585bab10f8","name":"add socketid høyre","rules":[{"t":"set","p":"socketid","pt":"msg","to":"sock2","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":630,"wires":[["06758b1ca6cc9b18"]]},{"id":"5d8b7e465e93b302","type":"ui_button","z":"4d395651357ab1b1","g":"761946585bab10f8","name":"","group":"0cf69380855e1696","order":20,"width":"3","height":"1","passthru":false,"label":"Home","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"","payloadType":"date","topic":"topic","topicType":"msg","x":450,"y":700,"wires":[["fc0679900e5a0e06","a2749f7f9e3d72b0"]]},{"id":"565da2f81f8d9ab9","type":"comment","z":"4d395651357ab1b1","g":"761946585bab10f8","name":"Gå tilbake til standardbilder","info":"","x":480,"y":500,"wires":[]},{"id":"bf011d24729fd552","type":"junction","z":"4d395651357ab1b1","g":"761946585bab10f8","x":350,"y":520,"wires":[["a2749f7f9e3d72b0","fc0679900e5a0e06"]]},{"id":"73d92a7d7e14f93c","type":"group","z":"4d395651357ab1b1","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["b30e1a33d082bae3","f625e891df043028","eed88d2f4d38b312","79f13f659cab5c27"],"x":34,"y":459,"w":282,"h":222},{"id":"b30e1a33d082bae3","type":"function","z":"4d395651357ab1b1","g":"73d92a7d7e14f93c","name":"Swap socketID","func":"var sock1 = flow.get(\"sock1\");\nvar sock2 = flow.get(\"sock2\");\nflow.set(\"sock2\", sock1);\nflow.set(\"sock1\", sock2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":210,"y":640,"wires":[["bf011d24729fd552"]]},{"id":"f625e891df043028","type":"ui_button","z":"4d395651357ab1b1","g":"73d92a7d7e14f93c","name":"","group":"c42f9791460d68ef","order":6,"width":0,"height":0,"passthru":false,"label":"Swap scr","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":120,"y":560,"wires":[["b30e1a33d082bae3"]]},{"id":"eed88d2f4d38b312","type":"ui_button","z":"4d395651357ab1b1","g":"73d92a7d7e14f93c","name":"","group":"0cf69380855e1696","order":19,"width":"3","height":"1","passthru":false,"label":"Swap scr","tooltip":"{{msg.tooltip}}","color":"{{msg.color}}","bgcolor":"{{msg.background}}","className":"","icon":"","payload":"","payloadType":"date","topic":"topic","topicType":"msg","x":120,"y":590,"wires":[["b30e1a33d082bae3"]]},{"id":"79f13f659cab5c27","type":"comment","z":"4d395651357ab1b1","g":"73d92a7d7e14f93c","name":"Bytt H og V skjerm manuelt","info":"","x":170,"y":500,"wires":[]},{"id":"c42f9791460d68ef","type":"ui_group","name":"Status Lys","tab":"e3ef94435f0945bf","order":3,"disp":true,"width":"6","collapse":false,"className":""},{"id":"e3ef94435f0945bf","type":"ui_tab","name":"Teknisk","icon":"timeline","order":17,"disabled":false,"hidden":false},{"id":"6694c9aee8de79dc","type":"group","z":"4d395651357ab1b1","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["683998be9a40ea1c","a1fa6e88b25ff771","6609410f8e1b3400","e7709ade069518a9","f1c1f87f3bcf3084","fb938bb2925213f8","77ddfadafc6e98d9","8783094b74dc58a0","ceda17c01d6cf547"],"x":864,"y":459,"w":732,"h":282},{"id":"683998be9a40ea1c","type":"switch","z":"4d395651357ab1b1","g":"6694c9aee8de79dc","name":"socketID?","property":"socketid","propertyType":"msg","rules":[{"t":"eq","v":"sock1","vt":"flow"},{"t":"eq","v":"sock2","vt":"flow"}],"checkall":"true","repair":false,"outputs":2,"x":1260,"y":680,"wires":[["a1fa6e88b25ff771"],["6609410f8e1b3400"]]},{"id":"a1fa6e88b25ff771","type":"change","z":"4d395651357ab1b1","g":"6694c9aee8de79dc","name":"set flow.BildeValgV","rules":[{"t":"set","p":"BildeValgV","pt":"flow","to":"name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1450,"y":660,"wires":[[]]},{"id":"6609410f8e1b3400","type":"change","z":"4d395651357ab1b1","g":"6694c9aee8de79dc","name":"set flow.BildeValgH","rules":[{"t":"set","p":"BildeValgH","pt":"flow","to":"name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1450,"y":700,"wires":[[]]},{"id":"e7709ade069518a9","type":"switch","z":"4d395651357ab1b1","g":"6694c9aee8de79dc","name":"IP ...149","property":"socketip","propertyType":"msg","rules":[{"t":"eq","v":"172.16.0.149","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1190,"y":580,"wires":[["77ddfadafc6e98d9","f1c1f87f3bcf3084"]]},{"id":"f1c1f87f3bcf3084","type":"switch","z":"4d395651357ab1b1","g":"6694c9aee8de79dc","name":"!= Kamera","property":"name","propertyType":"msg","rules":[{"t":"neq","v":"Kamera","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1350,"y":580,"wires":[["fb938bb2925213f8"]]},{"id":"fb938bb2925213f8","type":"switch","z":"4d395651357ab1b1","g":"6694c9aee8de79dc","name":"!= Home","property":"name","propertyType":"msg","rules":[{"t":"neq","v":"Home","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1510,"y":580,"wires":[["683998be9a40ea1c"]]},{"id":"77ddfadafc6e98d9","type":"function","z":"4d395651357ab1b1","g":"6694c9aee8de79dc","name":"Ny socketID?","func":"var sock1stored = flow.get(\"sock1\");\nvar sock2stored = flow.get(\"sock2\");\nvar SessToggle = flow.get(\"SessID_toggle\");\nif ((msg.socketid != sock1stored) && (msg.socketid != sock2stored)){\n if (SessToggle){\n sock1stored = msg.socketid;\n } else{\n sock2stored = msg.socketid;\n };\n SessToggle = !SessToggle;\n flow.set(\"sock1\", sock1stored);\n flow.set(\"sock2\", sock2stored);\n flow.set(\"SessID_toggle\", SessToggle);\n //node.send(msg);\n}\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1350,"y":540,"wires":[[]]},{"id":"8783094b74dc58a0","type":"comment","z":"4d395651357ab1b1","g":"6694c9aee8de79dc","name":"Lagre ny sockedID fra skjermer ved TV (IP ...149)","info":"","x":1070,"y":500,"wires":[]},{"id":"ceda17c01d6cf547","type":"ui_ui_control","z":"4d395651357ab1b1","g":"6694c9aee8de79dc","name":"Group events","events":"change","x":1000,"y":580,"wires":[["e7709ade069518a9"]]},{"id":"0cf69380855e1696","type":"ui_group","name":"Video","tab":"8f4c3716a72a96a8","order":1,"disp":false,"width":"40","collapse":false,"className":""},{"id":"8f4c3716a72a96a8","type":"ui_tab","name":"Kamera","icon":"videocam","order":13,"disabled":false,"hidden":false}] Siter
Anbefalte innlegg
Bli med i samtalen
Du kan publisere innhold nå og registrere deg senere. Hvis du har en konto, logg inn nå for å poste med kontoen din.