Smoke sensor for avionics is located inside extract duct which is common for both waste air from the avionics and cockpit panel.
https://plus.google.com/wm/1/+Aviati...ts/b4KGS4xNpDz
The smoke sensors in avionics and lavatories are optical that means they act in case of aerosol and/or solid particles in the air.