Ambient Intelligence deployments are very vulnerable to Cyber-Physical attacks. In these attacking strategies, intruders try to manipulate the behavior of the global system by affecting some key elements within the deployment. Typically, attackers inject false information, integrate malicious devices within the deployment, or infect communications among sensor nodes, among other possibilities. To protect Ambient Intelligence deployments against these attacks, complex data analysis algorithms are usually employed in the cloud to remove anomalous information from historical series. However, this approach presents two main problems. First, it requires all Ambient Intelligence systems to be networked and connected to the cloud. But most new applications for Ambient Intelligence are supported by isolated systems. And second, they are computationally heavy and not compatible with new decentralized architectures. Therefore, in this paper we propose a new decentralized security solution, based on a Blockchain ledger, to protect isolated Ambient Intelligence deployments. In this ledger, new sensing data are considered transactions that must be validated by edge managers, which operate a Blockchain network. This validation is based on reputation metrics evaluated by sensor nodes using historical network data and identity parameters. Through information theory, the coherence of all transactions with the behavior of the historical deployment is also analyzed and considered in the validation algorithm. The relevance of edge managers in the Blockchain network is also weighted considering the knowledge they have about the deployment. An experimental validation, supported by simulation tools and scenarios, is also described. Results show that up to 93% of Cyber-Physical attacks are correctly detected and stopped, with a maximum delay of 37 s.