Logging through revisions or nodes

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
pbosmans's picture

I've managed to integrate my home automation into drupal.
It's available, as a sandbox, on drupal.org
Every event that occurs on my domotica-network (CAN), can be send to my drupal site.
Also i can send events from my drupal site to the domotica-network (and so i can switch the lights, ...).
Also it's integrate with the rules module to for example send an email when some event occures on the domotica-network.

Now, i was looking to create a manner to log events.
Every type of event, has his corresponding node (event node-type) within drupal. The node will be updated when tesame event occures.
I've also a special logging node-type.

Now, i was wondering if i should create a new logging node for every event node update (when an event is received) or should i create a new revision of the corresponding logging node that is linked to a event node ?

Any suggestions or other ideas are welcome.

Comments

My thoughts..

scottprive's picture

I had to Google 'domotica-network'. I see it is a web-based IP camera. Nice.

I do not think there is any wrong answer - either creating new nodes, or creating new revisions - they are both OK things to do.
You could argue this is a new instance of an event (node), or a new version of it (revision).

I guess I would create yourself 10 or so "events" as both Nodes or Revisions... and see which one works best with your site framework.
I do not know the limitations of Revisions, because I never use that attribute.
I don't know if for example the standard Drupal node display allows access to older revisions (I assume it does not).

I typically display custom content using Views2+Semantic Views (I'm on Drupal 6).
Views can be complex, but it can make theming that content easier (and saves you from writing a TPL file).

In practice it depends on what you are most comfortable working with, and how you manage that data on your Drupal site, and if it will show you all the history/versions you require.

If you are expecting home security, be aware of the limitations of keeping your camera images stored on a local computer. :-)
I would investigate storing everything in Pachube or an offsite FTP, then use Drupal to fetch that data, so you have a safe off-site copy of all events.

interesting suggestion

pbosmans's picture

To be correct, my domotica-network is not that web-based ip-camera.
It's build with VSCP ( see http://www.vscp.org/ ). I used it for my 'kiewit' module (see http://sourceforge.net/apps/phpbb/m2m/viewtopic.php?f=10&t=63 ). I'm controlling my home-lights with it and everything is open source.

Thanks for your Pachube suggestion, i will definitly investigate if it's possible to use it with drupal to storage data externally.

Devices

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: