Closed NovaGL closed 3 years ago
Not really sure, Think the device plugin I'm using decrypts aes-128-cbc data to js Buffer. When I get it to the program I save it to a file.
So maybe convert the string to a utf8 buffer and save it to a *.bin file, place it in the command folder and see if it works. Please let me know.
Not really sure, Think the device plugin I'm using decrypts aes-128-cbc data to js Buffer. When I get it to the program I save it to a file.
So maybe convert the string to a utf8 buffer and save it to a *.bin file, place it in the command folder and see if it works. Please let me know.
I am trying to reuse already learned codes i gathered from e-control Database. What is the command to convert them and save as yours bin files ?
Example of RF code from e-control DB: e900a201131113111311131113111311081b1411091d1310091b091a091b091b091b1410091b150f150f150f150f150f1510140f0a1a0a1a150f150f0a1a0a1a0b19150f0a1a0a1a0a1a150e0b190a1a0a1a160001259d32160e160e160e170e150e160e0b19170d0c18170d0b190b190b190c180b19170d0b19160e170d160e160e170d160e160f0a190b1a160d17100a180b190c18170e0b190a190b1a160e0b180b1a0a19170001289f31170d170d170d170d170d170d0c18180e0a18170d0d190b190b180d170c19160e0b19170d170d170d170d170d160e160e0c180c18170d170d0b190b190b18170e0b190b180c19170e0b170c180c18170001239f32160d170d170d170d170d170d0c18170d0d17180c0c180d170c180d170c18170d0c19160d170d170d170d170e160d170e0b180c19160d170d0c180c180d18170e0b190b180c18180e0b170c180c19160001229e32180c170d170e160d170d170d0c17190c0c19180b0d170c180b180c1a0c18170d0c18180c190b170e160d170d170f150e0b190b18180e160c0c1a0a180c18180d0b180c180c18180c0c180c180c18170005dc000000000000
I'm using a fork for handling broadlink messages. https://github.com/fbacker/broadlinkjs-rm
Maybe just try to name the file to *.bin and see if it works? Else check the broadlinkjs project. Please let us know if you figure something out.
doing something with "decrypts aes-128-cbc" and bufferdata.
Just wanted to say thanks! @fbacker
I finally got around to doing this and the key was converting the string to a buffer! I looked all over but all the results I saw talked about converting to HEX and Base64
All I had to do was to convert the JSON string to a buffer using:
Buffer.from(string)
Then saving the output as a bin file and your app does the rest!
@NovaGL nice work. Did a little CLI script with method to convert. However I have no idea if it works. Can you try it out and if it not work give me pointers on what you did?
Upgrade to 2.1.4 and in project folder run ./cli.js This should give you an output help
Then you can try example js ./cli.js convert -f myfile.hex
You can use the -o to put the bin file directly in commands folder (I hope) and it should work (fingers crossed).
Will do. Can you put an example hex.
I just want to see the format you use so I can match it.
I took what @xscope44 posted. However I have no way of testing if it works :) To test it you need your example files, then convert it and play them, having a device that receives the request.
Ok. I'll let you know. However mine is a JSON string so it won't work the same.
HEX to buffer might be different https://www.w3schools.com/nodejs/met_buffer_from.asp
So using this page it seems you need to do
Buffer.from(string, 'hex')
I'll try later
Not sure how to run that cli file.
However if you want you can try your script with this and i'll tell you if it works
2600CA008F941036101410370F3710140F140F380F141014103711121211123512351211123512351211123512351235113512351235121112351212111212111212111212120F1410370F380F3710370F380F140F150F380F140F1410140F140F1410370F380FAE8E941037101310370F380F150F140F380F140F1410370F150F140F3810370F140F380F380F140F380F380F3710370F380F380F140F380F1410140F140F150F140F1410140F37103710370F380F380F140F150F370F150F140F1410140F1410370F380F000D050000000000000000000000000000
I still think you need to change the buffer.from section
Not sure what I'm doing here :)
but you can take the files that you want to convert. In broadlink folder just run
cli.js -f myfiletoconvert.hex
and it will output a new file myfiletoconvert.bin
that you can try to play with broadlink.
stale
Hi,
I have the following HEX, but I can't learn RF codes as I have lost the remote. I currently works with IHC app but want it working on this.
How can I convert the following to work