christopherpthomas / MMM-OctoMon

Octopus Energy display monitor module for MagicMirror
MIT License
5 stars 3 forks source link

No Results #1

Open Jack123uk opened 4 years ago

Jack123uk commented 4 years ago

Hi @christopherpthomas i seem to be having trouble getting my stats to work, the module loads up fine, but all I get is dashes? Could you help me with this please? Also the icon for the gas isn’t showing up to, Is this a known issue? Great idea for a module though. 😁 Thanks

christopherpthomas commented 4 years ago

Hi Jack, sorry for my slow reply, didn't receive an email notification of your question, and have only just thought to check github. Let's see if we can troubleshoot...

First, I take it you've set both your Octopus API, and electric and gas URLs in config.js? Have you tested them from either the command line or in a browser, to ensure they are both returning valid JSON formatted data? Also, if they are returning data, what dates are being returned? Lots of 'dashes' being displayed could mean that the most recent dates being returned by the Octopus API are outside of the range of the last 7 days (assuming you've set the module to display the last 7 days worth of data). Sometimes Octopus don't update their usage data for a few days, which is a trifle annoying.

Second, let's see if there's any errors reported from the module itself. Run magic mirror, and press CTRL+SHIFT+I (letter 'i') to bring up the Electron console. Click the 'vertical three dots' menu and move the dock to the bottom of the screen (easier to view), and click on the 'Console' tab. Next, type 'Octomon' in the filter text box to display only the output for the module. You should see some getElecData() and getGasData() lines, and all being well, each should return a few different readyStates, and then a HTTP status code of 200. If not, can you tell me what they are returning?

The Gas icon is taken from the Font Awesome set of icons, that I believe should already be installed with Magic Mirror. Indeed, the Electric icon is from the same suite, so they should either both work, or both not work... headereleclabel.innerHTML = "<span class=\"fa fa-plug small\"> Elec"; ... headergaslabel.innerHTML = "<span class=\"fa fa-burn small\"> Gas"; I'm at a loss to explain why only one is working!

By the way, thanks for giving the module a try! I hope we can get to the bottom of your issues.

christopherpthomas commented 4 years ago

:(