iRayanKhan / homebridge-tuya

A Homebridge plugin to control Tuya devices locally.
MIT License
394 stars 165 forks source link

sample config for sensors #77

Closed allenlicn closed 3 years ago

allenlicn commented 4 years ago

@iRayanKhan could you please provide sample config for supported sensors that were discussed in #this repo? what are the new device types? Thanks!

chinloon commented 4 years ago

Is the sensor portion already ported to this fork? Couldn't quite figure out from code's index.js

Thanks!

iRayanKhan commented 4 years ago

Contact sensor is not ported over it will be a fork for now.

Sorry if I already asked in the last issue, but are you able to Git Clone?

chinloon commented 4 years ago

Sorry, am not familiar with Git Clone. I can research more on that. Where is the fork that I should look at?

allenlicn commented 4 years ago

@iRayanKhan i don't know how to Git Clone either

@chinloon tuya-lan

allenlicn commented 4 years ago

@iRayanKhan i don't know how to Git Clone either

@chinloon tuya-lan

crampus commented 4 years ago

https://m.youtube.com/watch?v=bKuE-afbRLU

chinloon commented 4 years ago

Thanks. Found the repo for the fork at [https://github.com/iRayanKhan/homebridge-tuya-platform/tree/contact_Sensor] Reading through the code, I think the json should eb the following:

There seems to be 5 Read Only (RO), enum (T/F) type

{ "name": "Contact Sensor", "type": "contactsensor", "manufacturer": "xxx", "model": "yyyyyyyyy", "id": "011233455677899abbcd", "key": "0123456789abcdef", "ContactSensorState": 101, "StatusActive": 102, "StatusTampered": 103, "StatusFault": 104, "StatusLowBattery": 105 }

Am I correct?

Hope to also see other RO entries that can reach on a scale say from 0-10000

Also found "valve" which seems to be able to take in values and accept commands...

Hope to see these merged into the main branch. :-)

chinloon commented 4 years ago

I am presently receiving UDPs from two of my sensors, one is a Siren with temp and humidity sensor and the other is a PIR sensor.

0|homebridge | [TuyaDiscovery] UDP from 192.168.0.141:6667 0x000055aa...0x0000aa55

chinloon commented 4 years ago

The youtube video is helpful to do a git clone, However before trying, want to check whether the fock is a hard fock? I.e. when I git clone, does it take the base from the latest stable version 1.0.0 of tayu-platform? Or do I need to something special?

chinloon commented 4 years ago

Need to understand a bit more on this sensor fork:

How does it talk to the intermittent sensor traffic? The package is listening for UDP traffic from the sensors continuously? If that is so, then sensors that do not broadcast on UDP will not be detected by the package? Don't think the package is doing a MITM on the traffic from sensor to tuya cloud, correct?

ElphaX commented 3 years ago

Dated Issue, closed unless reopen neccessary.