The exponential growth of the Internet of Things (IoTs) has led to the widespread deployment of millions of sensors, crucial for the sensing layer's perception capabilities. In particular, there is a strong interest in intelligent photonic sensing. However, the current photonic sensing device and chip typically offer limited functionality, and the devices providing their power take up excessive amounts of space. There is a pressing need for smart, multifunctional sensing chips with the capability of intelligent recognition. Here, we propose and demonstrate the functionalities of a two-dimensional van der Waals photonic bipolar junction transistor (2D-vdW photonic BJT) in simultaneous sensing and discerning different wavelength bands of light. Also, a dual-function chip application is given. The optoelectronic detection characteristics in the vision-near-infrared (vis-NIR) band and photovoltaic characteristics are systematically studied. It exhibits negative photoconductivity (NPC) for the 1064 nm laser while maintaining positive photoconductivity (PPC) for the 638 and 1550 nm lasers. Also, the electrical tunable response is realized. Moreover, the function of this chip under real-application conditions has shown its efficacy in applications such as detecting dim light with ∼10 lx illuminance, identifying wavelength bands, and generating power photovoltaically. This work provides a solution for the interconnection of everything.