lprhodes / homebridge-broadlink-rm

Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
573 stars 285 forks source link

homebridge Broadlink and Camera-ffmpeg in one config.json file #567

Open dietlow opened 4 years ago

dietlow commented 4 years ago

I can't combine two of my config files together any help would be great. I have my broad link set up with one config file and my Camera-ffmpeg set up with another and I would like to combine them but I can't figure it out any help would be appreciated . Anything with a blank I have removed for security purposes. Thank you for your help.

{ "bridge":{ "name":"Homecam2", "username":"blank", "port":blank, "pin":"blank" }, "description":"Homecam",

"platforms":[ {

  "platform": "Camera-ffmpeg",
  "cameras": [
    {
      "name": "Doorcam",
      "videoConfig": {
        "debug": true,
        "source": "this is my camra link ",
        "stillImageSource": "blank",
        "maxStreams": 10,
        "maxWidth": 640,
        "maxHeight": 480,
        "maxFPS": 30,
        "audio": false,
        "additionalCommandline": "-x264-params \"intra-refresh=1:bframes=0\""
      }
    },

  {
    "name": "Patio",
    "videoConfig": {
      "debug": true,
      "source": "blank",
      "stillImageSource": "blank",
      "maxStreams": 3,
      "maxWidth": 1280,
      "maxHeight": 720,
      "maxFPS": 30,
      "additionalCommandline": "-x264-params \"intra-refresh=1:bframes=0\""
    }
    },

  {
    "name": "Garage",
    "videoConfig": {
      "source": "blank",
      "stillImageSource": "blank",
      "maxStreams": 3,
      "maxWidth": 640,
      "maxHeight": 480,
      "maxFPS": 30,
      "debug": true,
      "additionalCommandline": "-x264-params \"intra-refresh=1:bframes=0\""
    }
    },

      {
        "name": "Stairs",
        "videoConfig": {
          "source": "blank",
          "stillImageSource": "blank",
          "maxStreams": 3,
          "maxWidth": 640,
          "maxHeight": 480,
          "maxFPS": 30,
          "debug": true,
          "additionalCommandline": "-x264-params \"intra-refresh=1:bframes=0\""
        }
        },

  {
    "name": "DOOR",
    "videoConfig": {
     "source": "blank",
      "stillImageSource": "blank",
      "maxStreams": 3,
      "maxWidth": 640,
      "maxHeight": 480,
      "maxFPS": 15,
      "debug": true,
      "additionalCommandline": "-x264-params \"intra-refresh=1:bframes=0\""

      }
    }
  ]
}

] }

----------------------------------- Second config file------------------------

{ "bridge": { "name": "Homebridge", "username": "blank", "port": blank, "pin": "blank" }, "hosts": [ { "address": "blank", "mac": "blank", "isRFSupported": true } ], "description": "Homebridge", "accessories": [], "platforms": [ { "platform": "BroadlinkRM", "name": "Broadlink RM", "hideScanFrequencyButton": true, "hideLearnButton": true, "hideWelcomeMessage": true, "accessories": [ { "name": "Auto-off Switch", "type": "switch", "enableAutoOff": true, "onDuration": 5, "data": { "on": "2600500000012...", "off": "2600500000012..." } }, { "name": "TV", "host": "192.168.2.27", "type": "switch", "data": { "on": "26007600093c0a19091a091a0919091a093c093d0919093d0919091a091a093c091a090001753932300606790829150001e309000119093c091a091a0919091a093c091a091a093c091a093c093c0a3c091a093c0900059b093c091a0919091a091a09190a3c093c091a093c091a091a0919093d091909000d050000", "off": "26007600093c0a19091a091a0919091a093c093d0919093d0919091a091a093c091a090001753932300606790829150001e309000119093c091a091a0919091a093c091a091a093c091a093c093c0a3c091a093c0900059b093c091a0919091a091a09190a3c093c091a093c091a091a0919093d091909000d050000" } }, { "name": "Audio box", "host": "192.168.2.27", "type": "switch", "data": { "on": "260054004e1426151314261513142714131412161215131412161215260003514d15251612152714131427141314131513141314121612152700034f4e142615131427141315251612151314131413151314131427000d0500000000", "off": "260054004e1426151314261513142714131412161215131412161215260003514d15251612152714131427141314131513141314121612152700034f4e142615131427141315251612151314131413151314131427000d0500000000" } }, { "name": "Music Amp on", "host": "192.168.2.247", "type": "switch", "enableAutoOff": false, "onDuration": 1, "data": { "on": "2600580000012794123812131237123713371237153414121113153412131312121312131213143514111237121314111534153514111336143614101435123713131411113814101300052a0001294914000c5500012a4712000d05", "off": "2600580000012894123713131138113812381138123712131213123713121212131312131113113813371213121312131237123811131138131213371237123713131113123712131300052a0001274a12000c580001274a12000d05" } }, { "name": "Mute TV", "host": "192.168.2.27", "type": "switch", "enableAutoOff": false, "onDuration": 1, "data": { "on": "260054004d1512161215271413142714121513151314131412161215270003634d1512161116251612152714141312161215131411161315250003644e151215121526151215271413151314121513151215121526000d0500000000", "off": "260054004d1512161215271413142714121513151314131412161215270003634d1512161116251612152714141312161215131411161315250003644e151215121526151215271413151314121513151215121526000d0500000000" } }, { "name": "Apple Tv Audio", "host": "192.168.2.27", "enableAutoOff": false, "type": "switch", "data": { "on": "260054004e1413152615121513141215271412161314121513151314260003644d1512152615131513141215261512151315121513141216250003654d151314261512151216131427141215121513151314131427000d0500000000", "off": "260054004e14131427141215271412152714271413151314121513142700033d4e14131427141215271412152714271413151314131413152600033e4e141315261512152615131427142714121513151314131427000d0500000000" } }, { "name": "O Apple Tv Audio", "host": "192.168.2.27", "enableAutoOff": true, "type": "switch", "data": { "on": "260054004e1427141314271427142714271427141314131413151215270003144e1427141315251527142714271427141315131412151314270003174e142813131427142714271427142714121512161314131426000d0500000000", "off": "260054004e14131427141215271412152714271413151314121513142700033d4e14131427141215271412152714271413151314131413152600033e4e141315261512152615131427142714121513151314131427000d0500000000" } }, { "name": "Phono Music Amp", "host": "192.168.2.247", "type": "switch", "enableAutoOff": true, "onDuration": 1, "data": "2600580000012695113812141435113811381238113812141014143511141412101510141411143511141114141114351114101414121435113811381238111410391435143614101400052900012a4712000c580001294811000d05" }, { "name": "Bluetooth Music Amp", "host": "192.168.2.247", "type": "switch", "enableAutoOff": true, "onDuration": 1, "data": "260058000001289413361410163415341534163414351510151012381311141115101212160f153515101534151014361311131215101436123713111336161015341534163415101200052b0001294715000c550001294715000d05" }, { "name": "Tuner input Music Amp", "host": "192.168.2.247", "type": "switch", "enableAutoOff": true, "onDuration": 1, "data": "2600580000012794133613121337133613361238113813121213113813121114111412121214113813361312121312371312131212141137131211381237121411381336133713121100052c0001254b13000c570001274a13000d05" }, { "name": "Android Audio", "host": "192.168.2.27", "enableAutoOff": true, "type": "switch", "data": { "on": "260054004f13271413141315261512152615261512151215131512152600033d4f13271412151315261512152615271412151315121513142700033c4e132714131513142714121527142714131512151314121526000d0500000000", "off": "260054004e14131427141215271412152714271413151314121513142700033d4e14131427141215271412152714271413151314131413152600033e4e141315261512152615131427142714121513151314131427000d0500000000" } }, { "name": "TV Audio", "host": "192.168.2.27", "type": "switch", "enableAutoOff": true, "onDuration": 1, "data": "260054004e14131427141215271412152714271413151314121513142700033d4e14131427141215271412152714271413151314131413152600033e4e141315261512152615131427142714121513151314131427000d0500000000" }, { "name": "M-V up", "host": "192.168.2.247", "type": "switch", "enableAutoOff": true, "onDuration": 2.5, "data": [ { "data": "260050000001299214361311143613361435143613361411141113371311141114111411131213361435141114361336141113111412133614111336131213121336143514361312140005290001284814000d050000000000000000", "sendCount": 1, "interval": 0.6 } ] }, { "name": "Double Up music", "host": "192.168.2.247", "type": "switch", "enableAutoOff": true, "onDuration": 2.5, "data": [ { "data": "260050000001299214361311143613361435143613361411141113371311141114111411131213361435141114361336141113111412133614111336131213121336143514361312140005290001284814000d050000000000000000", "sendCount": 3, "interval": 0.6 } ] }, { "name": "Double down music", "host": "192.168.2.247", "type": "switch", "enableAutoOff": true, "onDuration": 2.5, "data": [ { "data": "260058000001259611381114143512381138123712381114101514351114141110141412141114351114103914351436141014121411103914351411141114111039143511381510140005290001294812000c580001254b12000d05", "sendCount": 3, "interval": 0.6 } ] }, { "name": "M-V Down", "host": "192.168.2.247", "type": "switch", "enableAutoOff": true, "onDuration": 2.5, "data": [ { "data": "260058000001259611381114143512381138123712381114101514351114141110141412141114351114103914351436141014121411103914351411141114111039143511381510140005290001294812000c580001254b12000d05", "sendCount": 1, "interval": 0.6 } ] }, { "name": "Volume Up", "host": "192.168.2.27", "type": "switch", "enableAutoOff": true, "onDuration": 2.5, "data": [ { "data": "260034014e1413142714121514142714131413141315131412151315270003634e1412152615121513142714131513141215131513141314270003664e1412152714121512152714131512151314121613141314270003644e1413142714131413152615121512151215131513141314270003644e1413142714131412152714131512151314131513141314270003634e1412152714131413152615131413141216131413141315260003644e1412152714121513152615131413141215141413141314260003654d1612142516131512152615121512151315121513141315250003644e1515122616111512152715111612161115121612151216250003654d1611162516111611162615121513141116121613151116250003674d161017251512161215271412151215121612171015121625000d0500000000", "sendCount": 5, "interval": 0.6 } ] }, { "name": "Double Up", "host": "192.168.2.27", "type": "switch", "enableAutoOff": true, "onDuration": 2.5, "data": [ { "data": "260034014e1413142714121514142714131413141315131412151315270003634e1412152615121513142714131513141215131513141314270003664e1412152714121512152714131512151314121613141314270003644e1413142714131413152615121512151215131513141314270003644e1413142714131412152714131512151314131513141314270003634e1412152714131413152615131413141216131413141315260003644e1412152714121513152615131413141215141413141314260003654d1612142516131512152615121512151315121513141315250003644e1515122616111512152715111612161115121612151216250003654d1611162516111611162615121513141116121613151116250003674d161017251512161215271412151215121612171015121625000d0500000000", "sendCount": 10, "interval": 0.6 } ] }, { "name": "Double Down", "host": "192.168.2.27", "type": "switch", "enableAutoOff": true, "onDuration": 2.5, "data": [ { "data": "26008c004e14261526151314131427141315131413141315121513142700034f4e1427142714131413152615131413141315121512151314260003514e1427142714131513142615121513151215131413141315260003504e1427142714131413152516131412151315121513141314270003504e142714261513141314271412161314131413151314131427000d05000000000000000000000000", "sendCount": 10, "interval": 0.6 } ] }, { "name": "Volume Down", "host": "192.168.2.27", "type": "switch", "enableAutoOff": true, "onDuration": 2.5, "data": [ { "data": "26008c004e14261526151314131427141315131413141315121513142700034f4e1427142714131413152615131413141315121512151314260003514e1427142714131513142615121513151215131413141315260003504e1427142714131413152516131412151315121513141314270003504e142714261513141314271412161314131413151314131427000d05000000000000000000000000", "sendCount": 5, "interval": 0.6 } ] }, { "name": "etertsnment", "type": "switch", "data": [ { "data": "2600a20070731c551c1d1b1d1c561a1e1b571b1d1c1d1b1d1b1e1c1d1a571b1e1a571a571c1c1b571b1d1c561a551e551b561c561c1c1c0004526f741a571b1d1c1d1b561b1e1c551b1e1b1d1b1e1b1e1b1d1b561b1e1c551c551c1d1b561b1e1c551b561b571c551b561c1d1c0004526f731c551b1e1c1d1b561b1d1b571a1e1c1d1b1d1c1d1c1d1a571c1c1b571b561b1e1a571b1e1a571a571b561c551c561b1d1b000d05000000000000", "sendCount": 2, "interval": 0.3, "pause": 2 }, { "data": "", "sendCount": 2, "interval": 5 } ] }, { "name": "Apple Tv V", "host": "192.168.2.27", "type": "switch", "data": { "on": [ { "data": "260088000a3b091a09190a19091a093c0a3b0b180a19093c091a091a0919093d0a180b0005de0a3c0a180a190a1909190a19091a093c093d0a18093d093c0a3b0a19093c0a00059a0a3b0a190a19091a081a0a3c083d091a0919093d0919091a091a093c091a090005e00b3a0a190a19081a091a091a0a18093d0a3b091a0a3b09390d3c0a180b3b0a000d05", "sendCount": 12, "interval": 0.6, "pause": 0.3 } ], "off": [ { "data": "260088000a3b091a09190a19091a093c0a3b0b180a19093c091a091a0919093d0a180b0005de0a3c0a180a190a1909190a19091a093c093d0a18093d093c0a3b0a19093c0a00059a0a3b0a190a19091a081a0a3c083d091a0919093d0919091a091a093c091a090005e00b3a0a190a19081a091a091a0a18093d0a3b091a0a3b09390d3c0a180b3b0a000d05", "pause": 0.1 }, { "data": "260088000a3b091a09190a19091a093c0a3b0b180a19093c091a091a0919093d0a180b0005de0a3c0a180a190a1909190a19091a093c093d0a18093d093c0a3b0a19093c0a00059a0a3b0a190a19091a081a0a3c083d091a0919093d0919091a091a093c091a090005e00b3a0a190a19081a091a091a0a18093d0a3b091a0a3b09390d3c0a180b3b0a000d05", "sendCount": 13, "interval": 0.6, "pause": 0.3 } ] } }, { "name": "O Apple V", "host": "192.168.2.27", "type": "switch", "data": { "on": [ { "data": "260088000a3b091a09190a19091a093c0a3b0b180a19093c091a091a0919093d0a180b0005de0a3c0a180a190a1909190a19091a093c093d0a18093d093c0a3b0a19093c0a00059a0a3b0a190a19091a081a0a3c083d091a0919093d0919091a091a093c091a090005e00b3a0a190a19081a091a091a0a18093d0a3b091a0a3b09390d3c0a180b3b0a000d05", "sendCount": 5, "interval": 0.6, "pause": 0.3 } ], "off": [ { "data": "260088000a3b091a09190a19091a093c0a3b0b180a19093c091a091a0919093d0a180b0005de0a3c0a180a190a1909190a19091a093c093d0a18093d093c0a3b0a19093c0a00059a0a3b0a190a19091a081a0a3c083d091a0919093d0919091a091a093c091a090005e00b3a0a190a19081a091a091a0a18093d0a3b091a0a3b09390d3c0a180b3b0a000d05", "pause": 0.1 }, { "data": "260088000a3b091a09190a19091a093c0a3b0b180a19093c091a091a0919093d0a180b0005de0a3c0a180a190a1909190a19091a093c093d0a18093d093c0a3b0a19093c0a00059a0a3b0a190a19091a081a0a3c083d091a0919093d0919091a091a093c091a090005e00b3a0a190a19081a091a091a0a18093d0a3b091a0a3b09390d3c0a180b3b0a000d05", "sendCount": 8, "interval": 0.6, "pause": 0.3 } ] } }, { "name": "Android V", "host": "192.168.2.27", "type": "switch", "data": { "on": [ { "data": "260088000a3b091a09190a19091a093c0a3b0b180a19093c091a091a0919093d0a180b0005de0a3c0a180a190a1909190a19091a093c093d0a18093d093c0a3b0a19093c0a00059a0a3b0a190a19091a081a0a3c083d091a0919093d0919091a091a093c091a090005e00b3a0a190a19081a091a091a0a18093d0a3b091a0a3b09390d3c0a180b3b0a000d05", "sendCount": 2, "interval": 0.6, "pause": 0.3 } ], "off": [ { "data": "260088000a3b091a09190a19091a093c0a3b0b180a19093c091a091a0919093d0a180b0005de0a3c0a180a190a1909190a19091a093c093d0a18093d093c0a3b0a19093c0a00059a0a3b0a190a19091a081a0a3c083d091a0919093d0919091a091a093c091a090005e00b3a0a190a19081a091a091a0a18093d0a3b091a0a3b09390d3c0a180b3b0a000d05", "pause": 0.1 }, { "data": "260088000a3b091a09190a19091a093c0a3b0b180a19093c091a091a0919093d0a180b0005de0a3c0a180a190a1909190a19091a093c093d0a18093d093c0a3b0a19093c0a00059a0a3b0a190a19091a081a0a3c083d091a0919093d0919091a091a093c091a090005e00b3a0a190a19081a091a091a0a18093d0a3b091a0a3b09390d3c0a180b3b0a000d05", "sendCount": 11, "interval": 0.6, "pause": 0.3 } ], "stop":"STOP_HEX..." } } ] } ] }

Edsonytic commented 4 years ago

What you need to do is not having two config files, it is a single one with two platforms in it. Here's a shortened version of mine.

{
    "bridge": {
        "name": "#####",
        "username": "#####",
        "port": 1,
        "pin": "#####"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 1,
            "platform": "config"
        },
        {
            "name": "Camera ffmpeg",
            "cameras": [
                {
                    "name": "Main Camera",
                    "motion": true,
                    "videoConfig": {
                        "source": "-re -i #####",
                    }
                }
            ],
            "platform": "Camera-ffmpeg"
        },
        {
            "platform": "BroadlinkRM",
            "name": "Broadlink RM",
            "hideScanFrequencyButton": true,
            "hideLearnButton": true,
            "hideWelcomeMessage": true,
            "accessories": [
                {
                    "name": "Gree AC",
                    "type": "air-conditioner",
                    "maxTemperature": 30,
                    "defaultCoolTemperature": 25,
                    "defaultHeatTemperature": 28,
                    "defaultAutoTemperature": 25,
                    "temperatureUpdateFrequency": 60,
                    "data": {
                      "YOUR HEX CODES GO HERE"
                    }
                },
                {
                    "name": "Gree Sleep Mode",
                    "type": "switch",
                    "data": {
                        "on": "#####",
                        "off": "#####"
                    }
                }
            ]
        }
    ]
}