Riopele Energy Intelligence (REI)
Problem
Riopele, a Portuguese vertical textile company, spends about €7.5 million a year on energy, roughly 7.6% of its turnover. Dozens of meters measure that energy, but the data is spread across factory equipment, databases and production systems, and the cost arrives once a month on a supplier invoice. Questions such as "where is our energy going right now?" or "which section used more this week, and why?" take spreadsheets, time and guesswork.
Solution. REI is a web platform that brings every meter into one place, collects readings automatically, explains consumption and allocates its cost.
Features
AI
REI has a Grok layer built on the official xAI SDK. It answers questions about consumption, generates insights compared with the previous period, and chats about the dashboard. It also builds cron schedules, formulas and SQL from plain language. It works only on the real meter catalogue and real data. Every output is validated before it is applied, requests are rate-limited, and answers come in the user's language.
Additionally REI watches consumption on its own, so nobody has to dig through every data source looking for problems. It compares each meter's readings with that meter's usual behaviour, and when consumption deviates or peaks, it emails the right people automatically. The email says which meter it is, when it happened and how far consumption is from normal. Problems that used to surface weeks later on the invoice now reach the team while they can still act.
Architecture. Data flows from the meters to a per-meter scheduler, into a MySQL time series, through a Node.js/Express REST API in TypeScript, and on to a React web app with the Grok layer. SQL runs on a separate read-only connection with a strict whitelist, and formulas use our own parser and never execute code. REI is packaged with Docker, with continuous integration and a staging environment on Google Cloud.
Tracks covered
Impact
REI gives Riopele continuous visibility on a €7.5 million cost. Invoices are allocated automatically instead of in spreadsheets, alerts replace manual analysis, and every user has their own view of the same numbers. The is room for several other features to be implemented, which measures the great potential the solution has.
Useful links: