tommasomarchionni / homebridge-openHAB

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

Can't see item in iOS device #20

Open MatteGary opened 8 years ago

MatteGary commented 8 years ago

Hi,

i've a problem. I think i've installed everything correctly, my iPhone is able to find a "Homebridge" device using Insteon app, but anything else. Nothing about the temperature sensor I've setup in openHab.

When I run homebridge from terminal the output said:

Loaded plugin: homebridge-openhab Registering platform 'homebridge-openhab.openHAB --- Scan this code...

It said nothing about any config.json or device/platform to load from. I think I'm editing the right config.json file, but FYI the path is '/usr/lib/node_modules/homebridge-openhab/', and its content is:

"bridge": { "name": "MyHomebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" },

"description": "This is an example configuration file with one fake accessory$

"accessories": [ ],

"platforms": [ { "platform": "openHAB", "name": "openHAB", "host": "192.168.1.142", "port": "8080", "sitemap":"HomeKit_Sitemap", "useLabelForName": true, "customAttrs" : [ { "itemName":"gTermostatoCamera_TemperaturaAttuale", "itemLabel":"Termostato Camera", "itemManufacturer":"MySelf", "itemModel":"v1", "itemType":"TemperatureSensorItem" } } ] }

The Sitemap i've setup for the bridge contains:

sitemap HomeKit_Sitemap label="Main Menu" { Text item=gTermostatoCamera_TemperaturaAttuale }

Any idea why I'm not able to find my temperature sensor in iOS?

MatteGary commented 8 years ago

Actually reading this #19 i think I figured it out. I've made some modification, and now it seems is working, but i'm ssh-ing from work so i need to get back home to see if my iOS device will see the thermosensor.

Update will follow.

MatteGary commented 8 years ago

Here I'm updating this issue.

I'm now able to see from my iDevice the two item I've put in the sitemap. The fact now is that in Lutron I can't see any of the custom attributes I've set for each item, not even the manufacturer for instance. So I can't interact with these item properly. Homebridge did managed to find the proper configure.json file and get connected with openhab, but it seems not able to understand the customAttrs part.

Any suggestion?

MatteGary commented 8 years ago

Update number 3, i feel like i'm in the test team at my work place. Anyway. I'm now able to control the thermostat i've setup in openhab and in the homebridge config.json. I still can't see the info i've put in the json, like the manufacturer. Instead i'm able to read (and hear from Siri) the actual temperature in my room and set the target temperature.

Another issue is this: if I change the target temperature using the +/- button in the Lutron App, it changes by step of something like 0,222 °C. I think is something related to the °C to °F conversion, and maybe related to the Lutron App and not to the homebridge-openhab binding. Anyone had this behaviour with other app?

Sorry for such mess in the issues section.

broux2 commented 8 years ago

I have the same issue custom attributes not showing correctly in both the insteon+ app and the elgato eve app.

I also have an issue with the Thermostat temperatures. I think it is a conversion issue as I have openHab reporting temps in Fahrenheit. Right now it shows my home being 162.5F which really should be 72.5F. Switching openhab to report in C should fix that. Not sure if that will help with your issue. Maybe try another app to rule out the Lutron one.

tommp4 commented 8 years ago

@MatteGary, I think I'm having the exact same problem as you did. I'm able to connect to homebridge using eve, but I don't see the one item I've defined so far. This is my sidemap:

sitemap HomeKit label="HomeKit" {Switch item=Light_Master label="All Lights"}

And same as you, my Homebridge is installed in /usr/local/lib/node_modules/homebridge/, not in /home/pi/.homebridge/, is that a problem overall? And which config.json file do I actually need to change, the one in /homebridge/ or the one in /homebridge-openhab/?

I'm relatively new to all this but would really appreciate some help, specifically what exactly you did to fix your problem :)

MatteGary commented 8 years ago

@tommp4 i think your sitemap is correct, and you have to modify the config.json present in the /homebridge folder. I have to launch homebridge with this command

sudo homebridge -U /usr/lib/node_modules/homebridge

in order to see the platform and accessories i specify in the config.json.

Maybe i'm doing something wrong but this is the only way i managed to make it work.

tommp4 commented 8 years ago

Yes ultimately it worked for me with that command as well now :) weird, but I'm just glad it does haha. Do you by any chance know if there's a way to execute that command at start up?

MatteGary commented 8 years ago

It's on my todo list XD

tommp4 commented 8 years ago

Did you happen to figure it out @MatteGary ? Also, I'm currently starting homebridge via an ssh command so it closes when I close the session, do you happen to know a way to keep it going? Cheers :)

MatteGary commented 8 years ago

Hi @tommp4 , i haven't work on that yet, I've been focused on setting up remote (and not) controlled lights in my terrarium. As soon as i will find some spare time i'll look into that, so I can't close my ssh session either :)