ptvoinfo / zigbee-configurable-firmware

PTVO firmware for CC2530, CC2531, and CC2652 Zigbee chips
https://ptvo.info/zigbee-configurable-firmware-features/
MIT License
205 stars 22 forks source link

Inputs not doing anything in Home assistant (ZHA). Outputs work #206

Closed alfi666 closed 9 months ago

alfi666 commented 1 year ago

Hi all, I'm trying to create a simple 4x binary input zigbee device - basically like 4x door/window contacts. I want them to show "closed" whenever they are shorted to the GND, but as soon as disconnected, it should show "open"

I configure 4 GPIO as inputs with internal Pull-up, however they are still showing as "closed" in Home assistant - regardless if I short them to GND or not. If I link the inputs to outputs - then the outputs are switching on/off, but what is the point to have the "input" sensors?

What am I missing? Why is HA not showing the actual state of the INPUT? HA ptvo

ptvoinfo commented 1 year ago

@alfi666 Did you create and add a custom converter for this device (on the Experts tab)?

alfi666 commented 1 year ago

@alfi666 Did you create and add a custom converter for this device (on the Experts tab)?

Hello - I did not... not sure what it is and what it does :( Do I need to "Save custom converter to Z2M"? What would I then used that *.js file for? image

ptvoinfo commented 1 year ago

@alfi666 Yes, you should use this button. Please look here: https://ptvo.info/zigbee-configurable-firmware-features/expert/

alfi666 commented 1 year ago

@alfi666 Yes, you should use this button. Please look here: https://ptvo.info/zigbee-configurable-firmware-features/expert/

OK, I read thru this, but this seems specific to Zigbee2MQTT - but I’m not using that. I’m using the ZHA implementation in Home assistant.

Does it mean then the issue is with ZHA implementation and it is not recognizing the inputs correctly?

ptvoinfo commented 1 year ago

Sorry, but I cannot help with ZHA.

alfi666 commented 1 year ago

Fair enough - I’ll try and investigate on HA group if there’s any workaround

garubi commented 1 year ago

@alfi666 have you found any solution? I'm in the same boat too, using ZHA, my device shows up but with neither output nor input dispalyed in HomeAssistant.

If you want we can join our efforts in investigating ;-)

My understanding (but I could be completely wrong) is that the Zigbee2MQTT custom converter is the equivalent of the ZHA quirk : it could be that one have to write a custom quirk to allow Home Assistant to understand and display the sensors... see, for example,

alfi666 commented 1 year ago

@garubi Hello, no I have not found a solution, but I think you're right - it probably could be fixed by ZHA quirk - however I have not had time to deep dive into it yet. So far I have configured the PTVO firmware as on my screenshot and this way I have outputs which react to input. Given I only need 4 input and don't need output, it works for me like that - I just need to track the state of outputs in HA instead of inputs.

garubi commented 1 year ago

@alfi666 well done! Maybe in the next weeks I'll try to understand the quirks syntax... Inthe meantime, to solve my urgent need (lot of WAF factor here... ) I swiched to an ESP32 with EspHome... but really hate to have IOT devices on Wifi...