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

Please implement discovery part for adapter. #7

Open
GermanBluefox opened this issue Jul 23, 2018 · 0 comments
Open

Please implement discovery part for adapter. #7

GermanBluefox opened this issue Jul 23, 2018 · 0 comments

Comments

@GermanBluefox
Copy link
Contributor

The sensor can be found via IP and it is possible to find this local sensor via discovery.
Just add a file into directory https://github.com/ioBroker/ioBroker.discovery/blob/master/lib/adapters/

You can copy the main code from here:
https://github.com/ioBroker/ioBroker.discovery/blob/master/lib/adapters/homepilot.js

Just use here https://github.com/ioBroker/ioBroker.discovery/blob/master/lib/adapters/homepilot.js#L9 other URL: 'http://' + ip + '/data.json' and detect in it: sensordatavalues

let content;
try {
content = JSON.parse(data);
} catch (e) {
}
if (content && content.hasOwnProperty('sensordatavalues')) {
   // detected
}


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

No branches or pull requests

1 participant