Industry 4.0 is based on interoperability among smart factories, products and services embedded in the Industrial Internet of Things (IIoT), which provides huge opportunities for sustainable manufacturing using ubiquitous information and ICT infrastructure. This paper has a twofold goal, to propose an IoT architecture linking physical devices with operators to afford efficient communication (green-BY concept) and to provide energy-saving oriented techniques to encourage the deployment of cost-effective networks, which enhances the lifespan of IoT devices (green-IN concept). Namely, we propose a flexible sleep-based algorithm called SustainaBLE, suitable for a wide range of domains using Bluetooth Low Energy (BLE). A real case studio has been carried out to provide power consumption measurements using SustainaBLE proposal, achieving one-year autonomy compared to one-day autonomy with BLE Connection mode. This achievement encourages us to broaden our experimental study considering more nodes, different topologies and additional standards for contributing to the future Industrial IoT networks.