Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 28 21:30
    jdkaire commented #110
  • Feb 18 23:09
    sjlongland commented #70
  • Jun 11 2021 22:09
    ChristianTremblay commented #110
  • Jun 10 2021 02:57
    clarsen edited #110
  • Jun 10 2021 02:40
    clarsen opened #110
  • Jun 03 2021 03:39
    sjlongland commented #109
  • May 25 2021 06:33
    gidnoot commented #109
  • May 23 2021 12:54
    gidnoot commented #109
  • May 21 2021 23:09
    sjlongland commented #109
  • May 21 2021 14:22
    gidnoot opened #109
  • Apr 21 2021 00:18
    sjlongland commented #108
  • Apr 21 2021 00:14
    sjlongland commented #108
  • Apr 21 2021 00:14
    sjlongland commented #108
  • Apr 20 2021 23:57
    ChristianTremblay commented #108
  • Apr 20 2021 23:33
    jdechalendar commented #108
  • Apr 20 2021 23:27
    ChristianTremblay commented #108
  • Apr 20 2021 23:24
    jdechalendar commented #108
  • Apr 20 2021 23:03
    sjlongland commented #108
  • Apr 20 2021 23:00
    jdechalendar commented #108
  • Apr 20 2021 23:00
    jdechalendar commented #108
Christian Tremblay
@ChristianTremblay
Same with Niagara.... you need a license and a way to build the@database, add nhaystack, etc...
Something that would be cool, is to include a server into pyhaystack. But time is a hard to find resources and there is only 24h a day.... that and the fact that people want to monetize their servers...
(By haystack-stack.... I mean haystack-Java, node-haystack, nhaystack, all implementations of the protocole... that are not complete server implementation by themselves.)
Stuart Longland
@sjlongland
@epaulson_gitlab Well, WideSky is a very distant node-haystack fork, but if I recall correctly, node-haystack just implemented the core guts, and if you wanted authentication, you configured the express HTTP server middleware to authenticate users.
So likely, won't work with node-haystack directly without some work on the pyhaystack side. Sadly, making a pyhaystack server is not something I'm able to entertain as it'd directly compete against my employer's product.
(Worth noting, we've hacked up node-haystack significantly since we forked it… so it's more like the difference between NetBSD and OpenBSD… yes OpenBSD forked NetBSD, but that was many years ago, and the two are very different today.)
Erik Paulson
@epaulson_gitlab
In pyhaystack (and other haystack clients) is the only difference between different haystack servers authentication methods, e.g. if I build out a quick "null authentication" method in pyhaystack am I likely to be OK to talk to the test server in haystack-java?
Christian Tremblay
@ChristianTremblay
I dont' think it's the only difference as every vendor will sell you their "cool features" :)
One point being what they do with the data
Fault detection, cloud storage, etc...
The REST API "should" be the same for all implementation.... even if some will play with the rules....
that is another story
Erik Paulson
@epaulson_gitlab
Thanks. I'm not too worried about extra "cool features", just trying to figure out a time estimate of what happens if I spend time with authentication on haystack-java and if there's more to do to have it successfully use the built-in dummy data server that's in haystack-java. (not worried about the effort to connect it to a real BMS just yet)
err, sorry - if I spend time with pyhaystack to successfully "authenticate" to haystack-java - so either actually get authentication in haystack-java working or else have a way to turn off authentication in pyhaystack
Stuart Longland
@sjlongland
You could implement a "null" authentication scheme… sub-class the base session class and stub out the functions relating to authentication. This would not be difficult. There's been no attempt to do this thus far because there's been very little call for it.
Erik Paulson
@epaulson_gitlab
I've been able to use pyhaystack with the java demo server (I just copied the skyspark session and set the authentication to None and have is_logged_in always return true).
Christian Tremblay
@ChristianTremblay
Nice ! Would you document that in some way ? Guess you may not be the only one that could need that trick
Erik Paulson
@epaulson_gitlab
however, session.nav() doesn't work - when I try this: op = session.nav(nav_id='A') it sends the wrong nav_id parameter - it's sending
DEBUG:urllib3.connectionpool:http://localhost:8080 "GET /nav?nav_id=A HTTP/1.1" 200 None
but the server expects
GET /nav?navId=A
Christian Tremblay
@ChristianTremblay
The underscore.... right ?
Erik Paulson
@epaulson_gitlab
yeah. I haven't found the code that is supposed to convert it to camelCase to see why it's not being called
Christian Tremblay
@ChristianTremblay
Can you try modifying session.py Line 482 ?
Erik Paulson
@epaulson_gitlab
and just hard-code it to navId? Yes, that worked
Christian Tremblay
@ChristianTremblay
Weird... not something I use a lot. This bug may be there since a while
Erik Paulson
@epaulson_gitlab
OK. thanks. I'll open an issue
Christian Tremblay
@ChristianTremblay
I’ve pushed to develop
Erik Paulson
@epaulson_gitlab
even better ;)
Christian Tremblay
@ChristianTremblay
Thanks for pointing that.
I’ll wait for your document ;-)
Stuart Longland
@sjlongland
Yeah, there's no magic underscores → camel case function… that was a whoopsie on my part. I've never used nav as WideSky doesn't implement it… it makes too many hierarchy assumptions.
Mitch Wayte
@MitchyW
I am trying to get write a value to to priority 8 with a duration. I cannot get either the point_write or invoke_action to perform this. point_write ignores the duration, and invoke action tell me that I cant't cast a BDouble to a BRelTtime. Anyone know what I am doing wrong? session.point_write('S.site.Ac1.testBool',level=8,val=False, who='dis',duration=5000)
Stuart Longland
@sjlongland
I didn't think there was such a thing as duration for pointWrite?
Hmm, no, I sit corrected, just checked the spec, guess never tried using it.
Mitch Wayte
@MitchyW
Additionally I am unable to retrieve point data from session.point_write('S.site.Ac1.testBool',level=None,val=None,who=None,duration=None) This returns "If level is None, val, who and duration must be None too.
Stuart Longland
@sjlongland
That smells like a bug… what version of pyhaystack is this?
Christian Tremblay
@ChristianTremblay
I remember playing with that recently...
Didn’t merge it to master think.
Chris Choy
@christlc
Perhaps you can try something like duration=hszinc.Quantity(1,'min') or duration='60s' for the duration argument.
Christian Tremblay
@ChristianTremblay
@MitchyW can you please test if develop branch fix your issue ?
Mitch Wayte
@MitchyW
@ChristianTremblay I tested it out and now it works somewhat. When I run point_write on with an object that doesn't have a priority array, then I see that nhaystack reads this point by id. However, pyhaystack throws <GetGridOperation failed> when it doesn't. This seems to be an issue with nhaystack, or possibly something i missed in the documentation. Thanks Christian.
Christian Tremblay
@ChristianTremblay
Please open an issue on GH and add all the details.
Mitch Wayte
@MitchyW
@christlc That worked perfect for invoke_action, I was unsuccesful with point_write at level 8. Thanks for the help.
Mitch Wayte
@MitchyW
@ChristianTremblay It's something I missed in the documentation. It explicitly states that pointWrite is for a point with a priority array. All should work right if the develop branch is merged to the master. Do I need to open the issue again on pyhaystack?
Christian Tremblay
@ChristianTremblay
If it’s only to remind me of merging develop ;-) no
Thanks for your patience !
meldrand
@meldrand
@ChristianTremblay , I'm trying to use the pyhaystack library to pull real-time data at a set sampling frequency from a SkySpark server. I am new at web-based coding and I could use your help to understand how to troubleshoot the authentication errors I keep getting. The main one that I am not sure what to do about is this one:
image.png
Christian Tremblay
@ChristianTremblay
Hi @meldrand, have you been able to connect once to the server ?
meldrand
@meldrand
I can't connect to the server, but I get a code 200 response. Unfortunately, but the response is a redirect to a user interface login page and returns the html code for the login page. If I copy the same GET command into a browser window, it sends me to a login page identical to the UI login, and once I log in there, I can see the response that was supposed to come through after pinging the server with the GET http://.../about url.
Christian Tremblay
@ChristianTremblay
I never work with skyspark.... but I have this snippet that I use to test the connection part of pyhaystack :
import pyhaystack

session = pyhaystack.connect('skyspark', uri='http://address',
                                project='name_of_project',
                                username='access_name',
                                password='password')

session.about().result