Giter Club home page Giter Club logo

node-red-contrib-crestron's Introduction

If you think this project is very helpful to you, you can give this project a star⭐. You can also buy me a cup of coffee, hh (● '◡' ●) I will keep updating.

Thank you

WARNING

It is not recommended to use the SIMPL 4.14 version, when I use it, it will cause some strange problems in the program (cause other macros to fail). So I rolled back the version to 4.11.

This is My Software Version.

SIMPL : simpl_windows_4.11.06.01.1

CRESTRON_DATABASE : crestron_database_89.05.002.00

DEVICE_DATABASE : device_database_115.00.002.00

Donate via PayPal

Nodered-Crestron

This is a NodeRed Plugin to Crestron Prefessor(Use Tcp Socket to commucation)

The Plugin has 3 types,there is

Digital

Accept Value is true/false or 0/1

Analog

Accept Value is 0-65535

String

Accept Value is any String(length is depend crestron marco)

技术交流群:107927710,里面有很多大神呦

PS:This is a free trial

How to use

  1. install nodejs and npm in your computer

  2. install node-red sudo npm install -g node-red

  3. install crestron-node sudo npm install -g node-red-contrib-crestron

  4. run node-red

  5. use crestron-node

    crestron-node

  6. config Crestron Professor Server

    crestron-node-server

  7. Fill in the ID and choose the data type,Make sure to match the pins of Crestron's macro file

    crestron-node-edit

  8. send the msg to the node

  9. Open Crestron SIMPL Software to edit CresNode

    crestron-node-edit

CHANGE LOG

V 1.0.0 First version

V 1.0.1 Fixed no digital output

V 1.0.2 add 10 inputs, "Serial -> String" , Added data type to label name for easy differentiation

V 1.0.3 Change node label, Easy to identify V 1.0.4 Update Demo

V 1.0.5 fixed Digital Node ouput

V 1.0.6 Support Crestron 2 Series Control System®

V 1.0.7 Support Crestron 4 Series Control System®(Will not continue to update for now)

V 1.0.8

  1. Update README
  2. false signal not need FeedBack now

V 1.1.0 Support Get FeedBack,Please check demo to know how to use

V 1.1.1 fixed the string problem,Thanks @gregjwinter found this bug.

V 1.1.2 update 4-series demo.

TEST

I created 50 nodes and sent 50 messages to the Crestron host every 1s, which is equivalent to a message of 20ms. After a long test, the information was sent steadily

crestron-node

DEMO

crestron-node-demo

[{"id":"34261440.6a55fc","type":"crestron-node","z":"ff2337eb.0985b8","server":"52a4d5a6.b307cc","cid":"1","ctype":"Digital","name":"","x":330,"y":3420,"wires":[["f9e0f22e.47fed"]]},{"id":"4f260411.c27f4c","type":"inject","z":"ff2337eb.0985b8","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":3380,"wires":[["34261440.6a55fc"]]},{"id":"5133cbb1.818fa4","type":"inject","z":"ff2337eb.0985b8","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":3480,"wires":[["34261440.6a55fc"]]},{"id":"f9e0f22e.47fed","type":"debug","z":"ff2337eb.0985b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":520,"y":3420,"wires":[]},{"id":"e6a48e93.8382","type":"crestron-node","z":"ff2337eb.0985b8","server":"52a4d5a6.b307cc","cid":"1","ctype":"Analog","name":"","x":320,"y":3600,"wires":[["88c34897.52f8f8"]]},{"id":"38457b10.e8e674","type":"inject","z":"ff2337eb.0985b8","name":"","topic":"","payload":"123","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":3600,"wires":[["e6a48e93.8382"]]},{"id":"88c34897.52f8f8","type":"debug","z":"ff2337eb.0985b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":510,"y":3600,"wires":[]},{"id":"1d423a1c.444716","type":"crestron-node","z":"ff2337eb.0985b8","server":"52a4d5a6.b307cc","cid":"1","ctype":"String","name":"","x":360,"y":3700,"wires":[["bbce66c1.5813f8"]]},{"id":"c605c078.97ddd","type":"inject","z":"ff2337eb.0985b8","name":"","topic":"","payload":"Hello World!","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":3700,"wires":[["1d423a1c.444716"]]},{"id":"bbce66c1.5813f8","type":"debug","z":"ff2337eb.0985b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":510,"y":3700,"wires":[]},{"id":"1a1b9880.d45828","type":"inject","z":"ff2337eb.0985b8","name":"","topic":"","payload":"getState","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":3820,"wires":[["e6a48e93.8382","1d423a1c.444716","34261440.6a55fc"]]},{"id":"52a4d5a6.b307cc","type":"crestron-node-config","z":"","host":"192.168.1.10","port":"9999"}]

node-red-contrib-crestron's People

Contributors

songzh96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-crestron's Issues

crestron simpl+ module

Hi,
Your simpl+ part is only compiled for old x series processors.
You have also locked your module preventing recompile.

Best regards

Error: CList: could not obtain list mutex (status=-50),(TaskHoldingMutex=SMn001B)

Hi,

thanks for this contribution.

I've started to use this contribution with my Crestron MP2E and Node-Red. When I add multiple Cresnodes in SIMPL Windows, I start to get errors when I deploy. This is what I get:

Program Initialized.

MP2E>The SocketGetStatus returns: 1
The MyServer.SocketStatus returns: 1
Server started to 0.0.0.0 on port 9973 (status: 0)
Error: CList: could not obtain list mutex (status=-50),(TaskHoldingMutex=SMn001B)

Error: Unable to get m_pListenList Protection
The SocketGetStatus returns: 1
The MyServer.SocketStatus returns: 1
Server started to 0.0.0.0 on port 9976 (status: 0)
Error: CList: could not obtain list mutex (status=-50),(TaskHoldingMutex=SMn001B)

Error: Unable to get m_pListenList Protection
The SocketGetStatus returns: 1
The MyServer.SocketStatus returns: 1
Server started to 0.0.0.0 on port 9975 (status: 0)
The SocketGetStatus returns: 1
The MyServer.SocketStatus returns: 1
Server started to 0.0.0.0 on port 9974 (status: 0)

MP2E>ISTAT SPLUS SMn001B
Task is associated with Main Task for Symbol S-7.22.

image

Any chance you would share the password for Crestron to be able to look at it?

Not passing all strings.

Crestron Program needs to be restarted because not all string values update or passed to Crestron.
Noted Red shows connected and debug shows data correctly to CrestNode. However, CrestNode strings show "" in Crestron ToolBox debug console.

SIMPL Windows: 4.15 (build: 4.1500.11)
SIMPL+ 4.06 (build: 4.0600.00)

INCLUDE4_2SERIES.DAT Version Information:
(2 Series) : 1.80
INCLUDE4.DAT Version Information:
(3 & 4 Series) : 2.14.157
Symlib2.Tio 1139 04/15/2021 07:20:24PM
iodev.tio 1139 04/15/2021 07:20:24PM

Other Crestron SW:
Device Database: 200.75 (build: 200.7500.001.00)
Crestron Database (cnctrldb22000.mdb) : 205.05 (build: 205.0500.004.00)
Crestron Toolbox: 3.09p20 (build: 3.0920.0042.0)
SIMPL+ Cross Compiler: 1.3

Should False be working?

Hi,

Great job by the way. I am trying to send either a bollean false or true dependent on when a sensor is open or closed. True works but false does not. I also tried sending a 1 or 0 via string inject. Any thoughts on if I am doing something wrong?

Password

Was wondering if you might like to share the Crestron source as I wanted to add a feature or two. 1) digital output to show the connection. 2) Digital to show activity. 3) May be even a debug serial string. I do all my work in 2 and 3 series units as I mostly do lighting systems.... Thank you very much in advance and have a great day.

Please update the zip file

Hi.
The downloadeble zip file does have a wrong cres node file. When extracting this to the simplwindows program it does not show in the project window. But once I replace it with the oldest file compiled in 24/12 it does compile. Can you update zip with the latest 1.0.3 version of the cres node?

Great work by the way!

Expand the module to more than 10 outputs?

Hi
I have used the module and it works very well. Great job so far!
But is it possible to expand the module so we can get 100-200 outputs instead of 10?
I have already used my 10 outputs and are planning for 30 more :-)

Error @ CresNode at line 167

Hi, thank you for this nice node. I was testing it on my system but I get this error time to time:

151. Error: splusmanagerapp.exe [App 1] # 2020-11-12 06:10:29  # Module S-7.3 : CresNode at line 167: Unhandled Exception: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
   at System.Text.StringBuilder.Remove(Int32 startIndex, Int32 length)
   at Crestron.Logos.SplusObjec152. Error: splusmanagerapp.exe [App 1] # 2020-11-12 06:10:29  # ts.CrestronString.Remove(Int32 length, Boolean bGrabLock)
   at Crestron.Logos.SplusObjects.CrestronStringExtentions.Remove(CrestronString CRString, Int32 length)
   at Crestron.Logos.SplusObjects.CrestronStringExtentions.Remove(CrestronString CRString,153. Error: splusmanagerapp.exe [App 1] # 2020-11-12 06:10:29  #  String matchStr, Int32 startPos)
   at Crestron.Logos.SplusLibrary.Functions.Remove(String matchStr, CrestronString input)
   at UserModule_CRESNODE.UserModuleClass_CRESNODE.SOCKETRX(SplusExecutionContext __context__)
   at UserModule_CRESNODE.UserMod154. Error: splusmanagerapp.exe [App 1] # 2020-11-12 06:10:29  # uleClass_CRESNODE.MYSERVER_OnSocketReceive_6(Object __Info__)
   at Amib.Threading.Internal.WorkItem.ExecuteWorkItem()
   at Amib.Threading.Internal.WorkItem.Execute()
   at Amib.Threading.SmartThreadPool.ExecuteWorkItem(WorkItem workItem)
   at Amib.155. Error: splusmanagerapp.exe [App 1] # 2020-11-12 06:10:29  # Threading.SmartThreadPool.ProcessQueuedItems()

I'm currently using the analog and serial signal only, no digital.
I think it is related to one of the serial inputs (nodered --> crestron) but the communication i send is just plain text..
Do you have any idea?

Crestron closes connection

If I send about 10 values every 5 seconds to Crestron, Crestron closes the connection to the node. A reconnect isnt possible, i have to restart the Crestron Program via Toolbox. If I send the 10 values, let me say, every 60 Minutes the Connection is stable. Do you have an idea how to fix this issue?

"Error: connect ECONNREFUSED 192.168.2.13:9999"

serial communication

Hi,
great job, but serial communication does not work. analog & digital is fine.

Error in sending to nodered char ":"

Hi, I think I found another strange behaviour.
If I send char ":" to nodered from the crestron processor, the string gets truncated.
for example
{"name":"light_I","value":"{"state":"ON","transition":"0"}"}
will result in receiving {"name"
Another example:
If I send one:two i receive just one, but if I send one@two I receive the full string.
Tried with different characters but so far only ":" is bracking the output

String length

Is it possible to change (I assume this would be in the SIMPL+ code) the string length array to handle 180 characters? In my instance, Node-Red is sending out a sting of 175 characters and I only get 131 characters back in Crestron SIMPL windows program. Otherwise the code works perfectly for my application - thank you for writing this. Will be sure to send you some $ for use in my home automation system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.