We have carried out bulk-sensitive hard x-ray photoelectron spectroscopy (HAXPES) measurements on in-situ cleaved and ex-situ polished SmB6 single crystals. Using the multiplet-structure in the Sm 3d core level spectra, we determined reliably that the valence of Sm in bulk SmB6 is close to 2.55 at ~5 K. Temperature dependent measurements revealed that the Sm valence gradually increases to 2.64 at 300 K. From a detailed line shape analysis we can clearly observe that not only the J=0 but also the J=1 state of the Sm 4f 6 configuration becomes occupied at elevated temperatures. Making use of the polarization dependence, we were able to identify and extract the Sm 4f spectral weight of the bulk material. Finally, we revealed that the oxidized or chemically damaged surface region of the ex-situ polished SmB6 single crystal is surprisingly thin, about 1 nm only.