Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcp ip question #1

Closed
kompio opened this issue Dec 8, 2017 · 8 comments
Closed

tcp ip question #1

kompio opened this issue Dec 8, 2017 · 8 comments

Comments

@kompio
Copy link

kompio commented Dec 8, 2017

Does your project works in tcp connection to otgw, or only serial connections in node red?

@Yveaux
Copy link
Owner

Yveaux commented Dec 8, 2017

It should work for any transport, so also for tcp connections.
The nodes just dissect otgw messages, you have to supply them.

@kompio
Copy link
Author

kompio commented Dec 8, 2017

I used tcp and I have the error for example : Illegal message length 'T90012500'

@Yveaux
Copy link
Owner

Yveaux commented Dec 8, 2017

The check fails when supplied otgw message has a length unequal to 9 (ref https://github.com/Yveaux/node-red-contrib-opentherm/blob/master/otgwdec.js#L21)
The error message suggests length is 9, but could there be a non-printable character in the string or something? (eg newline)

@kompio
Copy link
Author

kompio commented Dec 8, 2017

Yes, i think there is the problem .. i work on it.

@mikeS7
Copy link
Contributor

mikeS7 commented Dec 20, 2017

As temporary workaround you can use the following code:
[{"id":"b11399f4.f38f6","type":"switch","z":"2b03e62a.441eea","name":"","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"^([TBRA][0-9A-F]{8})$","vt":"str","case":false},{"t":"else"}],"checkall":"true","outputs":2,"x":450,"y":520,"wires":[["eea08ba.95ae878"],["346dbba.695b144"]],"outputLabels":["messages","responses"]},{"id":"dabc1aa3.7b3198","type":"change","z":"2b03e62a.441eea","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"^(.*)?\\s$","fromt":"re","to":"$1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":520,"wires":[["b11399f4.f38f6"]]}]

and use messages output

@kompio
Copy link
Author

kompio commented Dec 20, 2017 via email

@kompio
Copy link
Author

kompio commented Dec 22, 2017 via email

@Yveaux
Copy link
Owner

Yveaux commented Dec 22, 2017

Ok, great!
Closed this issue.

@Yveaux Yveaux closed this as completed Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants