ChristianTremblay / pyhaystack

Pyhaystack is a module that allow python programs to connect to a haystack server project-haystack.org. Connection can be established with Niagara Platform running the nhaystack, Skyspark and Widesky. For this to work with Anaconda IPython Notebook in Windows, be sure to use "python setup.py install" using the Anaconda Command Prompt in Windows. If not, module will be installed for System path python but won't work in the environment of Anaconda IPython Notebook. You will need hszinc 1.3+ for this to work.
Apache License 2.0
73 stars 31 forks source link

Watch_poll does not use argument refresh #98

Closed Jorricks closed 3 years ago

Jorricks commented 3 years ago

Hello,

We are trying to set up a watch for a skyspark installation. I was trying to get watch_poll to work, however, I noticed that it always returns me all the points whether I have refresh on True or False. I did some digging and found out it is probably due to the server implementation.

However, for a standard server, I think a full refresh won't work because of the following functions: https://github.com/ChristianTremblay/pyhaystack/blob/master/pyhaystack/client/session.py#L510 Here it basically forgets about the refresh parameter.

if refresh:
   grid.metadata["refresh"] = hszinc.MARKER

I think the above mentioned could should fix it if I look at the documentation specified here: https://project-haystack.org/doc/Ops#watchPoll

sjlongland commented 3 years ago

Yeah, that'd be a whoopsie on my part… might've meant to put those two lines in, but didn't.

Jorricks commented 3 years ago

Hi @sjlongland,

Thank you for adding this :)!