Giter Club home page Giter Club logo

Comments (17)

schnster avatar schnster commented on June 23, 2024 1

Thanks for the tip. Looks good now!
screen shot 2016-10-10 at 2 35 49 pm

from mmm-netatmo.

CFenner avatar CFenner commented on June 23, 2024

Hi there, is your Netatmo set to Fahrenheit? I wound like so set it automatically regarding to the settings in Netatmo.

from mmm-netatmo.

schnster avatar schnster commented on June 23, 2024

I believe so. My netatmo browser page shows temperature in F. But the magic mirror module does not. Thanks.
screen shot 2016-10-08 at 3 16 01 pm

from mmm-netatmo.

CFenner avatar CFenner commented on June 23, 2024

Ok, and the data on the mirror is in Celsius Or just Fahrenheit with C in the end?

from mmm-netatmo.

schnster avatar schnster commented on June 23, 2024

The data on the Magic Mirror is in Celcius. See pic. Thanks.

img_0759

from mmm-netatmo.

schnster avatar schnster commented on June 23, 2024

If you mean the default module weather obtained from Openweathermap, it was in F.

from mmm-netatmo.

CFenner avatar CFenner commented on June 23, 2024

Ok, as I understood the Netatmo API, the data should get out in the correct format. You can check the setting in the data you get back from Netatmo:
bildschirmfoto 2016-10-09 um 12 47 18
Here you have the unit value indicating the measurement system you are using.

Could you use your browsers debugger (open the mirror ui on your computer) to trace in the module coding and set a breakpoint inside the renderAll method of netatmo.js. Reload the page and have a look at the data variable.
bildschirmfoto 2016-10-09 um 12 41 31

from mmm-netatmo.

schnster avatar schnster commented on June 23, 2024

Pardon my ignorance I'm pretty new at this, but in my Chromium browser on the Pi, I think you are suggesting I use the the Developer Tools to trace the netatmo.js file in the module folder? How do I run the mirror UI (e.g., npm start) and have the Chromium dev tool trace it? Thanks again

from mmm-netatmo.

CFenner avatar CFenner commented on June 23, 2024

@schnster you just need to start the mirror as usual. Then you open your browser on your laptop and call the PIs ip: in my case it's http://192.168.178.40:8080
In the browser you can use the developer tools, the PIs browser Chromium has not dev tools, so you need to do this round trip.

from mmm-netatmo.

schnster avatar schnster commented on June 23, 2024

Ah, thanks, that was neat! I traced the data variable and this is what I got.
screen shot 2016-10-10 at 1 06 53 pm

from mmm-netatmo.

CFenner avatar CFenner commented on June 23, 2024

Ok, so different unit and if you look at the sensor data: body/device/0/dashboard_data is it in Celsius or Fahrenheit?

from mmm-netatmo.

schnster avatar schnster commented on June 23, 2024

Temperature is in Celcius...

screen shot 2016-10-10 at 1 20 41 pm

from mmm-netatmo.

CFenner avatar CFenner commented on June 23, 2024

Ok, I'm a bit confused, if I as an api provider would knew how the user wants his data to be displayed, then I would transform the data into this format right away. But that's only my opinion, I've just created a ticket in the netatmo forum. Hopefully someone there can tell me how to handle it. If we have bad lucky I need to implement a data conversion regarding the unit attribute.

from mmm-netatmo.

schnster avatar schnster commented on June 23, 2024

OK, thanks for helping out with this!

from mmm-netatmo.

CFenner avatar CFenner commented on June 23, 2024

Sorry for the inconvenience. If you like to get dirty you can get into the code and do a quick fix to Fahrenheit. Go to line 191 in netatmo.js and change return value.toFixed(1) + '°'; to return (value*1,8+32).toFixed(1) + '°';.

from mmm-netatmo.

macogle avatar macogle commented on June 23, 2024

The quick fix suggested utilizes a comma as the decimal point in the multiplier rather than a period. This will break the code for those computers with language configurations which define the period as the decimal point, returning a value of 40º. Presumably, many users who are looking for data in Fahrenheit are also using keyboards configured for US (EN).

The correct code should read (value*1.8+32).toFixed(1) + '°';

from mmm-netatmo.

CFenner avatar CFenner commented on June 23, 2024

@macogle you are right, 1,8 was stupid ;) it won't work never the less which computer language you have.

from mmm-netatmo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.