-
-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add hoymiles wifi inverter as a meter #16204
Feature/add hoymiles wifi inverter as a meter #16204
Conversation
Co-authored-by: andig <cpuidle@gmail.com>
Co-authored-by: andig <cpuidle@gmail.com>
Co-authored-by: andig <cpuidle@gmail.com>
Co-authored-by: andig <cpuidle@gmail.com>
Co-authored-by: andig <cpuidle@gmail.com>
// int32 would not be Year 2038 safe | ||
// See https://en.wikipedia.org/wiki/Year_2038_problem | ||
// Not 100% sure if the models are self-defined or provided by hoymiles | ||
request.Time = int32(time.Now().Unix()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Das kann in. Die Initialisierung des Requests mit rein. Eigentlich scheint das aber in die Lib zu gehören?
|
||
result, err := hmWifi.client.GetRealDataNew(request) | ||
if err != nil { | ||
if hmWifi.lastValue != 0 && !hmWifi.lastValueUpdated.Add(time.Minute*15).Before(time.Now()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wozu dient das?
if hmWifi.lastValue != 0 && !hmWifi.lastValueUpdated.Add(time.Minute*15).Before(time.Now()) { | ||
hmWifi.lastValue = 0 | ||
} | ||
if err.Error() == "client connection is closed" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Offline ist offline- das sollte das Gerät nicht überbrücken.
sysErr, ok2 := opErr.Err.(*os.SyscallError) | ||
if ok2 && sysErr.Err == syscall.Errno(10060) { | ||
hmWifi.log.DEBUG.Printf("HoymilesWifi the Host is offline: %s", hmWifi.cc.Host) | ||
return hmWifi.lastValue, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dito
return value, err | ||
} | ||
|
||
defer func(client *hoymiles_wifi.ClientData) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Das wäre dann
defer client.CloseConnection()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aber wozu brauchts das überhaupt?
…r-meter' into feature/add-hoymiles-wifi-inverter-meter
Co-authored-by: andig <cpuidle@gmail.com>
Co-authored-by: andig <cpuidle@gmail.com>
Co-authored-by: andig <cpuidle@gmail.com>
I would be really sad if this weren't integrated. |
I will prepare a new Commit. I test ist at home. |
Let's reopen when updated- thank you! |
Hello Evcc Team,
thx for your good work.
I will now pay some thing bag with this pull request.
It includes the feature:
To my person:
Configuration Inverter:
Library:
Som thing for claification:
Example: