You are missing a {
before module: “updatenotification”,
It should be:
{
module: "alert",
},
{
module: "updatenotification",
position: "top_bar"
},
You are missing a {
before module: “updatenotification”,
It should be:
{
module: "alert",
},
{
module: "updatenotification",
position: "top_bar"
},
I just tested this module and have found it working, if you use the following:
Test your Miele@Home acount:
https://www.miele.com/developer/swagger-ui/index.html
Get your client_ID and client_Secret here:
https://www.miele.com/f/com/en/register_api.aspx
Your UserName and password are the same you use to login to Miele@Home app
vg: ‘da-DK’, // default = ‘de-DE’, Choose the app Country
language: ‘en’, // default = ‘de’, Miele only support ‘de’ or ‘en’
showAlwaysAllDevices: true, // default = false , True show component even if it’s off
Language supported:
de - Deutsch
en - English
VG supported:
‘en-AU’ - Miele Australia
‘nl-BE’ - Miele België
‘en-CA’ - Miele Canada
‘es-CL’ - Miele Chile
‘hr-HR’ - Miele Croatia
‘cs-CZ’ - Miele Czechia
‘da-DK’ - Miele Danmark
‘de-DE’ - Miele Deutschland
‘et-EE’ - Miele Eesti
‘es-ES’ - Miele España
‘fr-FR’ - Miele France
‘ko-KR’ - Miele Hanguk
‘en-HK’ - Miele Hong Kong, China
‘en-IE’ - Miele Ireland
‘en-IL’ - Miele Israel
‘it-IT’ - Miele Italia
‘el-CY’ - Miele Kypros
‘lv-LV’ - Miele Latvija
‘lt-LT’ - Miele Lietuva
‘de-LU’ - Miele Luxemburg
‘hu-HU’ - Miele Magyarország
‘en-MY’ - Miele Malaysia
‘es-MX’ - Miele México
‘nl-NL’ - Miele Nederland
‘en-NZ’ - Miele New Zealand
‘ja-JP’ - Miele Nihon
‘no-NO’ - Miele Norge
‘pl-PL’ - Miele Polska
‘pt-PT’ - Miele Portugual
‘ro-RO’ - Miele România
‘de-CH’ - Miele Schweiz
‘en-SG’ - Miele Singapore
‘sl-SI’ - Miele Slovenia
‘sk-SK’ - Miele Slovensko
‘en-ZA’ - Miele South Africa
‘fi-FI’ - Miele Suomi
‘sv-SE’ - Miele Sverige
‘en-TH’ - Miele Thailand
‘tr-TR’ - Miele Türkiye
‘en-GB’ - Miele UK
‘en-US’ - Miele USA
‘en-AE’ - Miele United Arab Emirates
‘zh-CN’ - Miele Zhōngguó, dàlù
‘de-AT’ - Miele Österreich
‘el-GR’ - Miele Ελλάδα
‘ru-BY’ - Miele Беларуси
‘bg-BG’ - Miele България
‘ru-KZ’ - Miele Казахстан
‘ru-RU’ - Miele Россия
‘sr-RS’ - Miele Србија
‘uk-UA’ - Miele Україна
Working config:
{
disabled: false,
module: "MMM-MieleAtHome",
position: "top_right",
classes: 'medium bright',
config: {
userName: "??@??.??", // Your email to Miele@Home app
password: "??????", // Your password to Miele@Home app
client_ID: "????", // Your client_ID you get from the link above
client_Secret: "????", // Your client_Secret you get from the link above
vg: 'da-DK', // Your country code from the list above
language: 'en', // Language supported from list above
showAlwaysAllDevices: true //always display component
}
},
I just added a PIR sensor, and I have put jumper on “L” and the two potmeteres on low (clockwise) . This works fine.
Here you have som more information on the PIR sensor.
https://lastminuteengineers.com/pir-sensor-arduino-tutorial/
I use this module:
https://github.com/bugsounet/MMM-NewPIR
In the config, I have chaged delay from delay: 2 * 60 * 1000 // 2min to delay: 10 * 60 * 1000 //10min
{
disabled: false,
module: "newsfeed",
position: "bottom_bar",
config: {
feeds: [
{
title: "News.com.au",
url: "https://www.news.com.au/content-feeds/latest-news-national/"
},
{
title: "Weather Warnings for Australian Capital Territory.",
url: "http://www.bom.gov.au/fwo/IDZ00061.warnings_land_nsw.xml"
},
{
title: "ABC News",
url: "https://www.abc.net.au/news/feed/4535882/rss.xml"
}
],
showSourceTitle: true,
showPublishDate: true,
broadcastNewsFeeds: true,
broadcastNewsUpdates: true
}
},
ABC is working, there are no actual data for weater right now.
The news.com format is wrong, because it dosent end on rss.
Here you have links to the RSS feeds:
Main site: https://www.abc.net.au/news/rural/rss/
ex of RSS feed: https://www.abc.net.au/news/feed/4535882/rss.xml
Main site: https://www.news.com.au/more-information/rss-feeds
ex of RSS feed: https://www.news.com.au/content-feeds/latest-news-national/
Weather:
http://www.bom.gov.au/fwo/IDZ00061.warnings_land_nsw.xml
Thanks for all the help.
I ended the project because I found a module that allready hat the function that I was looking for.
You came up with some good information, thx for the help.
@kamischami
It is looking very nice!
Can you please list all the modules You are using, that would be a help.
@sdetweil
That I know. I allready have the actual date and the date from the array,
Im unsure of how to get all the dates and all the types from the array, so if there are more of the same dates, then there are more types taht has to be displayed.
I have this now, and this is working.
for(let type of Object.keys(obj)){
var date = obj[type];
console.log(type, date);
}
This will show the correct type and date.
But I have something in mind, that look like this:
if date === currentdate {
picture=type+"Div"}
ex:
20.02.2021 === 20.02.2021 then var piture= "bigDiv"
picture is then displayed.
but this have to be a loop, because there can be same dates but with different types(pictures)
Does this gives any meaning? its hard to descripe, but I’m realy glad for all the help I get.
It now works, I can get data into my new object.
My new json file look like this:
{
"RecyclingDates": [
{ "Type": "House", "Date": "02.01.2021"},
{ "Type": "House", "Date": "08.01.2021"},
{ "Type": "House", "Date": "15.01.2021"},
{ "Type": "Glass", "Date": "22.01.2021"},
{ "Type": "Glass", "Date": "29.01.2021"},
{ "Type": "Glass", "Date": "05.02.2021"},
{ "Type": "Garden", "Date": "12.02.2021"},
{ "Type": "Garden", "Date": "19.02.2021"},
{ "Type": "Garden", "Date": "26.02.2021"},
{ "Type": "Garden", "Date": "05.03.2021"},
{ "Type": "Big", "Date": "12.03.2021"},
{ "Type": "Big", "Date": "19.03.2021"},
{ "Type": "Big", "Date": "26.03.2021"}
]
}
I get this object output:
Object
RecyclingDates: Array(13)
0:
Type: "House"
Date: "02.01.2021"
__proto__: Object
1:
Type: "House"
Date: "08.01.2021"
__proto__: Object
2: {Type: "House", Date: "15.01.2021"}
3: {Type: "Glass", Date: "22.01.2021"}
4: {Type: "Glass", Date: "29.01.2021"}
5: {Type: "Glass", Date: "05.02.2021"}
6: {Type: "Garden", Date: "12.02.2021"}
7: {Type: "Garden", Date: "19.02.2021"}
8: {Type: "Garden", Date: "26.02.2021"}
9: {Type: "Garden", Date: "05.03.2021"}
10: {Type: "Big", Date: "12.03.2021"}
11: {Type: "Big", Date: "19.03.2021"}
12: {Type: "Big", Date: "26.03.2021"}
length: 13
I opend “0” and “1” in the object, so you can see how its stored in the object.
How do I access these values in my module.js file. I hope to make a loop/compare of the array.
My plan is to show different pictures according to the Type and if the Date is equale to current date.
What do you meen by " need some trigger function"? is that in the node_helper.js or where should it be?
modulename.js sends node_helper a socket notification w the module config info
node_helper sends the data back as object
Should I write some code in the modulename.js that call file read or do you mean that this is the place to make the compare?
Hi,
I need some help with a module I’m trying do develop. I need to read data from a *.json and compare the data with current date. If one or more of data are equal to current date, it will show a picture otherwise it doesn’t.
I think the date must be stored in a *.json file and read with NODE_HELPER.JS. But I can’t get it to work.
Example. Of *.JSON file:
{
Case1 [
“21.02.2021”,
“25.02.2021”,
“28.02.2021”
]
Case2 [
“12.03.2021”,
“23.03.2021”,
“29.04.2021”
]
}
Or another example.
{
“case1” , “21.02.2021”,
“case1” , “25.02.2021”,
“case1” , “28.02.2021”,
“case2” , “12.03.2021”,
“case2” , “23.03.2021”,
“case2” , “29.04.2021
]
}
I have tried to do a read command, but I’m not able to see if it can read the file correct or even find the file that I’m trying to read in.
So can someone help me with a working example of reading from a file and do the compare?