Hi guys,
I have several sonoffs configured to control lights, but I want to use a sonoff as a sensor to alert me to a gate opening via homekit.
I want to connect a switch/reed switch between GPIO14 and gnd. I don't require the relay on the sonoff to operate. I just need to know the state of the switch.
Currently when I add a new sonoff to homebridge I do this by adding/duplicating '
SonoffMQTT_accessory.js ' . This works great but is there a way of changing the accessory type from a 'light' or 'outlet' to say a sensor so that I'm able to set it up and use differently in the 'home' app.
I've tried to compare the code to other accessories found
here to see where the 'SonoffMQTT_accessory.js' file states it a light/power socket, thinking it might be an easy code change but a bit confused.
Is what I'm asking even possible, I've looked everywhere about adding other types of accessories but as I'm a complete novice to this and MMQT i've not found anything simple enough to follow.
Thanks in advance,
Dylan