sverf
October 16, 2024, 8:28am
368
Agree, it would be great to update the app to fetch prices from somewhere else, @balmli . I also use the “Sparegris”/“Piggy Bank” app on Homey, which fetches prices from entsoe.eu, and does not have the same issue today. Maybe it is possible to use a similar approach as used in that app?
Here is a link to the github with the price fetching code:
/* eslint-disable comma-dangle */
/* eslint-disable max-len */
'use strict';
const homeypath = ('testing' in global && testing) ? '../testing/' : '';
const { XMLParser } = require('fast-xml-parser');
const { request } = require(`${homeypath}urllib`); // This adds 512kB (1.4MB debug) to the app
const { toLocalTime } = require('./homeytime');
// =============================================================================
// = CURRENCY
// =============================================================================
const WWW_NORGES_BANK_CURRENCY = 'https://data.norges-bank.no/api/data/EXR/B.{toCurrency}.{fromCurrency}.SP?format=sdmx-json&startPeriod={startDate}&endPeriod={endDate}&locale={locale}';
let currencyTable = {
GBP: { rate: 13.4193, date: '2023-10-06', name: 'Britiske pund' },
EUR: { rate: 11.6090, date: '2023-10-06', name: 'Euro' },
SEK: { rate: 1.0004, date: '2023-10-06', name: 'Svenske kroner' },
DKK: { rate: 1.5567, date: '2023-10-06', name: 'Danske kroner' },
This file has been truncated. show original
Right, it was read-only, I didn’t notice.
But I see there is one writeable capability named “charging”, So I can use this.
However I cannot see any power-meter readings or controller, so it’s only on/off and it uses what it uses, right?
If it has a thermostat capability I would recommend you to turn on temperature control, this will be much more convenient for price control.
Yes
The prices are fetched from Entsoe , it should be the same prices as Noordpool except in euros. I use the day …
1 Like