dxdc / homebridge-blinds

:sunrise: Homebridge Plugin to control my blinds over HTTP
https://www.npmjs.com/package/homebridge-blinds
ISC License
54 stars 25 forks source link

Stop command is repeating the last command #27

Closed szazketto closed 4 years ago

szazketto commented 4 years ago

Hi, I have been using your plugin for a long time now and was wondering if you could suggest a way to use it on my - not so smart - blinds. So my problem is that in my case I have no STOP command. I can stop the blinds by repeating the last command. So if the blinds are going up and I want to stop them, I have to issue another up command, and if they are going down, I have to issue a down command to stop them.

Could this be somehow implemented?

Thank you and kind regards. Peter

dxdc commented 4 years ago

Hi Peter,

I just added a new option for you. In config.json add this command (see the README):

use_same_url_for_stop: true,

Please let me know your feedback!

szazketto commented 4 years ago

Hi Robin,

that was fast!! :) I have tried it and it works perfect. Huge thank you!

Kind regards, Peter

dxdc commented 4 years ago

cheers!

szazketto commented 4 years ago

dxdc,

one thing I noticed now that the plugin keeps throwing these messages endlessly to the log: [37m[1/6/2020, 10:53:49 PM] [Living Window Blinds] End Move up (to 0%) stdout 21:53:49 [1/6/2020, 10:53:49 PM] [Living Window Blinds] End Move down (to 0%)

Could you have a look?

dxdc commented 4 years ago

@szazketto That is really strange. I also just made a number of new changes, so please try the following:

  1. sudo npm -g install homebridge-blinds@1.3.8
  2. pm2 restart homebridge (or however your homebridge instance is)

Let me know if it's behaving any differently. If you're still seeing this behavior, please share your config.json

szazketto commented 4 years ago

@dxdc I have upgraded to 1.3.8, and the log storm stopped but then came back for another blind. I am not sure what is causing it. Here is an outtake from my config.json:

    {
        "accessory": "BlindsHTTP",
        "name": "Dining East Blinds",
        "up_url": "http://192.168.1.102/?4-on",
        "down_url": "http://192.168.1.102/?4-off",
        "use_same_url_for_stop": true,
        "motion_time": 21500,
        "response_lag": 30,
        "max_http_attempts": 5,
        "retry_delay": 2000,
        "http_method": "GET"
    },

I have 11 of these blinds. I will do some more testing in the evening.

Regards,

Peter

dxdc commented 4 years ago

Thanks @szazketto, I think I know what caused this issue. I've made a number of additional changes (including what should be a fix for this one). Please update and let me know if we can close this issue.

  1. sudo npm -g install homebridge-blinds@1.3.9
  2. pm2 restart homebridge (or however your homebridge instance is)
szazketto commented 4 years ago

Hi @dxdc I have upgraded and tested it. No log errors. Thanks very much!

Kind regards

dxdc commented 4 years ago

@szazketto glad to hear it!

One other point. I see you're using:

"response_lag": 30,

In your config. This is possible, but surprisingly low if that's the case. I think there may be some confusion on what that value should be, so I've updated the README to include more detailed calibration instructions. It will help if/when using values that are not 0 or 100.

https://github.com/zwerch/homebridge-blinds