arthurdent75 / SimpleScheduler

An Home Assistant AddOn to schedule entities on/off on weekly base
183 stars 36 forks source link

Frontend switch to enable /disable access #166

Closed PeterS1556 closed 2 weeks ago

PeterS1556 commented 3 weeks ago

I like your scheduler, and have used it to control my multiple minisplits for nightime setbacks. I want to be able to disable the warm up schedule entries for when I am away, by switching a single device, so I set up the MQTT config, per your instructions, and enabled it in SimpleScheduler, including username and password. However, when trying to create a script to enable/disable, I cannot find an option in the action dropdown to access SimpleScheduler items. I am a complete newbie to HA, so I am likely missing something obvious, but any pointers would be appreciated!

arthurdent75 commented 2 weeks ago

If you set up MQTT, you will find all schedulers as switches. At first, search in developer tools --> states for those switches (use scheduler as filter) If you find them, you need to choose in the script the action to turn on/off a switch

PeterS1556 commented 2 weeks ago

Thanks! When I look for the switches in developer tools-states, the SimpleScheduler switches are not present, only the update switches. Any thoughts on what I might have missed in setting up MQTT? I tried to follow your directions faithfully, but suspect I have not done something that would be obvious to a seasoned HA user..

PeterS1556 commented 2 weeks ago

Some additional info: I realized that the password would not be accepted into the password field when in the config screen for MQTT. I tried uninstalling and reinstalling MQTT, but when I enter core-mosquitto for the server, and my HA username and password, after about a 5 second delay, I get the message:
MQTT Please enter the connection information of your MQTT broker. Failed to connect Definitely moving backwards here!

PeterS1556 commented 2 weeks ago

Uninstalled and reinstalled both Mosquitto and MQTT, that all now seems to work. I created a new schedule entry, thinking it may have to be created after MQTT is set up, but still not showing up as a switch in "states". Is there any way to "ping" the MQTT pathway to determine whether it is configured correctly?

arthurdent75 commented 2 weeks ago

First, take a look at the bottom of the scheduler list and check that simplescheduler successfully connect to MQTT image

PeterS1556 commented 2 weeks ago

Ah, thanks. I hadn't noticed that whole line! No, it says Disconnected.

PeterS1556 commented 2 weeks ago

Given our time zone lag, I thought I would give you everything I had on this. Thanks very much for your time! I will definitely owe you a beer!

In SimpleScheduler , the enabled check box within the config screen is checked, and I have done multiple restarts, as I have tried every combination of user/password I could think of: my HA user and password, both fields empty, just "homeassistant" in the user field, pw field empty. It says "(need restart)" to the right of the MQTT enabled checkbox, but I think that is a prompt, rather than a status indicator. In MQTT, the only MQTT config that will load seems to be my HA user name, and nothing entered in the pw field. The pw field self populates with password_not_changed , and that field will not accept my HA user password. If I enter my HA password, the config fails. I don't see any config options for Mosquitto.

arthurdent75 commented 2 weeks ago

Let's try this: just create a secondary user in Mosquitto.

Go to Setting --> Add-ons --> Mosquitto Broker --> Configuration image Fill the Logins box as per screenshot, replacing mqtt_dedicated_xxxx with credentials of your choice. Click save and restart the Mosquitto addon.

After that, go to simplescheduler config and use the new credentials. Restart the simplescheduler addon.

Finger Crossed! 🤞

PeterS1556 commented 2 weeks ago

Yes! Thank-you so much! Enjoy the beer!