-
Notifications
You must be signed in to change notification settings - Fork 3
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
Comments
It should work for any transport, so also for tcp connections. |
I used tcp and I have the error for example : Illegal message length 'T90012500' |
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) |
Yes, i think there is the problem .. i work on it. |
As temporary workaround you can use the following code: and use messages output |
Thank you
I will do soon.
Konrad
20.12.2017 8:24 AM "mikeS7" <notifications@github.com> napisał(a):
… 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
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Agx1RtjFJULvwpvrlQQWRLF3vTTIZxIgks5tCLYWgaJpZM4Q673p>
.
|
This work for me:
[{"id":"193c8680.c04e4a","type":"function","z":"e332a1a8.50a58","name":"trim","func":"var
newMsg = { payload: msg.payload.length };\n\nmsg.payload =
msg.payload.toString().substr(0,9);\n\n\nreturn
msg;","outputs":1,"noerr":0,"x":99.566650390625,"y":130.566650390625,"wires":[["3f7800a5.7fe248"]]},{"id":"b52511aa.29f7d","type":"tcp
in","z":"e332a1a8.50a58","name":"","server":"client","host":"192.168.1.221","port":"1001","datamode":"stream","datatype":"buffer","newline":"","topic":"","base64":false,"x":129.63333129882812,"y":44.866607666015625,"wires":[["193c8680.c04e4a"]]}]
Thank You
2017-12-20 8:51 GMT+01:00 KOMPIO <kompio@kompio.net>:
… Thank you
I will do soon.
Konrad
20.12.2017 8:24 AM "mikeS7" ***@***.***> napisał(a):
> 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
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#1 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/Agx1RtjFJULvwpvrlQQWRLF3vTTIZxIgks5tCLYWgaJpZM4Q673p>
> .
>
|
Ok, great! |
Does your project works in tcp connection to otgw, or only serial connections in node red?
The text was updated successfully, but these errors were encountered: