Open curt2199 opened 4 years ago
Same here, beta 4 also affected.
I found a possible solution, it seems that relay has inverted logic in script. Turn off manual control edit fruxe script with sudo nano /var/www/html/actions/fruxepi.py Relevant section is here:
elif action == "lights":
# Lights OFF
if action_option == "-OFF" and action_GPIO is not None:
lightsON(action_GPIO, action_interval)
# Lights ON
elif action_option == "-ON" and action_GPIO is not None:
lightsOFF(action_GPIO, action_interval)
# Light Relay State
elif action_option == "-s" and action_GPIO is not None:
print(getRelayGPIOState(action_GPIO, action_interval))
Same here i have inverted on to off and vice versa:
def lightsON(gpioPIN, reverseRelay): print("Lights OFF") if reverseRelay: os.system("gpio -g mode " + str(gpioPIN) + " out") os.system("gpio -g write " + str(gpioPIN) + " 0") else: os.system("gpio -g mode " + str(gpioPIN) + " out") os.system("gpio -g write " + str(gpioPIN) + " 1")
def lightsOFF(gpioPIN, reverseRelay): print("Lights ON") if reverseRelay: os.system("gpio -g mode " + str(gpioPIN) + " out")
Now my cron job work perfectly but i dont think cron is the best way to do this if you switch to manual and you try to back in automatic light remain off until cron call the program to say lights ON
It need more code for better automation.
Could the same be applied to fans?
Running 0.3-beta and have been fighting with it. It doesn’t seem to follow the schedule no matter what I try. Also the listed time until lights on or off always just reflects the current time.
I’m pulling it today to try out some other automation software because having a proper light schedule is critical.