Giter Site home page Giter Site logo

Comments (7)

chinswain avatar chinswain commented on July 17, 2024

Tried installing the app via CLI but no extra debug or other useful information produced.

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on July 17, 2024

Fixed with d49e169

Will soon be published as new beta in the Athom app store but feel free to test it through CLI install.

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on July 17, 2024

@chinswain

Would you be willing to test a new release. Due to an update of the miio library I had to rewrite all drivers including the air purifier and I'd like someone to test it that actually owns the device. The release can be found here: https://github.com/jghaanstra/com.xiaomi-miio/releases/tag/2.5.0

from com.xiaomi-miio.

chinswain avatar chinswain commented on July 17, 2024

@jghaanstra device setup fine as before, can switch it on\off via clicking on the card but not within the new mobile app (Can you change the power toggle to a button? It seems the new app doesn't support clicking the image icon?)

I've tested it from the web interface (running in flows) and via the old mobile app, no issues at all.

If I attempt to test a flow from the new app it crashes, taking out all other apps (No option to power on\off as mentioned above):

`node.js output:

2018-02-02 21:24:15 [log] [XiaomiMiioApp] Initializing Xiaomi Mi Home app ...
(node:1430) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: pm2_5 is not defined
(node:1430) [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:1430) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: invalid_type
(node:1430) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): ReferenceError: pm2_5 is not defined
(node:1430) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: invalid_type
/app.js:114
args.device.miio.setPower(false)
^

TypeError: Cannot read property 'miio' of undefined
at FlowCardAction.Homey.FlowCardAction.register.registerRunListener [as _runListener] (/app.js:114:29)
at FlowCardAction._onRun (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/FlowCard.js:1:1191)
at emitThree (events.js:136:13)
at FlowCardAction.emit (events.js:217:7)
at ManagerFlow._onRun (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/manager/flow.js:1:2274)
at _eventListeners.filter.forEach.t (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/HomeyClient.js:1:1219)
at Array.forEach ()
at HomeyClient._onMessage (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/HomeyClient.js:1:1196)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)

--- INFO: com.xiaomi-miio has been killed ---

Error from Homey log:

(node:1430) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: pm2_5 is not defined
(node:1430) [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:1430) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: invalid_type
(node:1430) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): ReferenceError: pm2_5 is not defined
(node:1430) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: invalid_type
/app.js:114
args.device.miio.setPower(false)
^

TypeError: Cannot read property 'miio' of undefined
at FlowCardAction.Homey.FlowCardAction.register.registerRunListener [as _runListener] (/app.js:114:29)
at FlowCardAction._onRun (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/FlowCard.js:1:1191)
at emitThree (events.js:136:13)
at FlowCardAction.emit (events.js:217:7)
at ManagerFlow._onRun (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/manager/flow.js:1:2274)
at _eventListeners.filter.forEach.t (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/HomeyClient.js:1:1219)
at Array.forEach ()
at HomeyClient._onMessage (/opt/homey-client/system/manager/ManagerApps/bootstrap/sdk/v2/lib/HomeyClient.js:1:1196)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)

Exit code: 1
Exit signal: null`

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on July 17, 2024

Thanx for testing. It's good to hear the basic are working. This was a compete code overhaul.

The crash seems to be caused by something else other than the onoff capability, looking at the stack trace. I'll look into it later this weekend. It would be great if you could test it again by that time.

from com.xiaomi-miio.

chinswain avatar chinswain commented on July 17, 2024

I'm setting it to auto speed after switching on in the flow - I'll remove that and test again.

Let me know if you want me to test anything - happy to host some remote access if needed.

Edit:

Same issue with just switch on\off in the flow. Works 100% (Very responsive!) from the web interface or old android app but the new android app crashes miio instantly.

from com.xiaomi-miio.

jghaanstra avatar jghaanstra commented on July 17, 2024

@chinswain I dont think the crashes are related to the old or new mobile app. That was probably just a coincidence. I have made a little edit in the master branch and updated the release 2.5.0. Could you try again to see if this fixes the issue?

And you are right about the onoff capability. I'll have to switch that once the new mobile app becomes the standard one. For now I'll leave it in. Perhaps Athom will come with a backwards compatible solution.

https://github.com/jghaanstra/com.xiaomi-miio/releases/tag/2.5.0-v2

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.