I am running emons v7 on my home web server. I have information being posted to it from a node that is keeping track of temperatures at different locations on my property.
To make it easier for me to view at a glance I created a simple webpage that has the feed I want to view and the feed is set to public.
These are the lines I am using to display the feed data. Below that is the webpage code I am using. It works about 70% of the time. When it doesn't work the feeds will show 0 even though in my emon account they show the temperatures.
<script type="application/javascript">
var dashid = 2;
var path = "http://192.168.1.175/emonscms/";
var widget = ["button","cylinder","dial","feedvalue","jgauge","led","vis"];
var apikey = "";
var userid = 2;
for (z in widget)
{
var fname = widget[z]+"_widgetlist";
var fn = window[fname];
$.extend(widgets,fn());
}
Raw feeds and dials will show 0 for some reason?
Submitted by Guest on Wed, 05/03/2014 - 17:10I am running emons v7 on my home web server. I have information being posted to it from a node that is keeping track of temperatures at different locations on my property.
To make it easier for me to view at a glance I created a simple webpage that has the feed I want to view and the feed is set to public.
These are the lines I am using to display the feed data. Below that is the webpage code I am using. It works about 70% of the time. When it doesn't work the feeds will show 0 even though in my emon account they show the temperatures.
<div id="12" class="paragraph" style="font-family:arial;display:inline-block;color:#FF0000;font-size:18px;position: absolute; margin: 0px; top: 500px; left: 10px; width: 700px; height: 60px;">Temp of pool: </div>
<div id="15"><div units=" C" feedname="pooltemp" id="1" class="feedvalue" style="font-family:arial;display:inline-block;color:#FF0000;font-size:18px;position: absolute; margin: 0px; top: 480px; left: 650px; width: 140px; height: 60px;"></div>
******************** Code In ****************
<html>
<head>
<title>Mike's System</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
<meta name="robots" content="none">
<link href="/css/global.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table align=center>
<tr><td>
<html>
<head>
<script type="text/javascript" src="http://192.168.1.175/emonscms/Lib/jquery-1.9.0.min.js"></script>
<link href="http://192.168.1.175/emonscms/Lib/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="http://192.168.1.175/emonscms/Lib/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<title>Mike's Dash</title>
</head>
<body style="background-color:#FFFFFF">
<!-- <script src="settings.js" type="text/javascript"></script> -->
<div class="container">
<script type="text/javascript" src="http://192.168.1.175/emonscms/Modules/dashboard/dashboard_langjs.php"></script>
<link href="http://192.168.1.175/emonscms/Modules/dashboard/Views/js/widget.css" rel="stylesheet">
<script type="text/javascript" src="http://192.168.1.175/emonscms/Lib/flot/jquery.flot.min.js"></script>
<script type="text/javascript" src="http://192.168.1.175/emonscms/Modules/dashboard/Views/js/widgetlist.js"></script>
<script type="text/javascript" src="http://192.168.1.175/emonscms/Modules/dashboard/Views/js/render.js"></script>
<script type="text/javascript" src="http://192.168.1.175/emonscms/Modules/feed/feed.js"></script>
<script type='text/javascript' src='http://192.168.1.175/emonscms/Modules/dashboard/Views/js/widgets/button/button_render.js'></script>
<script type='text/javascript' src='http://192.168.1.175/emonscms/Modules/dashboard/Views/js/widgets/cylinder/cylinder_render.js'></script>
<script type='text/javascript' src='http://192.168.1.175/emonscms/Modules/dashboard/Views/js/widgets/dial/dial_render.js'></script>
<script type='text/javascript' src='http://192.168.1.175/emonscms/Modules/dashboard/Views/js/widgets/feedvalue/feedvalue_render.js'></script>
<script type='text/javascript' src='http://192.168.1.175/emonscms/Modules/dashboard/Views/js/widgets/jgauge/jgauge_render.js'></script>
<script type='text/javascript' src='http://192.168.1.175/emonscms/Modules/dashboard/Views/js/widgets/led/led_render.js'></script>
<script type='text/javascript' src='http://192.168.1.175/emonscms/Modules/dashboard/Views/js/widgets/vis/vis_render.js'></script>
<div id="page-container" style="height:600px; position:relative;">
<div id="12" class="paragraph" style="font-family:arial;display:inline-block;color:#FF0000;font-size:18px;position: absolute; margin: 0px; top: 500px; left: 10px; width: 700px; height: 60px;">Temp of pool: </div>
<div id="15"><div units=" C" feedname="pooltemp" id="1" class="feedvalue" style="font-family:arial;display:inline-block;color:#FF0000;font-size:18px;position: absolute; margin: 0px; top: 480px; left: 650px; width: 140px; height: 60px;"></div>
</div>
</div>
<script type="application/javascript">
var dashid = 2;
var path = "http://192.168.1.175/emonscms/";
var widget = ["button","cylinder","dial","feedvalue","jgauge","led","vis"];
var apikey = "";
var userid = 2;
for (z in widget)
{
var fname = widget[z]+"_widgetlist";
var fn = window[fname];
$.extend(widgets,fn());
}
var redraw = 1;
var reloadiframe = 0;
show_dashboard();
setInterval(function() { update(); }, 10000);
setInterval(function() { fast_update(); }, 30);
</script>
</div>
</body>
</html>
</div>
</td><tr>
</table>
</body>
</html>
******************** Code out ****************