rench / homebridge-smarthome

this is a homebridge plugin for mijia eco-chain but also a management webapp provide web and restapi to manage your mijia eco-chain,you can control and monitor your accessory via apple's homekit or the webapp
MIT License
39 stars 6 forks source link

ReferenceError: miio is not defined #8

Closed 350d closed 6 years ago

350d commented 6 years ago

I've successfully added my Mi Gateway to the Homebridge but my Yeelights Bulbs (developer mode on) doesn't work and I have only this error in Homebridge logs:

[smarthome-mijia] Initializing smarthome-mijia platform...
[smarthome-broadlink] Initializing smarthome-broadlink platform...
[smarthome-mijia] mijia init upd socket error->ReferenceError: miio is not defined

miio installed and I can scan for devices tokens. These bulbs works fine with homebridge-yeelight plugin. My devices part of config.json:

"devices": [
    {
        "sid": "Yeelight 1",
        "name": "Yeelight 1",
        "type": "wifi",
        "model": "light"
    },
    {
        "sid": "Yeelight 2",
        "name": "Yeelight 2",
        "type": "wifi",
        "model": "light"
    }
]
rench commented 6 years ago

Thanks for your report. There is missing miio requirement in yeelight. Just update the new version and try it again.

350d commented 6 years ago

I've updated and restarted and now I have this:

homebridge[8938]: Failed to find plugin to handle accessory 620533
homebridge[8938]: Failed to find plugin to handle accessory 61fae4

also if I don't have this dummy part in config.json:

{
    "platform": "smarthome-broadlink",
    "broadlink": {
        "devices": []
    }
}

homebridge goes to restart loop after this line in log: homebridge[8938]: Load homebridge-smarthome.smarthome-broadlink