-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
How to send raw commands via SerialBridge to Nextion displays? #3560
Comments
Hallo Renne, i think as SerialDelimiter is only 1 Character possible. So SerialSend3 wont work here. |
Hi, SerialSend4 had worked for you? |
Hi, Closing this issue as there is no feedback. Please, ask to reopen if needed. Thanks. |
@ascillato2 |
I also tried this but failed with
Works, but is kind of unfortunate as the documentation of @renne @martinmatias Any more progress on your side? |
Hi to all, I'm trying to figure out how to send commands to the Nextion, via Serial Send. SerialSend5 7478745374617475732e7478743d2248656c6c6f20576f726c6422FFFFFF Where 74 78 74 53 74 61 74 75 73 2e 74 78 74 3d 22 48 65 6c 6c 6f 20 57 6f 72 6c 64 22 is hex conversion of txtStatus.txt="Hello word" However, if it were possible to send the Nextion command in Ascii format, adding the FF FF FF delimiter, would be optimal... I want to use Tasmota to 'talk' with Nextion Display (via Serial Bridge) because i've a ESP12 in a place that execute only a single task (relay activation) ad i want to use also to display status & value from another device via MQTT. I hope to see good news on this topic ;) |
@ascillato can you reopen this issue? |
Yes, for me it is working without any problems with the above str2hex conversion. |
Ok, thank you @gitolicious However, if the Tasmota guys explain how to send 0xFF 0xFF 0xFF without hexadecimal conversion, it's much better ;) |
You can do the conversion also anywhere else, doesn't need to be node-red. Where does your txtStatus.txt="Hello word" text originate from? Maybe there you can hex-encode it. |
I use Home Assistant and i don't find the way to convert string in hex data, in a template/automation. |
Sorry, can't be of any help there. I am also using Home Assistant but all the automation/logic part is in node-red. |
I try to put an eye to Node Red, but only for a sigle string-to-hex formatting seems to shot a mosquito with a bazooka :) I hope in a smart (ad simple) solution from Tasmota Team! |
Sure, you are right on that... What confuses me is that the documentation states that number values 128-255 would disable the delimiter. Looking at the implementation I don't think that's true... Now for our problem, probably a new |
Reopened as requested by @GianCann |
The night sleep has bring to me a tip.. |
it seemed too simple ... SSerialSend2 g0.dis=10ÿÿÿ Sending ÿÿÿ don't work :( |
Too bad. Did you check what has actually been sent out on a hex level? (Should be easy to do so with a serial usb adapter.) |
Can you explain how to do?
The use of ÿÿÿ are reported also in Nextion documentation
|
@GianCann A fault that is often made https://httplab.it/ASCIICode is NOT ASCII Code it is ANSI! |
AAAAH! I have not read with due attention :( |
Connect your ESPs Rx/Tx and GND pins with your USB serial adapter, then any serial monitor of your liking should do. I saw this one being recommended as it has a "hex" switch: https://sites.google.com/site/terminalbpp/ |
Alright, I installed the terminal tool and sent out
My last resort as an improvement of the workflow is to send out the following:
By this you save yourself translating the command to hex. Need to take care of encoding though as Nextion doesn't understand UTF-8 but only ASCII. @Jason2866 I don't really get the implications of what you are saying... |
@gitolicious |
The Nextion display is a very powerfull (and simple to program) HMI device with touch screen. At the end, to integrate this device in Tasmota, without sending double Serial Send command, is needed just a simple SetOptionXX 1/0 to activate/deactivate the addition of FFFFFF to command string sended via serial bridge. |
Ok, i've make some test...
I send a Nextiot command like this: SSerialSend4 t0.txt="Hello world from Tasmota" Note: SSerialSend4 not exist in Tasmota, but only SerialSend4 Nextion elaborate the command and show Hello world from Tasmota in textbox named t0
At this point, i ask to @arendst if it's possibile to add a SetOption_XX_ 0/1 to add/remove 'FFFFFF' for use SerialSend2/SSerialSend2 in trasparent mode for who use the Nextion display. |
@gitolicious i've open a new feature request: |
* Fix mDNS addService (arendst#4938, arendst#4951) * Add (S)SerialSend3 escape sequence \x to allow hexadecimal byte value (arendst#3560, arendst#4947) * Add SerialBridge command SSerialSend5 <hexdata>
Hello, at the end was there a solution for writing serial Commands to nextion displays? |
Nextion displays use a sequence of 3x
0xFF
as delimiter. I want to use SerialBridge via MQTT with Node-Red:does not work. The display does not react while the command works in linux with minicom and a USB-UART adapter.
Does anyone have an idea what's wrong with the command?
The text was updated successfully, but these errors were encountered: