Supereg / homebridge-http-switch

Powerful http switch for Homebridge: https://github.com/homebridge/homebridge
ISC License
218 stars 36 forks source link

Unable to determine plugin type #93

Closed mikl10 closed 1 year ago

mikl10 commented 3 years ago

my homebridge server hoobs 3.3.5 doesn't load config.json because I have that issue with the plugin : 30/06/2021, 19:25:01 Unexpected token ':' 30/06/2021, 19:25:01 Unable to determine plugin type for "homebridge-http-switch"

When I delete all part with http-switch declaration that work. { "accessory": "HTTP-SWITCH", "name": "Portail", "switchType": "stateless", "timeout": 1000, "onUrl": "http://192.168.10.20/control?cmd=Pulse,5,1,500", "plugin_map": { "plugin_name": "homebridge-http-switch", "index": 0 }

Can you help me to resove that please?

mbierman commented 3 years ago

You are missing a "}"

{
    "accessory": "HTTP-SWITCH",
    "name": "Portail",
    "switchType": "stateless",
    "timeout": 1000,
    "onUrl": "http://192.168.10.20/control?cmd=Pulse,5,1,500",
    "plugin_map": {
        "plugin_name": "homebridge-http-switch",
        "index": 0
    }
}
mikl10 commented 3 years ago

it is a miss with my copy/paste, in my config file it is present

mbierman commented 3 years ago

Can you provide the entire config file?

Also, I’m not familiar with "plugin_map". I don’t see it in the documentation. Can you provide a link to where you got that from?

mikl10 commented 3 years ago

{ "server": { "port": 8080, "origin": "*", "autostart": 0, "home_setup_id": "X-HM://0023ISYWYMN3E", "polling_seconds": 5 }, "client": { "default_route": "status", "inactive_logoff": 30, "theme": "hoobs-light", "locale": "fr", "temp_units": "celsius", "country_code": "FR", "postal_code": "10150" }, "bridge": { "name": "MyHome", "port": 51826, "pin": "031-45-154", "username": "EC:4A:2B:88:4D:62" }, "description": "", "ports": {}, "accessories": [ { "accessory": "HTTP-SWITCH", "name": "Portail", "switchType": "stateless", "timeout": 1000, "onUrl": "http://192.168.10.20/control?cmd=Pulse,5,1,500", "plugin_map": { "plugin_name": "homebridge-http-switch", "index": 0 } }, { "accessory": "HTTP-SWITCH", "name": "Portail Pieton", "switchType": "stateless", "timeout": 1000, "onUrl": "http://192.168.10.20/control?cmd=Pulse,4,0,500", "plugin_map": { "plugin_name": "homebridge-http-switch", "index": 0 } },

    {
        "accessory": "DelaySwitch",
        "name": "DelaySwitch",
        "disableSensor": false,
        "delay": 5000,
        "plugin_map": {
            "plugin_name": "homebridge-delay-switch",
            "index": 0
        },
        "startOnReboot": false
    },
    {
        "accessory": "DelaySwitch",
        "name": "DelayGarage",
        "disableSensor": true,
        "delay": 600000,
        "plugin_map": {
            "plugin_name": "homebridge-delay-switch",
            "index": 0
        },
        "startOnReboot": false
    },
    {
        "accessory": "DelaySwitch",
        "name": "TimerChambreLeana",
        "disableSensor": true,
        "delay": 1800000,
        "plugin_map": {
            "plugin_name": "homebridge-delay-switch",
            "index": 0
        },
        "startOnReboot": false
    },
    {
        "accessory": "DelaySwitch",
        "name": "TimerChambreClea",
        "disableSensor": true,
        "delay": 1800000,
        "plugin_map": {
            "plugin_name": "homebridge-delay-switch",
            "index": 0
        },
        "startOnReboot": false
    },
    {
        "accessory": "DelaySwitch",
        "name": "TimerEntree",
        "disableSensor": true,
        "delay": 600000,
        "plugin_map": {
            "plugin_name": "homebridge-delay-switch",
            "index": 0
        },
        "startOnReboot": false
    }
],
"platforms": [
    {
        "platform": "HttpWebHooks",
        "webhook_port": "51830",
        "cache_directory": "/home/hoobs/storage",
        "sensors": [
            {
                "id": "sensor",
                "name": "sonnette",
                "type": "motion",
                "autoRelease": true
            },
            {
                "id": "sensor2",
                "name": "Portail_Info",
                "type": "contact",
                "autoRelease": false
            }
        ],
        "plugin_map": {
            "plugin_name": "homebridge-http-webhooks"
        }
    },
    {
        "platform": "ProgrammableHTTPSwitch",
        "plugin_map": {
            "plugin_name": "homebridge-programmable-http-switch"
        }
    }
]

}

mikl10 commented 3 years ago

Can you provide the entire config file?

Also, I’m not familiar with "plugin_map". I don’t see it in the documentation. Can you provide a link to where you got that from?

"plugin_map" it was automatically insert in my backup create with hoobs.

mbierman commented 3 years ago

So I use homebridge, not hoobs. I can't find any reference to "plugin_map" anywhere. Have you tried removing all of the instances of it and restarting?

mikl10 commented 3 years ago

Yes if I remove all declaration "HTTP-SWITCH" it work

mikl10 commented 3 years ago

I have try to uninstall and reinstall the plugin but it is the same Capture d’écran 2021-06-30 à 21 05 46

As you can see in the capture, web page to configure this plugin is empty, that is not normal usualy i had something until today it was working like a charm :-(

mbierman commented 3 years ago

Any other recent changes? Update to Hoobs ? Sorry I don't have a better answer for you.

mikl10 commented 3 years ago

nop this week-end I will try to restart all from 0, format SD card and reinstall all plugin. We'll see

Supereg commented 1 year ago

Please contact HOOBS support for issues with hoobs. This plugin only supports homebridge and homebridge-ui.