nitaybz / homebridge-delay-switch

Delay switches for Homebridge: https://github.com/nfarina/homebridge
MIT License
146 stars 20 forks source link

startOnReboot doesn't take effect #74

Open maisun opened 11 months ago

maisun commented 11 months ago

After upgrading to 3.2.5 I notice startOnReboot=true doesn't seem to take effect. After restarting HomeBridge all my delayed switches stays OFF. An example configuration is as below: { "name": "Kitchen Delayed Switch", "delay": 20, "delayUnit": "m", "flipSensorState": false, "startOnReboot": true, "debug": false, "_bridge": { "username": "XXXXXXX", "port": XXXXX }, "accessory": "DelaySwitch" }

laurika-lewis commented 10 months ago

Have the same issue after upgrading to v3.2.5

"startOnReboot" do not turn on the switch after restarting Homebridge.

mkz212 commented 10 months ago

I did PR with fix + some extra #78

sucitram commented 5 months ago

PR #78 appears to be based on the original nfarina/homebridge-dummy repository rather than nitaybz/homebridge-delay-switch. I have created an alternate PR with minimal changes #82

A temporary fix can be applied locally:

git clone https://github.com/sucitram/homebridge-delay-switch.git
sudo cp homebridge-delay-switch/index.js /var/lib/homebridge/node_modules/homebridge-delay-switch/.
sudo cp homebridge-delay-switch/config.schema.json /var/lib/homebridge/node_modules/homebridge-delay-switch/.
sudo chown homebridge:homebridge /var/lib/homebridge/node_modules/homebridge-delay-switch

The above commands assume that homebridge runs as 'homebridge' user and is installed to /var/lib/homebridge

Michkal1991 commented 2 months ago

I have the same problem. Any recommendations?