steilerDev / homebridge-openhab2-complete

A homebridge plugin for openHAB, that has the expectation to fully support all Services offered by Apple's Homekit Accessory Protocol (HAP)
GNU General Public License v3.0
52 stars 16 forks source link

Speaker Object doesn't show volume controls #97

Closed derdems closed 3 years ago

derdems commented 3 years ago

Describe the bug I'm not sure what initiated this but suddenly the speaker object doesn't propagate the volume property to the eve app anymore. (Of course it was never available in apple's own home app but that's a known apple-related issue)

Expected behavior I have separate volume objects in OH, declared as a dimmer and implemented them in the config like:

 {
                    "name": "Office Speaker",
                    "type": "speaker",
                    "item": "AirOffice",
                    "muteItem": "AirOffice",
                    "muteItemInverted": "true",
                    "volumeItem": "AirOff"
                },

This used to work for a long time now and just stopped working. (probably after either the latest homebridge update or the latest openhab2-complete plugin update… I'm not sure, actually.

Logs: The corresponding line from the log doesn't show a problem: [2/13/2021, 1:19:42 PM] [openHAB2-Complete] Added accessory Office Speaker (Type: speaker)

Environment:

This is probably related to homebridge itself? I'm not sure but think this should be investigated… TiA, derdems

*Edit: typo

eliempje commented 3 years ago

This used to work for a long time now and jsut stopped working. (probably after either the latest homebridge update or the latest openhab2-complete plugin update… I'm not sure, actually.

@derdems Are you able to validate which one caused the issue or in which situation it was working correctly

derdems commented 3 years ago

Are you able to validate which one caused the issue or in which situation it was working correctly

No I can't tell which one of the two updates changed this as I made them at once. Something I did not mention before is that I also ran an update from OH 2.4 to OH 2.5 a few days before and I can't remember if the speaker objects were still functioning after the OH update and before the homebridge/plugin update. Sorry… Any ideas if it is anything in my config? Would any additional config detail be needed to further investigate? Thanks for the response, btw!

eliempje commented 3 years ago

Please check docs: https://github.com/steilerDev/homebridge-openhab2-complete#speaker

Item line should not be in. Also make sure the mapping to OH is 1 on 1. Now you have AirOffice reference twice.

derdems commented 3 years ago

You are right. item line is not mentioned in the docs… Strange… my config was untouched after it worked. I followed your advice and changed the config, restarted homebridege, restarted eve app but it still doesn't show a volume slider in eve… Thanks again for your response!

EDIT: I have just redefined the OH Volume Item from Dimmer to Number. Now it works. How strange! Never touched the Dimmer Items before… Therefor I declare the Issue for somewhat solved and closed…

derdems commented 3 years ago

Closing, because OH Item definition change did it for me. I used to have "Dimmer" Items which worked fine but had to change it to "Number" to make it work again. Thanks for the exchange!