Giter VIP home page Giter VIP logo

Comments (3)

benzman81 avatar benzman81 commented on August 18, 2024

There should be a logentry. Can you post it for open and close?

from homebridge-http-webhooks.

Rob-VF avatar Rob-VF commented on August 18, 2024

I placed 3 different objects:

a) pushbutton to open
b) pushbutton to close
c) lockemechanisms to do both

if I use a) or b) the commands are properly executed and the status on c) is updated

if I use c) using the same url in a) or b) for closing or opening only the closing one is executed.

please find following the config and logs:

`"pushbuttons": [

                {
                "id": "a_centr",
                "name": "Open",
                "push_url": "http://localhost:8080/?objectId=1&Name=open&Value=1",
                "push_method": "GET"
                },
                {
                "id": "c_centr",
                "name": "Close",
                "push_url": "http://localhost:8080/?objectId=1&Name=close&Value=1",
                "push_method": "GET"
                }
            ],`

AND

"lockmechanisms": [{ "id": "closemec", "name": "centralizzata", "close_url": "http://localhost:8080/?objectId=1&Name=close&Value=1", "close_method": "GET", "open_url": "http://localhost:8080/?objectId=1&Name=open&Value=1", "open_method": "GET" }],

The log if I use a) or b) is:

`
++++++++ FROM CLOSED STATUS ++++++

[2/1/2019, 3:11:39 PM] [HttpWebHooks] Push buttons state change for 'a_centr'...
[2/1/2019, 3:11:40 PM] [HttpWebHooks] Request to 'http://localhost:8080/?objectId=1&Name=open&Value=1' finished with status code '200' and body 'sent query string: {
"objectId": "1",
"Name": "open",
"propValue": "1"
}
[2/1/2019, 3:11:41 PM] [HttpWebHooks] Change Target Lock State for locking to '0'.
[2/1/2019, 3:11:41 PM] [HttpWebHooks] Change Current Lock State for locking to '0'.

++++++++ FROM OPEN STATUS ++++++

[2/1/2019, 3:11:49 PM] [HttpWebHooks] Push buttons state change for 'c_centr'...
[2/1/2019, 3:11:50 PM] [HttpWebHooks] Request to 'http://localhost:8080/?objectId=1&Name=close&Value=1' finished with status code '200' and body 'sent query string: {
"objectId": "1",
"Name": "close",
"propValue": "1"
}
[2/1/2019, 3:11:51 PM] [HttpWebHooks] Change Target Lock State for locking to '1'.
[2/1/2019, 3:11:51 PM] [HttpWebHooks] Change Current Lock State for locking to '1'.
`

If I use c) the result is:

`
++++++++ FROM OPEN to CLOSE STATUS ++++++
[2/1/2019, 3:11:12 PM] [HttpWebHooks] Target Lock State for 'closemec'...
[2/1/2019, 3:11:13 PM] [HttpWebHooks] Request to 'http://localhost:8080/?objectId=1&Name=close&Value=1' finished with status code '200' and body 'sent query string: {
"objectId": "1",
"Name": "close",
"propValue": "1"
}
[2/1/2019, 3:11:14 PM] [HttpWebHooks] Change Target Lock State for locking to '1'.
[2/1/2019, 3:11:14 PM] [HttpWebHooks] Change Current Lock State for locking to '1'.

++++++++ FROM CLOSE to OPEN STATUS ++++++

[2/1/2019, 3:11:20 PM] [HttpWebHooks] Target Lock State for 'closemec'...
[2/1/2019, 3:11:20 PM] [HttpWebHooks] Request to 'http://localhost:8080/?objectId=1&Name=close&Value=1' finished with status code '200' and body 'sent query string: {
"objectId": "1",
"Name": "close",
"propValue": "1"
}
`
The service that updates from physical loc towards webhooks is obviously the same, the problem is that regardless the state set to 1 the lockemechanisms script sends always the "close" command.

R

from homebridge-http-webhooks.

benzman81 avatar benzman81 commented on August 18, 2024

fixed with 0.0.45

from homebridge-http-webhooks.

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.