Discover Packages
github.com/nItroTools/sungrow-go
ws
package
Version:
v0.0.0-...-d52d93c
Opens a new window with list of versions in this module.
Published: Apr 3, 2024
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type RequestConnect struct {
Lang string `json:"lang"`
Token string `json:"token"`
Service string `json:"service"`
}
type RequestReal struct {
Lang string `json:"lang"`
Token string `json:"token"`
DevId string `json:"dev_id"`
Service string `json:"service"`
Time123456 int64 `json:"time123456"`
}
type ResponseConnect struct {
ResultCode int `json:"result_code"`
ResultMsg string `json:"result_msg"`
ResultData struct {
Service string
Token string
Uid int
TipsDisable int `json:"tips_disable"`
} `json:"result_data"`
}
type ResponseReal struct {
ResultCode int `json:"result_code"`
ResultMsg string `json:"result_msg"`
ResultData struct {
Service string
List []struct {
DataName string `json:"data_name"`
DataValue string `json:"data_value"`
DataUnit string `json:"data_unit"`
}
Count int
} `json:"result_data"`
}
NewWS returns a new WS instance.
Battery fetches battery data from the inverter.
Close closes the connection.
func (ws *WS ) Connect() (err error )
Connect connects to the inverter using the WebSocket protocol.
Pv fetches pv data from the inverter.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.