MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Pauliolio
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    P
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 7
    • Groups 0

    Pauliolio

    @Pauliolio

    0
    Reputation
    632
    Profile views
    7
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Pauliolio Unfollow Follow

    Latest posts made by Pauliolio

    • Title on items in default news feed module don't work for BBC - Bug or design?

      It’s always bugged me that instead of the actual title of a news item being displayed by the default newsfeed module, every item is preceded by the text in the ‘title’ field of the feed’s config in the newsfeed module’s section of the config.js file.

      To try and explain that, the feeds section of my config.js file is:

      			config: {
      				feeds: [
      					{
      						title: "BBC UK",
      						url: "http://feeds.bbci.co.uk/news/uk/rss.xml"
      					},
      
      					{
      						title: "BBC World",
      						url: "http://feeds.bbci.co.uk/news/world/rss.xml",
      					},
      				],
      				showSourceTitle: true,
      				showPublishDate: false,
      				showDescription: true
      			}
      
      

      And the ‘Title’ shown on the mirror for every news item that comes from “http://feeds.bbci.co.uk/news/uk/rss.xml” is “BBC UK”, instead of the actual title of the item.

      I looked in the newsfeed.js file and there’s a line that says:

      if (this.config.showSourceTitle && this.newsItems[this.activeItem].sourceTitle !== '') sourceAndTimestamp.innerHTML = this.newsItems[this.activeItem].sourceTitle
      
      

      I then loaded the feed in Chrome & had a look at the xml source.
      In there the name of the title ‘field’ is “title”.
      I went to that line in the newsfeed.js file, changed .sourceTitle to title, rebooted the mirror and, yes!
      Each item in the feed has its proper title.

      So, my question is - Is this an issue specific to the BBC newsfeeds, or is it a more general ‘bug’ in the newsfeed module please?

      posted in Bug Hunt
      P
      Pauliolio
    • RE: Weatherunderground - currently - hourly - daily - configurable

      @RedNax

      Hi - I’d already tried that unfortunately. Still gets stuck at the same point in the code & displaying ‘Loading’ on the screen.

      Would wrapping that for loop in an if that checks whether data.alerts is actually defined or a try block help do you think?

      posted in Troubleshooting
      P
      Pauliolio
    • RE: Weatherunderground - currently - hourly - daily - configurable

      @RedNax

      This may explain the issue to you hopefully. I thought I’d given you this info before, but it seems not.

      In the console I get an error:
      MMM-WunderGround.js:407 Uncaught TypeError: Cannot read property 'length' of undefined

      The relevant code is:

      	processWeather: function(data) {
      		this.alerttext = "";
      		this.alertmsg = "";
      		for (var i = 0, count = data.alerts.length; i < count; i++) {
      

      Any idea why the array would be undefined?

      Many thanks.


      Note from admin: Please use Markdown on code snippets for easier reading!

      posted in Troubleshooting
      P
      Pauliolio
    • RE: Weatherunderground - currently - hourly - daily - configurable

      @RedNax

      That’s a handy test - Many thanks.
      When I request:
      http://api.wunderground.com/api/[my key]/conditions/forecast10day/astronomy/alerts/lang:EN/q/pws:IBATTLE3.json

      I get a full set of data back.
      The module is still getting stuck on ‘Loading’ on the mirror though.
      My config is:

      {
          module: 'MMM-WunderGround',
          position: 'top_right',
          config:  {
                  apikey: '[my key]',
                  pws: 'IBATTLE3;loctype:1',
                  lang: 'EN',
                  fctext: '1',
                  fcdaycount: "5",
                  fcdaystart: "0",
                  hourly: '1',
                  hourlyinterval: "3",
                  hourlycount: "2",
                  alerttime: 10000,
                  alerttruncatestring: "english:"
          }
      },
      

      Can you see anything wrong there please?

      Thank you.


      Note from admin: Please use Markdown on code snippets for easier reading!

      posted in Troubleshooting
      P
      Pauliolio
    • RE: Facial Recognition - Where do elements go go?

      Many thanks @KirAsh4 .
      I’ve tried it there, still no joy though…

      posted in Troubleshooting
      P
      Pauliolio
    • RE: Weatherunderground - currently - hourly - daily - configurable

      Hi @RedNax
      Could you explain the ‘pws’ attribute a little please?
      What’s ‘loctype’? Are there any other valid values?

      ‘locid’ is giving a little trouble. I can’t find anything on Wunderground about it, but if I use the ‘Search Locations’ tool, and when my area comes up, pick a different station (one closer to where I am), the url changes to this:
      https://www.wunderground.com/cgi-bin/findweather/getForecast?query=pws:IBATTLE3&MR=1
      So I’ve put your example config into config.js, set my apikey, and changed the locid to IBATTLE3.

      I left the default weather module in the config file while I was getting your one set up, and when they were both on screen they seemed to be giving weather for two different places as the sunrise times were different by about an hour so I’m really not confidant that I’ve got the correct locid here…

      Many thanks.

      posted in Troubleshooting
      P
      Pauliolio
    • Facial Recognition - Where do elements go go?

      Hi

      Can someone give me a bit of help getting this going please?
      I’m making a real rookie mistake here I’m sure - This is the first module I’ve tried to add in after getting the modules in the sample config file configured & working.

      I’ve put the main(?) module folder called MMM-Facial-Recognition-master in /home/pi/MagicMirror/modules/default/.
      I’ve installed the dependencies OK.
      I’ve used the tool to create the training images.
      I’ve added my ‘name’ to the facerecognition_tester/lib/config.py file
      I’ve used the trainer to create the XML file.

      The next step in the test tool instructions have me stuck though:
      “2. Copy your training.xml from tools/facetrainer into the root folder of this tool.”
      And having added the module info to the MagicMirror conf file all I get is a blank screen now.

      So, some questions please:
      Is the MMM-Facial-Recognition-master folder in the right place?
      Is anything from the capture, training, and testing tools required for the module to work other than the xml file?
      If not, why does adding the config for the face recognition module to config.js result in a completely blank output on the mirror?

      With regards to the testing tool…
      There is no ‘tools’ folder. Does it have to be in a folder called ‘tools’? If so, where should it be?
      When I try to use the test tool I get this error:
      pi@MirrorPi3:~/MagicMirror/Tools/facerecognition_tester $ python facerecognition.py
      Loading training data…
      ALGORITHM: LBPH
      Training data loaded!
      OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /build/opencv-ISmtkH/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp, line 3737
      Traceback (most recent call last):
      File “facerecognition.py”, line 42, in
      image = cv2.cvtColor(frame, cv2.COLOR_RGB2GRAY)
      cv2.error: /build/opencv-ISmtkH/opencv-2.4.9.1+dfsg/modules/imgproc/src/color.cpp:3737: error: (-215) scn == 3 || scn == 4 in function cvtColor

      Any idea what the issue is here?

      Many thanks,
      Pauliolio

      posted in Troubleshooting
      P
      Pauliolio