Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Pimatic shell-sensor recognized and communicated to Homekit? #51

Closed
pplucky opened this issue Nov 5, 2016 · 5 comments
Closed

Pimatic shell-sensor recognized and communicated to Homekit? #51

pplucky opened this issue Nov 5, 2016 · 5 comments

Comments

@pplucky
Copy link

pplucky commented Nov 5, 2016

Hello, first of all thanks for this great plugin!

I have a question: is it possible to use pimatic-hap with pimatic-shell-execute? I'm using it to obtain the temperature via js script, but HomeKit is not recognizing it as temperature sensor (even after putting the correct service name in hap tag in config). Also wanted to use it to obtain relative humidity, but I suppose issue will be the same.

Example of the config
{
"attributeName": "Temperature",
"attributeType": "number",
"attributeUnit": "ºC",
"command": "node /home/pi/pimatic-app/scripts/TempQuartoDiogo2.js",
"interval": 60000,
"id": "temperatura-quarto-diogo",
"name": "Temperatura Quarto Diogo",
"class": "ShellSensor",
"hap": {
"service": "Thermostat"
}
}

Thanks and regards.

@michbeck100
Copy link
Owner

Currently this is not supported. #42 also asked for this feature. I'll see if I can implement something. But this would require a completely different approach than with the other devices.

@pplucky
Copy link
Author

pplucky commented Nov 5, 2016

Yes, I agree it is a similar request, but can't you just only include shell-sensor in case an Homekit-valid service was stated in hap tag as above?

Just thinking out loud, considering that HAP-NodeJS also supports it if well defined.

@michbeck100
Copy link
Owner

No it's not that easy because the shell-execute-plugin doesn't expose any specific device types like switch, temperature sensor. It's a generic plugin that can be use as sensor, actor or something completely different. There's no way I can determine if it's running as temperature sensor, but to define some "specification" that users must comply to, like adding a temperature attribute.

michbeck100 added a commit that referenced this issue Nov 8, 2016
…laced TemperatureAccessory with GenericAccessory, which adds Services based on attributes (#42 and #51)
@michbeck100
Copy link
Owner

da2c11e implements a new generic sensor that currently supports temperature and humidity. Note that these attributes are case sensitive, so you would have to change your config so the attributeName is "temperature". The new sensor will be included in the next release.

@pplucky
Copy link
Author

pplucky commented Nov 8, 2016

Absolutely amazing. Working perfectly after installing 0.9.0. Thanks a lot for the great work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants