Sync live changes

This commit is contained in:
Ben Hardill
2025-08-07 21:15:07 +01:00
parent 623bc18954
commit 7ca99f4b25
5 changed files with 26 additions and 10 deletions

View File

@@ -377,7 +377,7 @@ app.get('/changePassword/:key',function(req, res, next){
if (!error && lostPassword) {
req.login(lostPassword.user, function(err){
if (!err){
lostPassword.remove();
// lostPassword.remove();
res.redirect('/changePassword');
} else {
console.log(err);
@@ -405,6 +405,11 @@ app.post('/changePassword', ensureAuthenticated, function(req, res, next){
u.save(function(error){
if (!error) {
//console.log("Chagned %s's password", u.username);
LostPassword.findOne({user: user._id}).exec(function(e,lp){
if (!e && lp) {
lp.remove()
}
})
res.status(200).send();
} else {
logger.info("Error changing ", u.username, "'s password");
@@ -578,7 +583,13 @@ var onGoingCommands = {};
mqttClient.on('message',function(topic,message){
if (topic.startsWith('response/')){
var payload = JSON.parse(message.toString());
var payload;
try {
payload = JSON.parse(message.toString());
} catch (errr) {
console.log(errr);
return;
}
var waiting = onGoingCommands[payload.messageId];
if (waiting) {
//console.log("mqtt response: " + JSON.stringify(payload,null," "));

View File

@@ -2,7 +2,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="monetization" content="$coil.xrptipbot.com/KZutpQmJRyqRZAK5KGKfug">
<meta name="monetization" content="$ilp.uphold.com/MmrdQJQiKgNX">
<title>Node-RED Alexa Home Skill Bridge</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
@@ -29,7 +29,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Node-RED Alexa Home Skill Bridge</a>
<a class="navbar-brand" href="#">Node-RED Skill for Amazon Alexa Bridge</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">

View File

@@ -10,13 +10,12 @@
<p>If you have a bug with the service please raise an issue on github <a href="https://github.com/hardillb/node-red-alexa-home-skill-web/issues">here</a></p>
<h2>Thanks</h2>
<p>If on the other hand you just want to say thanks, you can always throw a few quid my way to buy me a beer via <a href="https://paypal.me/hardillb/5"><img src="/images/paypal.svg" style="width: 20px; height: 20px;" alt="paypal"> paypal</a></p>
<p>If on the other hand you just want to say thanks, you can always throw a few quid my way to buy me a beer via <a href="https://paypal.me/hardillb/10"><img src="/images/paypal.svg" style="width: 20px; height: 20px;" alt="paypal"> paypal</a></p>
<p>If you are feeling super generous then you could always <a href="https://github.com/sponsors/hardillb">sponsor</a> me on GitHub. For $1 a month
you can help me keep working on these types of projects and keep them free to use.</p>
<h2>Privacy Policy</h2>
<p>No information held by this sevice will be shared with 3rd parties, with the exception of the oAuth
tokens required to link with Amazon's Alexa service.</p>
<p>No information held by this sevice will be shared with 3rd parties</p>
<p>Email addresses will only be used for comunication about the operaton of the service</p>
<p>Logs (including IP addresses) are kept for 30days then deleted to provide data for debugging problems. in rare cases this may be extended to 90 days
a specfic long running issue.</p>

View File

@@ -12,7 +12,7 @@
<div class="container main-content">
<h1>Documentation</h1>
<p>Welcome to the Node-RED Alexa Home Skill Bridge documentation</p>
<p>Welcome to the Node-RED Skill for Amazon Alexa Bridge documentation</p>
<h2 id="createAccount">Create Account</h2>
<p>Before you start the first thing that needs to be done is to create an account on this site.

View File

@@ -1,13 +1,19 @@
<% include ../fragments/header.ejs %>
<div class="container main-content">
<h1>Node-RED Alexa Home Skill Bridge</h1>
<p>This site is the registration point for using the node-red-contrib-alexa-home-skill
<p>This site is the registration point for using the node-red-contrib-alexa-home-skill
<!--
<p style="color: red">Amazon have de-listed the skill for new users at the moment, I am trying to get this fixed, but existing users DO NOT unlink the skill or you will not be able to re-link</p>
-->
<p>This site is the registration point for using the <a herf="https://flows.nodered.org/search?term=node-red-contrib-alexa-home-skill">node-red-contrib-alexa-home-skill</a>
<a href="http://nodered.org">Node-RED</a> module.</p>
<p style="color: green">New and Existing users, please take a moment to read the following <a href="https://blog.hardill.me.uk/2024/09/10/end-of-the-free-ride/">blog post</a></p>
<p>This node and service allows you to create your own "devices" to work with the Amazon Echo's
Home Skill system, giving you voice control over basically anything you can interface
with Node-RED. There is support for not only things like Belkin WeMo and Philps Hue,
but also a whole range of homebrew devices. You can also use Alexa to kick off seqences
but also a whole range of homebrew devices. You can also use Amazon Alexa to kick off seqences
of events not just discrete on/off type actions</p>
<img style="margin-right: auto; margin-left: auto; display: block; max-width: 100%; width: auto;" src="/images/node-red-alexa-small.png"/>