Skip to content

Commit

Permalink
Adding the last good V1 SEGmeter codes the V2.0 V2.1 SEGmeter codes a…
Browse files Browse the repository at this point in the history
…nd V2 SEGbox Gateway
  • Loading branch information
samotage committed Jan 25, 2013
1 parent 9816cf4 commit 93087f6
Show file tree
Hide file tree
Showing 16 changed files with 6,615 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions SEGbox/.profile
@@ -0,0 +1,5 @@
alias ll='ls -l'
alias la='ls -al'
alias rm='rm -i'
alias df='df -h'
alias zap='rm -rf'
29 changes: 29 additions & 0 deletions SEGbox/config_segbox.lua
@@ -0,0 +1,29 @@
-- ------------------------------------------------------------------------- --
-- segbox.lua
-- ~~~~~~~~~~~~~~~~
-- Please do not remove the following notices.
-- Copyright (c) 2012 Smart Energy Groups Pty. Ltd.
-- Version: 2.0
-- ------------------------------------------------------------------------- --
-- General controls
-- ------------------------------------------------------------------------- --

timestamp_data = true -- if false, data is not timestamped, and time sycnc on startup is not active.
has_3g = false -- switches a 3g service on and off
production = true -- picks the server
data_rate = 45 -- seconds default, to be updated from the cloud
save_data = true -- to persistently save data, otherwise RAM cached
-- data_path = "/mnt/memories/" -- location of data files NAND memories is best :D
-- data_path = "dataz/" -- location of data files dev locale
data_path = "/tmp/" -- location of data files for RAM based locale
-- data_path = "/Users/samotage/dev/seg/branches/seg_ruby_187/SEGbox/segbox/"
archive_data = false -- copies and archives stored data once sent to SEG, for big NAND drives!


-- ------------------------------------------------------------------------- --
-- Smart Energy Groups site_token = Your unique identifier for the web service API
-- Note site_unknown is a special token for discovery of segboxes.
-- SEGbox will update this file on discovery
-- ------------------------------------------------------------------------- --
segbox_name = "segbox_vtwo"
site_token = "site_unknown"
14 changes: 14 additions & 0 deletions SEGbox/daemon_segbox.sh
@@ -0,0 +1,14 @@
#!/bin/sh

# SEGbox restarter, for running on the crontabs config following
# from here>> */2 * * * * /root/daemon_segbox.sh >/dev/null 2>&1

ps -ef | grep -v grep | grep segbox.lua
# if not found - equals to 1, start it

if [ $? -eq 1 ]
then
/etc/init.d/segbox start
else
echo "SEGbox is running!"
fi

0 comments on commit 93087f6

Please sign in to comment.