Categories
Techstuff VSCP

VERY SIMPLE Control Protocol

När jag sitter här och dokumentera konfigurationsfilen för VSCP servern så måste jag le lite för mig själv. Också det enklaste verktygen behöver en rätt komplex configuration.

Fast inget att avskräckas av. Det finns många inställningar. De flesta behöver bara några stycken.

VERY SIMPLE? Jodå

{
    "runasuser" : "vscp",
    "debug" : 0,		
    "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:00:00:00:00:00:00:00:01",
    "servername" : "The VSCP daemon",
    "classtypedb" : "/var/lib/vscp/vscpd/vscp_events.sqlite3",
    "maindb" : "/var/lib/vscp/vscpd/vscp.sqlite3",
    "discoverydb" : "/var/lib/vscp/vscpd/vscp.sqlite3",
    "vscpkey" : "/etc/vscp/vscp.key",
    "logging" : {
        "file-enable-log": true,
        "file-log-level" : "info",
        "file-pattern" : "[vscp] [%^%l%$] %v",
        "file-path" : "/var/log/vscp/vscpd.log",
        "file-max-size" : 5242880,
        "file-max-files" : 7,
        "console-enable-log": false,
        "console-log-level" : "info",
        "console-pattern" : "[vscp] [%^%l%$] %v"
    },

    "mqtt" : {
        "bind" : "",   
        "host" : "192.168.1.7",
        "port" : 1883,
        "mqtt-options" : {
            "tcp-nodelay" : true,
            "protocol-version": 311,
            "receive-maximum": 20,
            "send-maximum": 20,
            "ssl-ctx-with-defaults": 0,
            "tls-ocsp-required": 0,
            "tls-use-os-certs" : 0
        },
        "user" : "vscp",
        "password": "secret",
        "clientid" : "the-vscp-daemon",  
        "publish-format" : "json",
        "subscribe-format" : "auto",
        "qos" : 1,
        "bcleansession" : false,
        "bretain" : false,      
        "keepalive" : 60,
        "reconnect" : {
          "delay" : 2,
          "delay-max" : 10,
          "exponential-backoff" : false
        },
        "tls" : {
            "cafile" : "",
            "capath" : "",
            "certfile" : "",
            "keyfile" : "",
            "pwkeyfile" : "",
            "no-hostname-checking" : true,
            "cert-reqs" : 0,
            "version": "",
            "ciphers": "",
            "psk": "",
            "psk-identity" : ""
        },
        "will": {
            "topic": "Last Will",
            "qos": 0,
            "retain": false,
            "payload": "This is the end"
        },
        "subscribe": [
            {
                "topic": "test1/topic/A",
                "qos": 0,
                "v5-options": 0,
                "format": "auto"
            },
            {
                "topic": "test2/topic/B",
                "qos": 0,
                "v5-options": 0,
                "format": "auto"
            },
            {
                "topic": "test/#",
                "qos": 0,
                "v5-options": 0,
                "format": "auto"
            },
            {
                "topic": "test2/#",
                "qos": 0,
                "v5-options": 0,
                "format": "auto"
            }
        ],
        "bescape-pub-topics": true,
        "user-escapes": {
            "escape1": "valu1",
            "escape2": "valu2"
        },
        "publish": [
            {
                "topic" : "publish/topic/json",
                "qos" : 0,
                "retain" : false,
                "format": "json"
            },
            {
                "topic" : "publish/topic/xml",
                "qos" : 0,
                "retain" : false,
                "format": "xml"
            },
            {
                "topic" : "publish/topic/string",
                "qos" : 0,
                "retain" : false,
                "format": "string"
            },
            {
                "topic" : "publish/topic/binary",
                "qos" : 0,
                "retain" : false,
                "format": "binary"
            },
            {
                "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                "qos" : 0,
                "retain" : false,
                "format": "json"
            }    
        ],      
        "v5" : {
            "user-properties": {
                "prop1" : "value",
                "prop2" : "value"    
            } 
        }
    },

    "drivers" : {
        "level1" : [
            {
                "enable" : false,
                "name" : "logger",
                "config" : "/tmp/canallog.txt",
                "flags" : 1,
                "translation" : 2,
                "path" : "/var/lib/vscp/drivers/level1/vscpl1drv-logger.so",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:01:00:00:00:00:00:00:01",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level1-logger-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            },
            {
                "enable" : false,
                "name" : "can4vscp",
                "config" : "/dev/ttyUSB0",
                "flags" : 0,
                "translation" : 2,
                "path" : "/var/lib/vscp/drivers/level1/vscpl1drv-can4vscp.so",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:01:00:00:00:00:00:00:02",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level1-can4vscp-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            },
            {
                "enable" : true,
                "name" : "socketcanl1",
                "config" : "can0",
                "flags" : 0,
                "translation" : 2,
                "path" : "/var/lib/vscp/drivers/level1/vscpl1drv-socketcan.so.1.1.1",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:01:00:00:00:00:00:00:03",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level1-socketcan-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            },
            {
                "enable" : false,
                "name" : "can232",
                "config" : "/dev/ttyS0;19200;0;0;125",
                "flags" : 0,
                "translation" : 2,
                "path" : "/var/lib/vscp/drivers/level1/vscpl1drv-can232.so",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:01:00:00:00:00:00:00:04",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level1-can232-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            }
        ],
        "level2" : [
            {
                "enable" : false,
                "name" : "Logger",
                "path-driver" : "/var/lib/vscp/drivers/level2/vscpl2drv-logger.so",
                "path-config" : "/var/lib/vscp/vscpd/logger2.conf",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:02:00:00:00:00:00:00:01",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level2-logger-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            },
            {
                "enable" : false,
                "name" : "lmsensors",
                "path-driver" : "/var/lib/vscp/drivers/level2/vscpl2drv-lmsensors.so",
                "path-config" : "/var/lib/vscp/vscpd/lmsensors.conf",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:06:00:00:00:00:00:00:00",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level2-lmsensors-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            },
            {
                "enable" : false,
                "name" : "socketcan",
                "path-driver" : "/var/lib/vscp/drivers/level2/vscpl2drv-socketcan.so",
                "path-config" : "/var/lib/vscp/vscpd/socketcan.conf",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:07:00:00:00:00:00:00:00",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level2-socketcan-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            },
            {
                "enable" : false,
                "name" : "mqtt",
                "path-driver" : "/var/lib/vscp/drivers/level2/vscpl2drv-mqtt.so",
                "path-config" : "/var/lib/vscp/vscpd/mqtt.conf",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:08:00:00:00:00:00:00:00",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level2-mqtt-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            },
            {
                "enable" : false,
                "name" : "tcpiplink",
                "path-driver" : "/var/lib/vscp/drivers/level2/vscpl2drv-tcpiplink.so",
                "path-config" : "/var/lib/vscp/vscpd/tcpiplink.conf",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:09:00:00:00:00:00:00:00",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level2-tcpiplink-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            },
            {
                "enable" : false,
                "name" : "rawethernet",
                "path-driver" : "/var/lib/vscp/drivers/level2/vscpl2drv-raweth.so",
                "path-config" : "/var/lib/vscp/vscpd/raweth.conf",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:0A:00:00:00:00:00:00:00",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level2-rawethernet-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            },
            {
                "enable" : false,
                "name" : "sim",
                "path-driver" : "/var/lib/vscp/drivers/level2/vscpl2drv-sim.so",
                "path-config" : "/var/lib/vscp/vscpd/sim.conf",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:0B:00:00:00:00:00:00:00",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level2-simulation-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            },
            {
                "enable" : false,
                "name" : "1-wire",
                "path-driver" : "/var/lib/vscp/drivers/level2/vscpl2drv-wire1.so",
                "path-config" : "/var/lib/vscp/vscpd/wire1.conf",
                "guid" : "FF:FF:FF:FF:FF:FF:FF:F5:0C:00:00:00:00:00:00:00",

                "mqtt" : {
                    "bind" : "",   
                    "host" : "192.168.1.7",
                    "port" : 1883,
                    "mqtt-options" : {
                        "tcp-nodelay" : true,
                        "protocol-version": 311,
                        "receive-maximum": 20,
                        "send-maximum": 20,
                        "ssl-ctx-with-defaults": 0,
                        "tls-ocsp-required": 0,
                        "tls-use-os-certs" : 0
                    },
                    "user" : "vscp",
                    "password": "secret",
                    "clientid" : "vscp-level2-one-wire-driver",  
                    "publish-format" : "json",
                    "subscribe-format" : "auto",
                    "qos" : 1,
                    "bcleansession" : false,
                    "bretain" : false,      
                    "keepalive" : 60,
                    "reconnect" : {
                      "delay" : 2,
                      "delay-max" : 10,
                      "exponential-backoff" : false
                    },
                    "tls" : {
                        "cafile" : "",
                        "capath" : "",
                        "certfile" : "",
                        "keyfile" : "",
                        "pwkeyfile" : "",
                        "no-hostname-checking" : true,
                        "cert-reqs" : 0,
                        "version": "",
                        "ciphers": "",
                        "psk": "",
                        "psk-identity" : ""
                    },
                    "will": {
                        "topic": "Last Will",
                        "qos": 0,
                        "retain": false,
                        "payload": "This is the end"
                    },
                    "subscribe": [
                        {
                            "topic": "test1/topic/A",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/topic/B",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        },
                        {
                            "topic": "test2/#",
                            "qos": 0,
                            "v5-options": 0,
                            "format": "auto"
                        }
                    ],
                    "bescape-pub-topics": true,
                    "user-escapes": {
                        "escape1": "valu1",
                        "escape2": "valu2"
                    },
                    "publish": [
                        {
                            "topic" : "publish/topic/json",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        },
                        {
                            "topic" : "publish/topic/xml",
                            "qos" : 0,
                            "retain" : false,
                            "format": "xml"
                        },
                        {
                            "topic" : "publish/topic/string",
                            "qos" : 0,
                            "retain" : false,
                            "format": "string"
                        },
                        {
                            "topic" : "publish/topic/binary",
                            "qos" : 0,
                            "retain" : false,
                            "format": "binary"
                        },
                        {
                            "topic" : "publish/topic/{{datetime}}/{{user}}/C",
                            "qos" : 0,
                            "retain" : false,
                            "format": "json"
                        }    
                    ],      
                    "v5" : {
                        "user-properties": {
                            "prop1" : "value",
                            "prop2" : "value"    
                        } 
                    }
                },
            }
        ]
    }
}

Lämna en kommentar

This site uses Akismet to reduce spam. Learn how your comment data is processed.