The standard technique for investigating adrenergic effects on heart function is perfusion with pharmaceutical agonists, which does not provide high temporal or spatial precision. Herein we demonstrate that the light sensitive Gs-protein coupled receptor JellyOp enables optogenetic stimulation of Gs-signaling in cardiomyocytes and the whole heart. Illumination of transgenic embryonic stem cell-derived cardiomyocytes or of the right atrium of mice expressing JellyOp elevates cAMP levels and instantaneously accelerates spontaneous beating rates similar to pharmacological β-adrenergic stimulation. Light application to the dorsal left atrium instead leads to supraventricular extrabeats, indicating adverse effects of localized Gs-signaling. In isolated ventricular cardiomyocytes from JellyOp mice, we find increased Ca2+ currents, fractional cell shortening and relaxation rates after illumination enabling the analysis of differential Gs-signaling with high temporal precision. Thus, JellyOp expression allows localized and time-restricted Gs stimulation and will provide mechanistic insights into different effects of site-specific, long-lasting and pulsatile Gs activation.