Closed shamin closed 1 year ago
Hello, sorry for the response time. From what I remember, the program uses a different branch of code for this type of device. For lack of time, because this type of device was in the minority and because it was not my goal at the time, I was not interested in it.
There should be at least an example of the URL used to start a reversing of this part of the program.
Is it doable? Yes without a doubt
Can it be re-implemented in this project? certainly yes
Will it be done and when? Probably not even in the mid-term. You could follow the tutorial mentioned at the beginning of the README if you want to get your hands on it.
In the meantime I will add a line to inform the user that this type is not supported, so others won't be unpleasantly surprised like you were.
@ysard Thanks for the update. Actually I was able to fetch the STB data from the mi api, forgot to update it here.
I followed your tutorial, and with some help with Wireshark, I was able to pull the data. Your code was helpful in decoding the IR data.
There are the API's I used to pull the STB data. Might be useful for someone else trying to do the same.
https://i2-urc.io.mi.com/controller/device/1?version=6329&country=IN&ts=1667318141899&nonce=-1171209548&opaque=ee48b71c1b3d5d866a1586ca0fc56823f54a7d9f
https://i2-urc.io.mi.com/controller/stb/lineup/match/1?version=6329&country=IN&ts=1667318148341&nonce=871222104&opaque=c9f3ffc28ac586207772e11bcd909ead2b339f3a
https://i2-urc.io.mi.com/controller/code/1?version=6329&country=IN&ts=1667318737889&nonce=-573423170&matchid=xm_2_1489&vendor=mi&opaque=3c1350bce46e508ef5fa3fe96a0a6a8bdd5ee78e
https://i2-urc.io.mi.com/controller/report/1?version=6329&country=IN&ts=1667318740316&nonce=-756289397&opaque=80b68462fd59142c4e884d524e9060ccc89950a6
https://i2-urc.io.mi.com/controller/match/tree/1?version=6329&country=IN&ts=1667318152151&nonce=-20782770&devid=2&miyk=1&spid=in100&power=1&opaque=5a31c79439f2314a2ff935fd852eb5172c9316ed
Thanks for the project again. Feel free to close the issue.
Ok, thank you,
I have an error with the opaque param for the /controller/report/
url. Maybe it is not a very important url...
I suppose that the main urls are match, code & device.
Yeah, You don't need the report. I think it was just to check the status of api. It is not working for me also now.
These is the flow.
Thanks, so spid
replaces brandid
in the match url, and stb url replaces the brand url used for all the other devices.
I will try to update the code for that when I will have the time :p
Ok it's done; 117 more unique patterns. I will add dumped files later in the release page. These devices are only for India, no data for the other countries :o
That is a great news. Thanks for doing it. You have an amazing project. :)
It's indeed an amazing project. As Richard Stallman has always said, reverse engineering is the biggest contribution in the Free Software community.
Only if I had the knowledge to turn this into a free/libre Android application ...
The set-top box links got simpler in newer version.
https://us-urc.io.mi.com/app/public/get_stb_brand?data={"country":"ID"}
https://us-urc.io.mi.com/app/public/get_stb_match?data={"country":"US","brandid":12}
https://us-urc.io.mi.com/app/public/get_stb_keyset?data={"id":"kk_2_12_114"}
First of all, Thanks for the amazing project.
I was trying to pull Set-top box devices data using your
dump_database
function. But it is always giving me an empty dataThen I went through your code and found out the TODO you have added at https://github.com/ysard/mi_remote_database/blob/master/src/xiaomi_query.py#L212
I would like to know if there is anyway I can pull in the Set-top box devices data from the mi api. Any help would be much appreciated.