Skip to content
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

Timestamps on things like last warning are several hours in the future #9

Closed
apbarratt opened this issue May 2, 2023 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@apbarratt
Copy link
Contributor

Various timestamps such as the one shown for Last Warning are several hours into the future, presumably in China time without a timezone appended to them for home assistant to adjust for. The result is I'm getting entities showing things like my last warning being "in 7 hours".

I see there is a very recent commit to fix this though, so I'm not sure why it's not working for me. My installed version seems to match with the latest commit c23e642 so would include the timezone issues fixed in d783813

Do let me know if there's any data I can provide to help and if there's any particular stuff I need to do to get a useful log to show you :)

I'm afraid that whilst I have had my bike for a while, the old Super Soco ECU was broken and only just replaced with a new Vmoto one a couple of days ago so I can't say if this is a new issue or not.

@drakhart
Copy link
Owner

drakhart commented May 3, 2023

Hi Andy! Thanks for taking the time to try this integration.

I thought I had solved that issue with the commit you mentioned, but you're absolutely right and the last warning also needs a timestamp correction. I'll push a fix for it soon, along with other small things I fixed in the past days.

By the way did you notice the issue in any other entity besides that one?

@drakhart
Copy link
Owner

drakhart commented May 3, 2023

Ok, I noticed that all the timestamps needed a fix except for the GPS which was already fixed. I guess they noticed they were providing wrong timestamps on their side and fixed them to be proper epoch instead of local Shanghai time.

This should be fixed in beta 11. Please let me know if it worked for you.

@drakhart drakhart added the bug Something isn't working label May 3, 2023
@apbarratt
Copy link
Contributor Author

Thank you muchly, that seems to be matching up with me on British Summer Time now :)
Now if only I could figure out how to convince it that the slightest tectonic tremor is not cause for alarm! I'm up to eight alerts today :(
image

@apbarratt
Copy link
Contributor Author

My assumption was that the time from the GPS was based on the actual time stamp received from the satellites (presumably sent in UTC and adjusted by HomeAssistant accordingly) where as all the other time stamps are based on some Chinese server time. It'd be nice if we could tweak these things to point at some self hosted server one day, but I suspect flashing these would not be quite so simple as that 😅

@drakhart
Copy link
Owner

drakhart commented May 3, 2023

If it's of any help to you I've set up an automation to relay alerts to my phone, but I've added a condition with the following template: {{ not is_state_attr("sensor.super_soco_tcmax_last_warning", "title", "Vibrating alert") }}. This way I filter out all the annoying and useless vibration alerts and just receive the important ones.

I feel like hacking the firmware will be really hard to accomplish, but if you're interested in DIY hardware there's this custom board project to send all bike data to an Android app via Bluetooth: https://github.com/Xmanu12/SuSoDevs

I'll close this issue as solved since you're now getting the correct timestamps. Thank you!

@drakhart drakhart closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants