@mickym
ok, it came back...
So I'm going to see for the node
@mickym
ok, it came back...
So I'm going to see for the node
@mickym
I'll try it later.
Problem is that my "pallette" disappear so I can't have access to ne different node...
I'm searching the problem
@mickym
I'm trying to do.
But, Once I'd upgrade Node-red, Pallette is not shown as before to install or remove some node...
Do you know how to have it back?
can you inform me about the price? and if it's paid once or yearly?
thanks a lot.
@mickym
Hello Mickym,
as I'm using your node in node red.
Today I'd change a name of a node for Alexa, and now I've message under the node "Device limit Reached"
As it was juste to change the name and as I had already change some name, I supposed that the old name stay somewhere but I didn't find where.
In My Alexa accounet I'd deleted everything but still same problem and know only 7 node are connected, all the reste have the same message "Device limit reached"
In total I've about 34node with different name.
Can you help me to solve this?
Thanks a lot.
@asgothian said in Script and Telegram:
generates a trigger which remains in memory as written once the "condition" has been true once. As such it will parse the response to the telegram message until you terminate the script.
Dear,
thanks for your answer.
I understood that I din't end the script once the condition is true, for that no problem.
But I ddn't understand your proposal.
In the code you wrote it's the same as mine, and I didn't understand what I've to do, just that you mentionned to write on the variable "MAIN" the text send by Telegram.
There is no command to exit a script once on of the conditions are true?
Presently, it works but without the first Menu, If y send the text corresponding to an action, Iobroker send me back all the differents objet that I would like to light-on,-off or open/close.
But I thing that in some case, Iobroker send always the command to my blind, as If I ask to Alexa to open the blind that was closed by Telegram... is start to open and after some seconds motor change is rotation and the blind stay closed.
It's difficult to explain exactly my problem so I understand that it is difficult to help me...
Tiger
dear Iobrokers,
I'm trying to command from Telegram.
I'd made 4 scripts thaht allow me to :
In the beginning of each script I send to Telegram a keybord to choose the action to made
sendTo('telegram.0', {
text: 'Que voulez-vous faire ?',
reply_markup: {
keyboard: [
['Allumer/Eteindre'],
['Ouvrir'],
['Fermer'],
['Température']
],
resize_keyboard: true,
one_time_keyboard: true
}
});
And after, following the choice... I send what I wanted to do with another keyboard.
Everything works individually, but once I made the choice of 1 action, the script stay in this action and I can't go back to the first menu.
I tryed to exit script but nothing...
I can add a button on the keybord to exit or restart the script already made but I don't know how to do it.
some screen capture here under :
the different scripts :
And how it's in one script (each time the same), the only things, I've put in javascript to be more easy for you, but this is in blockly.
var action, Allumer;
// Décrivez cette fonction...
async function Choix_action() {
sendTo('telegram.0', {
text: 'Que voulez-vous faire ?',
reply_markup: {
keyboard: [
['Allumer/Eteindre'],
['Ouvrir'],
['Fermer'],
['Température']
],
resize_keyboard: true,
one_time_keyboard: true
}
});
}
// Décrivez cette fonction...
async function Choix_allumer() {
sendTo('telegram.0', {
text: 'Que voulez-vous allumer ?',
reply_markup: {
keyboard: [
['Salon','SAM','Cuisine','Table cuisine'],
['Meuble cuisine','Evier','Fauteuil','Mur télé'],
['Buanderie','Bureau','Hall','Escalier'],
['Devant','Terrasse','Ext Buanderie','HDN'],
['Salle de jeux','Chambre papa','Chambre Manon','Chambre Hugo'],
['Salle de bain','Miroir','Toilettes','Quitter']
],
resize_keyboard: true,
one_time_keyboard: true
}
});
}
// Décrivez cette fonction...
async function quitter() {
}
await Choix_action();
on({id: [].concat(['telegram.0.communicate.request']), change: "any"}, async function (obj) {
var value = obj.state.val;
var oldValue = obj.oldState.val;
action = (obj.state ? obj.state.val : "").slice(8, (obj.state ? obj.state.val : "").lastIndexOf('') + 1);
if (action == 'Allumer/Eteindre') {
await Choix_allumer();
on({id: [].concat(['telegram.0.communicate.request']), change: "any"}, async function (obj) {
var value = obj.state.val;
var oldValue = obj.oldState.val;
Allumer = (obj.state ? obj.state.val : "").slice(8, (obj.state ? obj.state.val : "").lastIndexOf('') + 1);
if (Allumer == 'Salon') {
setStateDelayed('s7.0.DBs.DB1.INT_Salon', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'SAM') {
setStateDelayed('s7.0.DBs.DB1.INT_SAM', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Cuisine') {
setStateDelayed('s7.0.DBs.DB1.INT_cuisine_principa', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Table cuisine') {
setStateDelayed('s7.0.DBs.DB1.INT_Cuisine_Table', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Meuble cuisine') {
setStateDelayed('s7.0.DBs.DB1.INT_cuisine_meuble', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Evier') {
setStateDelayed('s7.0.DBs.DB1.INT_Cuisine_Evier', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Fauteuil') {
setStateDelayed('s7.0.DBs.DB1.INT_Applique', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Mur télé') {
setStateDelayed('s7.0.DBs.DB1.INT_Applique_direct', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Buanderie') {
setStateDelayed('s7.0.DBs.DB1.INT_Buanderie', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Bureau') {
setStateDelayed('s7.0.DBs.DB1.INT_Bureau', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Hall') {
setStateDelayed('s7.0.DBs.DB1.INT_Hall_bas', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Escalier') {
setStateDelayed('s7.0.DBs.DB1.INT_Escalier', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Devant') {
setStateDelayed('s7.0.DBs.DB1.INT_Ext_dvt', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Terrasse') {
setStateDelayed('s7.0.DBs.DB1.Ext_terrasse', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Ext Buanderie') {
setStateDelayed('s7.0.DBs.DB1.INT_Ext_buanderie', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'HDN') {
setStateDelayed('s7.0.DBs.DB1.INT_HDN_Haut', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Salle de jeux') {
setStateDelayed('s7.0.DBs.DB1.INT_SDJ', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Chambre papa') {
setStateDelayed('s7.0.DBs.DB1.INT_Papa', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Chambre Manon') {
setStateDelayed('s7.0.DBs.DB1.INT_Manon', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Chambre Hugo') {
setStateDelayed('s7.0.DBs.DB1.INT_Hugo', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Salle de bain') {
setStateDelayed('s7.1.DBs.DB1.INT_SDB', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Miroir') {
setStateDelayed('s7.1.DBs.DB1.INT_Meuble_SDB', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Toilettes') {
setStateDelayed('s7.0.DBs.DB1.INT_WC', true, false, parseInt(((0) || "").toString(), 10), false);
} else if (Allumer == 'Quitter') {
} else {
}
});
console.log(Allumer);
}
});
in pictures :
Thanks for your help.
@homoran
you're right... with PuTTY is more easy...
Very big THANK YOU.
@mickym
ok works without password...strange
Thanks a lot
@homoran
@Thomas-Braun
@mickym
@crunchip
THanks a lot for your help !
My system is completely as before but with all update !!! (just the problem of login in node red)
Last question, to stay up to date, I've only to check if there is update on Iobroker?
As I don't go very often in the page of iobroker, is it possible to send all the update available via notification on vis?
Thanks a lot for all!
Hy,
everything is update...
The only problem is node-red, on the left, when I click On Node-Red icon, I have to login,
But it failed and I don't know why..
Is there another user or password? I out the usernam and password written in the configuration of Node-red
Thanks