With the grow of the Web of Things, lots of devices are being connected to the network. Many of these devices require human interaction when using them. In a desirable scenario, technology should allow to automatically adapt the behavior of these devices to the needs and expectations of their us-ers. To this extent, in previous work we proposed the Internet of People model to automatically develop virtual profiles of people, stored in their smartphones. However, in order to build a complete virtual profile with in-formation about the user’s environment and context, we need also the con-tribution of these surrounding devices. Our goal is to develop a framework in which users and smart devices are integrated seamlessly and in real time, al-lowing programmatic adaptation and update of both virtual user profiles and surrounding devices. As a proof of concept, in this paper we propose the use of beacons for dynamically downloading and executing in the smartphone scripts for updating the virtual profile with context information, and trigger actions both in the smartphone and the devices. This way, we take a first step to an effective Programmable World, in which everyday objects con-nected to the network can be programmatically adapted to their users.