Chatset in debug tab of Node-Red - serial-port

Hi i need know if is possible change the charset of the: "Debug" tab on Node-Red.
Im trying get incoming serial data and show in "Debug" tab, but the input data has rare characters and is not displayed correctly.
Input String example:
"...H.Y.ÝAW.J...~.›..Lé.$...H.Y.ÛGW."
I can send the message to console using:
console.log(msg.payload)
and view this characters, but cannot in debug tab.
Thank's.

Related

Extract URL stream from webpage?

I am trying to extract direct HTTP, RTSP, MP stream URLs or something that I can work with from this website:
http://kamery.ovanet.cz/
Any idea how to do it, I've tried f12 using chrome, but wasn't sucessful.
Thank you.
"Any idea how to do it, I've tried F12 using Chrome, but wasn't successful."
You have to first open the Network tab of Chrome's Developer tools then...
In the small text box that shows filter text, type in there: .m3u8
Select a camera. It should show multiple .m3u8 files being loaded
Choose a playlist.m3u8 that does not have ?auth=b64%3A etc in the URL
Try testing this link (is M3U8 playlist) :
https://stream.ovanet.cz/ovanet/f89ab1fdfeba19d51fa26dd491edcbaa/camera97/playlist.m3u8
You can try the above link with some online player : HLS Stream Tester.
Edit : Regarding comments...
"The URL link works for just a while and then it stops. Can I solve it somehow?"
Yes, their links are time-limited and will expire so you need a page refresh to get the newest version of the M3U8 link.
If you want to automate the process then you will have to write code that achieves the following:
Choose a camera ID number from this listing. Notice that the "cam_id" is followed by the related location's "title". Example is "cam_id":19.
Using the camera's ID number, make a request to this URL:
https://stream.ovanet.cz/player/api/embed-live.js?stream=camera19&_=XXXX
Note: Where XXXX is the current time as a UNIX timestamp (eg : 1659717867824).
This will return some text. Part of that text has the URL with the Base64 "auth" that you need for a correct request. You get it by finding the start position of return " and extracting (via String functions) everything between up until the first occurrence of "; going forward from the start position.
Request this newly extracted link, which looks like example:
https://stream.ovanet.cz/ovanet/camera19/playlist.m3u8?auth=b64%3AY2FtZXJhMTk6OjoxMjg0MzQzMTU3OjE2NTk3MjE1NjAwODc6MTY1OTcyNTE2MDo5Mi40MC4xOTAuMjc6MDdiZGUxN2MwMGY1Nzg5YTkwZjlkMmY3YjdmM2JmYTM%3D
There will be a re-direct to another URL of same M3U8 file name but from a different location, so you need to find out this new URL. It has the folder name you need.
Eg: the folder name is: /f3630f4527ce8ddd69bf27580737d66f/ from: https://stream.ovanet.cz/ovanet/f3630f4527ce8ddd69bf27580737d66f/camera19/playlist.m3u8
The final URL is basically (using chunklist.m3u8 seems to work better):
https://stream.ovanet.cz/ovanet/f3630f4527ce8ddd69bf27580737d66f/camera19/chunklist.m3u8

strange text when extract the body of email from Gmail using IMAP

iam using QT and Qsslsocket to get some emails body from Gmail using IMAP, I started using the IMAP command to log in, check how many emails I have, and fetch the data from the email I selected I use this commands sure after connected to IMAP using hostname and port.
tag login username password
after login and check the number of messages using tag select inbox I use this command to extract the body of the email.
tag fetch message_number (body[1])
the problem is i got very strange words like this
* 5 FETCH (BODY[1] {1856}
SGkgRmVsaXggYW5kIEZpbmdlcnMgRHVlbGluZyBQaWFub3MsCgpWaWN0b3JpYSBBLiBoYXMg
dXBkYXRlZCB0aGVpciBldmVudC4KClRoZSBwZXJmb3JtYW5jZSBsZW5ndGggaGFzIGJlZW4g
Y2hhbmdlZCB0byAzIGhvdXJzLgoKVGhlIHBlcmZvcm1hbmNlIHN0YXJ0IHRpbWUgaGFzIGJl
ZW4gY2hhbmdlZCB0byA1OjAwcG0uCgoKCgpVc2UgdGhlIGxpbmsgYmVsb3cgdG8gdmlldyB0
aGlzIGxlYWQ6Cmh0dHA6Ly90cmFja2luZy5naWdzYWxhZC5jb20vdHJhY2tpbmcvY2xpY2s/
ZD1RS1FFeEQxZGtIQTZrYWE3YzFXSzcxZ2VDVXBNX0F5UFRkcUpjeUVZcWZwN3RuMklNRXIx
WlRCOVcxYzlfR3VaUEFyaFhJQkIxbWl4S29jSDZXb1dVUTdlUkRsNl8zMTlPSXpLS0NGZmUz
X2FnQmRlN2lPd2hWaFczOXB2V25SMTY0R1JjaWdoYlZVSVpwT2k1NmxnOVhlV2JLcnhEVS05
WGJTWlBnZzhFRU9SMAoKUGVhY2UsIGxvdmUgJiBnaWdz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ICYgZ2lnc8KuIGlzIGEgcmVnaXN0ZXJlZCB0cmFkZW1hcmsgb2YgVGhlIEdpZyBCdXJlYXUs
IExMQy4KMjczMyBFLiBCYXR0bGVmaWVsZCBSZCAjMTA1IFNwcmluZ2ZpZWxkLCBNTyA2NTgw
NA==
)
but the email contains normal message have normal words the strange is when i test with another gmail, i take this email from first email and send it forward message to my second email, it give me the normal text in it! so please any help i can't understand what is the problem, also what i tried is using openssl which give me same result as QT strange words, and javaMail library and extract text from first email it worked? so is the problem from the imap command i used or what?
Thanks in advance.
this a screenshot of the email message
Update
when i start some search i checked that this message is encoded to base64 and when i used online decoder it convert to the normal text but the question now is what command should i use so that i can fetch this message body text in normal text automaticly if there is such away.

How to input email and password for PayPal using Selenium2Library?

I am trying to input email and password into PayPal (sandbox mode) using my Robot Framework script. This is a snippet of my code:
input text login_email ${email}
input text login_password ${password}
login_email is the name of the input field for the email and login_password is for the password.
I am passing the email in the ${email} argument and the password in the ${password} argument.
This doesn't seem to work for some reason. I keep getting this error:
InvalidElementStateException: Message: Element is not currently interactable and may not be manipulated
The email and password field for PayPal are generated upon the loading of the page. Can that be a reason why they are not accessible? Can anybody help me identify what am I doing wrong here?
As Correctly said by Ofer Steinberg , try to find the XPATH manually
Also, add a wait point until that item is visible and the enter name and password
as many times item is present and hidden due to which it says item not interactable.
It seems you have there a 'not constant' id (or similar..).
I had this problem, and the solution was to change the input path from id to xpath.
Moreover, try to inspect the paths manually in 'guest mode' (I guess you using chrome), it should show that page source more accurately since the selenium running by it.

How to submit form files on Paw?

I would like to use Paw to send form files, that I can catch from my PHP script with the $_FILES global variable.
The File body option sends a file, but it is not encapsulated in a form structure and PHP cannot treat it.
How can I do that ?
Set your request to POST, which is likely to be the method you want to use
Go to the body tab, and pick Multipart on the left column
Enter the expected file name as "Part Name" (the key you want to get in your PHP $_FILES global)
In the Value field of the Multipart editor, right-click and pick File > File Content
Click on the File token, and you'll be able to pick or drag-and-drop a file
Press Cmd + R (or Cmd + Enter) to send the request!

What does PuTTY send when I press Enter key?

I am trying desperately to get a Bluetooth dongle working with my Arduino but I can't send it a command that it needs. I can use it when I plug it into my computer via a USB to UART chip and send the command (C) from PuTTY and then press Enter.
The Bluetooth dongle's command sheet says that the command I am trying to send it C<cr> but I can't figure out how to send the proper carriage return character from the Arduino code. I have tried using the Serial.println() function as well as adding the \r character to my current Serial.write("C\r") but neither of those are working.
How can I achieve this?
Interestingly, I can report the opposite on Win 7: PuTTY for me and my embedded project is sending ONLY \r over the COM port. Curious, read: frustratingly unexplainable, but I simply look for either character on the other end of the serial connection.
Then, if you enable "Implicit LF in every CR" under Terminal options it will send both \r\n. Default behaviour seems to be akin to a Commodore machine :D (http://en.wikipedia.org/wiki/Newline). who knew...
Sending CR+LF is possible in modified PuTTY. Source code is available at https://github.com/gniemirowski/putty-crlf and Windows binary at https://www.grzegorz.net/pliki/putty-crlf.zip When you run this version just go to Terminal -> Keyboard and select "CR LF" for "The Enter key" option.
PuTTY emulates xterm which emulates vt100. To have putty send CR/LF when pressing enter, type ESC[20h in putty after connecting to the serial device. This sets VT100 LNM true.
http://vt100.net/docs/vt100-ug/chapter3.html
Line feed/new line New line ESC [20h Line feed ESC [20l
If you watch the ascii table or similar reference you might find interesting: \r ou \x0D
For better understanding, see : http://www.grok2.com/sedfaq6.html
The modified PuTTY is the easiest solution. If you want to stick with the standard PuTTY, there's some other options...
You can send a newline using ctrl+j before pressing enter, but that's a faff.
To automate it, you can use AutoHotKey to change your {ENTER} to ^J{ENTER} when you've got a PuTTY window active:
#if WinActive("ahk_exe putty.exe")
Enter::
SendInput ^J{Enter}
Return
#if
To do this for just one PuTTY window, you can give AHK the name of the window:
#if WinActive("COM8 - PuTTY")
Enter::
SendInput ^J{Enter}
Return
#if
On arduino program, just use Serial.write and both characters codes:
Serial.write(13); // CR
Serial.write(10); // LF
And Avoid Serial.print as it is intended as human readable, so formatted.
references: write print
In standard configuration (on Windows and Linux) if you type "help" and then press enter, the following chain of bytes will appear on the serial port (checked with external connected terminal via RS232, and logic analyzer):
0x68(h) 0x65(e) 0x6c(l) 0x70(p) 0x0d(CR: Carriage Return U+000D)
So it seems like PUTTY puts CR on ENTER (no matter if you are on Linux or Windows).
I'm almost sure that you are looking for the \n new line character.
I tried this very simple code (cr = carriage return)
Serial.write(13);
And because the next "printed" caracters will feed the residual text, it's ok.

Resources