Versions in this module Expand all Collapse all v0 v0.1.1 Sep 3, 2023 Changes in this version + const RSABits + func DumpRSAPEM(pubKey *rsa.PublicKey) (pubPEM []byte) + func GenerateRSAKeys() (*rsa.PrivateKey, *rsa.PublicKey) + type P100Cipher struct + func (c *P100Cipher) Decrypt(payload []byte) []byte + func (c *P100Cipher) Encrypt(payload []byte) []byte + type P100Device struct + func New(ip, email, password string, timeout time.Duration) *P100Device + func (d *P100Device) CheckErrorCode(errorCode int) error + func (d *P100Device) DoRequest(payload []byte) ([]byte, error) + func (d *P100Device) GetDeviceInfo() (*P100Status, error) + func (d *P100Device) GetEnergyUsage(status *P100Status) (*P100Status, error) + func (d *P100Device) GetURL() string + func (d *P100Device) Handshake() (err error) + func (d *P100Device) Login() (err error) + func (d *P100Device) Switch(status bool) (err error) + type P100Status struct + ErrorCode int + Result struct{ ... }