Jump to content

NodeLink to EmonCMS API Issue


jellis

Recommended Posts

I am currently trying to get the NodeLink UNRAID Docker version 0.8.3 to send some variables to EmonCMS.  Everything is working fine with the exception that the POST coming out of NodeLink does not match the INPUT/POST that EmonCMS expects.  

 

NodeLink is sending the following:

 

http://10.0.1.100:8998/emoncms/input/post.json?node=emontx&apikey=myapikey&json={logger1_energyWholeHouse_Total:4901113,logger1_energyWholeHouse_Current:72466}

 

but my EmonCMS expects the following.   

 

http://10.0.1.100:8998/input/post?node=emontx&fulljson={"power1":100,"power2":200,"power3":300}&apikey=myapikey

 

Not considering the difference between json and fulljson my installation of EmonCMS does not have the additional directory.  

 

So 2 questions?  

1.) Is there a way to adjust for this in NodeLink or could this feature be added? 

or

2.) Is there a way to adjust for this within the Docker settings?

Link to comment
Share on other sites

  • 4 weeks later...

I am trying to use the default to upload to emoncms.org but I am getting

2017-12-05 23:14:00 - EmonCMS Send Error: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure

(i ahve checked my api key is the right write key 3 times :-) )

Link to comment
Share on other sites

Scyto, 

 

I am afraid I will not be much help on this since I have not been able to test 8.4.  I run it in a docker and am waiting for the docker to be updated or figure out to update it myself.  In the meantime, I have been using the network module.  Maybe post some screenshots of your settings and that might help spot any config issues.   

Link to comment
Share on other sites

This is the emoncms section (key is redacted)

-<section name="emoncms">

<item value="True" key="emonenable"/>

<item value="redacted" key="emonkey"/>

<item value="0" key="emonnodeid"/>

<item value="False" key="emonverbose"/>

<item value="False" key="emoncustomaddress"/>

<item value="http://emoncms.org/" key="emonaddress"/>

here is the gem section key redacted

-<section name="gem">

<item value="192.168.1.214" key="address"/>

<item value="8000" key="port"/>

<item value="True" key="verboselog"/>

<item value="False" key="sendtoseg"/>

<item value="" key="segtoken"/>

<item value="GEM" key="segnode"/>

<item value="True" key="sendtoemon"/>

<item value="redacted" key="emonkey"/>

<item value="1" key="sendmultiplier"/>

<item value="False" key="hassplitmain"/>

<item value="309.53" key="runtimechannel1"/>

<item value="83.06" key="runtimechannel3"/>

<item value="318.83" key="runtimechannel4"/>

<item value="216.6" key="runtimechannel5"/>

<item value="318.83" key="runtimechannel7"/>

<item value="318.82" key="runtimechannel8"/>

<item value="318.78" key="runtimechannel10"/>

<item value="318.79" key="runtimechannel18"/>

<item value="32.76" key="runtimechannel19"/>

<item value="318.71" key="runtimechannel24"/>

<item value="318.71" key="runtimechannel28"/>

<item value="318.71" key="runtimechannel29"/>

<item value="318.71" key="runtimechannel30"/>

<item value="165.22" key="runtimechannel27"/>

<item value="101.77" key="runtimechannel6"/>

<item value="1.02" key="runtimechannel16"/>

<item value="22.11" key="runtimechannel25"/>

<item value="0.09" key="runtimechannel15"/>

<item value="0.08" key="runtimechannel14"/>

<item value="2.84" key="runtimechannel13"/>

<item value="148.86" key="runtimechannel11"/>

<item value="165.29" key="runtimechannel9"/>

<item value="180.52" key="runtimechannel31"/>

<item value="2.78" key="runtimechannel2"/>

<item value="1.02" key="runtimechannel26"/>

<item value="23.04" key="runtimechannel12"/>

<item value="3.6" key="runtimechannel21"/>

<item value="2.43" key="runtimechannel23"/>

<item value="4.34" key="runtimechannel17"/>

<item value="0.3" key="runtimechannel22"/>

<item value="68.88" key="runtimechannel32"/>

<item value="emoncms.org" key="emonaddress"/>

<item value="0" key="emonnodeid"/>

<item value="False" key="emoncustomaddress"/>

<item value="10" key="runtimetrigger"/>

<item value="0" key="runtimechannel0"/>
Link to comment
Share on other sites

Scyto, 

 

I am afraid I will not be much help on this since I have not been able to test 8.4.  I run it in a docker and am waiting for the docker to be updated or figure out to update it myself.  In the meantime, I have been using the network module.  Maybe post some screenshots of your settings and that might help spot any config issues.   

if you store nodelink not inside the docker container but in a mapped r/w folder on the host you should find the auto upgrade works (i.e just use any vanilla linux distro docker container, map in a directory from your host and follow the install instructions for nodelink)

Link to comment
Share on other sites

Ok, i updated to stretch and latest mono as per install document (i just copied my nodelink and rc.local across :-) )

 

The Error has disappeared from the log but emoncms is still not getting data, i turned on verbose emoncms loggins and got the following:

(collapsed text because pages of text are annoying)

 

 

 

2017-12-07 18:43:36 - GEM: n=01000029&m=1074321&wh_1=131139.03&p_1=48&a_1=1.44&wh_2=112218.75&p_2=5&a_2=.36&wh_3=9887.50&p_3=5154&a_3=44.22&wh_4=68643.45&p_4=41&a_4=.54&wh_5=43773.53&p_5=43&a_5=.76&wh_6=108197.52&p_6=5&a_6=.10&wh_7=77621.77&p_7=105&a_7=.94&wh_8=128802.46&p_8=222&a_8=2.56&wh_9=128395.20&p_9=2&a_9=0.08&wh_10=161812.10&p_10=63&a_10=.78&wh_11=156274.06&p_11=51&a_11=.48&wh_12=112813.99&p_12=1&a_12=0&wh_13=.00&p_13=0&a_13=0.08&wh_14=.00&p_14=0&a_14=0&wh_15=78110.51&p_15=3&a_15=0&wh_16=42158.98&p_16=0&a_16=.12&wh_17=303.88&p_17=0&a_17=.18&wh_18=17105.88&p_18=57&a_18=.72&wh_19=121481.30&p_19=4&a_19=.12&wh_20=151127.88&p_20=1&a_20=0&wh_21=48162.54&p_21=0&a_21=.14&wh_22=13175.45&p_22=0&a_22=0.08&wh_23=73400.44&p_23=0&a_23=0.08&wh_24=44150.12&p_24=74&a_24=.86&wh_25=976.98&p_25=0&a_25=0&wh_26=.00&p_26=0&a_26=0&wh_27=54933.33&p_27=2&a_27=0.08&wh_28=75506.25&p_28=113&a_28=1.26&wh_29=112939.93&p_29=501&a_29=4.70&wh_30=5478.80&p_30=203&a_30=1.88&wh_31=57569.72&p_31=46&a_31=.50&wh_32=.00&p_32=0&a_32=0&v=120.1 [gem]
2017-12-07 18:43:37 - EmonCMS Send: http://emoncms.org
2017-12-07 18:43:37 - EmonCMS Response: <!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Emoncms - site home </title>
<link rel="shortcut icon" href="https://emoncms.org/Theme/basic/favicon.png" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-startup-image" href="https://emoncms.org/Theme/basic/ios_load.png">
<link rel="apple-touch-icon" href="https://emoncms.org/Theme/basic/logo_normal.png">
<!--<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="https://emoncms.org/Lib/bootstrap-datetimepicker-0.0.11/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
-->
<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap-combined.min.css" rel="stylesheet">

<link href="https://emoncms.org/Theme/basic/emon-standard.css" rel="stylesheet">

<script type="text/javascript" src="https://emoncms.org/Lib/jquery-1.11.3.min.js"></script>
</head>
<body>
<div id="wrap">

<div id="emoncms-navbar" class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<style>
@media (max-width: 1200px){
.menu-text {
display: none !important;
}
}
@media (max-width: 480px){
.menu-dashboard {
display: none !important;
}
}

@media (max-width: 320px){
.menu-extra {
display: none !important;
}
}
</style>

<ul class="nav">
<li class='active menu-left'><a href="https://emoncms.org/site/home"><div style='display: inline'> <img style='margin-top: -4px;' id='emoncms-logo' src='https://emoncms.org/Theme/emoncms-logo.png' /></div></a></li></ul>
<ul class="nav pull-right">
<li class=' menu-right'><a href="https://emoncms.org/site/api#input"><div style='display: inline'> API</div></a></li><li class=' menu-right'><a href="https://emoncms.org/user/login"><div style='display: inline'><i class='icon-home icon-white' title='Log In'></i> <span class='menu-text'>Log In</span></div></a></li></ul>
</div>
</div>

<div id="topspacer"></div>

<!--<div style="background-color:#f3a48b; color:#fff; padding:10px;">Emoncms.org will be offline between 9:45am and 10:45am today, see <a href="https://community.openenergymonitor.org/t/emoncms-org-downtime-tomorrow-17th-october/5371">forum thread</a></div>-->


<div class="container">

<script type="text/javascript" src="https://emoncms.org/Modules/user/user.js"></script>

<style>

h2 {
color:#fff;
}

input[type=text] {
background-color:#555;
font-size:16px;
color:#fff;
border:1px #888 solid;
}

input[type=password] {
background-color:#555;
font-size:16px;
color:#fff;
border:1px #888 solid;
}

p {
color:#ccc;
font-size:18px;
line-height:22px;
}

h1 {
font-size:52px;
color:#fff;
}

h2 a {
color:#fff;
}

h2 a:hover {
text-decoration:none;
color:#ccc;
}

.a2 a {
color:#fff;
}

.a2 a:hover {
text-decoration:none;
color:#ccc;
}


</style>
<br><br>
<div class="row-fluid">
<div class="span6" style="padding:20px;">

<h1>Emoncms<span style="color:#888">.org</span></h1><br>
<p style="color:#ccc; font-size:18px; line-height:22px" >Emoncms is a powerful open-source web-app for processing, logging and visualising energy, temperature and other environmental data.</p>
<p><span style="color:#666">Part of the <a href="https://openenergymonitor.org">OpenEnergyMonitor.org</a> project.</span></p>

<img src="https://emoncms.org/Modules/site/emoncms_front.png" />
</div>

<div class="span6" style="padding:20px;">

<br><br>
<div id="login-form" class="well" style="text-align:left; background-color:rgba(255,255,255,0.1); border:0;">
<p style="color:#fff">
Emoncms.org Login<hr style="margin:0px;">
</p>

<p class="register-item" style="display:none; color:#fff; font-size:14px">Before creating an account please read:<br><a href="https://emoncms.org/site/usage">Posting to emoncms.org</a></p>

<p style="color:#fff">
Username:<br/>
<input type="text" tabindex="1" name="username" style="width:94%"/>
</p>

<p class="register-item" style="display:none; color:#fff">
Email: <input type="text" name="email" style="width:94%" tabindex="2"/>
</p>

<p style="color:#fff">
Password:<br/>
<input type="password" tabindex="3" name="password" style="width:94%"/>
</p>

<p class="register-item" style="display:none; color:#fff">
Confirm password:<br/>
<input type="password" name="confirm-password" style="width:94%" tabindex="4"/>
</p>

<div id="error" class="alert alert-error" style="display:none;"></div>

<p class="login-item" style="color:#aaa">

<label class="checkbox"><input type="checkbox" tabindex="5" id="rememberme" value="1" name="rememberme"> Remember me</label><br /> <button id="login" class="btn btn-primary" tabindex="6" type="button">Login</button>
 or <a id="register-link" href="#">register</a> </p>

<p class="register-item" style="display:none; color:#aaa">
<button id="register" class="btn btn-primary" type="button">Register</button>  or  <a id="cancel-link" href="#">cancel</a>
</p>

<p class="login-item"><a id="passwordreset-link" href="#" style="color:#fff; font-size:14px"><i class="icon-question-sign icon-white"></i> Forgotten password</a></p>

<div id="passwordreset-block" style="display:none">
<hr>
<div id="passwordreset-message"></div>
<div id="passwordreset-input">
<p style="color:#888; font-size:12px">Enter account name:</p>
<input id="passwordreset-username" type="text" /><br>
<p style="color:#888; font-size:12px">Enter account email address:</p>
<input id="passwordreset-email" type="text" /><br>
<button id="passwordreset-submit" class="btn">Submit</button>
</div>

</div>

</div>

<div style="float:right;">
<div style="display:inline">
<a href="https://play.google.com/store/apps/details?id=org.emoncms.myapps"><img alt="Get it on Google Play" src="https://emoncms.org/Modules/site/en-play-badge.png" /></a>
<a href="https://itunes.apple.com/us/app/emoncms/id1169483587?ls=1&mt=8"><img alt="Download on the App Store" src="https://emoncms.org/Modules/site/appstore.png" /></a>
</div>
</div>

</div>
</div>

<div class="row-fluid">
<div class="span12" style="padding:20px;">
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/book.png" style="width:42px;" /> Docs</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">Documentation for how to install, upgrade, use and backup emoncms is available on the emoncms github repository.</a></p>
</div>
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/GitHub-Mark-Light-64px.png" style="width:42px;" /> Github</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">We believe open source is a better way of doing things. Emoncms is available under the GPL Affero licence (AGPL).</a></p>
</div>
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/emonpi.png" style="width:42px;" /> Install</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">Install emoncms on a RaspberryPi, home computer or web server. With emoncms you can have full control of your data.</a></p>
</div>
</div>
</div>

<div class="row-fluid">
<div class="span12" style="padding:20px; text-align:center">
<a href="https://github.com/emoncms/emoncms" style="color:#888; font-size:18px">https://github.com/emoncms/emoncms</a>
</div>
</div>

<script>

$(".hero-unit").css("background-color","#222");
$("body").css("background-color","#222");

$(window).ready(function(){
$("#footer").css('background-color','#181818');
$("#footer").css('color','#999');
});

var path = "https://emoncms.org/";
var register_open = false;
var passwordreset = "1";

if (!passwordreset) $("#passwordreset-link").hide();

$("#passwordreset-link").click(function(){
$("#passwordreset-block").show();
$("#passwordreset-input").show();
$("#passwordreset-message").html("");
});

$("#passwordreset-submit").click(function(){
var username = $("#passwordreset-username").val();
var email = $("#passwordreset-email").val();

if (email=="" || username=="") {
alert("Please enter username and email address");
} else {
var result = user.passwordreset(username,email);
if (result.success==true) {
$("#passwordreset-message").html("<div class='alert alert-success'>"+result.message+"</div>");
$("#passwordreset-input").hide();
} else {
$("#passwordreset-message").html("<div class='alert alert-error'>"+result.message+"</div>");
}
}
});

$("#register-link").click(function(){
$(".login-item").hide();
$(".register-item").show();
$("#error").hide();
register_open = true;
return false;
});

$("#cancel-link").click(function(){
$(".login-item").show();
$(".register-item").hide();
$("#error").hide();
register_open = false;
return false;
});

$("input").keypress(function(event) {
//login or register when pressing enter
if (event.which == 13) {
event.preventDefault();
if ( register_open ) {
register();
} else {
login();
}
}
});

function login(){
var username = $("input[name='username']").val();
var password = $("input[name='password']").val();
var rememberme = 0; if ($("#rememberme").is(":checked")) rememberme = 1;

var result = user.login(username,password,rememberme);

if (result.success)
{
if (result.startingpage==undefined || result.startingpage=="") result.startingpage = "feed/list";
window.location.href = path+result.startingpage;
}
else
{
$("#error").html(result.message).show();
}
}

function register(){
var username = $("input[name='username']").val();
var password = $("input[name='password']").val();
var confirmpassword = $("input[name='confirm-password']").val();
var email = $("input[name='email']").val();

if (password != confirmpassword)
{
$("#error").html("Passwords do not match").show();
}
else
{
var result = user.register(username,password,email);

if (result.success)
{
var result = user.login(username,password);
if (result.success)
{
window.location.href = path+"user/view";
}
}
else
{
$("#error").html(result.message).show();
}
}
}

$("#login").click(login);
$("#register").click(register);


</script>
</div>

<div style="clear:both; height:60px;"></div>
</div>

<div id="footer">
Powered by <a href="http://openenergymonitor.org">openenergymonitor.org</a>
<span></span>
</div>
<script type="text/javascript" src="https://emoncms.org/Lib/bootstrap/js/bootstrap.js"></script>
</body>
</html>

2017-12-07 18:43:51 - GEM: n=01000029&m=1074321&wh_1=131139.27&p_1=54&a_1=1.44&wh_2=112218.76&p_2=5&a_2=.36&wh_3=9909.01&p_3=5152&a_3=44.20&wh_4=68643.62&p_4=41&a_4=.54&wh_5=43773.71&p_5=44&a_5=.76&wh_6=108197.54&p_6=3&a_6=0.08&wh_7=77622.21&p_7=105&a_7=.94&wh_8=128803.38&p_8=223&a_8=2.56&wh_9=128395.21&p_9=2&a_9=0.08&wh_10=161812.37&p_10=63&a_10=.78&wh_11=156274.28&p_11=52&a_11=.50&wh_12=112813.99&p_12=1&a_12=0&wh_13=.00&p_13=0&a_13=0&wh_14=.00&p_14=0&a_14=0&wh_15=78110.52&p_15=2&a_15=0.08&wh_16=42158.98&p_16=0&a_16=.16&wh_17=303.88&p_17=1&a_17=.18&wh_18=17106.12&p_18=57&a_18=.72&wh_19=121481.31&p_19=3&a_19=.12&wh_20=151127.88&p_20=0&a_20=0&wh_21=48162.54&p_21=0&a_21=.12&wh_22=13175.45&p_22=0&a_22=0.08&wh_23=73400.44&p_23=0&a_23=0.08&wh_24=44150.43&p_24=75&a_24=.88&wh_25=976.98&p_25=0&a_25=0&wh_26=.00&p_26=0&a_26=0&wh_27=54933.34&p_27=2&a_27=0.08&wh_28=75506.72&p_28=114&a_28=1.26&wh_29=112942.03&p_29=499&a_29=4.68&wh_30=5479.60&p_30=177&a_30=1.64&wh_31=57569.92&p_31=46&a_31=.50&wh_32=.00&p_32=0&a_32=0.08&v=119.5 [gem]
2017-12-07 18:43:52 - EmonCMS Send: http://emoncms.org
2017-12-07 18:43:52 - EmonCMS Response: <!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Emoncms - site home </title>
<link rel="shortcut icon" href="https://emoncms.org/Theme/basic/favicon.png" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-startup-image" href="https://emoncms.org/Theme/basic/ios_load.png">
<link rel="apple-touch-icon" href="https://emoncms.org/Theme/basic/logo_normal.png">
<!--<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="https://emoncms.org/Lib/bootstrap-datetimepicker-0.0.11/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
-->
<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap-combined.min.css" rel="stylesheet">

<link href="https://emoncms.org/Theme/basic/emon-standard.css" rel="stylesheet">

<script type="text/javascript" src="https://emoncms.org/Lib/jquery-1.11.3.min.js"></script>
</head>
<body>
<div id="wrap">

<div id="emoncms-navbar" class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<style>
@media (max-width: 1200px){
.menu-text {
display: none !important;
}
}
@media (max-width: 480px){
.menu-dashboard {
display: none !important;
}
}

@media (max-width: 320px){
.menu-extra {
display: none !important;
}
}
</style>

<ul class="nav">
<li class='active menu-left'><a href="https://emoncms.org/site/home"><div style='display: inline'> <img style='margin-top: -4px;' id='emoncms-logo' src='https://emoncms.org/Theme/emoncms-logo.png' /></div></a></li></ul>
<ul class="nav pull-right">
<li class=' menu-right'><a href="https://emoncms.org/site/api#input"><div style='display: inline'> API</div></a></li><li class=' menu-right'><a href="https://emoncms.org/user/login"><div style='display: inline'><i class='icon-home icon-white' title='Log In'></i> <span class='menu-text'>Log In</span></div></a></li></ul>
</div>
</div>

<div id="topspacer"></div>

<!--<div style="background-color:#f3a48b; color:#fff; padding:10px;">Emoncms.org will be offline between 9:45am and 10:45am today, see <a href="https://community.openenergymonitor.org/t/emoncms-org-downtime-tomorrow-17th-october/5371">forum thread</a></div>-->


<div class="container">

<script type="text/javascript" src="https://emoncms.org/Modules/user/user.js"></script>

<style>

h2 {
color:#fff;
}

input[type=text] {
background-color:#555;
font-size:16px;
color:#fff;
border:1px #888 solid;
}

input[type=password] {
background-color:#555;
font-size:16px;
color:#fff;
border:1px #888 solid;
}

p {
color:#ccc;
font-size:18px;
line-height:22px;
}

h1 {
font-size:52px;
color:#fff;
}

h2 a {
color:#fff;
}

h2 a:hover {
text-decoration:none;
color:#ccc;
}

.a2 a {
color:#fff;
}

.a2 a:hover {
text-decoration:none;
color:#ccc;
}


</style>
<br><br>
<div class="row-fluid">
<div class="span6" style="padding:20px;">

<h1>Emoncms<span style="color:#888">.org</span></h1><br>
<p style="color:#ccc; font-size:18px; line-height:22px" >Emoncms is a powerful open-source web-app for processing, logging and visualising energy, temperature and other environmental data.</p>
<p><span style="color:#666">Part of the <a href="https://openenergymonitor.org">OpenEnergyMonitor.org</a> project.</span></p>

<img src="https://emoncms.org/Modules/site/emoncms_front.png" />
</div>

<div class="span6" style="padding:20px;">

<br><br>
<div id="login-form" class="well" style="text-align:left; background-color:rgba(255,255,255,0.1); border:0;">
<p style="color:#fff">
Emoncms.org Login<hr style="margin:0px;">
</p>

<p class="register-item" style="display:none; color:#fff; font-size:14px">Before creating an account please read:<br><a href="https://emoncms.org/site/usage">Posting to emoncms.org</a></p>

<p style="color:#fff">
Username:<br/>
<input type="text" tabindex="1" name="username" style="width:94%"/>
</p>

<p class="register-item" style="display:none; color:#fff">
Email: <input type="text" name="email" style="width:94%" tabindex="2"/>
</p>

<p style="color:#fff">
Password:<br/>
<input type="password" tabindex="3" name="password" style="width:94%"/>
</p>

<p class="register-item" style="display:none; color:#fff">
Confirm password:<br/>
<input type="password" name="confirm-password" style="width:94%" tabindex="4"/>
</p>

<div id="error" class="alert alert-error" style="display:none;"></div>

<p class="login-item" style="color:#aaa">

<label class="checkbox"><input type="checkbox" tabindex="5" id="rememberme" value="1" name="rememberme"> Remember me</label><br /> <button id="login" class="btn btn-primary" tabindex="6" type="button">Login</button>
 or <a id="register-link" href="#">register</a> </p>

<p class="register-item" style="display:none; color:#aaa">
<button id="register" class="btn btn-primary" type="button">Register</button>  or  <a id="cancel-link" href="#">cancel</a>
</p>

<p class="login-item"><a id="passwordreset-link" href="#" style="color:#fff; font-size:14px"><i class="icon-question-sign icon-white"></i> Forgotten password</a></p>

<div id="passwordreset-block" style="display:none">
<hr>
<div id="passwordreset-message"></div>
<div id="passwordreset-input">
<p style="color:#888; font-size:12px">Enter account name:</p>
<input id="passwordreset-username" type="text" /><br>
<p style="color:#888; font-size:12px">Enter account email address:</p>
<input id="passwordreset-email" type="text" /><br>
<button id="passwordreset-submit" class="btn">Submit</button>
</div>

</div>

</div>

<div style="float:right;">
<div style="display:inline">
<a href="https://play.google.com/store/apps/details?id=org.emoncms.myapps"><img alt="Get it on Google Play" src="https://emoncms.org/Modules/site/en-play-badge.png" /></a>
<a href="https://itunes.apple.com/us/app/emoncms/id1169483587?ls=1&mt=8"><img alt="Download on the App Store" src="https://emoncms.org/Modules/site/appstore.png" /></a>
</div>
</div>

</div>
</div>

<div class="row-fluid">
<div class="span12" style="padding:20px;">
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/book.png" style="width:42px;" /> Docs</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">Documentation for how to install, upgrade, use and backup emoncms is available on the emoncms github repository.</a></p>
</div>
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/GitHub-Mark-Light-64px.png" style="width:42px;" /> Github</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">We believe open source is a better way of doing things. Emoncms is available under the GPL Affero licence (AGPL).</a></p>
</div>
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/emonpi.png" style="width:42px;" /> Install</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">Install emoncms on a RaspberryPi, home computer or web server. With emoncms you can have full control of your data.</a></p>
</div>
</div>
</div>

<div class="row-fluid">
<div class="span12" style="padding:20px; text-align:center">
<a href="https://github.com/emoncms/emoncms" style="color:#888; font-size:18px">https://github.com/emoncms/emoncms</a>
</div>
</div>

<script>

$(".hero-unit").css("background-color","#222");
$("body").css("background-color","#222");

$(window).ready(function(){
$("#footer").css('background-color','#181818');
$("#footer").css('color','#999');
});

var path = "https://emoncms.org/";
var register_open = false;
var passwordreset = "1";

if (!passwordreset) $("#passwordreset-link").hide();

$("#passwordreset-link").click(function(){
$("#passwordreset-block").show();
$("#passwordreset-input").show();
$("#passwordreset-message").html("");
});

$("#passwordreset-submit").click(function(){
var username = $("#passwordreset-username").val();
var email = $("#passwordreset-email").val();

if (email=="" || username=="") {
alert("Please enter username and email address");
} else {
var result = user.passwordreset(username,email);
if (result.success==true) {
$("#passwordreset-message").html("<div class='alert alert-success'>"+result.message+"</div>");
$("#passwordreset-input").hide();
} else {
$("#passwordreset-message").html("<div class='alert alert-error'>"+result.message+"</div>");
}
}
});

$("#register-link").click(function(){
$(".login-item").hide();
$(".register-item").show();
$("#error").hide();
register_open = true;
return false;
});

$("#cancel-link").click(function(){
$(".login-item").show();
$(".register-item").hide();
$("#error").hide();
register_open = false;
return false;
});

$("input").keypress(function(event) {
//login or register when pressing enter
if (event.which == 13) {
event.preventDefault();
if ( register_open ) {
register();
} else {
login();
}
}
});

function login(){
var username = $("input[name='username']").val();
var password = $("input[name='password']").val();
var rememberme = 0; if ($("#rememberme").is(":checked")) rememberme = 1;

var result = user.login(username,password,rememberme);

if (result.success)
{
if (result.startingpage==undefined || result.startingpage=="") result.startingpage = "feed/list";
window.location.href = path+result.startingpage;
}
else
{
$("#error").html(result.message).show();
}
}

function register(){
var username = $("input[name='username']").val();
var password = $("input[name='password']").val();
var confirmpassword = $("input[name='confirm-password']").val();
var email = $("input[name='email']").val();

if (password != confirmpassword)
{
$("#error").html("Passwords do not match").show();
}
else
{
var result = user.register(username,password,email);

if (result.success)
{
var result = user.login(username,password);
if (result.success)
{
window.location.href = path+"user/view";
}
}
else
{
$("#error").html(result.message).show();
}
}
}

$("#login").click(login);
$("#register").click(register);


</script>
</div>

<div style="clear:both; height:60px;"></div>
</div>

<div id="footer">
Powered by <a href="http://openenergymonitor.org">openenergymonitor.org</a>
<span></span>
</div>
<script type="text/javascript" src="https://emoncms.org/Lib/bootstrap/js/bootstrap.js"></script>
</body>
</html>
 

 

 

 

--edit-- and just for completeness i got one of these (but seems to be a transient error given we are sending to emoncms every 15 seconds...)

2017-12-07 18:54:56 - EmonCMS Send Error: The request timed out 

Link to comment
Share on other sites

  • 3 weeks later...

Ok, i updated to stretch and latest mono as per install document (i just copied my nodelink and rc.local across :-) )

 

The Error has disappeared from the log but emoncms is still not getting data, i turned on verbose emoncms loggins and got the following:

(collapsed text because pages of text are annoying)

 

 

 

2017-12-07 18:43:36 - GEM: n=01000029&m=1074321&wh_1=131139.03&p_1=48&a_1=1.44&wh_2=112218.75&p_2=5&a_2=.36&wh_3=9887.50&p_3=5154&a_3=44.22&wh_4=68643.45&p_4=41&a_4=.54&wh_5=43773.53&p_5=43&a_5=.76&wh_6=108197.52&p_6=5&a_6=.10&wh_7=77621.77&p_7=105&a_7=.94&wh_8=128802.46&p_8=222&a_8=2.56&wh_9=128395.20&p_9=2&a_9=0.08&wh_10=161812.10&p_10=63&a_10=.78&wh_11=156274.06&p_11=51&a_11=.48&wh_12=112813.99&p_12=1&a_12=0&wh_13=.00&p_13=0&a_13=0.08&wh_14=.00&p_14=0&a_14=0&wh_15=78110.51&p_15=3&a_15=0&wh_16=42158.98&p_16=0&a_16=.12&wh_17=303.88&p_17=0&a_17=.18&wh_18=17105.88&p_18=57&a_18=.72&wh_19=121481.30&p_19=4&a_19=.12&wh_20=151127.88&p_20=1&a_20=0&wh_21=48162.54&p_21=0&a_21=.14&wh_22=13175.45&p_22=0&a_22=0.08&wh_23=73400.44&p_23=0&a_23=0.08&wh_24=44150.12&p_24=74&a_24=.86&wh_25=976.98&p_25=0&a_25=0&wh_26=.00&p_26=0&a_26=0&wh_27=54933.33&p_27=2&a_27=0.08&wh_28=75506.25&p_28=113&a_28=1.26&wh_29=112939.93&p_29=501&a_29=4.70&wh_30=5478.80&p_30=203&a_30=1.88&wh_31=57569.72&p_31=46&a_31=.50&wh_32=.00&p_32=0&a_32=0&v=120.1 [gem]
2017-12-07 18:43:37 - EmonCMS Send: http://emoncms.org
2017-12-07 18:43:37 - EmonCMS Response: <!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Emoncms - site home </title>
<link rel="shortcut icon" href="https://emoncms.org/Theme/basic/favicon.png" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-startup-image" href="https://emoncms.org/Theme/basic/ios_load.png">
<link rel="apple-touch-icon" href="https://emoncms.org/Theme/basic/logo_normal.png">
<!--<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="https://emoncms.org/Lib/bootstrap-datetimepicker-0.0.11/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
-->
<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap-combined.min.css" rel="stylesheet">

<link href="https://emoncms.org/Theme/basic/emon-standard.css" rel="stylesheet">

<script type="text/javascript" src="https://emoncms.org/Lib/jquery-1.11.3.min.js"></script>
</head>
<body>
<div id="wrap">

<div id="emoncms-navbar" class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<style>
@media (max-width: 1200px){
.menu-text {
display: none !important;
}
}
@media (max-width: 480px){
.menu-dashboard {
display: none !important;
}
}

@media (max-width: 320px){
.menu-extra {
display: none !important;
}
}
</style>

<ul class="nav">
<li class='active menu-left'><a href="https://emoncms.org/site/home"><div style='display: inline'> <img style='margin-top: -4px;' id='emoncms-logo' src='https://emoncms.org/Theme/emoncms-logo.png' /></div></a></li></ul>
<ul class="nav pull-right">
<li class=' menu-right'><a href="https://emoncms.org/site/api#input"><div style='display: inline'> API</div></a></li><li class=' menu-right'><a href="https://emoncms.org/user/login"><div style='display: inline'><i class='icon-home icon-white' title='Log In'></i> <span class='menu-text'>Log In</span></div></a></li></ul>
</div>
</div>

<div id="topspacer"></div>

<!--<div style="background-color:#f3a48b; color:#fff; padding:10px;">Emoncms.org will be offline between 9:45am and 10:45am today, see <a href="https://community.openenergymonitor.org/t/emoncms-org-downtime-tomorrow-17th-october/5371">forum thread</a></div>-->


<div class="container">

<script type="text/javascript" src="https://emoncms.org/Modules/user/user.js"></script>

<style>

h2 {
color:#fff;
}

input[type=text] {
background-color:#555;
font-size:16px;
color:#fff;
border:1px #888 solid;
}

input[type=password] {
background-color:#555;
font-size:16px;
color:#fff;
border:1px #888 solid;
}

p {
color:#ccc;
font-size:18px;
line-height:22px;
}

h1 {
font-size:52px;
color:#fff;
}

h2 a {
color:#fff;
}

h2 a:hover {
text-decoration:none;
color:#ccc;
}

.a2 a {
color:#fff;
}

.a2 a:hover {
text-decoration:none;
color:#ccc;
}


</style>
<br><br>
<div class="row-fluid">
<div class="span6" style="padding:20px;">

<h1>Emoncms<span style="color:#888">.org</span></h1><br>
<p style="color:#ccc; font-size:18px; line-height:22px" >Emoncms is a powerful open-source web-app for processing, logging and visualising energy, temperature and other environmental data.</p>
<p><span style="color:#666">Part of the <a href="https://openenergymonitor.org">OpenEnergyMonitor.org</a> project.</span></p>

<img src="https://emoncms.org/Modules/site/emoncms_front.png" />
</div>

<div class="span6" style="padding:20px;">

<br><br>
<div id="login-form" class="well" style="text-align:left; background-color:rgba(255,255,255,0.1); border:0;">
<p style="color:#fff">
Emoncms.org Login<hr style="margin:0px;">
</p>

<p class="register-item" style="display:none; color:#fff; font-size:14px">Before creating an account please read:<br><a href="https://emoncms.org/site/usage">Posting to emoncms.org</a></p>

<p style="color:#fff">
Username:<br/>
<input type="text" tabindex="1" name="username" style="width:94%"/>
</p>

<p class="register-item" style="display:none; color:#fff">
Email: <input type="text" name="email" style="width:94%" tabindex="2"/>
</p>

<p style="color:#fff">
Password:<br/>
<input type="password" tabindex="3" name="password" style="width:94%"/>
</p>

<p class="register-item" style="display:none; color:#fff">
Confirm password:<br/>
<input type="password" name="confirm-password" style="width:94%" tabindex="4"/>
</p>

<div id="error" class="alert alert-error" style="display:none;"></div>

<p class="login-item" style="color:#aaa">

<label class="checkbox"><input type="checkbox" tabindex="5" id="rememberme" value="1" name="rememberme"> Remember me</label><br /> <button id="login" class="btn btn-primary" tabindex="6" type="button">Login</button>
 or <a id="register-link" href="#">register</a> </p>

<p class="register-item" style="display:none; color:#aaa">
<button id="register" class="btn btn-primary" type="button">Register</button>  or  <a id="cancel-link" href="#">cancel</a>
</p>

<p class="login-item"><a id="passwordreset-link" href="#" style="color:#fff; font-size:14px"><i class="icon-question-sign icon-white"></i> Forgotten password</a></p>

<div id="passwordreset-block" style="display:none">
<hr>
<div id="passwordreset-message"></div>
<div id="passwordreset-input">
<p style="color:#888; font-size:12px">Enter account name:</p>
<input id="passwordreset-username" type="text" /><br>
<p style="color:#888; font-size:12px">Enter account email address:</p>
<input id="passwordreset-email" type="text" /><br>
<button id="passwordreset-submit" class="btn">Submit</button>
</div>

</div>

</div>

<div style="float:right;">
<div style="display:inline">
<a href="https://play.google.com/store/apps/details?id=org.emoncms.myapps"><img alt="Get it on Google Play" src="https://emoncms.org/Modules/site/en-play-badge.png" /></a>
<a href="https://itunes.apple.com/us/app/emoncms/id1169483587?ls=1&mt=8"><img alt="Download on the App Store" src="https://emoncms.org/Modules/site/appstore.png" /></a>
</div>
</div>

</div>
</div>

<div class="row-fluid">
<div class="span12" style="padding:20px;">
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/book.png" style="width:42px;" /> Docs</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">Documentation for how to install, upgrade, use and backup emoncms is available on the emoncms github repository.</a></p>
</div>
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/GitHub-Mark-Light-64px.png" style="width:42px;" /> Github</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">We believe open source is a better way of doing things. Emoncms is available under the GPL Affero licence (AGPL).</a></p>
</div>
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/emonpi.png" style="width:42px;" /> Install</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">Install emoncms on a RaspberryPi, home computer or web server. With emoncms you can have full control of your data.</a></p>
</div>
</div>
</div>

<div class="row-fluid">
<div class="span12" style="padding:20px; text-align:center">
<a href="https://github.com/emoncms/emoncms" style="color:#888; font-size:18px">https://github.com/emoncms/emoncms</a>
</div>
</div>

<script>

$(".hero-unit").css("background-color","#222");
$("body").css("background-color","#222");

$(window).ready(function(){
$("#footer").css('background-color','#181818');
$("#footer").css('color','#999');
});

var path = "https://emoncms.org/";
var register_open = false;
var passwordreset = "1";

if (!passwordreset) $("#passwordreset-link").hide();

$("#passwordreset-link").click(function(){
$("#passwordreset-block").show();
$("#passwordreset-input").show();
$("#passwordreset-message").html("");
});

$("#passwordreset-submit").click(function(){
var username = $("#passwordreset-username").val();
var email = $("#passwordreset-email").val();

if (email=="" || username=="") {
alert("Please enter username and email address");
} else {
var result = user.passwordreset(username,email);
if (result.success==true) {
$("#passwordreset-message").html("<div class='alert alert-success'>"+result.message+"</div>");
$("#passwordreset-input").hide();
} else {
$("#passwordreset-message").html("<div class='alert alert-error'>"+result.message+"</div>");
}
}
});

$("#register-link").click(function(){
$(".login-item").hide();
$(".register-item").show();
$("#error").hide();
register_open = true;
return false;
});

$("#cancel-link").click(function(){
$(".login-item").show();
$(".register-item").hide();
$("#error").hide();
register_open = false;
return false;
});

$("input").keypress(function(event) {
//login or register when pressing enter
if (event.which == 13) {
event.preventDefault();
if ( register_open ) {
register();
} else {
login();
}
}
});

function login(){
var username = $("input[name='username']").val();
var password = $("input[name='password']").val();
var rememberme = 0; if ($("#rememberme").is(":checked")) rememberme = 1;

var result = user.login(username,password,rememberme);

if (result.success)
{
if (result.startingpage==undefined || result.startingpage=="") result.startingpage = "feed/list";
window.location.href = path+result.startingpage;
}
else
{
$("#error").html(result.message).show();
}
}

function register(){
var username = $("input[name='username']").val();
var password = $("input[name='password']").val();
var confirmpassword = $("input[name='confirm-password']").val();
var email = $("input[name='email']").val();

if (password != confirmpassword)
{
$("#error").html("Passwords do not match").show();
}
else
{
var result = user.register(username,password,email);

if (result.success)
{
var result = user.login(username,password);
if (result.success)
{
window.location.href = path+"user/view";
}
}
else
{
$("#error").html(result.message).show();
}
}
}

$("#login").click(login);
$("#register").click(register);


</script>
</div>

<div style="clear:both; height:60px;"></div>
</div>

<div id="footer">
Powered by <a href="http://openenergymonitor.org">openenergymonitor.org</a>
<span></span>
</div>
<script type="text/javascript" src="https://emoncms.org/Lib/bootstrap/js/bootstrap.js"></script>
</body>
</html>

2017-12-07 18:43:51 - GEM: n=01000029&m=1074321&wh_1=131139.27&p_1=54&a_1=1.44&wh_2=112218.76&p_2=5&a_2=.36&wh_3=9909.01&p_3=5152&a_3=44.20&wh_4=68643.62&p_4=41&a_4=.54&wh_5=43773.71&p_5=44&a_5=.76&wh_6=108197.54&p_6=3&a_6=0.08&wh_7=77622.21&p_7=105&a_7=.94&wh_8=128803.38&p_8=223&a_8=2.56&wh_9=128395.21&p_9=2&a_9=0.08&wh_10=161812.37&p_10=63&a_10=.78&wh_11=156274.28&p_11=52&a_11=.50&wh_12=112813.99&p_12=1&a_12=0&wh_13=.00&p_13=0&a_13=0&wh_14=.00&p_14=0&a_14=0&wh_15=78110.52&p_15=2&a_15=0.08&wh_16=42158.98&p_16=0&a_16=.16&wh_17=303.88&p_17=1&a_17=.18&wh_18=17106.12&p_18=57&a_18=.72&wh_19=121481.31&p_19=3&a_19=.12&wh_20=151127.88&p_20=0&a_20=0&wh_21=48162.54&p_21=0&a_21=.12&wh_22=13175.45&p_22=0&a_22=0.08&wh_23=73400.44&p_23=0&a_23=0.08&wh_24=44150.43&p_24=75&a_24=.88&wh_25=976.98&p_25=0&a_25=0&wh_26=.00&p_26=0&a_26=0&wh_27=54933.34&p_27=2&a_27=0.08&wh_28=75506.72&p_28=114&a_28=1.26&wh_29=112942.03&p_29=499&a_29=4.68&wh_30=5479.60&p_30=177&a_30=1.64&wh_31=57569.92&p_31=46&a_31=.50&wh_32=.00&p_32=0&a_32=0.08&v=119.5 [gem]
2017-12-07 18:43:52 - EmonCMS Send: http://emoncms.org
2017-12-07 18:43:52 - EmonCMS Response: <!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Emoncms - site home </title>
<link rel="shortcut icon" href="https://emoncms.org/Theme/basic/favicon.png" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-startup-image" href="https://emoncms.org/Theme/basic/ios_load.png">
<link rel="apple-touch-icon" href="https://emoncms.org/Theme/basic/logo_normal.png">
<!--<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="https://emoncms.org/Lib/bootstrap-datetimepicker-0.0.11/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
-->
<link href="https://emoncms.org/Lib/bootstrap/css/bootstrap-combined.min.css" rel="stylesheet">

<link href="https://emoncms.org/Theme/basic/emon-standard.css" rel="stylesheet">

<script type="text/javascript" src="https://emoncms.org/Lib/jquery-1.11.3.min.js"></script>
</head>
<body>
<div id="wrap">

<div id="emoncms-navbar" class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<style>
@media (max-width: 1200px){
.menu-text {
display: none !important;
}
}
@media (max-width: 480px){
.menu-dashboard {
display: none !important;
}
}

@media (max-width: 320px){
.menu-extra {
display: none !important;
}
}
</style>

<ul class="nav">
<li class='active menu-left'><a href="https://emoncms.org/site/home"><div style='display: inline'> <img style='margin-top: -4px;' id='emoncms-logo' src='https://emoncms.org/Theme/emoncms-logo.png' /></div></a></li></ul>
<ul class="nav pull-right">
<li class=' menu-right'><a href="https://emoncms.org/site/api#input"><div style='display: inline'> API</div></a></li><li class=' menu-right'><a href="https://emoncms.org/user/login"><div style='display: inline'><i class='icon-home icon-white' title='Log In'></i> <span class='menu-text'>Log In</span></div></a></li></ul>
</div>
</div>

<div id="topspacer"></div>

<!--<div style="background-color:#f3a48b; color:#fff; padding:10px;">Emoncms.org will be offline between 9:45am and 10:45am today, see <a href="https://community.openenergymonitor.org/t/emoncms-org-downtime-tomorrow-17th-october/5371">forum thread</a></div>-->


<div class="container">

<script type="text/javascript" src="https://emoncms.org/Modules/user/user.js"></script>

<style>

h2 {
color:#fff;
}

input[type=text] {
background-color:#555;
font-size:16px;
color:#fff;
border:1px #888 solid;
}

input[type=password] {
background-color:#555;
font-size:16px;
color:#fff;
border:1px #888 solid;
}

p {
color:#ccc;
font-size:18px;
line-height:22px;
}

h1 {
font-size:52px;
color:#fff;
}

h2 a {
color:#fff;
}

h2 a:hover {
text-decoration:none;
color:#ccc;
}

.a2 a {
color:#fff;
}

.a2 a:hover {
text-decoration:none;
color:#ccc;
}


</style>
<br><br>
<div class="row-fluid">
<div class="span6" style="padding:20px;">

<h1>Emoncms<span style="color:#888">.org</span></h1><br>
<p style="color:#ccc; font-size:18px; line-height:22px" >Emoncms is a powerful open-source web-app for processing, logging and visualising energy, temperature and other environmental data.</p>
<p><span style="color:#666">Part of the <a href="https://openenergymonitor.org">OpenEnergyMonitor.org</a> project.</span></p>

<img src="https://emoncms.org/Modules/site/emoncms_front.png" />
</div>

<div class="span6" style="padding:20px;">

<br><br>
<div id="login-form" class="well" style="text-align:left; background-color:rgba(255,255,255,0.1); border:0;">
<p style="color:#fff">
Emoncms.org Login<hr style="margin:0px;">
</p>

<p class="register-item" style="display:none; color:#fff; font-size:14px">Before creating an account please read:<br><a href="https://emoncms.org/site/usage">Posting to emoncms.org</a></p>

<p style="color:#fff">
Username:<br/>
<input type="text" tabindex="1" name="username" style="width:94%"/>
</p>

<p class="register-item" style="display:none; color:#fff">
Email: <input type="text" name="email" style="width:94%" tabindex="2"/>
</p>

<p style="color:#fff">
Password:<br/>
<input type="password" tabindex="3" name="password" style="width:94%"/>
</p>

<p class="register-item" style="display:none; color:#fff">
Confirm password:<br/>
<input type="password" name="confirm-password" style="width:94%" tabindex="4"/>
</p>

<div id="error" class="alert alert-error" style="display:none;"></div>

<p class="login-item" style="color:#aaa">

<label class="checkbox"><input type="checkbox" tabindex="5" id="rememberme" value="1" name="rememberme"> Remember me</label><br /> <button id="login" class="btn btn-primary" tabindex="6" type="button">Login</button>
 or <a id="register-link" href="#">register</a> </p>

<p class="register-item" style="display:none; color:#aaa">
<button id="register" class="btn btn-primary" type="button">Register</button>  or  <a id="cancel-link" href="#">cancel</a>
</p>

<p class="login-item"><a id="passwordreset-link" href="#" style="color:#fff; font-size:14px"><i class="icon-question-sign icon-white"></i> Forgotten password</a></p>

<div id="passwordreset-block" style="display:none">
<hr>
<div id="passwordreset-message"></div>
<div id="passwordreset-input">
<p style="color:#888; font-size:12px">Enter account name:</p>
<input id="passwordreset-username" type="text" /><br>
<p style="color:#888; font-size:12px">Enter account email address:</p>
<input id="passwordreset-email" type="text" /><br>
<button id="passwordreset-submit" class="btn">Submit</button>
</div>

</div>

</div>

<div style="float:right;">
<div style="display:inline">
<a href="https://play.google.com/store/apps/details?id=org.emoncms.myapps"><img alt="Get it on Google Play" src="https://emoncms.org/Modules/site/en-play-badge.png" /></a>
<a href="https://itunes.apple.com/us/app/emoncms/id1169483587?ls=1&mt=8"><img alt="Download on the App Store" src="https://emoncms.org/Modules/site/appstore.png" /></a>
</div>
</div>

</div>
</div>

<div class="row-fluid">
<div class="span12" style="padding:20px;">
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/book.png" style="width:42px;" /> Docs</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">Documentation for how to install, upgrade, use and backup emoncms is available on the emoncms github repository.</a></p>
</div>
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/GitHub-Mark-Light-64px.png" style="width:42px;" /> Github</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">We believe open source is a better way of doing things. Emoncms is available under the GPL Affero licence (AGPL).</a></p>
</div>
<div class="span4 blink">
<h2><img src="https://emoncms.org/Modules/site/emonpi.png" style="width:42px;" /> Install</h2>
<p class="a2"><a href="https://github.com/emoncms/emoncms">Install emoncms on a RaspberryPi, home computer or web server. With emoncms you can have full control of your data.</a></p>
</div>
</div>
</div>

<div class="row-fluid">
<div class="span12" style="padding:20px; text-align:center">
<a href="https://github.com/emoncms/emoncms" style="color:#888; font-size:18px">https://github.com/emoncms/emoncms</a>
</div>
</div>

<script>

$(".hero-unit").css("background-color","#222");
$("body").css("background-color","#222");

$(window).ready(function(){
$("#footer").css('background-color','#181818');
$("#footer").css('color','#999');
});

var path = "https://emoncms.org/";
var register_open = false;
var passwordreset = "1";

if (!passwordreset) $("#passwordreset-link").hide();

$("#passwordreset-link").click(function(){
$("#passwordreset-block").show();
$("#passwordreset-input").show();
$("#passwordreset-message").html("");
});

$("#passwordreset-submit").click(function(){
var username = $("#passwordreset-username").val();
var email = $("#passwordreset-email").val();

if (email=="" || username=="") {
alert("Please enter username and email address");
} else {
var result = user.passwordreset(username,email);
if (result.success==true) {
$("#passwordreset-message").html("<div class='alert alert-success'>"+result.message+"</div>");
$("#passwordreset-input").hide();
} else {
$("#passwordreset-message").html("<div class='alert alert-error'>"+result.message+"</div>");
}
}
});

$("#register-link").click(function(){
$(".login-item").hide();
$(".register-item").show();
$("#error").hide();
register_open = true;
return false;
});

$("#cancel-link").click(function(){
$(".login-item").show();
$(".register-item").hide();
$("#error").hide();
register_open = false;
return false;
});

$("input").keypress(function(event) {
//login or register when pressing enter
if (event.which == 13) {
event.preventDefault();
if ( register_open ) {
register();
} else {
login();
}
}
});

function login(){
var username = $("input[name='username']").val();
var password = $("input[name='password']").val();
var rememberme = 0; if ($("#rememberme").is(":checked")) rememberme = 1;

var result = user.login(username,password,rememberme);

if (result.success)
{
if (result.startingpage==undefined || result.startingpage=="") result.startingpage = "feed/list";
window.location.href = path+result.startingpage;
}
else
{
$("#error").html(result.message).show();
}
}

function register(){
var username = $("input[name='username']").val();
var password = $("input[name='password']").val();
var confirmpassword = $("input[name='confirm-password']").val();
var email = $("input[name='email']").val();

if (password != confirmpassword)
{
$("#error").html("Passwords do not match").show();
}
else
{
var result = user.register(username,password,email);

if (result.success)
{
var result = user.login(username,password);
if (result.success)
{
window.location.href = path+"user/view";
}
}
else
{
$("#error").html(result.message).show();
}
}
}

$("#login").click(login);
$("#register").click(register);


</script>
</div>

<div style="clear:both; height:60px;"></div>
</div>

<div id="footer">
Powered by <a href="http://openenergymonitor.org">openenergymonitor.org</a>
<span></span>
</div>
<script type="text/javascript" src="https://emoncms.org/Lib/bootstrap/js/bootstrap.js"></script>
</body>
</html>
 

 

 

 

--edit-- and just for completeness i got one of these (but seems to be a transient error given we are sending to emoncms every 15 seconds...)

2017-12-07 18:54:56 - EmonCMS Send Error: The request timed out 

 

 

Fixed in 0.8.5

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...