添加MqttServer插件使用示例

This commit is contained in:
2248356998 qq.com
2023-03-07 19:18:01 +08:00
parent f1e648915d
commit 356e4172a9
69 changed files with 216 additions and 89 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
(()=>{"use strict";var e,t,r,a,o,f={},n={};function c(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return f[e].call(r.exports,r,r.exports,c),r.exports}c.m=f,e=[],c.O=(t,r,a,o)=>{if(!r){var f=1/0;for(b=0;b<e.length;b++){r=e[b][0],a=e[b][1],o=e[b][2];for(var n=!0,i=0;i<r.length;i++)(!1&o||f>=o)&&Object.keys(c.O).every((e=>c.O[e](r[i])))?r.splice(i--,1):(n=!1,o<f&&(f=o));if(n){e.splice(b--,1);var d=a();void 0!==d&&(t=d)}}return t}o=o||0;for(var b=e.length;b>0&&e[b-1][2]>o;b--)e[b]=e[b-1];e[b]=[r,a,o]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var f={};t=t||[null,r({}),r([]),r(r)];for(var n=2&a&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,c.d(o,f),o},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,r)=>(c.f[r](e,t),t)),[])),c.u=e=>"assets/js/"+({22:"879054ab",53:"935f2afb",175:"c361d1eb",189:"186a3eb8",195:"c4f5d8e4",217:"b8d02a9c",242:"26929101",261:"cb4f4ca9",320:"b86d2c6e",373:"760264af",514:"1be78505",544:"a9d01d88",564:"976454a3",676:"2ae4ef1c",866:"ec4c2846",875:"444af13b",889:"7f2059f1",916:"f21858e6",918:"17896441",920:"1a4e3797",966:"4ab8a817",994:"53c1042e",996:"19b7f836"}[e]||e)+"."+{22:"2e22548b",53:"6cff3cf4",175:"ee8bab92",189:"d8710378",195:"3eff4979",217:"bdf25ce5",242:"5ec9b9bb",261:"983c3141",320:"82fd5222",373:"3ed61cd5",443:"a35c493a",514:"79ca6d8a",523:"bb83377d",525:"ee7ff280",544:"0aefd47f",564:"7efa7a24",676:"f772a5d3",866:"de5833c1",875:"a37fbda4",889:"1d13a28e",916:"b12940cb",918:"e52e3593",920:"83cee253",966:"7d0118d3",972:"a79306f2",994:"e1e7c39f",996:"98239486"}[e]+".js",c.miniCssF=e=>{},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="thingsgateway:",c.l=(e,t,r,f)=>{if(a[e])a[e].push(t);else{var n,i;if(void 0!==r)for(var d=document.getElementsByTagName("script"),b=0;b<d.length;b++){var u=d[b];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+r){n=u;break}}n||(i=!0,(n=document.createElement("script")).charset="utf-8",n.timeout=120,c.nc&&n.setAttribute("nonce",c.nc),n.setAttribute("data-webpack",o+r),n.src=e),a[e]=[t];var l=(t,r)=>{n.onerror=n.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],n.parentNode&&n.parentNode.removeChild(n),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=l.bind(null,n.onerror),n.onload=l.bind(null,n.onload),i&&document.head.appendChild(n)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="/thingsgateway/",c.gca=function(e){return e={17896441:"918",26929101:"242","879054ab":"22","935f2afb":"53",c361d1eb:"175","186a3eb8":"189",c4f5d8e4:"195",b8d02a9c:"217",cb4f4ca9:"261",b86d2c6e:"320","760264af":"373","1be78505":"514",a9d01d88:"544","976454a3":"564","2ae4ef1c":"676",ec4c2846:"866","444af13b":"875","7f2059f1":"889",f21858e6:"916","1a4e3797":"920","4ab8a817":"966","53c1042e":"994","19b7f836":"996"}[e]||e,c.p+c.u(e)},(()=>{var e={303:0,532:0};c.f.j=(t,r)=>{var a=c.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var f=c.p+c.u(t),n=new Error;c.l(f,(r=>{if(c.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),f=r&&r.target&&r.target.src;n.message="Loading chunk "+t+" failed.\n("+o+": "+f+")",n.name="ChunkLoadError",n.type=o,n.request=f,a[1](n)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,f=r[0],n=r[1],i=r[2],d=0;if(f.some((t=>0!==e[t]))){for(a in n)c.o(n,a)&&(c.m[a]=n[a]);if(i)var b=i(c)}for(t&&t(r);d<f.length;d++)o=f[d],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return c.O(b)},r=self.webpackChunkthingsgateway=self.webpackChunkthingsgateway||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})()})();

View File

@@ -0,0 +1 @@
(()=>{"use strict";var e,t,r,a,o,f={},n={};function c(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return f[e].call(r.exports,r,r.exports,c),r.exports}c.m=f,e=[],c.O=(t,r,a,o)=>{if(!r){var f=1/0;for(b=0;b<e.length;b++){r=e[b][0],a=e[b][1],o=e[b][2];for(var n=!0,i=0;i<r.length;i++)(!1&o||f>=o)&&Object.keys(c.O).every((e=>c.O[e](r[i])))?r.splice(i--,1):(n=!1,o<f&&(f=o));if(n){e.splice(b--,1);var d=a();void 0!==d&&(t=d)}}return t}o=o||0;for(var b=e.length;b>0&&e[b-1][2]>o;b--)e[b]=e[b-1];e[b]=[r,a,o]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var f={};t=t||[null,r({}),r([]),r(r)];for(var n=2&a&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,c.d(o,f),o},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,r)=>(c.f[r](e,t),t)),[])),c.u=e=>"assets/js/"+({22:"879054ab",53:"935f2afb",175:"c361d1eb",189:"186a3eb8",195:"c4f5d8e4",217:"b8d02a9c",242:"26929101",261:"cb4f4ca9",320:"b86d2c6e",373:"760264af",514:"1be78505",526:"fd321996",544:"a9d01d88",564:"976454a3",676:"2ae4ef1c",866:"ec4c2846",875:"444af13b",889:"7f2059f1",916:"f21858e6",918:"17896441",920:"1a4e3797",966:"4ab8a817",994:"53c1042e",996:"19b7f836"}[e]||e)+"."+{22:"dbe4a4ff",53:"a654b199",175:"ee8bab92",189:"d8710378",195:"3eff4979",217:"bdf25ce5",242:"143c32d8",261:"983c3141",320:"82fd5222",373:"3ed61cd5",443:"a35c493a",514:"79ca6d8a",523:"bb83377d",525:"ee7ff280",526:"c8b3ede1",544:"0aefd47f",564:"7efa7a24",676:"f772a5d3",866:"de5833c1",875:"a37fbda4",889:"57f5f831",916:"b12940cb",918:"e52e3593",920:"83cee253",966:"7d0118d3",972:"a79306f2",994:"e1e7c39f",996:"98239486"}[e]+".js",c.miniCssF=e=>{},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="thingsgateway:",c.l=(e,t,r,f)=>{if(a[e])a[e].push(t);else{var n,i;if(void 0!==r)for(var d=document.getElementsByTagName("script"),b=0;b<d.length;b++){var u=d[b];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+r){n=u;break}}n||(i=!0,(n=document.createElement("script")).charset="utf-8",n.timeout=120,c.nc&&n.setAttribute("nonce",c.nc),n.setAttribute("data-webpack",o+r),n.src=e),a[e]=[t];var l=(t,r)=>{n.onerror=n.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],n.parentNode&&n.parentNode.removeChild(n),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=l.bind(null,n.onerror),n.onload=l.bind(null,n.onload),i&&document.head.appendChild(n)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="/thingsgateway/",c.gca=function(e){return e={17896441:"918",26929101:"242","879054ab":"22","935f2afb":"53",c361d1eb:"175","186a3eb8":"189",c4f5d8e4:"195",b8d02a9c:"217",cb4f4ca9:"261",b86d2c6e:"320","760264af":"373","1be78505":"514",fd321996:"526",a9d01d88:"544","976454a3":"564","2ae4ef1c":"676",ec4c2846:"866","444af13b":"875","7f2059f1":"889",f21858e6:"916","1a4e3797":"920","4ab8a817":"966","53c1042e":"994","19b7f836":"996"}[e]||e,c.p+c.u(e)},(()=>{var e={303:0,532:0};c.f.j=(t,r)=>{var a=c.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var f=c.p+c.u(t),n=new Error;c.l(f,(r=>{if(c.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),f=r&&r.target&&r.target.src;n.message="Loading chunk "+t+" failed.\n("+o+": "+f+")",n.name="ChunkLoadError",n.type=o,n.request=f,a[1](n)}}),"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,f=r[0],n=r[1],i=r[2],d=0;if(f.some((t=>0!==e[t]))){for(a in n)c.o(n,a)&&(c.m[a]=n[a]);if(i)var b=i(c)}for(t&&t(r);d<f.length;d++)o=f[d],c.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return c.O(b)},r=self.webpackChunkthingsgateway=self.webpackChunkthingsgateway||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})()})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://diego2098.gitee.io/thingsgateway/search</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/05%E3%80%81%E7%BD%91%E5%85%B3%E9%85%8D%E7%BD%AE/collectdevice</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/05%E3%80%81%E7%BD%91%E5%85%B3%E9%85%8D%E7%BD%AE/otherconfig</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/05%E3%80%81%E7%BD%91%E5%85%B3%E9%85%8D%E7%BD%AE/plugincore</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/05%E3%80%81%E7%BD%91%E5%85%B3%E9%85%8D%E7%BD%AE/uploaddevice</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/05%E3%80%81%E7%BD%91%E5%85%B3%E9%85%8D%E7%BD%AE/variable</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/06%E3%80%81%E9%87%87%E9%9B%86%E9%A9%B1%E5%8A%A8%E8%AF%B4%E6%98%8E/modbus</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/07%E3%80%81%E4%B8%8A%E4%BC%A0%E9%A9%B1%E5%8A%A8%E8%AF%B4%E6%98%8E/ModbusServer</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/07%E3%80%81%E4%B8%8A%E4%BC%A0%E9%A9%B1%E5%8A%A8%E8%AF%B4%E6%98%8E/MqttClient</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/07%E3%80%81%E4%B8%8A%E4%BC%A0%E9%A9%B1%E5%8A%A8%E8%AF%B4%E6%98%8E/MqttServer</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/08%E3%80%81Demo/modbusdemo</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/08%E3%80%81Demo/modbusserverdemo</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/%E6%94%AF%E6%8C%81%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/quickstart</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/upgrade</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url></urlset>
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://diego2098.gitee.io/thingsgateway/search</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/05%E3%80%81%E7%BD%91%E5%85%B3%E9%85%8D%E7%BD%AE/collectdevice</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/05%E3%80%81%E7%BD%91%E5%85%B3%E9%85%8D%E7%BD%AE/otherconfig</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/05%E3%80%81%E7%BD%91%E5%85%B3%E9%85%8D%E7%BD%AE/plugincore</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/05%E3%80%81%E7%BD%91%E5%85%B3%E9%85%8D%E7%BD%AE/uploaddevice</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/05%E3%80%81%E7%BD%91%E5%85%B3%E9%85%8D%E7%BD%AE/variable</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/06%E3%80%81%E9%87%87%E9%9B%86%E9%A9%B1%E5%8A%A8%E8%AF%B4%E6%98%8E/modbus</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/07%E3%80%81%E4%B8%8A%E4%BC%A0%E9%A9%B1%E5%8A%A8%E8%AF%B4%E6%98%8E/ModbusServer</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/07%E3%80%81%E4%B8%8A%E4%BC%A0%E9%A9%B1%E5%8A%A8%E8%AF%B4%E6%98%8E/MqttClient</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/07%E3%80%81%E4%B8%8A%E4%BC%A0%E9%A9%B1%E5%8A%A8%E8%AF%B4%E6%98%8E/MqttServer</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/08%E3%80%81Demo/modbusdemo</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/08%E3%80%81Demo/modbusserverdemo</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/08%E3%80%81Demo/mqttserverdemo</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/%E6%94%AF%E6%8C%81%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/quickstart</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/docs/upgrade</loc><changefreq>weekly</changefreq><priority>0.5</priority></url><url><loc>https://diego2098.gitee.io/thingsgateway/</loc><changefreq>weekly</changefreq><priority>0.5</priority></url></urlset>

View File

@@ -26,7 +26,7 @@ sidebar_label: 7.1、MqttServer
:::
Rpc实体规则
RpcJson
```
{
"Name":"tt8",//变量名称
@@ -34,7 +34,24 @@ Rpc实体规则
"RpcId":"testid"//当前RpcId
}
```
Rpc返回实体规则
Rpc返回Json
```
{
"RpcId":"testid", //RpcId
"Message":"操作成功",//返回消息
"Success":true//是否成功
}
```
变量Json
```
{
"RpcId":"testid", //RpcId
"Message":"操作成功",//返回消息
"Success":true//是否成功
}
```
设备Json:
```
{
"RpcId":"testid", //RpcId
@@ -44,6 +61,7 @@ Rpc返回实体规则
```
### (二)变量配置

View File

@@ -22,7 +22,7 @@ sidebar_label: 7.2、MqttClient
| 变量Topic | 变量信息订阅Topic | ThingsGateway/Variable |
| 设备Topic | 设备信息订阅Topic | ThingsGateway/Device |
Rpc实体规则
RpcJson
```
{
"Name":"tt8",//变量名称
@@ -30,7 +30,24 @@ Rpc实体规则
"RpcId":"testid"//当前RpcId
}
```
Rpc返回实体规则
Rpc返回Json
```
{
"RpcId":"testid", //RpcId
"Message":"操作成功",//返回消息
"Success":true//是否成功
}
```
变量Json
```
{
"RpcId":"testid", //RpcId
"Message":"操作成功",//返回消息
"Success":true//是否成功
}
```
设备Json:
```
{
"RpcId":"testid", //RpcId

View File

@@ -0,0 +1,74 @@
---
id: mqttserverdemo
title: 使用MqttServer插件
sidebar_label: 8.3、使用MqttServer插件
---
上一篇文章:[使用ModbusServer插件](modbusserverdemo) 已经介绍了ModbusServer
下面演示网关提供的MqttServer插件使用
**工具**
Mqtt客户端Mqttx
### (一)建立上传设备
<img src={require('../../static/img/mqttserverdemo1.png').default} width="400" />
<img src={require('../../static/img/mqttserverdemo2.png').default} width="400"/>
设备属性默认,允许写入
### (二)重启采集线程
![](/img/modbusdemo4.png)
点击右边浮动按钮,全部重启
### Mqtt连接到网关
<img src={require('../../static/img/mqttserverdemo3.png').default} />
使用Mqttx连接到网关
:::tip
填写对应的UserName与Password可以在第三方授权用户菜单中自行创建或者使用默认用户Admin默认密码123456
![](/img/mqttserver1.png)
:::
- 连接成功后添加设备订阅Topic
<img src={require('../../static/img/mqttserverdemo4.png').default} width="600" />
- 首次订阅成功,会自动接收到当前的全部采集设备信息
<img src={require('../../static/img/mqttserverdemo5.png').default} width="600" />
- 添加变量订阅Topic效果与设备Topic一致
<img src={require('../../static/img/mqttserverdemo6.png').default} width="400" />
<img src={require('../../static/img/mqttserverdemo7.png').default} width="400" />
- 当前变量值变化时,也会同步接收到新数据
<img src={require('../../static/img/mqttserverdemo8.png').default} width="800" />
- 同理,设备状态变化时,同步接收到新数据
<img src={require('../../static/img/mqttserverdemo9.png').default} width="800" />
- Rpc写入变量值
首先需要订阅Rpc状态返回的Topic在前面我们定义Topic为ThingsGateway/RpcSub
<img src={require('../../static/img/mqttserverdemo10.png').default} width="600" />
然后往ThingsGateway/RpcWrite Topic上发布新内容,具体格式可查看MqttServer插件说明
<img src={require('../../static/img/mqttserverdemo11.png').default} width="800" />
可以看到回复结果为Success True并且在订阅变量Topic时也会接收到新的变量值

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB