I have a script that needs some clean up and debugging. I also need to add a few pauses between writes. See current [login to view URL] file attached.
I have a small Python program that will set the TCP modbus value to either 0 or 1, for a grid connected energy storage system based on utility peak day rate schedule. This program lives on a Synology NAS.
**Actual time of day control is not needed, as that is already set in the physical device, we just need to enable the functionality on peak days and disable it on days that do not have a peak rate.
This would involve setting the device to
1. turn off during utility 'winter' from November - April
2. turn on during utility 'summer' from May - October during peak days.
3. Peak days are Monday - Friday except holidays' (only those during the summer months apply here)
4. 'Holidays' for the purposes of this Rate Schedule are New Year's Day, President's Day, Memorial Day, Independence Day, Labor Day, Veterans Day, Thanksgiving Day, and Christmas Day. The dates will be those on which the holidays are legally observed.
Here are the modbus details:
Modbus address 354
Device ID (3 total) 10, 11 and 12
TCP local address [login to view URL]
see E-6 TOU Periods tab on attached spreadsheet for reference.
see manufacturer Modbus specs attached
How many hours would you estimate this project to take?