Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to know how long an input was pressed in plugins/mqtt-client? #56

Open
pietew opened this issue Feb 1, 2022 · 1 comment
Open

Comments

@pietew
Copy link

pietew commented Feb 1, 2022

In plugins/mqtt-client, the input status topic (Default: openmotics/input/{id}/state) now publishes the following information:

{"status": "OFF", "timestamp": "2022-02-01T15:55:31.748217+00:00", "id": 36, "name": "I3Geel"}

Is it possible to know the long press information that OpenMotics supports?

@pietew pietew changed the title Possible to know how long an input was pressed? Possible to know how long an input was pressed in plugins/mqtt-client? Feb 1, 2022
@evilB
Copy link

evilB commented Mar 8, 2022

I just tested it here at home:

I have pressed a specific switch, these were the two related messages I received.
(intermediate messages were related to changing of brightness)

So you can subscribe to a specific input (in my case 24) and keep track of ON and Off status and timestamp.

Message 716 received on openmotics/input/24/state at 21:20:
{
"status": "ON",
"timestamp": "2022-03-08T20:20:38.999321+00:00",
"id": 24,
"name": "I3.1"
}

Message 730 received on openmotics/input/24/state at 21:20:
{
"status": "OFF",
"timestamp": "2022-03-08T20:20:41.072235+00:00",
"id": 24,
"name": "I3.1"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants