Giter Club home page Giter Club logo

Comments (25)

jghaanstra avatar jghaanstra commented on August 22, 2024

I dont own any Xiaomi Philips light bulbs myself so I can not test what is causing this. Do you know how to run a Homey app from the command line. I can make a special version that will give me more debug logging that will enable me to figure out what is going on.

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

Give me a link and I will do it

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on August 22, 2024

https://github.com/jghaanstra/com.xiaomi-miio/tree/debug

If you run this version through command line it should spit out additional logging which might tell me what is going on.

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

i install this version.
module.js:540
throw err;
^

Error: Cannot find module 'miio'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at Module.require (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/index.js:1:253)
at require (internal/module.js:11:18)
at Object. (/drivers/philips-bulb/driver.js:4:14)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)

Exit code: 1
Exit signal: null

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on August 22, 2024

Did you download the complete repo as zip file including the node_modules directory which includes the miio module?

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

It’s my mistake. It’s ok now. What I must to do?

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on August 22, 2024

Use the Athom CLI and run the app with "athom app run" command. And see if there is any error logging directly available in the console. If not re-pair your light and than copy and paste the output here.

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

2018-05-28 23:50:05 [log] [XiaomiMiioApp] Initializing Xiaomi Mi Home app ...
Creating device
Initializing device
Polling device
(node:10748) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: reject is not defined
(node:10748) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2018-05-28 23:50:15 [log] [ManagerDrivers] [philips-bulb] [0] TypeError: colorTemperature.replace is not a function
at getData (/drivers/philips-bulb/device.js:82:45)
at

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on August 22, 2024

OK, thanx. I'll look into it some time soon and will let you know.

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

thanks for the help. Tell me, when it will be possible to solve the problem approximately?

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on August 22, 2024

I have updated the debug branch. Could you try it again and post the result here.

https://github.com/jghaanstra/com.xiaomi-miio/tree/debug

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

request to https://api.athom.com/user/me failed, reason: read ECONNRESET
what my mistake?

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on August 22, 2024

Never seen that before. Are you logged in and added to token to the Athom CLI?

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

Everything okay?
2018-05-29 20:08:28 [log] [XiaomiMiioApp] Initializing Xiaomi Mi Home app ...
Creating device
Initializing device
Polling device
(node:22498) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: reject is not defined
(node:22498) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

loading over 10 minutes

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

─────────────── Logging stdout & stderr ───────────────
2018-05-29 20:46:20 [log] [XiaomiMiioApp] Initializing Xiaomi Mi Home app ...
Creating device
Initializing device
(node:2128) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: reject is not defined
(node:2128) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:2128) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): ReferenceError: reject is not defined

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on August 22, 2024

Not yet, but I'm getting closer. I have just pushed another update to the debug branch. Could you test again, also by changing the color temperature through Homey but also through the Mi Home smartphone app and once again post the results here.

https://github.com/jghaanstra/com.xiaomi-miio/tree/debug

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

─────────────── Logging stdout & stderr ───────────────
2018-05-29 20:49:40 [log] [XiaomiMiioApp] Initializing Xiaomi Mi Home app ...
Creating device
Initializing device
Polling device
(node:2726) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: reject is not defined
(node:2726) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }
Color { values: [ 5646 ], model: 'temperature' }

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

2018-05-29 20:54:15 [log] [XiaomiMiioApp] Initializing Xiaomi Mi Home app ...
Creating device
Initializing device
Polling device
Color changed: Color { values: [ 5646 ], model: 'temperature' }
Color changed normalized: NaN
(node:3534) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: reject is not defined
(node:3534) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

color doesn't change

2018-05-29 20:55:54 [log] [XiaomiMiioApp] Initializing Xiaomi Mi Home app ...

Creating device
Initializing device
Polling device
Color changed: Color { values: [ 5646 ], model: 'temperature' }
Color changed normalized: NaN
(node:3851) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: reject is not defined
(node:3851) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Color updated: 5700K
Color changed: Color { values: [ 5700 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5214K
Color changed: Color { values: [ 5214 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5700K
Color changed: Color { values: [ 5700 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 4728K
Color changed: Color { values: [ 4728 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5214K
Color changed: Color { values: [ 5214 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5322K
Color changed: Color { values: [ 5322 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5619K
Color changed: Color { values: [ 5619 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5430K
Color changed: Color { values: [ 5430 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5079K
Color changed: Color { values: [ 5079 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5565K
Color changed: Color { values: [ 5565 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5700K
Color updated: 4998K
Color changed: Color { values: [ 4998 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5619K
Color changed: Color { values: [ 5619 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 4404K
Color changed: Color { values: [ 4404 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5700K
Color changed: Color { values: [ 5700 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5133K
Color changed: Color { values: [ 5133 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 4836K
Color changed: Color { values: [ 4836 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5700K
Color changed: Color { values: [ 5700 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5700K
Color updated: 5268K
Color changed: Color { values: [ 5268 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5538K
Color changed: Color { values: [ 5538 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 5511K
Color changed: Color { values: [ 5511 ], model: 'temperature' }
Color changed normalized: NaN
Color updated: 4890K
Color changed: Color { values: [ 4890 ], model: 'temperature' }
Color changed normalized: NaN

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on August 22, 2024

New version uploaded, please test again.

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

─────────────── Logging stdout & stderr ───────────────
2018-05-29 21:43:23 [log] [XiaomiMiioApp] Initializing Xiaomi Mi Home app ...
(node:11881) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: reject is not defined
(node:11881) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Color changed 1: [ 5700 ]
Color changed 2: 5700
Color changed 3: Color { values: [ 5700 ], model: 'temperature' }
Color changed normalized: NaN
Color changed 1: [ 3999 ]
Color changed 2: 3999
Color changed 3: Color { values: [ 3999 ], model: 'temperature' }
Color changed normalized: NaN
Color changed 1: [ 5700 ]
Color changed 2: 5700
Color changed 3: Color { values: [ 5700 ], model: 'temperature' }
Color changed normalized: NaN
Color changed 1: [ 3027 ]
Color changed 2: 3027
Color changed 3: Color { values: [ 3027 ], model: 'temperature' }
Color changed normalized: NaN
Color changed 1: [ 5700 ]
Color changed 2: 5700
Color changed 3: Color { values: [ 5700 ], model: 'temperature' }
Color changed normalized: NaN
Color changed 1: [ 3027 ]
Color changed 2: 3027
Color changed 3: Color { values: [ 3027 ], model: 'temperature' }
Color changed normalized: NaN
Color changed 1: [ 4971 ]
Color changed 2: 4971
Color changed 3: Color { values: [ 4971 ], model: 'temperature' }
Color changed normalized: NaN
Color changed 1: [ 5700 ]
Color changed 2: 5700
Color changed 3: Color { values: [ 5700 ], model: 'temperature' }
Color changed normalized: NaN
Color changed 1: [ 3027 ]
Color changed 2: 3027
Color changed 3: Color { values: [ 3027 ], model: 'temperature' }
Color changed normalized: NaN
Color changed 1: [ 5457 ]
Color changed 2: 5457
Color changed 3: Color { values: [ 5457 ], model: 'temperature' }
Color changed normalized: NaN
Color changed 1: [ 5700 ]
Color changed 2: 5700
Color changed 3: Color { values: [ 5700 ], model: 'temperature' }
Color changed normalized: NaN

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on August 22, 2024

Ok, pushed another version. I think I have fixed keeping the Homey device in sync with the actual device. So if you change the temperature from the Mi Home smartpone app the Homey device should update accordingly.

I'm not sure yet if setting the temperature from a action flow card is working correctly. Could you try this and let me know the result.

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on August 22, 2024

I have not heard back from you. I'm publishing a new release to the app store (2.6.5) which contains the fixes allowing you to pair your Philips devices. If you experience any more issues please open up a new report.

from com.xiaomi-miio.

rostov36 avatar rostov36 commented on August 22, 2024

Yesterday I tested. It’s ok. But I have a new problem) I will give you a link

from com.xiaomi-miio.

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.