ni-c / heimcontrol.js

Home-Automation with node.js and Raspberry PI
MIT License
1.41k stars 297 forks source link

Logging Temperature Possible? #48

Open beniroquai opened 10 years ago

beniroquai commented 10 years ago

I've seen a node.js server which logs/charts the Temperature of a pi. Is there a way to to do this in heimcontrol as well? Is there an API for the Sensors from the Arduino? You can find the Server here: https://github.com/talltom/PiThermServer

mikehumphrey commented 10 years ago

I would love to see this and think it could be wired up as a plugin and configured to load data into MongoDB for a specified Sensor or sensors. The plugin system should support this, but I'm not totally sure.

beniroquai commented 10 years ago

Yeah. Good Idea. But actually I'm absolutely not familiar with programming ;) But anybody is hereby invited to do that :+1

HeLiBloks commented 10 years ago

Well i looked into this and it should be possible to add a http post {sensorHistory : $push([[Date.now()],[data]]) } method to the Arduino duino sensor object that is created for each sensor. Posting this to plotly every 25 min or so would make a nice graph to link showing the history. Im not certain however if it would continue to push data to Mongo after you log out from the gui? It should however probably work to log the rc objekt when switched. Since Im new to express, require.js and io.connect my learning curve is kind of high to make this work properly, lets hope for help.