Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Two triggers to disable/enable macro

If you have a question or need help, this is the place to be.
Samme
Posts: 33
Joined: Tue Nov 22, 2011 9:07 am

Re: Two triggers to disable/enable macro

Post by Samme »

Hi Walter, and thanks for helping out, very friendly of you! I'm very excited to try this out, but I'm out of town for a couple of days, but maybe I'm able to try it on my laptop, anyway. I will, write here as soon as I've tried it out!

Have a great weekend!
Samme
Posts: 33
Joined: Tue Nov 22, 2011 9:07 am

Re: Two triggers to disable/enable macro

Post by Samme »

Hi Walter!

Thanks for your scripting, I've implemented it according to your instructions, but it doesn't trigger any events. I took a screenshot when both keys "left" the house! Same thing when both keys "enter" the house, no event is triggered.
eg.png
This is the code for "home" and "away" triggers.

Code: Select all

eg.TriggerEvent("Josefin", payload=0, prefix="Rfid.Away", source=eg)
eg.TriggerEvent("Josefin", payload=1, prefix="Rfid.Home", source=eg)
I tried to change the following:

Code: Select all

if newEvent == 'Home':
    counter += 1
into:

Code: Select all

if newEvent == 'Rfid.Home':
    counter += 1
Same with the lines for away, since I thought it was that, but that didn't make any difference! Am I missing something here?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Two triggers to disable/enable macro

Post by krambriw »

We agreed that you should change the events like this:

Code: Select all

eg.TriggerEvent("Home", payload="Josefin", prefix="Rfid", source=eg)
eg.TriggerEvent("Away", payload="Josefin", prefix="Rfid", source=eg)
Do you see the difference?

BR Walter
Samme
Posts: 33
Joined: Tue Nov 22, 2011 9:07 am

Re: Two triggers to disable/enable macro

Post by Samme »

Ahh, thanks for pointing that out, must have used an old .xml, I have the "new" version on the laptop and forgot to transfer it!

I'll give it a try!
Samme
Posts: 33
Joined: Tue Nov 22, 2011 9:07 am

Re: Two triggers to disable/enable macro

Post by Samme »

Thanks Walter, works like a charm!

Now I don't have to turn the tv, lights, etc off when I leave home, only if I'm the last one leaving, truly excellent!

:)
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Two triggers to disable/enable macro

Post by krambriw »

Happy to hear, seems to be a cool solution! Hope it is fail safe. I suppose it is very important that everybody has the discipline to use their tags all the time, otherwise the counter will loose control of the number of persons inside.

Is it RFID tags you are using? What is then the reading range?

BR Walter
Samme
Posts: 33
Joined: Tue Nov 22, 2011 9:07 am

Re: Two triggers to disable/enable macro

Post by Samme »

Well, fail safe, hmm...we'll see, I'll have to, some how, convince my better half the good about the things that I've done. I'm trying to make the home as user friendly as possible and fail safe. That was why I needed this, so the use of the RFID tags don't mess up when some one of us still is at home and vice versa.

Yes, it's RFID tags I'm using, I bought a reader and some tags on Ebay, I also bought a programmer, got it the other day, so I haven't had time to "play" with it. It's close range about 5 centimeters, then I use the Keyboard and Multitap plugin, one drawback is that it first sends the numeric keys, which Multitaps catches and triggers the event, but then after that it sends the "Enter" key, which is not that good. I've no prior experience with RFID so I don't know if it's possible to get rid of the "Enter" stroke by reprogramming the key.

I've tried earlier to detect presence both via wifi, bluetooth in combination with EG and other options, but I didn't find something as reliable and cheap as this RFID/EG solution.
What if you're phone is dead when you get home, battery's empty? The RFID tag strapped to the key chain is easy and reliable, as longs as you use your keys to open the door and have the RFID reader right inside the door, and as far as I can see, we'll probably use ordinary keys for a long time to go.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Two triggers to disable/enable macro

Post by krambriw »

Yes, you are right, I was just curious since I work with related things myself. As you most likely know, there are active RFID tags as well with a better range. A lot will improve in the future.

BestR Walter
dros_d
Posts: 1
Joined: Sat Dec 22, 2012 12:51 am

Re: Two triggers to disable/enable macro

Post by dros_d »

Why not just voice activated?
Hi Hal
Goodbye Hal
Turn off the lights Hal
What is the advantage of the rfid?
Samme
Posts: 33
Joined: Tue Nov 22, 2011 9:07 am

Re: Two triggers to disable/enable macro

Post by Samme »

I've been thinking about that, but I haven't found any good solution to it, especially ones that works in swedish.
juanalei
Posts: 18
Joined: Fri Jul 22, 2011 8:32 am
Location: Espa├▒a

Re: Two triggers to disable/enable macro

Post by juanalei »

hello.
is it too old topic, but I've been using this scrip long time and I'm happy with.
is there any way to know (after a while) the state?

It would be like making a Question eventgost and to respond if we are or are not home.




hola.
ya se que es muy viejo este tema, pero llevo utilizando este scrip mucho tiempo y estoy encantado con el.
hay alguna forma de saber (despues de un tiempo) el estado?

Seria, como hacer una pregunta a eventgost y que respondiera si estamos o no estamos en casa.





hallo.
es ist zu alt, Thema, aber ich habe mit diesen scrip lange Zeit und ich bin gl├╝cklich mit.
Gibt es eine M├Âglichkeit zu wissen, (nach einer Weile), die den Zustand?

Es wäre wie das Bilden eine Frage eventgost sein und zu reagieren, wenn wir oder nicht zu Hause sind.
Post Reply