Wireless sensor, actuator networks distinguish themselves from wireless sensor networks by the need to coordinate actuators' actions, real-time constraints on communication and the frequently feedback-based nature of computation performed in the network. In this paper we propose a functional macro-programming language, SOSNA, that employs the stream programming paradigm to concisely specify data transformations in the network so that wireless sensor actuator network (WSAN) application developers can focus on higher-level control-oriented problems rather than on designing the way in which communication is organised in the network. SOSNA accommodates a broad class of WSAN coordination models, supports mobility and provides a means of employing feedback for distributed state maintenance. Program execution proceeds in rounds providing real-time guarantees on actuator decision making and synchronisation. In addition, static program semantics permit nodes to switch their radios off to conserve energy.