Giter Club home page Giter Club logo

Comments (3)

droliverlewis avatar droliverlewis commented on August 24, 2024

Sorry, forgot to give you the log entry when I try to register the device with ST:

Get Device State TypeError: deviceMap[id].target.state is not a function Error at
Object.module.exports.getDeviceState (/usr/src/app/miio/miio.js:1487:55) at /usr/src/app/routes/registerST.js:20:10 at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5) at next (/usr/src/app/node_modules/express/lib/router/route.js:137:13) at isAuthenticated (/usr/src/app/routes/dashboard.js:21:12) at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5) at next (/usr/src/app/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/usr/src/app/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5) at /usr/src/app/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:335:12) at next (/usr/src/app/node_modules/express/lib/router/index.js:275:10) at Function.handle (/usr/src/app/node_modules/express/lib/router/index.js:174:3) at router (/usr/src/app/node_modules/express/lib/router/index.js:47:12) at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:317:13)

It just looks like mi_connector hasn't been able to ID the device type successfully and has just allocated it as a generic/unknown device.

from mi_connector.

droliverlewis avatar droliverlewis commented on August 24, 2024

Been playing in the docker image (couldn't find sources), to see if I could find the problem and it looks like two changes are required to get lumi.ctrl_ln2.aq1 devices to work:

1. /usr/src/app/node_modules/miio/lib/devices/gateway/subdevices.js

following entry needs to be added to the module.exports:
64: require('./ctrl_ln2'),

2. /usr/src/app/miio/miio.js - line 384

Change
if(child.miioModel == "lumi.ctrl_neutral2" || child.miioModel == "lumi.ctrl_neutral2")
to
if(child.miioModel == "lumi.ctrl_neutral2" || child.miioModel == "lumi.ctrl_ln2")

Maybe fison76 could verify this and add it properly.

from mi_connector.

fison67 avatar fison67 commented on August 24, 2024

Maybe this 64? is a new model.
I will update a source.

Thanks much.

from mi_connector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.