Mikähän tässä inverted -käytössä olevassa scriptissä tökkii. Tarkoitus oli ohjata rele OFF -tilaan kun alla olevat toteutuvat ja ON -tilaan kun eivät toteudu. Juuri nyt (30.1.23 klo 15:30) ollaan järkeni mukaan tilanteessa, että alla olevat ehdot eivät toteudu ja releen pitäisi vetää ja sitä kautta ohjata koko lämmitykseni "säästömoodiin".
Scripti (Haettu spot-hinta.fi kirjastosta):
let SETTINGS_1 =
{
RelayIsInUse: true, // Change this to true/false depending if you want to use this relay or not
Region: "FI", // See all supported regions from Swagger documentation:
https://api.spot-hinta.fi/swagger/ui
RankAtZeroDegrees: "5", // "Rank" (number of cheapest hours) when outdoor temperature is 0?C
RankAdjusterPercentage: "4", // Percentage how much "Rank" is adjusted when outdoor temperature changes by one degree
MinimumRank: "3", // Minimum 'Rank' when temperature goes above zero and Rank is getting smaller
PriceAlwaysAllowed: "1", // "Allow always cheap prices". Price when relay is always ON.
MaxPrice: "999", // This is the maximum allowed price in Euro cents.
AllowedDays: "1,2,3,4,5,6,7", // Allowed days from Monday to Sunday. Modify only if you don't want everyday execution.
PostalCode: "xxxxx", // Postal code (Finland only!), which area temperature is used in calculations
Latitude: "xxxxx", // Latitude. Overrides PostalCode. Simple service to check the coordinates:
https://www.latlong.net/
Longitude: "xxxx", // Longitude. Overrides PostalCode. Simple service to check the coordinates:
https://www.latlong.net/
BackupHours: ["00", "01", "02", "03", "20", "21"], // Backup hours if API is not answering or Internet connection is down.
BoosterHours: "99,99", // During these hours relay is always ON. If you don't want this, use "99,99"
PriorityHours: "99,99", // List here hours you want to prioritize. With PriceModifier: "0", these hours always get the smallest 'rank'
PriorityHoursRank: "3", // This limits how many hours are prioritized (i.e. 3 cheapest hours from priority hours)
PriceModifier: "-2,50", // Put here the difference in Euro cents if priority hours have lower price, like 'night electricity'
Relay: "0", // Number of the relay within Shelly. Make sure this is correct
RelayName: "Halvat tunnit", // Whatever name for this relay. Used in debug logging mostly.
Inverted: true, // If "true", relay logic is inverted
};
Osoite jolla tarkastan mitä tulee vastaukseksi:
Ja vastaukseksi tulee tämä ja kun Invertted = True, niin eikö relee pitäisi olla tilassa ON, mutta ei ole.
Missä kohtaa minulla menee vikaan?