-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix: restore sh1btabb spec, add a7sghmms #5567
Conversation
devices/giex.js
Outdated
case dataPoints.giexWaterValve.irrigationEndTime: | ||
return {[keys.giexWaterValve.irrigationEndTime]: timezone ? toLocalTime(value, timezone) : value}; | ||
case dataPoints.giexWaterValve.lastIrrigationDuration: | ||
return {[keys.giexWaterValve.lastIrrigationDuration]: value.split(',').shift()}; // Remove meaningless ,0 suffix |
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.
Note: for _TZE200_a7sghmms
I've always seen ,0
(i.e. 00:02:10,0
instead of a proper fraction of a second, that's why I'm removing this.
I'm converting this to draft until we clarify this doubt about model names (the current ones in the PR are quite unfriendly): #4929 (comment) |
@drakhart I've tried the new file as a custom converter and have noticed a couple of issues on a
Everything else looks great and it's correctly identified as a model QT06 (sh1btabb) in the UI. |
@drakhart I don't know why, but changing the year in the So line 18 becomes:
|
This is most likely related to the change in model names, as well as the broken documentation link I mention in this comment: #5567 (comment) I guess we'll need to create new markdown files and images into the zigbee2mqtt.io repo.
That's weird. With this conversion I'm getting exactly 7 hours less than the time reported by the device, which is the proper one for me (I'm on CET / GMT+1). The 1900 fix sounds a bit hacky to me since Unix epoch starts in January 1st 1970, and also feels flaky because setting that I get a weird time difference (i.e. it converts Can you please check the system time on the machine you're running Z2M in, and make sure it's set to the proper timezone? Example:
|
This feels very, very weird. Would you mind putting a year somewhere in the middle of epoch time, let's say 2000, instead of 1900 or 1970? Just to make sure this is not some edge case caused by the conversion returning a value below epoch's minimum date. |
I changed it to:
And it's calculating the timezone correctly. I don't understand it. The code as is, with 1970, works perfectly outside of this environment. |
I can't explain it either, just wanted to make sure. But seeing that 2000 works properly for both you and me I'll assume that it will also work for people in other timezones, so I'll apply it to the PR. |
Sounds good. Happy to test anything else as needed. |
Opened the following PR for the docs & images: Koenkk/zigbee2mqtt.io#1947 |
I've tested the current changes and the Instead, when the tap opens, the irrigation_end_time is the |
It's happening for me too and I didn't notice, thanks for the heads up. It's really weird though, let me look into it. |
I did have a brief go at debugging but didn't have enough time. All I can be sure of is that it's not making into the function that converts the time to local. |
I'm getting the following behaviors:
All in all, I don't see anything unusual. Are you sure it doesn't get into the |
I'll need to double check when I get home tonight, but previous versions definitely had the end time as dashes whilst the tap was open. I'll have a play later and see if I can find out where |
Looks good now, please let me know once this is ready for merge. |
@drakhart Apologies for the delay on this one. I've conducted some thorough testing and was really struggling to get my head around this. I effectively debugged each line of relevant code to see where it was getting overwritten, but could never see where I then decided to roll-back to the previous version of the converter, and it was still doing it! I went as far as pulling the converter entirely. Still doing it. I then wondered if it was something set on the device itself, so I removed and repaired it. Still doing it. After sleeping on the issue, I then toggled the My huge apologies, @drakhart, there was nothing wrong with your code at all. I've just tested the latest code in this PR and it's working perfectly when using EDIT: GMT calculation seems to be off again - checking... |
I think I spoke to soon. It looks like the issue is with it not respecting When the I think this may be a limitation of this devices firmware which is possibly solved in the later version. The only work-around I can find is setting the Either way, it's not a problem with this code as the issue is present with the current code and this release. Apologies for the back-and-forth on this one, @drakhart, and thanks again for all of your efforts. |
No problem, @WhimsySpoon, better be safe than sorry. Thanks for taking your time double-checking all these things. ❤️ It indeed sounds like a limitation with |
@Koenkk we're all good, please merge when you have the time. 👍 Thanks. |
Thanks! |
I have tested the |
@drakhart The UK recently moved to British Summer Time, or BST which is GMT+1 and the local times are still showing as GMT, so an hour behind current. You're not going to believe this, but changing the following back to 1970 fixes this:
I'm going to have a play with this and try and get to the bottom of it before I open a new PR. |
Ok, please let me know your findings and let's see if we can get this sorted out once and for all. 🤞 |
Apply fixes as discussed in #4929