Event-driven programming based on Event-Condition-Action (ECA) rules allows users to define complex automation routines in a simple, declarative way; for this reason, in recent years ECA rules have been adopted by the majority of companies in the Internet of Things (IoT) industry as a promising paradigm for implementing ubiquitous and pervasive systems. Unfortunately, programming simplicity comes to a price: most implementations of ECA rules are bound to a strongly centralized communication infrastructure, that poses serious limitations on the application scenarios for the IoT, due to scalability, security and availability issues. To mitigate these issues, recent works introduced abstractions for communication and coordination of ensembles of IoT devices in a decentralized setting, effectively moving the computation towards the edge of the network without sacrificing the programming simplicity prerogative of ECA rules. In particular, Attribute-based memory Updates is a communication model transparently enhancing ECA rules-based systems with an interaction mechanism where communication is similar to broadcast but actual receivers are selected on the spot, by means of predicates (i.e., properties) over devices attributes. In this paper, we introduce AbU-dsl, a Domain Specific Language for the IoT that compiles on top of an implementation of Attribute-based memory Updates. In this way, AbU-dsl provides a practical development interface, based on ECA rules, to effectively program IoT devices in a fully decentralized setting, by exploiting a full-fledged attribute-based interaction model. Thus, programmers can specify interactions between devices in a declarative way, abstracting from details such as devices identity, number, or even their existence, without the need for a central controlling service.