Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for sensors and fixed get values for characteristics On and Brightness #11

Merged
merged 51 commits into from
Oct 4, 2016

Conversation

mansica
Copy link
Contributor

@mansica mansica commented Mar 7, 2016

Temperature and humidity sensors, either combined or separate, are now added as accessories.
Return values are now fixed for On and Brightness and a combination of those.

@johnlemonse
Copy link
Owner

Hi, I'll look at you changes during the weekend, in the meantime I have one question for you. What is this "Skalskydd" at line 186 and why is it located under "selflearning-dimmer" (line 185) with SecuritySystem as the service?

@mansica
Copy link
Contributor Author

mansica commented Mar 10, 2016

Hello,
glad you find interest in my requests. I’m sorry about the ”skalskydd”. It is a local hack and should not be merged into your master.
However, what it does is that it lets a fake dimmer accessory works as a security system if it is called ”Skalskydd”. Skalskydd means something like Perimeter security. I used a dimmer to be able to store the different states;

Characteristic.SecuritySystemCurrentState.STAY_ARM = 0;
Characteristic.SecuritySystemCurrentState.AWAY_ARM = 1;
Characteristic.SecuritySystemCurrentState.NIGHT_ARM = 2;
Characteristic.SecuritySystemCurrentState.DISARMED = 3;
Characteristic.SecuritySystemCurrentState.ALARM_TRIGGERED = 4;
I’m fairly new to git and I didn’t think this code should be visible in the pull request. Sorry about that.

/Mats

10 mars 2016 kl. 01:15 skrev John Lemón notifications@github.com:

Hi, I'll look at you changes during the weekend, in the meantime I have one question for you. What is this "Skalskydd" at line 186 and why is it located under "selflearning-dimmer" (line 185) with SecuritySystem as the service?


Reply to this email directly or view it on GitHub #11 (comment).

tvillingett and others added 5 commits March 21, 2016 22:16
with this EA4C addition my temp sensor finally works! But It could probably be better implemented...
See below for the data for my temp sensor:
´´´
{"sensor":[{"id":"2227001","name":"Utetemp","lastUpdated":1458594078,"ignored":0,"client":"130828","clientName":"Torodd1","online":"1","editable":1,"battery":253,"keepHistory":0,"protocol":"oregon","model":"EA4C","sensorId":"141"}]}
´´´
added one more temp sensor model
@steam0
Copy link
Collaborator

steam0 commented Sep 13, 2016

@jchnlemon Do you mind merging in these changes? And can you open-source this project? Right now this is rotting on github, while users need to download a fork to make it work!

mifi and others added 6 commits October 1, 2016 00:53
Devices that are not auto detected, can be included in config.json.
For example:
"unknown_accessories": [
  {
      "id": 123456,
      "model": "selflearning-switch",
      "manufacturer": "Nexa"
  }
]

Also make code more robust and easy to follow by using promises.

Don't turn on dimmer if already on (prevents problems when dimming)
Because homekit sends both Brightness command and On command at the same time.

More descriptive message when unknown device is encountered.

Made code more modern by using node v4 features.

REQUIRES NODE >=v4
Support unknown devices
Caused two of the same sensor type to fail
Fix bug introduced during refactoring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants