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

Device properties via variable #91

Closed
ImhotepDE opened this issue Jan 15, 2019 · 21 comments
Closed

Device properties via variable #91

ImhotepDE opened this issue Jan 15, 2019 · 21 comments

Comments

@ImhotepDE
Copy link

Read out device properties optionally via ioBrocker.State or similar.

With this you can automatically read and enter the firmware, serial number, manufacturer etc..

image

@jensweigele
Copy link
Owner

With the latest master you can add an "AccessoryInformation" service to specify those values via datapoints/functions etc.
Those values will overwrite the values you provide in the device header.
In my tests, the iOS HomeKit app needed some time to take over the new information on the devices.

@ImhotepDE
Copy link
Author

As soon as I add the service, there is always an error message:

TypeError: Cannot read property 'toString' of undefined

@jensweigele jensweigele reopened this Jan 24, 2019
@jensweigele
Copy link
Owner

Where do you get this error?
In the admin console or when starting the adapter?

@ImhotepDE
Copy link
Author

ImhotepDE commented Jan 24, 2019

Once I add and save the service.

ioBroker.yahka does not start then and the error occurs in the LOG

image

@ImhotepDE
Copy link
Author

If I don't specify a service typ (AccessoryInformation Service), there's a mistake:

Error: Cannot add a Characteristic with the same UUID as another Characteristic in this Service:

@jensweigele
Copy link
Owner

jensweigele commented Jan 24, 2019

can you please enable the debug log for the Yahka Adapter?
And post the full log of the adapter here

@ImhotepDE
Copy link
Author

yahka.0 2019-01-24 11:31:41.209 info adapter ready, checking config yahka.0 2019-01-24 11:31:41.179 info starting. Version 0.8.2 in /opt/iobroker/node_modules/iobroker.yahka, node: v8.15.0 yahka.0 2019-01-24 11:31:17.978 info terminating yahka.0 2019-01-24 11:31:17.910 info cleaned up ... yahka.0 2019-01-24 11:31:17.909 info cleaning up ... yahka.0 2019-01-24 11:31:17.905 error at Adapter.emit (events.js:208:7) yahka.0 2019-01-24 11:31:17.905 error at emitNone (events.js:106:13) yahka.0 2019-01-24 11:31:17.905 error at TIOBrokerAdapter.adapterReady (/opt/iobroker/node_modules/iobroker.yahka/yahka.ioBroker-adapter.js:29:14) yahka.0 2019-01-24 11:31:17.905 error at TIOBrokerAdapter.createHomeKitBridges (/opt/iobroker/node_modules/iobroker.yahka/yahka.ioBroker-adapter.js:52:27) yahka.0 2019-01-24 11:31:17.905 error at new THomeKitBridge (/opt/iobroker/node_modules/iobroker.yahka/yahka.homekit-bridge.js:14:14) yahka.0 2019-01-24 11:31:17.905 error at THomeKitBridge.init (/opt/iobroker/node_modules/iobroker.yahka/yahka.homekit-bridge.js:24:38) yahka.0 2019-01-24 11:31:17.905 error at THomeKitBridge.createDevice (/opt/iobroker/node_modules/iobroker.yahka/yahka.homekit-bridge.js:74:18) yahka.0 2019-01-24 11:31:17.905 error at THomeKitBridge.initService (/opt/iobroker/node_modules/iobroker.yahka/yahka.homekit-bridge.js:88:26) yahka.0 2019-01-24 11:31:17.905 error at new Service.AccessoryInformation (/opt/iobroker/node_modules/hap-nodejs/lib/gen/HomeKitTypes.js:2660:8) yahka.0 2019-01-24 11:31:17.905 error at Service.AccessoryInformation.Service.addCharacteristic (/opt/iobroker/node_modules/hap-nodejs/lib/Service.js:80:13) yahka.0 2019-01-24 11:31:17.905 error Error: Cannot add a Characteristic with the same UUID as another Characteristic in this Service: xxxxxx-xxx-xxx-xxx-xxxxxxx yahka.0 2019-01-24 11:31:17.904 error uncaught exception: Cannot add a Characteristic with the same UUID as another Characteristic in this Service: xxxxxx-xxx-xxx-xxx-xxxxxxx yahka.0 2019-01-24 11:31:17.859 info adding Ikea with UUID: xxxxx-xxx-xxx-x-xxxxxxxx yahka.0 2019-01-24 11:31:17.830 info adapter ready, checking config yahka.0 2019-01-24 11:31:17.803 info starting. Version 0.8.2 in /opt/iobroker/node_modules/iobroker.yahka, node: v8.15.0 yahka.0 2019-01-24 11:30:45.031 info terminating yahka.0 2019-01-24 11:30:44.951 info cleaned up ... yahka.0 2019-01-24 11:30:44.950 info cleaning up ...

@jensweigele
Copy link
Owner

You are not using the latest version of Yahka (which is necessary for this feature)
You need to install 0.9.0 (should be available via the admin interface tomorrow)
Or you should update the adapter via the "GitHub" button

Please check again if it works with 0.9.0

@ImhotepDE
Copy link
Author

How exactly do I do that using the GitHub button?

@jensweigele
Copy link
Owner

Go to the "Adapters" Page
Click on the GitHub button (the button with the cat)
Select "Yahka" and click "install"
That's it

@ImhotepDE
Copy link
Author

sorry, which button is meant?

image

@ImhotepDE
Copy link
Author

I found it... thank you.

@ImhotepDE
Copy link
Author

The error is also present with the current version.

Could you please write a working example where the AccessoryInformation Service function is used and also works

@jensweigele
Copy link
Owner

Can you please post the log again?
I've tried several times - just added the AccessoryInformation, checked "Model", "Serialnumber" and "Manufacturer", used the State-Function and used javascript datapoint.

@ImhotepDE
Copy link
Author

yahka.0 2019-01-24 12:54:59.193 error at initAdapter (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:4990:18)
yahka.0 2019-01-24 12:54:59.193 error at Adapter.emit (events.js:208:7)
yahka.0 2019-01-24 12:54:59.193 error at emitNone (events.js:106:13)
yahka.0 2019-01-24 12:54:59.193 error at TIOBrokerAdapter../yahka.ioBroker-adapter.ts.TIOBrokerAdapter.adapterReady (/opt/iobroker/node_modules/iobroker.yahka/main.js:2169:14)
yahka.0 2019-01-24 12:54:59.193 error at TIOBrokerAdapter../yahka.ioBroker-adapter.ts.TIOBrokerAdapter.createHomeKitBridges (/opt/iobroker/node_modules/iobroker.yahka/main.js:2192:27)
yahka.0 2019-01-24 12:54:59.193 error at new THomeKitBridge (/opt/iobroker/node_modules/iobroker.yahka/main.js:1583:14)
yahka.0 2019-01-24 12:54:59.193 error at THomeKitBridge../yahka.homekit-bridge.ts.THomeKitBridge.init (/opt/iobroker/node_modules/iobroker.yahka/main.js:1595:42)
yahka.0 2019-01-24 12:54:59.193 error at THomeKitBridge../yahka.homekit-bridge.ts.THomeKitBridge.createDevice (/opt/iobroker/node_modules/iobroker.yahka/main.js:1669:22)
yahka.0 2019-01-24 12:54:59.193 error at THomeKitBridge../yahka.homekit-bridge.ts.THomeKitBridge.initService (/opt/iobroker/node_modules/iobroker.yahka/main.js:1711:23)
yahka.0 2019-01-24 12:54:59.193 error at Accessory.addService (/opt/iobroker/node_modules/hap-nodejs/lib/Accessory.js:150:59)
yahka.0 2019-01-24 12:54:59.193 error TypeError: Cannot read property 'toString' of undefined
yahka.0 2019-01-24 12:54:59.193 error uncaught exception: Cannot read property 'toString' of undefined

@jensweigele
Copy link
Owner

Did you fill in the "Subtype" Fields?
The error you get has something to do with the Subtypes of the services.
Please let them empty - unless really needed.
If you enable the debug log again, you should see the service it tries to initialize just before the error occurs.

@ImhotepDE
Copy link
Author

If I leave the service subtype empty, the error occurs:

yahka.0 2019-01-24 13:16:23.398 error Error: Cannot add a Characteristic with the same UUID as another Characteristic in this Service: xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxxxxxxxx
yahka.0 2019-01-24 13:16:23.397 error uncaught exception: Cannot add a Characteristic with the same UUID as another Characteristic in this Service: xxxxxx-xxxxxx-xxxxxx-xxxxxx-xxxxxxxxxxxx

@jensweigele
Copy link
Owner

Can you post more of the log?
I want to see which characteristic it is (and on which service)
Please make sure that the loglevel is debug

@jensweigele
Copy link
Owner

Any news on this?

@ImhotepDE
Copy link
Author

sorry...

I have tested it with a heating thermostat, it works, with the lamp comes the said error

@jensweigele
Copy link
Owner

Can you make a screenshot of your configuration of the said lamp?

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

2 participants