johnlemonse / homebridge-telldus

36 stars 22 forks source link

Support for motion sensors? #22

Open henriklied opened 7 years ago

henriklied commented 7 years ago

Hi!

Would it be hard to implement support for the Nexa series motion sensors?

mifi commented 7 years ago

Hei. On the homebridge side i think it should be quite simple (there is a MotionSensor service with Characteristic.MotionDetected). However I'm not sure how they're implemented in telldus live. There needs to be some way to listen for trigger-events through their API

mknuts commented 7 years ago

Hi! Don't know if it helps, but I have both zwave and 433Mhz motion sensors on my telldus live account. They just work as auto on/off switches so when motion is detected the switch is turned on and then there is a timer in the device (can be changed with jumpers or programmed in some devices) that turns it off.

mifi commented 7 years ago

Ok, so I guess the program would need to continously poll for the status on the sensor very often (many times per minute?). Not sure if telldus is gonna like that everyone's doing that.

mknuts commented 7 years ago

No polling is probably not a good idea. If it should be done it should probably use a Telldus event, but I don't see an obvious solution. A Telldus event could call a URL when the switch changes but that requires a public web server and it sounds like a very special and complex solution....if even possible. Personally I don't see of any use for Telldus motion sensors in Homebridge, simply because I let the automation take place directly in Telldus and just use Homebridge as a user interface for my switches and sensors.

mifi commented 7 years ago

Agree. Telldus should have had an event queue system that we could subscribe to. Else we would need an external service that proxies and saves the events. I see that they can send events to email. That's a possible solution since mail is indeed a queuing service where the client can "subscribe" and get new messages dispatches. But it is a very hacky solution.

We can leave this open and see if more people would like sensor support.

tvillingett commented 7 years ago

I would like them to use MQTT broker to connect to, that would make it easy... Is the temperature sensor only polled from the iphone in the implementation today?

mifi commented 7 years ago

Doesn't matter if it's MQTT or whatever technology, as long as it's a way for to queue messages that a client can connect and dispatch. Temperature sensor is different because the user will request a read. When the iPhone asks for the temperature, homebridge-telldus requests it from telldus live and returns it.

MrWodan commented 5 years ago

Hi, i'm very interested to get real support for motion sensors, I want to use them for trigger a push notification from a camera in the same room. My "Nexa" motion sensor just work as a self learning-switch right now.