|
23 | 23 | "info": "",
|
24 | 24 | "env": []
|
25 | 25 | },
|
| 26 | + { |
| 27 | + "id": "94b8abb47e4cb1f2", |
| 28 | + "type": "serial-port", |
| 29 | + "serialport": "", |
| 30 | + "serialbaud": "115200", |
| 31 | + "databits": "8", |
| 32 | + "parity": "none", |
| 33 | + "stopbits": "1", |
| 34 | + "waitfor": "", |
| 35 | + "dtr": "none", |
| 36 | + "rts": "none", |
| 37 | + "cts": "none", |
| 38 | + "dsr": "none", |
| 39 | + "newline": "\\n", |
| 40 | + "bin": "false", |
| 41 | + "out": "char", |
| 42 | + "addchar": "", |
| 43 | + "responsetimeout": "10000" |
| 44 | + }, |
26 | 45 | {
|
27 | 46 | "id": "32174867b86c7b03",
|
28 | 47 | "type": "function",
|
|
47 | 66 | "type": "function",
|
48 | 67 | "z": "09012e75c72a4968",
|
49 | 68 | "name": "processSerialData",
|
50 |
| - "func": "//var parts = msg.serialData.split(\"-\");\nlet parts = JSON.parse(msg.serialData); \n\n//dato il protocollo creo delle variabili globali per gestire il messaggio\n//msg.roomID = parts[1].trim()\n//msg.valueChanged = parts[2].trim()\n//msg.value = parts[3].trim()\n\nmsg.room_id = parts[\"room_id\"]\nmsg.temperature_value = parts[\"temperature_value\"]\nmsg.temperature_unit = parts[\"temperature_unit\"]\n\n\n\n\nreturn msg;", |
| 69 | + "func": "let parts = JSON.parse(msg.serialData); \n\nmsg.room_id = parts[\"room_id\"]\nmsg.temperature_value = parts[\"temperature_value\"]\nmsg.temperature_unit = parts[\"temperature_unit\"]\n\nreturn msg;", |
51 | 70 | "outputs": 1,
|
52 | 71 | "noerr": 0,
|
53 | 72 | "initialize": "",
|
|
533 | 552 | "upload": false,
|
534 | 553 | "swaggerDoc": "",
|
535 | 554 | "x": 130,
|
536 |
| - "y": 980, |
| 555 | + "y": 1300, |
537 | 556 | "wires": [
|
538 | 557 | [
|
539 | 558 | "d95b89b933ecab60"
|
|
613 | 632 | ]
|
614 | 633 | ]
|
615 | 634 | },
|
616 |
| - { |
617 |
| - "id": "5ff43b84fbe92a30", |
618 |
| - "type": "comment", |
619 |
| - "z": "09012e75c72a4968", |
620 |
| - "name": "", |
621 |
| - "info": "da arduino ricevo attuatore, tipo di attuatore e room corrispondente", |
622 |
| - "x": 1160, |
623 |
| - "y": 880, |
624 |
| - "wires": [] |
625 |
| - }, |
626 | 635 | {
|
627 | 636 | "id": "8b23d4b6fc9ad1ef",
|
628 | 637 | "type": "file in",
|
|
636 | 645 | "encoding": "utf8",
|
637 | 646 | "allProps": false,
|
638 | 647 | "x": 670,
|
639 |
| - "y": 980, |
| 648 | + "y": 1300, |
640 | 649 | "wires": [
|
641 | 650 | [
|
642 | 651 | "1107f97b9aa49722"
|
|
655 | 664 | "finalize": "",
|
656 | 665 | "libs": [],
|
657 | 666 | "x": 370,
|
658 |
| - "y": 980, |
| 667 | + "y": 1300, |
659 | 668 | "wires": [
|
660 | 669 | [
|
661 | 670 | "8b23d4b6fc9ad1ef"
|
|
674 | 683 | "finalize": "",
|
675 | 684 | "libs": [],
|
676 | 685 | "x": 980,
|
677 |
| - "y": 980, |
| 686 | + "y": 1300, |
678 | 687 | "wires": [
|
679 | 688 | [
|
680 | 689 | "19b43e1a0fb43f50"
|
|
694 | 703 | "encoding": "utf8",
|
695 | 704 | "allProps": false,
|
696 | 705 | "x": 1270,
|
697 |
| - "y": 980, |
| 706 | + "y": 1300, |
698 | 707 | "wires": [
|
699 | 708 | [
|
700 | 709 | "0bcfc84520ddafb2"
|
|
713 | 722 | "finalize": "",
|
714 | 723 | "libs": [],
|
715 | 724 | "x": 1520,
|
716 |
| - "y": 980, |
| 725 | + "y": 1300, |
717 | 726 | "wires": [
|
718 | 727 | [
|
719 | 728 | "c38d2690eac04451"
|
|
753 | 762 | "repair": false,
|
754 | 763 | "outputs": 4,
|
755 | 764 | "x": 1710,
|
756 |
| - "y": 980, |
| 765 | + "y": 1300, |
757 | 766 | "wires": [
|
758 | 767 | [
|
759 | 768 | "3153f241b098b8da"
|
|
783 | 792 | "statusVal": "",
|
784 | 793 | "statusType": "auto",
|
785 | 794 | "x": 1900,
|
786 |
| - "y": 920, |
| 795 | + "y": 1240, |
787 | 796 | "wires": []
|
788 | 797 | },
|
789 | 798 | {
|
|
799 | 808 | "statusVal": "",
|
800 | 809 | "statusType": "auto",
|
801 | 810 | "x": 1900,
|
802 |
| - "y": 1040, |
| 811 | + "y": 1360, |
803 | 812 | "wires": []
|
804 | 813 | },
|
805 | 814 | {
|
|
815 | 824 | "statusVal": "",
|
816 | 825 | "statusType": "auto",
|
817 | 826 | "x": 1900,
|
818 |
| - "y": 1000, |
| 827 | + "y": 1320, |
819 | 828 | "wires": []
|
820 | 829 | },
|
821 | 830 | {
|
|
831 | 840 | "statusVal": "",
|
832 | 841 | "statusType": "auto",
|
833 | 842 | "x": 1900,
|
834 |
| - "y": 960, |
| 843 | + "y": 1280, |
835 | 844 | "wires": []
|
836 | 845 | },
|
837 | 846 | {
|
|
1024 | 1033 | "type": "serial in",
|
1025 | 1034 | "z": "09012e75c72a4968",
|
1026 | 1035 | "name": "",
|
| 1036 | + "serial": "94b8abb47e4cb1f2", |
| 1037 | + "x": 90, |
| 1038 | + "y": 180, |
| 1039 | + "wires": [ |
| 1040 | + [ |
| 1041 | + "ead8458e27835fd5" |
| 1042 | + ] |
| 1043 | + ] |
| 1044 | + }, |
| 1045 | + { |
| 1046 | + "id": "d86ee55246645576", |
| 1047 | + "type": "serial in", |
| 1048 | + "z": "09012e75c72a4968", |
| 1049 | + "name": "", |
1027 | 1050 | "serial": "",
|
1028 |
| - "x": 230, |
1029 |
| - "y": 240, |
| 1051 | + "x": 90, |
| 1052 | + "y": 220, |
| 1053 | + "wires": [ |
| 1054 | + [ |
| 1055 | + "f5d4b6da7502dcc5" |
| 1056 | + ] |
| 1057 | + ] |
| 1058 | + }, |
| 1059 | + { |
| 1060 | + "id": "f58ad2d2abbb5940", |
| 1061 | + "type": "serial in", |
| 1062 | + "z": "09012e75c72a4968", |
| 1063 | + "name": "", |
| 1064 | + "serial": "", |
| 1065 | + "x": 90, |
| 1066 | + "y": 260, |
| 1067 | + "wires": [ |
| 1068 | + [ |
| 1069 | + "95a015623724305b" |
| 1070 | + ] |
| 1071 | + ] |
| 1072 | + }, |
| 1073 | + { |
| 1074 | + "id": "31a34bfbb86c9ddc", |
| 1075 | + "type": "serial in", |
| 1076 | + "z": "09012e75c72a4968", |
| 1077 | + "name": "", |
| 1078 | + "serial": "", |
| 1079 | + "x": 90, |
| 1080 | + "y": 300, |
| 1081 | + "wires": [ |
| 1082 | + [ |
| 1083 | + "490f2072cd94d40a" |
| 1084 | + ] |
| 1085 | + ] |
| 1086 | + }, |
| 1087 | + { |
| 1088 | + "id": "ead8458e27835fd5", |
| 1089 | + "type": "function", |
| 1090 | + "z": "09012e75c72a4968", |
| 1091 | + "name": "setSerial", |
| 1092 | + "func": "msg.serialID = \"/dev/tty/USB0\"\nreturn msg;", |
| 1093 | + "outputs": 1, |
| 1094 | + "noerr": 0, |
| 1095 | + "initialize": "", |
| 1096 | + "finalize": "", |
| 1097 | + "libs": [], |
| 1098 | + "x": 240, |
| 1099 | + "y": 180, |
| 1100 | + "wires": [ |
| 1101 | + [ |
| 1102 | + "272e66b82d47e0e4" |
| 1103 | + ] |
| 1104 | + ] |
| 1105 | + }, |
| 1106 | + { |
| 1107 | + "id": "f5d4b6da7502dcc5", |
| 1108 | + "type": "function", |
| 1109 | + "z": "09012e75c72a4968", |
| 1110 | + "name": "setSerial", |
| 1111 | + "func": "msg.serialID = \"/dev/tty/USB1\"\n\nreturn msg;", |
| 1112 | + "outputs": 1, |
| 1113 | + "noerr": 0, |
| 1114 | + "initialize": "", |
| 1115 | + "finalize": "", |
| 1116 | + "libs": [], |
| 1117 | + "x": 240, |
| 1118 | + "y": 220, |
| 1119 | + "wires": [ |
| 1120 | + [ |
| 1121 | + "272e66b82d47e0e4" |
| 1122 | + ] |
| 1123 | + ] |
| 1124 | + }, |
| 1125 | + { |
| 1126 | + "id": "95a015623724305b", |
| 1127 | + "type": "function", |
| 1128 | + "z": "09012e75c72a4968", |
| 1129 | + "name": "setSerial", |
| 1130 | + "func": "msg.serialID = \"/dev/tty/USB2\"\n\nreturn msg;", |
| 1131 | + "outputs": 1, |
| 1132 | + "noerr": 0, |
| 1133 | + "initialize": "", |
| 1134 | + "finalize": "", |
| 1135 | + "libs": [], |
| 1136 | + "x": 240, |
| 1137 | + "y": 260, |
| 1138 | + "wires": [ |
| 1139 | + [ |
| 1140 | + "272e66b82d47e0e4" |
| 1141 | + ] |
| 1142 | + ] |
| 1143 | + }, |
| 1144 | + { |
| 1145 | + "id": "490f2072cd94d40a", |
| 1146 | + "type": "function", |
| 1147 | + "z": "09012e75c72a4968", |
| 1148 | + "name": "setSerial", |
| 1149 | + "func": "msg.serialID = \"/dev/tty/USB3\"\n\nreturn msg;", |
| 1150 | + "outputs": 1, |
| 1151 | + "noerr": 0, |
| 1152 | + "initialize": "", |
| 1153 | + "finalize": "", |
| 1154 | + "libs": [], |
| 1155 | + "x": 240, |
| 1156 | + "y": 300, |
1030 | 1157 | "wires": [
|
1031 | 1158 | [
|
1032 | 1159 | "272e66b82d47e0e4"
|
|
0 commit comments