This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
enablePoll / disablePoll does not update the is_polled flag of full zwave payload #18
Comments
You right, is_polled property is not updated after an enable/disablePoll call, I should check if there is an event related with the poll change or change the is_pooled on successfull call of enable_poll and disable_poll.
In your first cal you haven't set an intensity value when calling enable_poll, it must be higher than 0 or it returns some errors in lower level z_wave lib (you should enable OpenZwave log to check them). Try to enablePoll and set the intensity to 1 or more and let me know if the is_polled property is updated than.
As I said in a previous comment I still doesn't know what intensity stands for, I have tried to check docs but they are not so clear, I just know that if it is set to 0 there are errors.
… On 15 Mar 2019, at 21:16, Jorge Schrauwen ***@***.***> wrote:
While trying to solve #12 I was playing with enablePoll/disablePoll.
start zwave2mqtt with poll disabled for the value
send {"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}]} to zwave/_CLIENTS/ZWAVE_GATEWAY-mosca/api/enablePoll/set
we now get the value every few seconds (frequency has no effect :()
For the message received now this is the payload
{"value_id":"4-37-1-0","node_id":4,"class_id":37,"type":"bool","genre":"user","instance":1,"index":0,"label":"Switch","units":"","help":"","read_only":false,"write_only":false,"min":0,"max":0,"is_polled":false,"value":true}
(optionally disable poll again) send {"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}]} to zwave/_CLIENTS/ZWAVE_GATEWAY-mosca/api/disablePoll/set
As you can see the polled message have is_polled set to false!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The reply to the command is that is was successful though, and it seems to work.
I will try with a value next time I am near the computer.
~ sjorge
… On 16 Mar 2019, at 08:38, Daniel Lando ***@***.***> wrote:
You right, is_polled property is not updated after an enable/disablePoll call, I should check if there is an event related with the poll change or change the is_pooled on successfull call of enable_poll and disable_poll.
In your first cal you haven't set an intensity value when calling enable_poll, it must be higher than 0 or it returns some errors in lower level z_wave lib (you should enable OpenZwave log to check them). Try to enablePoll and set the intensity to 1 or more and let me know if the is_polled property is updated than.
As I said in a previous comment I still doesn't know what intensity stands for, I have tried to check docs but they are not so clear, I just know that if it is set to 0 there are errors.
> On 15 Mar 2019, at 21:16, Jorge Schrauwen ***@***.***> wrote:
>
> While trying to solve #12 I was playing with enablePoll/disablePoll.
>
> start zwave2mqtt with poll disabled for the value
> send {"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}]} to zwave/_CLIENTS/ZWAVE_GATEWAY-mosca/api/enablePoll/set
> we now get the value every few seconds (frequency has no effect :()
> For the message received now this is the payload
> {"value_id":"4-37-1-0","node_id":4,"class_id":37,"type":"bool","genre":"user","instance":1,"index":0,"label":"Switch","units":"","help":"","read_only":false,"write_only":false,"min":0,"max":0,"is_polled":false,"value":true}
> (optionally disable poll again) send {"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}]} to zwave/_CLIENTS/ZWAVE_GATEWAY-mosca/api/disablePoll/set
> As you can see the polled message have is_polled set to false!
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yep the command works and the value is polled but if you run the command isPolled on that value openzwave returns always false if you have set an intensity of null or 0, returns true otherwise. So try that than on Monday I will check if there are events or another way to update the is_polled flag on the value and all your other issues
… On 16 Mar 2019, at 08:41, Jorge Schrauwen ***@***.***> wrote:
The reply to the command is that is was successful though, and it seems to work.
I will try with a value next time I am near the computer.
~ sjorge
> On 16 Mar 2019, at 08:38, Daniel Lando ***@***.***> wrote:
>
> You right, is_polled property is not updated after an enable/disablePoll call, I should check if there is an event related with the poll change or change the is_pooled on successfull call of enable_poll and disable_poll.
>
> In your first cal you haven't set an intensity value when calling enable_poll, it must be higher than 0 or it returns some errors in lower level z_wave lib (you should enable OpenZwave log to check them). Try to enablePoll and set the intensity to 1 or more and let me know if the is_polled property is updated than.
>
> As I said in a previous comment I still doesn't know what intensity stands for, I have tried to check docs but they are not so clear, I just know that if it is set to 0 there are errors.
>
>
> > On 15 Mar 2019, at 21:16, Jorge Schrauwen ***@***.***> wrote:
> >
> > While trying to solve #12 I was playing with enablePoll/disablePoll.
> >
> > start zwave2mqtt with poll disabled for the value
> > send {"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}]} to zwave/_CLIENTS/ZWAVE_GATEWAY-mosca/api/enablePoll/set
> > we now get the value every few seconds (frequency has no effect :()
> > For the message received now this is the payload
> > {"value_id":"4-37-1-0","node_id":4,"class_id":37,"type":"bool","genre":"user","instance":1,"index":0,"label":"Switch","units":"","help":"","read_only":false,"write_only":false,"min":0,"max":0,"is_polled":false,"value":true}
> > (optionally disable poll again) send {"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}]} to zwave/_CLIENTS/ZWAVE_GATEWAY-mosca/api/disablePoll/set
> > As you can see the polled message have is_polled set to false!
> >
> > —
> > You are receiving this because you are subscribed to this thread.
> > Reply to this email directly, view it on GitHub, or mute the thread.
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This is still on my TODO to retest, but bit busy this week. |
I still have to fix this but give it a try as I suggested
… On 19 Mar 2019, at 18:52, Jorge Schrauwen ***@***.***> wrote:
This is still on my TODO to retest, but bit busy this week.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I just had some time to test.
or
Both enable the polling of the value but the flag is set to false
Enables polling and the flag is then set to true as you said it would be. All 3 variants do return a success message though 🤷♂️ |
Ok just find out there are two events `poll enabled` and `poll disabled` that I can use to update values IDs, tomorrow In the afternoon I will make a commit with the updates, I will keep you updated to test when you have time
… On 21 Mar 2019, at 18:04, Jorge Schrauwen ***@***.***> wrote:
I just had some time to test.
{"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}]}
or
{"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}, 0]}
Both enable the polling of the value but the flag is set to false
{"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}, 1]}
Enables polling and the flag is then set to true as you said it would be.
All 3 variants do return a success message though 🤷♂️
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
robertsLando
added a commit
that referenced
this issue
Mar 22, 2019
@sjorge check the last commit and let me know if it fixes your problem 😄 |
That seems to work! But shoudn't the new code be moved up so that it is in the success branch of the if (err) ... above it? |
I have placed it there as it is not part of the result, result just tells if the apiCall is successful or not, in this case the api is enable/disablePoll so it is independent from the isPolled call result
… On 22 Mar 2019, at 22:57, Jorge Schrauwen ***@***.***> wrote:
That seems to work! But shoudn't the new code be moved up so that it is in the success branch of the if (err) ... above it?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
While trying to solve #12 I was playing with enablePoll/disablePoll.
{"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}]}
tozwave/_CLIENTS/ZWAVE_GATEWAY-mosca/api/enablePoll/set
For the message received now this is the payload
{"args":[{"node_id":4,"class_id":37,"instance":1,"index":0}]}
tozwave/_CLIENTS/ZWAVE_GATEWAY-mosca/api/disablePoll/set
As you can see the polled message have is_polled set to false!
The text was updated successfully, but these errors were encountered: