tommasomarchionni / homebridge-openHAB

Homebridge plugin for openHAB
Apache License 2.0
49 stars 18 forks source link

Is there no support for temperature items? #3

Closed alexbartisro closed 8 years ago

alexbartisro commented 8 years ago

First of all, great job!

Second, if I add a temperature item to my sitemap I get

Platform - The widget 'Bedroom Temperature' of type NumberItem is an item not handled

tommasomarchionni commented 8 years ago

Thank you! I added this feature now, let me know if it works so i can close the issue.

alexbartisro commented 8 years ago

Awesome! I'll try in about 9 hours, when I get back from work. Thank you!

alexbartisro commented 8 years ago

It just crashes now. Installed with npm update

`/usr/lib/node_modules/homebridge-openhab/items/AbstractItem.js:75 return new exportsthis.itemType; ^

TypeError: exports[this.itemType] is not a function at AbstractItem.getItem (/usr/lib/node_modules/homebridge-openhab/items/AbstractItem.js:75:12) at exports.Factory.parseSitemap (/usr/lib/node_modules/homebridge-openhab/libs/ItemFactory.js:39:38) at Request._callback (/usr/lib/node_modules/homebridge-openhab/index.js:86:34) at Request.self.callback (/usr/lib/node_modules/homebridge-openhab/node_modules/request/request.js:198:22) at emitTwo (events.js:87:13) at Request.emit (events.js:172:7) at Request. (/usr/lib/node_modules/homebridge-openhab/node_modules/request/request.js:1035:10) at emitOne (events.js:82:20) at Request.emit (events.js:169:7) at IncomingMessage. (/usr/lib/node_modules/homebridge-openhab/node_modules/request/request.js:962:12)`

alexbartisro commented 8 years ago

Yep. Crashes with both versions 16 and 17. I've reverted to 15 and it works fine.

tommasomarchionni commented 8 years ago

Can you try now? It crashes because you should set itemType in customAttrs to TemperatureSensorItem. Now every numberItem of openHAB is set to default to TemperatureSensorItem.

alexbartisro commented 8 years ago

I don't get the configuration part. I don't have any item set in my config.json. All of them are loaded from the sitemap. Except this case, why should I add individual items besides pointing it to the sitemap?

tommasomarchionni commented 8 years ago

You should add openhab's item in customAttrs only when you need to define special item in HomeKit catalog. For example if you want to define a switch such as a lightbulb. So you can say to Siri to switch on all Lamps without switch on the other switch (Fan, Outlet, etc.).

alexbartisro commented 8 years ago

Ah, ok, no I get it. Thank you!

Updated, it works, thank you!

alexbartisro commented 8 years ago

One more question, sorry about this!

Do you have any idea why siri doesn't recognize the asking about temperature, but knows if I ask how hot is it? http://imgur.com/EOKiews

snizzleorg commented 8 years ago

Don't know. but Siri is strange sometimes. For some weeks "turn the lights on worked", however "turn the lights off" didn't now it works... I think apple needs to do some fixing

alexbartisro commented 8 years ago

Yeah, I guess you're right. Saw the same thing with a dimmer, when I first set up homebridge. Turn on worked, but set value didn't. After a couple of hours, set lights at XX percent started working.