Git Product home page Git Product logo

Comments (13)

dre2901 avatar dre2901 commented on June 24, 2024

The underlying library (https://github.com/thomasmunduchira/myq-api) is relying on state.light_state property to control lights. based on your log, your linked light is using state.lamp_state instead. not sure whether it's a general change in apis or there are different devices (eg light and lamp). so the non-breaking way of introducing the support for "lamp" would be to fork myq-api and make the change there as well. I can try to make this change but would not be able to test as I don't have such devices at home.

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on June 24, 2024

I've pushed new version 0.0.3 with support for "lamp" object. so you can use "lamp_on" and "lamp_off" for them. Please try as I cannot test it myself.

from node-red-contrib-myq.

Horse2370 avatar Horse2370 commented on June 24, 2024

I missed the subtle difference between light and lamp. I will update and verify the added lamp support.
Greatly appreciate your fast update. Will report back

from node-red-contrib-myq.

Horse2370 avatar Horse2370 commented on June 24, 2024

FYI, Installing 0.0.3 does not install the dependent myq-api module as 0.0.2 did: -

16 Aug 11:37:54 - [info] Installed module: node-red-contrib-myq
16 Aug 11:37:54 - [info] Added node types:
16 Aug 11:37:54 - [info]  - node-red-contrib-myq:myq-device-node : Error: Cannot find module 'myq-api'
Require stack:
- /data/node_modules/node-red-contrib-myq/myq.js
- /usr/src/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/src/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/src/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/src/node-red/node_modules/node-red/lib/red.js
- /usr/src/node-red/node_modules/node-red/red.js
16 Aug 11:57:36 - [info] Stopping modified nodes
16 Aug 11:57:36 - [info] Stopped modified nodes
16 Aug 11:57:36 - [info] Waiting for missing types to be registered:
16 Aug 11:57:36 - [info]  - myq-device-node```

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on June 24, 2024

I have no issues on brand new node-red (via docker). The 0.0.3 is using my own fork of myq-api which is @dre2901/myq-api:
"dependencies": { "@dre2901/myq-api": "2.0.5" },
Maybe some clean up is needed on your environment. Try to uninstall and install node-red-contrib-myq

from node-red-contrib-myq.

Horse2370 avatar Horse2370 commented on June 24, 2024

Manually installed the myq-api npm and the Lamp Node correctly shows the lamp state underneath it
Maybe I am misunderstanding something (I'm not a developer)
I send a payload with lamp_on and receive this from the api

TypeError: api.setLampState is not a function

Using payload with string on I get the previous error about it not being a light as expected.

Will check I installed your version of myq-api

from node-red-contrib-myq.

Horse2370 avatar Horse2370 commented on June 24, 2024

Also running in Docker and did try removing > Restart container > Install myq > restart container - same issue - missing node
This Instance was rebuilt from new using NR 2.x over the weekend and importing my flows.
Just spun up a test NR 2.0.5 and just installed node-red-contrib-myq and same result.

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on June 24, 2024

yep, my fault - forgot to update reference to the new fork in one require statement, so it was still looking for the old myq-api.
I have updated the node to 0.0.4. Install works without issues now.
There is only weird behaviour of Palette Manager which does not show the latest version 0.0.4 but it does show up on web using https://flows.nodered.org/search?term=node-red-contrib-myq
So for my tests I had to install it manually npm i node-red-contrib-myq and restart node red

from node-red-contrib-myq.

Horse2370 avatar Horse2370 commented on June 24, 2024

Working in the test NR container and much closer to working. Install all good via the Palette Manager, but when I send a payload with lamp_on I get the following: -

Error message: Invalid action parameter 'Symbol(turnOn)' specified for a lamp; valid actions are MyQ.actions.lamp.TURN_ON and MyQ.actions.lamp.TURN_OFF.

Node shows correctly the status of the lamp, which it did not in version 0.0.2. If I turn it on manually and request status, its shows correctly under the node.
The lamp_on is hitting your forked myq-api but seems to be running into an issue. Or am I using the wrong payload?

Again, thank you

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on June 24, 2024

debug in darkness :) fixed in 0.0.5. now if I am sending lamp_on for my garage door it properly returns that it is not a lamp. try it for your lamp

from node-red-contrib-myq.

Horse2370 avatar Horse2370 commented on June 24, 2024

Debugging in the dark works like a charm!
Confirmed - Status poll works and sets label under node.
lamp_on turns on the lamp and returns status OK
lamp_off turns the lamp off and returns a status OK.
open, close, on and off all return I am not a door or a light as expected
Everything else returns detailed status

Many Thanks -- One more automation moved over into Node Red with your help.

from node-red-contrib-myq.

Horse2370 avatar Horse2370 commented on June 24, 2024

from node-red-contrib-myq.

dre2901 avatar dre2901 commented on June 24, 2024

Yes, V5 API is down. New oAuth login has to be implemented for V6. It is tracked here thomasmunduchira/myq-api#34

from node-red-contrib-myq.

Related Issues (15)

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.