Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/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.
https://github.com/christiantremblay/pyhaystack
analytics bms building-automation nhaystack niagara niagara-framework niagara4 semantic skyspark widesky
Last synced: about 5 hours ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/christiantremblay/pyhaystack
- Owner: ChristianTremblay
- License: apache-2.0
- Created: 2016-01-11T02:05:10.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-02-26T14:35:46.000Z (over 3 years ago)
- Last Synced: 2024-04-17T22:48:12.147Z (7 months ago)
- Topics: analytics, bms, building-automation, nhaystack, niagara, niagara-framework, niagara4, semantic, skyspark, widesky
- Language: Python
- Homepage:
- Size: 1.13 MB
- Stars: 70
- Watchers: 11
- Forks: 30
- Open Issues: 12
-
Metadata Files:
- Readme: README.rst
- License: license
Awesome Lists containing this project
README
pyhaystack |build-status| |coverage| |docs| |Gitter|
====================================================What is this ?
--------------
Pyhaystack is a module that allow python programs to connect to a haystack server
using semantic data model for buildings (project-haystack_).Browse a campus, building, floor... find VAV boxes, AHU units, etc. Then extract history
data from them and get the results ready for analysis using pandas or your own database implementation.Which clients are implemented ?
-------------------------------
Actually, connection can be established with :* Niagara4_ by Tridium
* NiagaraAX_ by Tridium
* WideSky_ by Widesky.cloud_
* Skyspark_ by SkyFoundry (version 2 and 3+)Connection to Niagara AX or Niagara 4 requires the nHaystack_ module by J2 Innovations to be installed
and properly configured on your Jace. Refer to documentation of nHaystack for details.How do I install pyhaystack ?
-----------------------------
::pip install pyhaystack
Or you can also git clone the develop branch and use ::
python setup.py install
.. note::
Some users reported problems when installing pyhaystack using the Python version
provided by their OS (Mac OS users). We recommend to try the virtual environment
approach when you are unsure about the python version our modules dependencies.
Using virtual env
------------------
You can find more information on how to use virtualenv_ but here is a short way of making it work.::
sudo pip install virtualenv
mkdir your project folder
cd project
virtualenv venv
source venv/bin/activate.. note::
Once you are in your virtual env DO NOT use sudo to pip install.
(in fact, this is the part that made me think of permission issue as I read somewhere that we should never sudo pip install anything)So now you are in your virtual env (it's in parenthesis in the console) and you
::
pip install requests
pip install hszinc
pip install pyhaystack(note that this time you won't see any weird message when trying to install pandas and you need xcode to perform the install....)
You are now able to ::import hszinc
hszinc.MODE_ZINC
from pyhaystack.client.skyspark import SkysparkHaystackSessionWhat is project-haystack ?
--------------------------
As stated in the web site"`Project Haystack`_ is an open source initiative to streamline
working with data from the Internet of Things. We standardize
semantic data models and web services with the goal of making
it easier to unlock value from the vast quantity of data being
generated by the smart devices that permeate our homes, buildings,
factories, and cities. Applications include automation, control,
energy, HVAC, lighting, and other environmental systems."-- Project-Haystack
Actual implementation
--------------------------
Pyhaystack is robust and will be ready for asynchronous development.We have chosen a state machine approach with observer pattern. See the docs for
more informations.This implementation has been mostly supported by Widesky.cloud_ and Servisys_. We are hoping
that more people will join us in our effort to build a well working open-source software
that will open the door of building data analysis to Python users.Dependency
--------------
Pyhaystack highly depends on hszinc_ which is a special parser for zinc encoded data.
Zinc was created for project-haystack_ as a CSV replacement.For analysis, we also suggest using Pint_ to deal with units. It will bring a lot of possibilities
to pyhaystack (ex. unit conversion).. |build-status| image:: https://travis-ci.org/ChristianTremblay/pyhaystack.svg?branch=master
:target: https://travis-ci.org/ChristianTremblay/pyhaystack
:alt: Build status
.. |docs| image:: https://readthedocs.org/projects/pyhaystack/badge/?version=latest
:target: http://pyhaystack.readthedocs.org/
:alt: Documentation
.. |coverage| image:: https://coveralls.io/repos/ChristianTremblay/pyhaystack/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/ChristianTremblay/pyhaystack?branch=master
:alt: Coverage
.. |Gitter| image:: https://badges.gitter.im/ChristianTremblay/pyhaystack.svg
:target: https://gitter.im/ChristianTremblay/pyhaystack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge
:alt: Gitter.. _Skyspark : https://www.skyfoundry.com/skyspark/
.. _NiagaraAX : https://www.tridium.com/en/products-services/niagaraax
.. _Niagara4 : https://www.tridium.com/en/products-services/niagara4
.. _WideSky.cloud : http://widesky.cloud/
.. _Servisys : http://www.servisys.com
.. _WideSky : http://widesky.cloud/
.. _nHaystack : https://bitbucket.org/jasondbriggs/nhaystack
.. _project-haystack : http://www.project-haystack.org
.. _Project Haystack : http://www.project-haystack.org
.. _Pint : http://pint.readthedocs.io
.. _hszinc : https://github.com/vrtsystems/hszinc
.. _virtualenv : https://virtualenv.pypa.io/en/stable/