zepp

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2025 License: MIT Imports: 12 Imported by: 0

README

Data

Mi Body Composition Scale 2 (XMTZC05HM)

{
    "bmi": 21.8,
    "bodyScore": 89,
    "bodyStyle": 5,
    "bodyWaterRate": 56.92887,
    "boneMass": 2.7305484,
    "deviceType": 1,
    "encryptImpedance": "451",
    "fatRate": 17.01331,
    "height": 172.0,
    "impedance": 451,
    "metabolism": 1358.0,
    "muscleAge": 25,
    "muscleRate": 50.961838,
    "proteinRatio": 21.837502,
    "source": 1,
    "standBodyWeight": 64.4,
    "visceralFat": 9.0,
    "weight": 64.7
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) AddWeights added in v0.3.0

func (c *Client) AddWeights(weights []*core.Weight) error

func (*Client) DeleteWeight added in v0.3.0

func (c *Client) DeleteWeight(weight *core.Weight) error

func (*Client) Equal added in v0.3.0

func (c *Client) Equal(w1, w2 *core.Weight) bool

func (*Client) GetAllWeights

func (c *Client) GetAllWeights() ([]*core.Weight, error)

func (*Client) GetFamilyID

func (c *Client) GetFamilyID(name string) (int64, error)

func (*Client) GetFamilyMembers

func (c *Client) GetFamilyMembers() error

func (*Client) GetFilterWeights added in v0.2.0

func (c *Client) GetFilterWeights(name string) ([]*core.Weight, error)

func (*Client) Login

func (c *Client) Login(username, password string) error

func (*Client) LoginWithToken

func (c *Client) LoginWithToken(token string) error

func (*Client) Token

func (c *Client) Token() string

type Record added in v0.3.0

type Record struct {
	DataSource    int    `json:"dataSource"`    // 1 = WEIGHT
	DeviceId      string `json:"deviceId"`      // uppercase mac without colons
	DeviceSource  int    `json:"deviceSource"`  // 102
	GeneratedTime int64  `json:"generatedTime"` // unix
	MemberId      string `json:"memberId"`      // -1 for main user
	UserId        string `json:"userId"`
	WeightType    int    `json:"weightType"` // 0 - add, 1 - change or delete?

	Summary RecordSummary `json:"summary"`
}

type RecordSummary added in v0.3.0

type RecordSummary struct {
	Weight           float32 `json:"weight"`
	Height           float32 `json:"height,omitempty"`
	BMI              float32 `json:"bmi,omitempty"`
	FatRate          float32 `json:"fatRate,omitempty"`
	BodyWaterRate    float32 `json:"bodyWaterRate,omitempty"`
	BoneMass         float32 `json:"boneMass,omitempty"`
	Metabolism       float32 `json:"metabolism,omitempty"`
	MuscleRate       float32 `json:"muscleRate,omitempty"`
	MuscleAge        int     `json:"muscleAge,omitempty"`
	ProteinRatio     float32 `json:"proteinRatio,omitempty"`
	StandBodyWeight  float32 `json:"standBodyWeight,omitempty"`
	VisceralFat      float32 `json:"visceralFat,omitempty"`
	Impedance        int     `json:"impedance,omitempty"`
	EncryptImpedance string  `json:"encryptImpedance,omitempty"`
	BodyScore        int     `json:"bodyScore,omitempty"`
	BodyStyle        int     `json:"bodyStyle,omitempty"`
	DeviceType       int     `json:"deviceType"` // 1 - WEIGHT
	Source           int     `json:"source"`     // 1 - without Age, BodyBalanceScore, OneFootMeasureTime, SyncHealth

}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL