Git Product home page Git Product logo

homebridge-http-curtain's People

Contributors

dependabot[bot] avatar quicksander avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

dural pallester

homebridge-http-curtain's Issues

Need ReGex for setter Please

Hello,

I would like to ask you for a small change in order to make my roller shutters work.

My home automation API needs to be able to receive (SETTER) with a body request.

Here is an example to determine the desired position of a roller shutter:
http://xxx.xxx.xxx.xxx/api/core/ana/196642?ApiKey=xxxx&option=filter_state

Method: PUT

Request body (your "%d"):
{"value":xxx}

Can you add that please?

Thank you!

Functional problem

Hello QuickSander,

I am encountering a problem :
When I try to change the position of one of my roller shutters, the first press on the button (to open or close it completely) in the Home app produces no effect (the encoder wheel appears at the top right of the button ), I then have to press again to "cancel" my first request and start again for it to finally work. I don't have this problem, if I do a long press and set a specific percentage.

Here's a result from my logs that might be useful (but is irrelevant to when I'm using a roller shutter):

[3/30/2022, 08:44:27] [homebridge-http-lightbulb] This plugin slows down Homebridge. The read handler for the characteristic 'On' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[3/30/2022, 08:44:27] [homebridge-http-curtain] This plugin slows down Homebridge. The read handler for the characteristic 'Current Position' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.
[3/30/2022, 08:44:27] [homebridge-http-curtain] This plugin slows down Homebridge. The read handler for the characteristic 'Target Position' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

A snippet of my config file:

{
            "name": "Porte",
            "notificationID": "X4VR3-4",
            "getCurrentPosUrl": {
                "url": "http://xxxx/api/core/ana/196642?ApiKey=xxxx&option=filter_state",
                "method": "GET"
            },
            "getCurrentPosRegEx": "\"value\"s*:s*([0-9]+)",
            "setTargetPosUrl": {
                "url": "http://xxxx/api/core/ana/196638?ApiKey=xxxx",
                "method": "PUT",
                "body": "{ \"virtual\":true, \"value\":%d }"
            },
            "getTargetPosUrl": {
                "url": "http://xxxx/api/core/ana/196642?ApiKey=xxxx&option=filter_state",
                "method": "GET"
            },
            "getTargetPosRegEx": "\"value\"s*:s*([0-9]+)",
            "pullInterval": 30000,
            "invertPosition": true,
            "accessory": "HttpCurtain"
        },

Thank for your help !

Unable to use a pattern to retrieve current position

Hello,

First of all, excuse my English because I'm French.
Then, thanks for the plugin :)

I try to configure the config.json to have the current status position of my curtain.
My url request gives the results : "{ "success": 1, "body":{"last_value": 0} }" where the last_value starts from 0 to 100 and gives the current position.

The plugin can't read the current status and it gives the value "Position value is currently at: NaN%" in Homebridge.
Have you got an idea to solve my problem ?

This is my configuration

"name": "Lames Pergola",
"notificationID": "my-http-curtain",
"getCurrentPosUrl": {
"url": "https://api.eedomus.com.......",
"method": "GET",
"statusPattern": "([0-9]{1,3})"
},
"setTargetPosUrl": {
"url": "http://..........value=%d",
"method": "POST"
},
"pullInterval": 30000,
"debug": true,
"accessory": "HttpCurtain"

Thanks in advance,
Thomas

Allow inverting position status

I am trying to use this with shades that report 0 for open, but this plugin reports 0 as closed to homekit. Is it possible to get a checkbox for "Invert value" in the accessory config?

Time out

Hello and thank you for the plugin
I have time out errors when I set several curtains
[26/04/2023, 15:59:24] [homebridge-http-curtain] This plugin slows down Homebridge. The read handler for the characteristic 'Target Position' was slow to respond! See https://homebridge.io/w/JtMGR for more info.
26/04/2023, 15:59:38] [homebridge-http-lightbulb] This plugin slows down Homebridge. The read handler for the characteristic 'On' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.
do you have a solution ?
thank you

Stuck on Opening...

Hey, I just set this plugin up and it seems I can't get things 100% (ha)

Here is my config

      {
            "name": "Office Blinds",
            "notificationID": "my-http-curtain",
            "getCurrentPosUrl": {
                "url": "http://192.168.1.53/api/status",
                "method": "GET"
            },
            "getPositionStateUrl": {
                "method": "GET"
            },
            "setTargetPosUrl": {
                "url": "http://192.168.1.53/api/position?pct=%d",
                "method": "PUT"
            },
            "getTargetPosUrl": {
                "method": "GET"
            },
            "identifyUrl": {
                "method": "GET"
            },
            "pullInterval": 5000,
            "accessory": "HttpCurtain"
        }

When the curtain is open, the status API returns

curl http://192.168.1.53/api/status 
100

Which is what I believe the plugin is expecting. When closed, it returns 0. When I tap the blinds card to close it, the status immediately switches to "Closed" with no loading indicator. The open state never seems to complete though.

image

Plugin slows down homebridge

Homebridge gives me this error every few mintutes. My webserver responds really fast, I checked that already.

[16/08/2021, 15:24:37] [homebridge-http-curtain] This plugin slows down Homebridge. The read handler for the characteristic 'Current Position' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info. [16/08/2021, 15:24:37] [homebridge-http-curtain] This plugin slows down Homebridge. The read handler for the characteristic 'Target Position' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

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.