Zacharya... Didn't know if you were still having trouble but I wanted to get word out...spent waay to long looking at this problem on a vehicle recently. Here's a bunch of my opinions and info that I've found.... after typing all this I saw the 1349 code you listed... it means your Oil control valve filter is clogged... that's probably triggering all the other cam related codes for bank one... clean the OCV valve and filter for bank 1... read on for brief description of where it is.
P1354 (or P1346)-- Is a essentially a cam/crank correlation mismatch code. The 54 is bank 2 and the 46 is bank 1. There are several potential causes. Based on your rough idle symptom, as well as the time and costs involved. I would advise you to try number 1 and 2 first, and then look at 4, and if the timing belt, tensioner, and pullies are good, and all timing marks line up properly, then tackle number 3.
1. The Oil control valve is bad
2. The screen for the OCV is clogged (remove bolt on side of head near the OCV ... the screen is in there, clean it.
3. The VVTi cam gear is sludged up and need replaced... there is no way to clean it (from a competent sounding guy on the net who tried)
4. The timing belt has jumped a tooth or is stretched.
I just spent a good deal of time looking at this code and researching. I found several Toyota/Lexus techs saying that in some cases the cam gear needs replaced in addition to replacing the OCV and screen...
As for your other codes, I agree that you should erase the codes and see what comes back, and then address them. If you've been driving with the CEL on for an extended period, based on your mileage, you could easily pile up those codes legitimately, and none of them stand out to me as likely to be creating your rough idle --- especially in light of all the cam related codes.
Given your description of your situation, and your desire to make the car idle and drive properly, after resolving the P1346 code, I would start with replacing your coolant temp sensor (assuming that code returns), and assuming that your vehicle is properly filled with coolant. Coolant temp sensors have been know to effect idle in some vehicles, though the symptoms usually include longer than normal crank time (have to hold key on longer to start).
The codes relating to the O2 sensor are for the heating elements in the sensors, not the sensors themselves. In other words, those sensors are probably not creating the rough idle condition...unless the rough idle is only during initial warm up.
The knock sensor codes -- unlikely the source of rough idle. You could have a wiring issue with the sensors, or a computer issue, however, based on your mileage, and driving with the CEL on, its more likely that the sensors need replaced. The computer is looking for a particular electrical signal from each sensor, and that signal is not present, or is not making it to the computer, hence it sets the codes. Do not be deceived into believing that the code is being set because the sensor is detecting knock in the engine, that's not whats happening, that's not what the code means, though it's a common misunderstanding. Yes the sensors job is to detect and correct knock, but that knock sensor code relates to the missing (or weak) signal from the sensor, not the detection of knock. A note on knock sensors, on some vehicles, they are particularly sensitive to the amount of torque used to install them, use care to properly torque them. So, Check the internal resistance of the sensors if you can find a spec on it, then check the torque of the sensors, then check the wiring back to the computer for high resistance/bad terminals, then replace the sensors.... or live dangerously and just change out one of them... for the price, it saves a lot of testing...
.... and yes, the VVTi cam codes can cause other codes, but typically not the codes you've listed.... those systems (codes) just aren't closely related enough to cam timing (my opinion and experience)
I'm all typed out, hope this helps someone. Thanks for reading