I found out by accident that you can use Phillips HUE motion sensors to measure temperature inside rooms.

Some days ago I was browsing through the app and saw some temperature data and was wondering where that data comes from:

HUE Labs page on iOS

I googled around and found Huejay, a nice HUE library for node.js, which supports the retrieval of sensor data:

const isTemperatureSensor = sensor => sensor.type === 'ZLLTemperature'

const sensors = await client.sensors.getAll()
const sensorData = sensors
    .filter(isTemperatureSensor)

That's a nice thing though because I was still too lazy to solder the temperature sensor I bought weeks ago on my Raspberry Pi. The good thing is that I have two temperature sensors which also work without any wires 🙂

Gathering data on the PI and push it to the cloud

Finally some work for Hugo, my Raspberry Pi. I wrote an agent that get's called via crontab every ten minutes: thermomax-agent

Unfortunately the sensor is not very accurate, it differs by almost constant 2 degrees from the real temperature. That's why I had to add some adjustment value.

Hugo sends the data directly to the thermomax-server. Which is currently only an in-memory store for the aggregated data. Besides that it provides an basic UI:

thermomax server UI

That's ok for the moment but what's next? Statistics, of course!

Recently I start working with Googles Firebase and it seems to be a good place to store and calculate some nice statistics 🤓