keropnative.blogg.se

Storing xpanel on processor
Storing xpanel on processor




storing xpanel on processor
  1. #STORING XPANEL ON PROCESSOR INSTALL#
  2. #STORING XPANEL ON PROCESSOR SERIAL#
  3. #STORING XPANEL ON PROCESSOR UPDATE#
  4. #STORING XPANEL ON PROCESSOR REGISTRATION#

#STORING XPANEL ON PROCESSOR SERIAL#

value can be 0 or 1 for digital joins, 0 - 65535 for analog joins or a string for serial joins. sigtype can be "d" for digital joins, "a" for analog joins or "s" for serial joins. Set(sigtype, join, value) is used to set the state of joins coming from the CIPSocketClient as seen by the control processor.

#STORING XPANEL ON PROCESSOR UPDATE#

Update_request() can be used while connected to initiate the update request (two-way synchronization) procedure. Stop() should be called once when you're finished with the CIPSocketClient to close the socket connection and shut down the worker threads.

#STORING XPANEL ON PROCESSOR REGISTRATION#

When the socket connection is first established, the standard CIP registration and update request procedures are performed automatically. Start() should be called once after instantiating a CIPSocketClient to initiate the socket connection and start the required worker threads. subscribe ( "d", 1, my_callback ) # run 'my_callback` when digital join 1 changes # this will close the socket connection when you're finished cip. get ( "s", 223 ) # returns the current state of serial join 223 # you should really subscribe to incoming (processor > client) joins rather than polling def my_callback ( sigtype, join, state ): print ( f " " ) cip. get ( "a", 109 ) # returns the current state of analog join 109 serial_223 = cip. get ( "d", 34 ) # returns the current state of digital join 34 analog_109 = cip. release ( 3 ) # emulates a touchpanel button release on digital join 3 # for joins coming from the processor going to this client digital_34 = cip. press ( 3 ) # emulates a touchpanel button press on digital join 3 (stays high until released) cip. pulse ( 2 ) # pulses digital join 2 (sets it high then immediately sets it low again) cip. set ( "s", 101, "Hello Crestron!" ) # set serial join 101 to "Hello Crestron!" cip. set ( "d", 132, 0 ) # set digital join 132 low cip. set ( "d", 1, 1 ) # set digital join 1 high cip. update_request () # note that this also occurs automatically on first connection # for joins coming from this client going to the processor cip. start () # you can force this client and the processor to resync using an update request cip. CIPSocketClient ( "processor", 0x0A ) # initiate the socket connection and start worker threads cip. import cipclient # set up the client to connect to hostname "processor" at IP-ID 0x0A cip = cipclient. Here is a simple example that demonstrates setting and getting join states using this module. Once the control processor has been programmed accordingly, you can communicate with it using the API as described below. This module works by connecting to an "XPanel 2.0 Smart Graphics" symbol defined in a SIMPL Windows program.

#STORING XPANEL ON PROCESSOR INSTALL#

Pip install python-cipclient Usage and API This module is available throught the Python Package Index, and can be installed using the pip package-management system: Familiarity with and access to Crestron's development tools, processes and terminology are required to configure the control processor in a way that allows this module to be used. This is a Python-based socket client that facilitates communications with a Crestron control processor using the Crestron-over-IP (CIP) protocol. The author is not affiliated in any way with Crestron with the exception of owning and using some of their hardware. 'XPanel', 'Smart Graphics' and 'SIMPL Windows' are all trademarks of Crestron. NOTICE: This module is not produced, endorsed, maintained or supported by Crestron Electronics Incorporated. A Python module for communicating with Crestron control processors via the






Storing xpanel on processor