Date: 201807
Local time of day: 1201-1800
Location: ZZZ.ARTCC, US
Flight conditions: VMC
Weather elements / visibility: Thunderstorm
Light: Daylight
Aircraft: EMB ERJ 145 ER/LR
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Cruise
Airspace: Class A ZZZ
ATC / advisory: Center ZZZ
Aircraft component: Air Conditioning and Pressurization Pack
Component problem: Malfunctioning
Reporter organization: Air Carrier
Reporter function: Captain; Pilot Not Flying
Reporter qualification: Flight Crew Multiengine; Flight Crew Instrument; Flight Crew Air Transport Pilot (ATP)
Human factors: Situational Awareness
Second reporter function: Pilot Flying; First Officer
Anomaly: Aircraft Equipment Problem Less Severe; Deviation / Discrepancy - Procedural MEL / CDL; Flight Deck / Cabin / Aircraft Event Smoke / Fire / Fumes / Odor; Inflight Event / Encounter Weather / Turbulence
Detector: Person Flight Crew
When detected: In-flight
Result: Air Traffic Control Provided Assistance; Flight Crew Landed in Emergency Condition; Flight Crew Diverted; Flight Crew Requested ATC Assistance / Clarification
Contributing factors: Aircraft
Primary problem: Aircraft

Narrative: Last turn of a three day trip for Captain. FO (First Officer) had just joined the trip. While at gate with passengers boarding; APU ON; with both packs running; we heard the pack duct on pack 2 blow. Gate AC (air-conditioning) was not hooked up to the aircraft. We were about 20 minutes prior to departure. Called Maintenance Control; Maintenance came out and verified blown duct and proceeded to MEL pack 2. Called Dispatch for new numbers for FL250. We were good on fuel and received amendment to release to add MEL and departed on schedule. Takeoff and climb were normal. Approximately 35 minutes into the flight cruising at FL240; I noticed an odor in the cockpit; asked the FO if he smelled it as well; FO indicated he too smelled what we thought was an electrical odor. The FO speculated that it might be an ozone type odor because we were in an area of thunderstorm activity. We were VMC in between buildup at the time. I called back to the FA (Flight Attendant) and asked if he noticed an odor or smoke in the cabin. The FA replied there was no odor or smoke at that time. There were no abnormal indications in the cockpit. The odor dissipated after a few minutes. About 10 minutes later; both the FO and I saw visible smoke coming from what appeared to be the top of the console and/or around the side windows. The smoke increased with a strong burning odor. At that point; I ran the memory items; and [checklist] for Cabin Fire or Smoke. I called the FA and asked about smoke in the cabin and the FA verified that there was also smoke in the cabin of the aircraft. The FO and I looked at nearest suitable airport options and decided on ZZZ which was about 50 miles to the west of our present position. While the FO continued to fly the aircraft; I contacted ATC and [advised them] and indicated we were diverting to ZZZ with smoke in the cabin. We were given and immediate clearance to fly direct to ZZZ and expect a visual approach to Runway 11. Once we started heading to ZZZ; I ran the QRH for smoke in the cabin with unknown source. There were no EICAS or other abnormal indications in the cockpit that either of us could see. I contacted Dispatch and informed them that we were diverting with a smoke in the cabin emergency; informed the FA of the problem and that we were diverting to ZZZ but expected a normal approach and landing and gave an approximate time frame. Made a PA to inform the passengers of that we were making a precautionary landing in ZZZ. Filled out an ACARS diversion report. Started getting landing data and ATIS for ZZZ. The FO was assisting in ATC radio communication and updated the FMS to set up for landing in ZZZ. One additional threat during this time was that the FO oxygen mask microphone was not working properly and he improvised by sticking his boom microphone inside his mask. We began a normal descent into ZZZ. The smoke had begun to clear by this point but we kept our masks on. ATC informed us that the emergency equipment would be standing by and asked if we needed any further assistance. I told ATC we expected a normal arrival and landing in ZZZ. The approach was normal except we did get a momentary wind shear caution message at about 1500 AGL at about 160k IAS. The FO asked if we should go around and I told him to continue the approach. The WS (Wind Shear) caution indication was present for approximately 3-5 seconds. Remaining approach and landing were normal. We rolled the aircraft to the end of runway; taxied off the runway and to the gate without incident. By this time there was no remaining smoke in the cockpit. We did notice on the taxi into the gate that the cockpit was getting very warm and we were not getting any airflow. We parked at the gate; deplaned the aircraft; and called Dispatch and Maintenance control.We did have the obvious threat of a fire from an unknown source. We also had to work our way around some weather in the ZZZ area while dealing with a very high workload. The FO did a very nice job of flying the aircraft and assisting in getting setup for the landing in ZZZ. In reviewing our crew performance; the FO did a very nice job of flying the aircraft and assisting in getting setup for the landing. The FA did a good job in communicating with the flight crew and keeping us informed as to the conditions in the cabin. The Passengers appeared relatively calm when deplaning the aircraft. After things calmed down on the ground; I went back to review the QRH and perhaps I could have taken more time to troubleshoot the problem. The problem may have been that the number one pack also blew out and created the smoke in the aircraft. Since the number 2 pack was already MEL'd; we still would have likely had to divert since we would have had to descend to 10;000 ft. I never looked at the cabin pressure during the incident to see if we were losing cabin pressure especially since we were already in a descent.


Second narrative: [Report narrative contained no additional information.]


Synopsis: Embraer Flight Crew reported visible smoke in the cockpit and cabin led to a diversion.