MerossIot icon indicating copy to clipboard operation
MerossIot copied to clipboard

Setting a schedule for a MSS310 plug

Open davidwozabal opened this issue 2 years ago • 4 comments

Background: I have a contract with my power supplier where prices fluctuate hourly based on wholesale prices on the electricity exchange. I would therefore want to control certain devices (e.g., water heater) such that they switch on, when prices are low.

Intended solution: I would have to query next day's prices and then program the plugs with a corresponding schedule for the next day. Ideally, I want to connect to the device only once and then let the plugs execute the schedule on its own (without connecting every time I want to make a switch). It seems to me that the MSS310 plugs in principle support this functionality.

Question: Can such a function be implemented in the current version of the library? I only found methods to switch on/off instantaneously.

davidwozabal avatar Jul 17 '23 05:07 davidwozabal

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 16 '23 11:09 stale[bot]

Hi! Are you going to schedule this via python directly or are you going to use some sort of orchestrator, such as HomeAssistant?

Why wouldn't you implement this via python script/daemon running on the background?

albertogeniola avatar Sep 16 '23 12:09 albertogeniola

Hi, I was thinking about scheduling this directly from a Python script, which is periodically called. However, I cannot guarantee that the machine that runs the job will be up the whole day. Hence, I would like to submit a schedule once a day to the plug which stores the schedule and then executes it autonomously without any further interaction from the script.

If I am not mistaken, the hardware of the MSS310 supports such a thing, but the library doesn't.

davidwozabal avatar Sep 17 '23 03:09 davidwozabal

Hi, I was thinking about scheduling this directly from a Python script, which is periodically called. However, I cannot guarantee that the machine that runs the job will be up the whole day. Hence, I would like to submit a schedule once a day to the plug which stores the schedule and then executes it autonomously without any further interaction from the script.

If I am not mistaken, the hardware of the MSS310 supports such a thing, but the library doesn't.

+1 for me, I've a little home lab that I would shutdown for example at 1:00 am

Every time my home lab is going to shutdown it should say to the plug to shutdown itself after x minutes

Tkd-Alex avatar Nov 23 '24 19:11 Tkd-Alex