Search found 30 matches

by EricT
Monday 18 June 2018 17:26
Forum: LUA
Topic: LUA Script: Time how much a device is ON
Replies: 22
Views: 14334

Re: LUA Script: Time how much a device is ON

Hi mvzut,

Exellent, thank you very much! :D

Eric
by EricT
Monday 18 June 2018 10:14
Forum: LUA
Topic: LUA Script: Time how much a device is ON
Replies: 22
Views: 14334

Re: LUA Script: Time how much a device is ON

by mvzut » Sunday 17 June 2018 23:13 This has always been the behavior of counters in Domoticz. It shows the daily increment in the dashboard, but I have never found a way to retrieve this number from the device in LUA. Same here, have been searching for it and couldn't find it either. :( I ended ...
by EricT
Friday 15 June 2018 15:25
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: [another one solved] email notification when a user disarmed the alarm

by jvdz » Friday 15 June 2018 14:54

This is now the function i have in my general lua library file. It also limits the retrieval period of the log records to the last 15 seconds:

Thanks Jos!

Eric
by EricT
Thursday 14 June 2018 23:38
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: [another one solved] email notification when a user disarmed the alarm

please be aware that if you move on to a later version the way this is logged will change and therefore you then will need to add &loglevel=2 to the getlog json to get this type of message. Not sure with what version is starts but I know for sure >= V3.9580 I have added it to the earlier posted ...
by EricT
Thursday 14 June 2018 23:11
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: [another one solved] email notification when a user disarmed the alarm

Here it is:

Code: Select all

2018-06-14 23:09:29.822 User: Eric initiated a switch command (52/Activity Main Switch/Off)
by EricT
Thursday 14 June 2018 12:47
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: email notification when a user disarmed the alarm

I have added the email notification and it is working like a charm! :D Tanks again Jos! BTW, I have used the local Raspberry Pi IP address and it issues an email immidiately when the switch is turned On/Off. It is working and I do not know the difference when using http:///127.0.0.1:8080 :( Eric For ...
by EricT
Thursday 14 June 2018 9:48
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: email notification when a user disarmed the alarm

Hi Jos, I have created the Lua libraries as described here: https://www.domoticz.com/wiki/Remote_Co ... _Libraries and it WORKS! :D :D :D I only received the error Error: EventSystem: in name test: [string "..."]:36: attempt to index global 'devicechanged' (a nil value) but changing the Lua type ...
by EricT
Wednesday 13 June 2018 21:30
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: email notification when a user disarmed the alarm

Aah, ok.

Thanks Jos I will have another go at it tomorrow!

Eric
by EricT
Wednesday 13 June 2018 14:10
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: email notification when a user disarmed the alarm

Today I have tried the Lua proposed by Jos but I get the below error:

Code: Select all

 Error: EventSystem: in name test: [string "..."]:3: module 'socket.http' not found:
Am I missing some dependencies?
by EricT
Tuesday 12 June 2018 23:38
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: email notification when a user disarmed the alarm

Wow guys, I am truly impressed.

I did not have the time to read it all, I will have a closer look at it later.

Eric
by EricT
Tuesday 12 June 2018 10:55
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: email notification when a user disarmed the alarm

So nobody knows how to pull the name of the user that has logged in into a Lua? :shock:
by EricT
Tuesday 05 June 2018 9:15
Forum: Utility
Topic: Rename "Usage 1" and "Usage 2"
Replies: 3
Views: 2072

Re: Rename "Usage 1" and "Usage 2"

I came across it when I changed the text of my virtual counter. Before you start making changes it is maybe wise to keep a copy of the original file in case you screw it up like I did. :oops: Edit the language file in the folder: domoticz/www.i18n/. Copy the file to your PC and uncompress it. Use a ...
by EricT
Tuesday 05 June 2018 8:52
Forum: Utility
Topic: [SOLVED] how to change the text of a virtual counter?
Replies: 2
Views: 989

Re: [SOLVED] how to change the text of a virtual counter?

I have located "Verbruik" in the compressed file: domoticz/www.i18n/domoticz-nl.sjon.gz. I have replaced "Verbruik" (line 312 in the compressed file) by "Aantal vandaag" by using a json editor and replaced the original file by the modified file (see attached file for the result).
by EricT
Friday 01 June 2018 10:38
Forum: Utility
Topic: [SOLVED] how to change the text of a virtual counter?
Replies: 2
Views: 989

Re: how to change the text of a virtual counter?

I have located the "Last seen" in the file domoticz/www/css/legacy.css thus I have that fixed. If someone can tell me where "Verbruik" is located it will be very helpfull.
by EricT
Thursday 31 May 2018 23:21
Forum: Utility
Topic: [SOLVED] how to change the text of a virtual counter?
Replies: 2
Views: 989

[SOLVED] how to change the text of a virtual counter?

Hi all,

I want to change the text "Verbruik" and "Last seen" of my virtual counter (See attachment). Can anyone tell me where to edit it?

Thanks,

Eric
by EricT
Wednesday 16 May 2018 13:37
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: email notification when a user disarmed the alarm

Thank you very much for your advice but I only want to make the dashboard available to the users. I have the alarm arm/disarm switch on the Domoticz dashboard available for all users. If one of the users arms or disarms the alarm I want to notify the other users who done it. I currently use a Lua ...
by EricT
Wednesday 16 May 2018 13:08
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: email notification when a user disarmed the alarm

That is exactly my question.

In the log it is visable who made a change thus somehow Domoticz knows who made the change (see attachment). So the question is how to get that name in an email to other users.
by EricT
Wednesday 16 May 2018 12:35
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

Re: email notification when a user disarmed the alarm

I am sorry but maybe I was not clear enough. I can send an email when something is switched on or off, no problem with that. What I am looking for that it mentioned in the email which user has done it, to be more specific name of the user that has logged in and made the change. This email has to be ...
by EricT
Wednesday 16 May 2018 10:55
Forum: LUA
Topic: [another one solved] email notification when a user disarmed the alarm
Replies: 32
Views: 5315

[another one solved] email notification when a user disarmed the alarm

Hi all,

Is it possible to send an email notification if one of the users has armed or disarmed the alarm?

E.g if user X has logged in and disarmed the alarm an email notification is send to the other users like:

user X has disarmed the alarm

Thanks for your help.

Eric
by EricT
Tuesday 08 May 2018 0:23
Forum: Blockly
Topic: Blockly & Varíable does not work
Replies: 5
Views: 1396

Re: Blockly & Varíable does not work

I am glad to be able to help. :)