Git Product home page Git Product logo

node-red-contrib-myq's Introduction

node-red-contrib-myq

Node-Red node to control MyQ (Chamberlain) devices. Based on awesome myq library.

Installation

npm install node-red-contrib-myq

Drop the myq device node to your flow. Provide your MyQ credentials (Username, Password and Region), set Serial number or Name (if both are set then Serial number will be used to identify the device) in properties. That's it.

Inputs

payload (optional) - string

Action to perform on device. If payload is null, empty or info then it will trigger retrieval of status information. Any other payload will be sent as is to the API (for example, there are actions for doors open and close, for lights on and off, for lamps lamp_on and lamp_off).

Outputs

  • Status output

payload - object

Returns extended status information about device in payload

  • Action output

payload - boolean

Confirmation of successful action execution

  • Standard error

payload - string

The standard error of the command

node-red-contrib-myq's People

Contributors

dre2901 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-red-contrib-myq's Issues

Garage Door Light Question

First, thanks for providing this very handy node. I've been using it since the last update and it works very well.

Is there a way to use the node to control the lights on a garage door opener? I've tried sending an 'on' and 'lamp_on' to the opener as a payload but that isn't working.

Won't Install

When I try to install this in node red via 'manage pallete' I get an error. I've included the error message, logs, and npm-audit results (after also trying to install it via command line). I'm pretty new to node red so I'm not sure how to proceed.

Failed to install: node-red-contrib-myq

Install failed

Check the log for more information

Logs give me the following:

-----------------------------------------------------------
2021-07-05T16:39:35.887Z Install : node-red-contrib-myq 0.0.1

2021-07-05T16:39:36.038Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected]
2021-07-05T16:39:38.066Z [err] npm
2021-07-05T16:39:38.066Z [err]  
2021-07-05T16:39:38.067Z [err] ERR!
2021-07-05T16:39:38.067Z [err]  
2021-07-05T16:39:38.067Z [err] code
2021-07-05T16:39:38.067Z [err]  ETARGET
2021-07-05T16:39:38.070Z [err] npm
2021-07-05T16:39:38.070Z [err]  
2021-07-05T16:39:38.070Z [err] ERR!
2021-07-05T16:39:38.070Z [err]  
2021-07-05T16:39:38.070Z [err] notarget No matching version found for [email protected].
2021-07-05T16:39:38.070Z [err] npm
2021-07-05T16:39:38.071Z [err]  ERR!
2021-07-05T16:39:38.071Z [err]  notarget
2021-07-05T16:39:38.071Z [err]  In most cases you or one of your dependencies are requesting
2021-07-05T16:39:38.071Z [err] npm
2021-07-05T16:39:38.071Z [err]  ERR! 
2021-07-05T16:39:38.071Z [err] notarget a package version that doesn't exist.
2021-07-05T16:39:38.096Z [err] 
2021-07-05T16:39:38.097Z [err] npm ERR! A complete log of this run can be found in:
2021-07-05T16:39:38.097Z [err] npm 
2021-07-05T16:39:38.097Z [err] ERR!     /data/.npm/_logs/2021-07-05T16_39_38_072Z-debug.log
2021-07-05T16:39:38.103Z rc=1

Trying to use command line, I get the following feedback. Including running an audit.

bash-5.0$ npm install node-red-contrib-myq
npm WARN deprecated [email protected]: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm notice created a lockfile as package-lock.json. You should commit this file.
+ [email protected]
added 9 packages from 14 contributors and audited 359 packages in 4.808s

6 packages are looking for funding
  run `npm fund` for details

found 8 vulnerabilities (7 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details
bash-5.0$ npm audit
                                                                                
                       === npm audit security report ===                        
                                                                                
# Run  npm update ws --depth 4  to resolve 1 vulnerability
                                                                                
  Moderate        Regular Expression Denial of Service                          
                                                                                
  Package         ws                                                            
                                                                                
  Dependency of   node-red                                                      
                                                                                
  Path            node-red > @node-red/nodes > mqtt > ws                        
                                                                                
  More info       https://npmjs.com/advisories/1748                             
                                                                                


                                                                                
                                 Manual Review                                  
             Some vulnerabilities require your attention to resolve             
                                                                                
          Visit https://go.npm.me/audit-guide for additional guidance           
                                                                                
                                                                                
  Moderate        Inadequate Encryption Strength                                
                                                                                
  Package         bcrypt                                                        
                                                                                
  Patched in      >=5.0.0                                                       
                                                                                
  Dependency of   node-red                                                      
                                                                                
  Path            node-red > @node-red/editor-api > bcrypt                      
                                                                                
  More info       https://npmjs.com/advisories/1553                             
                                                                                
                                                                                
  Moderate        Inadequate Encryption Strength                                
                                                                                
  Package         bcrypt                                                        
                                                                                
  Patched in      >=5.0.0                                                       
                                                                                
  Dependency of   node-red                                                      
                                                                                
  Path            node-red > bcrypt                                             
                                                                                
  More info       https://npmjs.com/advisories/1553                             
                                                                                
                                                                                
  Moderate        Inadequate Encryption Strength                                
                                                                                
  Package         bcrypt                                                        
                                                                                
  Patched in      >=5.0.0                                                       
                                                                                
  Dependency of   node-red                                                      
                                                                                
  Path            node-red > node-red-admin > bcrypt                            
                                                                                
  More info       https://npmjs.com/advisories/1553                             
                                                                                
                                                                                
  Moderate        Regular Expression Denial of Service                          
                                                                                
  Package         ws                                                            
                                                                                
  Patched in      >=5.2.3 <6.0.0 || >=6.2.2 <7.0.0 || >=7.4.6                   
                                                                                
  Dependency of   node-red                                                      
                                                                                
  Path            node-red > @node-red/editor-api > ws                          
                                                                                
  More info       https://npmjs.com/advisories/1748                             
                                                                                
                                                                                
  Moderate        Regular Expression Denial of Service                          
                                                                                
  Package         ws                                                            
                                                                                
  Patched in      >=5.2.3 <6.0.0 || >=6.2.2 <7.0.0 || >=7.4.6                   
                                                                                
  Dependency of   node-red                                                      
                                                                                
  Path            node-red > @node-red/nodes > ws                               
                                                                                
  More info       https://npmjs.com/advisories/1748                             
                                                                                
                                                                                
  Moderate        Regular expression denial of service                          
                                                                                
  Package         glob-parent                                                   
                                                                                
  Patched in      >=5.1.2                                                       
                                                                                
  Dependency of   node-red                                                      
                                                                                
  Path            node-red > @node-red/nodes > mqtt > help-me > glob-stream >   
                  glob-parent                                                   
                                                                                
  More info       https://npmjs.com/advisories/1751                             
                                                                                
                                                                                
  High            Denial of Service                                             
                                                                                
  Package         css-what                                                      
                                                                                
  Patched in      >=5.0.1                                                       
                                                                                
  Dependency of   node-red                                                      
                                                                                
  Path            node-red > @node-red/nodes > cheerio > css-select > css-what  
                                                                                
  More info       https://npmjs.com/advisories/1754                             
                                                                                
found 8 vulnerabilities (7 moderate, 1 high) in 359 scanned packages
  run `npm audit fix` to fix 1 of them.
  7 vulnerabilities require manual review. See the full report for details.
bash-5.0$ ^C

This node stopped working for me

I've been using this node for years but a few days ago it stopped reporting device status.

When I attempt to retrieve the device status, I get multiple errors:

Error received
Could not refresh devices!

I've confirmed my account information is correct so asking those who use this node if there's a MyQ cloud issue or is it just me?

Node-Red Setup

do you have instructions on installing this to node-red?

Liftmaster Light is Not a Light

I have a Liftmaster WiFi enabled opener that is registered with MyQ and appears as 3 devices.
1 - The WiFi Gateway - this is build into the opener and has a unique Serial Number
2 - The Door Opener - This also has a unique serial number
3 - The Linked Light - This has its own unique serial number

I create 3 nodes each with my login credentials and one of the serial numbers.
If I request status each returns correctly and confirms what it is and the name I configured in MyQ cloud.
The Opener Node-Red Nodes display the status under them. The Light and Gateway nodes do not.
I can open and close the doors with the "open" and "close" payload strings (no quotes)
For the Light I get this as the output from a status: (Serial Numbers Redacted)

msg.payload : Object object code: "OK" device: object href: "http://api.myqdevice.com/api/v5/accounts/443ef87b-2daa-4b76-9f04-16cd814405de/devices/XXXXXXXXXX" serial_number: "XXXXXXXXXX" device_family: "lamp" device_platform: "myq" device_type: "lamp" name: "Light" parent_device: "http://api.myqdevice.com/api/v5/accounts/443ef87b-2daa-4b76-9f04-16cd814405de/devices/YYYYYYYYYYYY" parent_device_id: "YYYYYYYYYYYY" created_date: "0001-01-01T00:00:00" state: object lamp_state: "off" lamp_subtype: "remoteledworklight" on: "http://api.myqdevice.com/api/v5/accounts/443ef87b-2daa-4b76-9f04-16cd814405de/devices/XXXXXXXXXX/on" off: "http://api.myqdevice.com/api/v5/accounts/443ef87b-2daa-4b76-9f04-16cd814405de/devices/XXXXXXXXXX/off" last_update: "2021-08-12T05:14:40.4563784Z" online: true last_status: "2021-08-12T05:54:58.7718311Z"

This confirms the serial number is a light. If I send a payload string "on" (no quotes)
I receive the following errors

MyQError: Device with serial number "XXXXXXXXXX" is not a light

Error code: ERR_MYQ_INVALID_DEVICE

I have a different integration that I'm trying to move into Node-Red with this node that controls the light, is this linked remote light (not integrated into the opener) handled differently to other opener lights?
Doors work exactly as I expected.
Light Node does not show status (The code implies it should show on or off like the doors under the node) and I cannot control.

Thanks

Where do I find serial number?

I have both a MyQ garage door opener and gate opener. I've installed your node but one of the inputs is serial #. Is this the serial # on each device or is this data located somewhere else?

v6 support?

Are you planning to update this node to support the new v6 API? If so, have any estimate on when that might be?

Getting error with v0.6

First of all, thanks for releasing a update to your node.

When I use the new version and provide my credentials and serial number, I get multiple errors:

"Error received:"
"TypeError: Cannot read property 'state' of undefined"
"Error code: undefined"
"Error message: Cannot read property 'state' of undefined"
"TypeError: Cannot read property 'state' of undefined"

Any ideas on how to resolve these errors?

New errors with v0.0.15

I woke up this morning to see this error occurring during each request:

myQ API error: Temporary myQ API server-side issues encountered: 429 - Too Many Requests.

Is anyone else experiencing this error?

Receiving errors with v0.0.9

I just upgraded to v0.0.9 and am still getting "Error received:" and "Could not refresh devices!" errors when I send an INFO request. Even though I get the errors, I do get the correct status of the devices (gate and garage door). Not sure if this error is related to the new release.

While opening or closing garage door, getting errors

This NR node is working great except when my door is opening, closing or partially open, it gives undefined errors. I believe this is due to its dependency on "@hjdhjd/myq" v6.0.4. Based on what I've learned, I believe if you change your dependency to v6.0.9 and with a minor change to one of your case statements, this node can pass the device status of "opening", "closing" or "stopped" which would eliminate the undefined errors.

Receiving errors with v0.0.15

I just upgraded to v0.0.15 and now am seeing this error:

myQ API error: Temporary myQ API server-side issues encountered: 429 - Too Many Requests.
Could not refresh devices!

I'm only doing refresh request at the rate of once every 15 seconds which hasn't been a problem for years.

Also, I don't see an option to choose West or East as I could in the previous version.

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.