Tellstick DUO & WINDOOR or MOTION sensor/detector
Moderator: Telldus
Tellstick DUO & WINDOOR or MOTION sensor/detector
Hi all,
I would like to know how I can catch a message or event or a value when the door is opened (windoor sensor) or a person passes in front of motion sensor with the telldus core API ? Because when I looked at telldus-core, only temperature or humidity are supported as sensors at this moment.
Thanks for your helps.
Regards,
NT
I would like to know how I can catch a message or event or a value when the door is opened (windoor sensor) or a person passes in front of motion sensor with the telldus core API ? Because when I looked at telldus-core, only temperature or humidity are supported as sensors at this moment.
Thanks for your helps.
Regards,
NT
-
- Site Admin
- Posts: 2243
- Joined: Fri Mar 17, 2023 9:45 am
- Location: Lund
- Contact:
Re: Tellstick DUO & WINDOOR or MOTION sensor/detector
Yes, it is possible. Read more under "Events": http://developer.telldus.com/doxygen/
Micke Prag
Software
Telldus Technologies
Software
Telldus Technologies
Re: Tellstick DUO & WINDOOR or MOTION sensor/detector
Thanks for your reply. You mean that to catch a message sent by windoor/motion sensor, I need register the device with tdRegisterSensorEvent() ? I only saw that the API supports only 2 datatype for sensor TEMPERATURE and HUMIDITY.
Does tellstick transmitter classic support this ?
Thanks for your helps.
Does tellstick transmitter classic support this ?
Thanks for your helps.
-
- Site Admin
- Posts: 2243
- Joined: Fri Mar 17, 2023 9:45 am
- Location: Lund
- Contact:
Re: Tellstick DUO & WINDOOR or MOTION sensor/detector
No, you must first define a device for your motion sensor and then listen for changes using tdRegisterDeviceEvent().
Micke Prag
Software
Telldus Technologies
Software
Telldus Technologies
Re: Tellstick DUO & WINDOOR or MOTION sensor/detector
How I can define my sensor ? Because, normally, a sensor can not be learned.
-
- Site Admin
- Posts: 2243
- Joined: Fri Mar 17, 2023 9:45 am
- Location: Lund
- Contact:
Re: Tellstick DUO & WINDOOR or MOTION sensor/detector
What kind of motion detector do you have? Without that information it is really hard to guess how you should configure it!
Micke Prag
Software
Telldus Technologies
Software
Telldus Technologies
Re: Tellstick DUO & WINDOOR or MOTION sensor/detector
DOOR detector
-
- Site Admin
- Posts: 2243
- Joined: Fri Mar 17, 2023 9:45 am
- Location: Lund
- Contact:
Re: Tellstick DUO & WINDOOR or MOTION sensor/detector
Brand? Please provide a link to the one you have.
Micke Prag
Software
Telldus Technologies
Software
Telldus Technologies
Tellstick DUO & WINDOOR or MOTION sensor/detector
I have Duo and Nexa lmst-606. I can receive data to TelldusCenter when i open Nexa. So thats workig but if i open Nexa how i can send email, start lights etc?
So i need to do some scripts witch collect that openin or closing data and do then what i want.
Is this solution? http://developer.telldus.se/blog/2012/1 ... om-signals
If yes then please help me little.
So i need to do some scripts witch collect that openin or closing data and do then what i want.
Is this solution? http://developer.telldus.se/blog/2012/1 ... om-signals
If yes then please help me little.
Re: Tellstick DUO & WINDOOR or MOTION sensor/detector
Ok, no help so i do little python script which use pytelldus.
My script needs from pytelldus both tdtool.py and td.py.
I named this script SignalReceiver.py and then i run it on Terminal 'python SignalReceiver.py'. This must run all the time to check signals.
My script needs from pytelldus both tdtool.py and td.py.
Code: Select all
#!/usr/bin/env python
import td
import time
import os
def myDeviceEvent(deviceId, method, data, callbackId):
content = '%s' %( td.getName(deviceId) )+' - %s' %(td.methodsReadable.get(method, 'Unknown' ))
if 'Door - ON' in content: #### When device named Door is open
os.system('python tdtool.py --on "Livingroom 1"') #### it run script which open Livingroom 1 lights.
td.registerDeviceEvent(myDeviceEvent)
try:
while(1):
time.sleep(1)
except KeyboardInterrupt:
print 'KeyboardInterrupt received, exiting'
os.system('rm *.pyc')
Re: Tellstick DUO & WINDOOR or MOTION sensor/detector
Hi.
Tried the above script (with some minor adjustment, livingrom 1 to one existing in my system) but I really cannot get it to work. I have the SignalReceiver.py in the same folder as td.py and tdtool.py and all are chmoded with +x.
My magnet sensor is configged as brytare2 and this is my output if i run tdtool.py --event and triggers the magnet.
But if i run SignalReceiver.py and triggers the magnet nothing happens.
Can this have something to do with that it is a RawDeviceEvent and not a registerDeviceEvent?
If so, how would the script need adjustment?
BR
Nebuchad
Tried the above script (with some minor adjustment, livingrom 1 to one existing in my system) but I really cannot get it to work. I have the SignalReceiver.py in the same folder as td.py and tdtool.py and all are chmoded with +x.
My magnet sensor is configged as brytare2 and this is my output if i run tdtool.py --event and triggers the magnet.
Code: Select all
1383082044: RawDeviceEvent: class:command;protocol:arctech;model:selflearning;house:3712562;unit:10;group:0;method:turnon;
controllerId: -1
1383082044: RawDeviceEvent: class:command;protocol:arctech;model:selflearning;house:3712562;unit:10;group:0;method:turnon;
controllerId: -1
1383082044: DeviceEvent Device: 13 - 2brytare
method: 1 - ON, data:
Can this have something to do with that it is a RawDeviceEvent and not a registerDeviceEvent?
If so, how would the script need adjustment?
BR
Nebuchad