P20_Ser2Net can not show HEX in the info page

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
keehee
Normal user
Posts: 10
Joined: 18 Sep 2024, 12:41

P20_Ser2Net can not show HEX in the info page

#1 Post by keehee » 12 Nov 2024, 10:08

Hi,
Anyone know how to do it send HEX to espeasy ? i tried and it can not show correct in the info , so i cant trigger in the rules .
this is what i received .

[16:43:48]00:45:41.754 : (229044) Info : EVENT: !Serial#21#
[16:43:50]00:45:43.557 : (229044) Info : EVENT: !Serial#21#
[16:43:51]00:45:44.447 : (229044) Info : EVENT: !Serial#21#
[16:43:52]00:45:45.441 : (229044) Info : EVENT: !Serial#21#
[16:43:57]00:45:50.889 : (229076) Info : EVENT: !Serial#
[16:44:03]00:45:56.388 : (229076) Info : EVENT: !Serial#
[16:44:03]00:45:56.622 : (229076) Info : EVENT: !Serial#
[16:44:03]00:45:56.816 : (229076) Info : EVENT: !Serial#
[16:44:03]00:45:56.979 : (229076) Info : EVENT: !Serial#

butm if i sent ASCⅡ , eapeasy can show correctly. how i can do ?

[16:43:28]00:45:22.288 : (228380) Info : EVENT: !Serial#123123123123132
[16:43:29]00:45:23.164 : (228380) Info : EVENT: !Serial#123123123123132
[16:43:30]00:45:23.781 : (228380) Info : EVENT: !Serial#123123123123132
[16:43:30]00:45:24.030 : (228380) Info : EVENT: !Serial#123123123123132
[16:43:31]00:45:24.880 : (229028) Info : EVENT: !Serial#12


i only know use serialsendmix can send HEX .
is it my setting is not correct ? but i tried all.

Best regards,

User avatar
Ath
Normal user
Posts: 4007
Joined: 10 Jun 2018, 12:06
Location: NL

Re: P20_Ser2Net can not show HEX in the info page

#2 Post by Ath » 12 Nov 2024, 11:38

ESPEasy shows exactly what it is sent there, and if that contains non-displayable characters (ascii < 32, and some ascii > 127) it won't be able to make that properly visible. This is a plain log of the content, and also is the data passed through to the TCP connection that's listening on the configured port, so ESPEasy modifying that data would be unexpected, and probably wrong, that's why it doesn't do that.

It's possible to add a feature to log the data in a readable format, but the event is also logged (that's what you have shown) unless you select Error as the log level, and that data won't be changed. So effectively it would only duplicate the number of logged lines...
/Ton (PayPal.me)

keehee
Normal user
Posts: 10
Joined: 18 Sep 2024, 12:41

Re: P20_Ser2Net can not show HEX in the info page

#3 Post by keehee » 12 Nov 2024, 14:03

Ath wrote: 12 Nov 2024, 11:38 ESPEasy shows exactly what it is sent there, and if that contains non-displayable characters (ascii < 32, and some ascii > 127) it won't be able to make that properly visible. This is a plain log of the content, and also is the data passed through to the TCP connection that's listening on the configured port, so ESPEasy modifying that data would be unexpected, and probably wrong, that's why it doesn't do that.

It's possible to add a feature to log the data in a readable format, but the event is also logged (that's what you have shown) unless you select Error as the log level, and that data won't be changed. So effectively it would only duplicate the number of logged lines...
thank your reply, Ath.

if i sent HEX 30 36 to espeasy it show !Serial#06. if i sent ascii 30 36 to espeasy it show !Serial#30 36

if i sent from pannel to espeasy it show !Serial#□ ,but in the serial tools turn on HEXShow , it can show 06

i have a 485 touch pannel, i test if i turn on HEXShow in serial tools in pc ,serial tools received correct(show 06). if turn off HEXShow , serial tools same thing(show □) what i see in the espeasy logs(!Serial#□).

So its possible turn on 'HEXShow' in Ser2Net ?

User avatar
Ath
Normal user
Posts: 4007
Joined: 10 Jun 2018, 12:06
Location: NL

Re: P20_Ser2Net can not show HEX in the info page

#4 Post by Ath » 12 Nov 2024, 22:10

What is your intention with this data?
The P020 Ser2Net plugin is intended to be used as a means to transfer serial data from a device to an external receiver, listening on a TCP port, and should be decoded on/by that receiver, not necessarily by the ESP.
/Ton (PayPal.me)

keehee
Normal user
Posts: 10
Joined: 18 Sep 2024, 12:41

Re: P20_Ser2Net can not show HEX in the info page

#5 Post by keehee » 13 Nov 2024, 03:03

Ath wrote: 12 Nov 2024, 22:10 What is your intention with this data?
The P020 Ser2Net plugin is intended to be used as a means to transfer serial data from a device to an external receiver, listening on a TCP port, and should be decoded on/by that receiver, not necessarily by the ESP.
yes, i use serial tools in pc listening on espeasy TCP port , can get the data. the Ser2Net plugin seem not decoded .
I want to use it to the rules.
On !Serial#06 do
DMX,255,255,255,255,0
SendToHTTP,%sysname%,%unit%,/RemoteCommands/SetCuelistGoTo=1
endon

i tried the 'serial proxy' plugin , its nothing happen in the logs.

User avatar
Ath
Normal user
Posts: 4007
Joined: 10 Jun 2018, 12:06
Location: NL

Re: P20_Ser2Net can not show HEX in the info page

#6 Post by Ath » 13 Nov 2024, 08:23

keehee wrote: 13 Nov 2024, 03:03 yes, i use serial tools in pc listening on espeasy TCP port , can get the data. the Ser2Net plugin seem not decoded .
Hm, P020 is a transportation plugin, taking any data from serial to TCP, there is no knowledge on how to 'decode' something, as this is a universally usable plugin.
And if it is supposed to represent hexadecimal data, then it will be prefixed with 0x to explicitly indicate it being hexadecimal, and not decimal.
keehee wrote: 13 Nov 2024, 03:03 I want to use it to the rules.

Code: Select all

On !Serial#06 do
  DMX,255,255,255,255,0
  SendToHTTP,%sysname%,%unit%,/RemoteCommands/SetCuelistGoTo=1
endon
That SendToHTTP won't work as expected, you are trying to send to the same unit you are sending from, using the unit number as the port. While processing (rules), the unit is not capable of also receiving and processing data, as it is single-threading.
keehee wrote: 13 Nov 2024, 03:03 i tried the 'serial proxy' plugin , its nothing happen in the logs.
That plugin expects to receive a CR and/or LF character to complete the data, AFAICS.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest