Wireless sensor networks (WSNs) are considered as a crucial technology that will definitely ensure a permanent growth to emergent applications as smart homes, smart grids, etc. In the particular home area network (HAN) context, sensor nodes will be in charge of the power monitoring between the smart home appliances. But, the communications in WSNs generally relay on the ISM bands, characterized by a narrow bandwidth and a high collision/interference ratio. Hence, the cognitive radio technology can be used to overcome the spectrum resource scarcity in WSNs. In cognitive radio networks, the sensor nodes will opportunistically access licensed channels if they are vacant of primary signals, thus ensuring a better exploitation of the available radio resources. Generally, a common control channel (CCC) is used to exchange control messages in the cognitive network. But, relying on a CCC is not always feasible especially if the number of contenders in the network is important or if the sensors do not share the same spectrum resources. Therefore, we propose in this paper a new framework for the by-domestic energy control in smart homes using cognitive radio sensor networks (CRSNs). Our proposed framework, called Cooperative Spectrum Resource Allocation (CSRA), aims to completely avoid the CCC and to achieve a distributed fair spectrum resource sharing among the sensors in smart homes. The fairness of CSRA is ensured through partially observable Markov decision process (POMDP) that performs the channel assignment, to each node, based on local spectrum utilization estimates. Performance evaluation, using the OMNeT++ simulator, reveals that the proposed CSRA approach achieves a fair spectrum allocation between sensor nodes in smart home systems.