Giter VIP home page Giter VIP logo

netatmo-api-go's Introduction

netatmo-api-go

Simple API to access Netatmo weather station data written in Go.

Quickstart

  • Create a new netatmo app
  • Edit test/sample.confwith your credentials
  • run go run test/netatmo-api-test.go -f test/sample.conf
  • Output shall look like :
Station : Home               
        Module : Chambre Elsa                              
                BatteryPercent : 47 (updated 323s ago)     
                RFStatus : 68 (updated 323s ago)           
                Temperature : 22.8 (updated 323s ago)      
                Humidity : 53 (updated 323s ago)           
                CO2 : 446 (updated 323s ago)               
        Module : Chambre parents                           
                BatteryPercent : 50 (updated 323s ago)     
                RFStatus : 71 (updated 323s ago)           
                Temperature : 19.9 (updated 323s ago)      
                Humidity : 61 (updated 323s ago)           
                CO2 : 428 (updated 323s ago)               
        Module : Chambre Jules                             
                BatteryPercent : 46 (updated 323s ago)     
                RFStatus : 60 (updated 323s ago)           
                CO2 : 396 (updated 323s ago)               
                Temperature : 22 (updated 323s ago)        
                Humidity : 54 (updated 323s ago)           
        Module : Exterieur   
                BatteryPercent : 37 (updated 323s ago)     
                RFStatus : 66 (updated 323s ago)           
                Temperature : 23.4 (updated 323s ago)      
                Humidity : 52 (updated 323s ago)           
        Module : Pluie       
                BatteryPercent : 72 (updated 9684499s ago)
                RFStatus : 54 (updated 9684499s ago)       
                Rain : 0.101 (updated 9684499s ago)        
        Module : Living      
                WifiStatus : 37 (updated 278s ago)         
                Temperature : 24 (updated 278s ago)        
                Humidity : 49 (updated 278s ago)           
                CO2 : 733 (updated 278s ago)               
                Noise : 50 (updated 278s ago)              
                Pressure : 1028.1 (updated 278s ago)       
                AbsolutePressure : 1008.4 (updated 278s ago)

Tips

  • Only Read() method actually do an API call and refresh all data at once
  • Main station is handle as a module, it means that Modules() method returns list of additional modules and station itself.
  • Data() returns sensors values (such as temperature) whereas Info() returns module status (such as battery level)

netatmo-api-go's People

Contributors

exzz avatar ginabythebay avatar nightman-1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

netatmo-api-go's Issues

Gust Strength is missing

Hello,

as i see Gust Strength is missing..

is this line correct:

    GustStrength     *int32   `json:"GustStrengthfloat32,omitempty"`

?

or better this:
GustStrength *int32 json:"GustStrength,omitempty"
?

panic - any ideas?

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x47da03]

goroutine 1 [running]:
panic(0x6345a0, 0xc42000c100)
/usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1
github.com/exzz/netatmo-api-go.(*Device).Data(0xc4202f2700, 0xc420076db0, 0xc4200e9328)
/root/netatmo-api-go/src/github.com/exzz/netatmo-api-go/weather.go:278 +0x953
main.main()

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.