dubocr / homebridge-gpio-device

Homebridge GPIO device expose several HomeKit accessories interacting with GPIO
Apache License 2.0
65 stars 22 forks source link

Usage with pwm #97

Open sidharthb0 opened 4 years ago

sidharthb0 commented 4 years ago

Hi,

I’ve been trying to use this plugin to expose a switch that works as an ’on/off’ device to control the backlight of a display. I’m currently using wiringpi with the commands ‘gpio -g pwm 19 0’ to turn it off and ‘gpio -g pwm 19 60’ for full brightness.

Is there a way to achieve this using this plugin?

Frank-Friemel commented 4 years ago

No, it doesn‘t. But you may try my fork. It supports software PWM. The homebridge config has to look like this then:

    "accessory": "GPIODevice",
    "name": "Livingroom Light",
    "type": "Lightbulb",
    "pin": 4,
    "pwmMode": true,
    "pwmValue": 100