Giter Site home page Giter Site logo

drakhart / ha-super-soco-custom Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 3.0 600 KB

Custom component for integrating your Super Soco or Vmoto Soco motorcycle into Home Assistant. It provides meaningful data like power status, battery percentage, location and a lot more.

License: MIT License

Python 100.00%
custom-component home-assistant super-soco

ha-super-soco-custom's People

Contributors

drakhart avatar leandroissa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

leandroissa pmdp

ha-super-soco-custom's Issues

Source API documentation

Hi,

I got inspired by your application and want to use the API to pull the data from my TC MAX to do some analyses on battery use, range, etc.

I was wondering where you got the information for the API, since I am searching but can not find any documentation on it.

Also I noticed that you have two files for the API (vmoto_soco_api.py and super_soco_api.py) which one should I use to retrieve the data?

Kind regards,

Mathijs

Failed to setup - 1.0.0 Beta 10

Got the initial setup to work, with getting a code and added successfully, but integration fails to setup.

image

Error fetching super_soco_custom data:
07:37:34 – (ERROR) Super Soco Custom (custom integration) - message first occurred at 07:21:58 and shows up 22 times
'NoneType' object is not subscriptable
07:37:34 – (ERROR) Super Soco Custom (custom integration) - message first occurred at 07:21:58 and shows up 22 times
Config entry 'Super Soco Custom' for super_soco_custom integration not ready yet: None; Retrying in background
07:33:31 – (WARNING) config_entries.py - message first occurred at 07:22:57 and shows up 2 times
Config entry 'SOCO' for ev_smart_charging integration not ready yet: Input sensors not ready.; Retrying in background
07:21:58 – (WARNING) config_entries.py - message first occurred at 07:11:19 and shows up 5 times

App Vmoto Soco

My IMEI does not work on the Super Soco android app, but it works on the Vmoto Soco android app. Are you planning to make a Home assistant for the Vmoto Soco app as well?

Vmoto Servers not sending sign in SMS code

Just logging an issue here so others don't log further duplicates :)

Vmoto's servers have stopped sending out SMS text messages.
Obviously this isn't an issue with this integration but felt some kind of issue here would be helpful for others who may land here.

Such attempts seem to fail silently in the official app, we just don't receive a message. I'm not sure if this is global or in all regions, my attempts are from Scotland (in the UK... for now).

My logs would suggest that my last successful sign in was on the 15th January but that after that I had my session expired early on shortly after midnight (Beijing time) on 1st February.

Posts on user groups on Facebook show that people have not been able to sign in to the Vmoto apps (at least the ones that require SMS login) this month (February 2024) so far.

Hopefully it'll be back to normal soon, I've found no intuitive way to message the app developers other than through a review on the App Store so far but will message the folk at Vmoto UK shortly to at least see if they can get a message up the chain to the folk in China.
Screenshot 2024-02-04 at 10 25 15

Last Warning no longer available.

My last warning entity has become unavailable and I'm seeing regularly errors in my log because of it.

Here's the latest one for when the integration appears to be attempting to get the information it's asking for:

This error originated from a custom integration.

Logger: custom_components.super_soco_custom
Source: custom_components/super_soco_custom/vmoto_soco_api.py:121 
Integration: Super Soco Custom (documentation, issues) 
First occurred: 12:11:37 (1 occurrences) 
Last logged: 12:11:37

999, message='', url=URL('https://app.vmotosoco-service.com/app/v1/deviceWarn/findDeviceWarnPageByUserId')
Traceback (most recent call last):
  File "/config/custom_components/super_soco_custom/coordinator.py", line 542, in _get_last_warning_data
    res = await self._client.get_warning_list(self._user_id, 1, 1)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/super_soco_custom/vmoto_soco_api.py", line 75, in get_warning_list
    return await self._api_wrapper(url, headers, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/super_soco_custom/vmoto_soco_api.py", line 121, in _api_wrapper
    res.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1005, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 999, message='', url=URL('https://app.vmotosoco-service.com/app/v1/deviceWarn/findDeviceWarnPageByUserId')

Everything else appears to be working okay, I'm getting live data for battery, location, etc just as usual. I assume vmoto must have changed something somewhere. Let me know if there's anything I can provide :)

Hour in moto

Hi when i use the home asisstant the hour in te moto change to UTC intead of the regional hour in muy case UTC +2 (summer)
BEST regards

Speed information lost

Hello,

I would like to ask for help with speed values. I use the lastest version for several weeks with no issue but from last week, I recognize no speed info received via Vmoto Soco login. Used version is [1.0.0-beta.11]. Below, you can find an error related to this app:

Logger: custom_components.super_soco_custom
Source: custom_components/super_soco_custom/vmoto_soco_api.py:121
Integration: Super Soco Custom (documentation, issues)
First occurred: 14. června 2023 v 07:15:50 (3000 occurrences)
Last logged: 12:57:20

999, message='', url=URL('https://app.vmotosoco-service.com/app/v1/deviceWarn/findDeviceWarnPageByUserId')
Traceback (most recent call last):
File "/config/custom_components/super_soco_custom/coordinator.py", line 542, in _get_last_warning_data
res = await self._client.get_warning_list(self._user_id, 1, 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/super_soco_custom/vmoto_soco_api.py", line 75, in get_warning_list
return await self._api_wrapper(url, headers, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/super_soco_custom/vmoto_soco_api.py", line 121, in _api_wrapper
res.raise_for_status()
File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1005, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 999, message='', url=URL('https://app.vmotosoco-service.com/app/v1/deviceWarn/findDeviceWarnPageByUserId')

The login is validated, other data are coming, namely CPX Last GPS Time is changing, therefore I expect the authentication is valid and working properly.

Is there anything I can check?

Thank you

Michal

Stuck in the Reconfiguration V1.0.0 Beta

Thank you for the much anticipated update,

Unfortunately i cannot get it to work. I have updated through HACS and get to the Reconfiguration menu, but get this error message
"Invalid authentication or too many verification codes requested", even though I have not yet submitted my phone number, the same if a do a restart of HA (as I cant restart the integration, as below) or if I wait a solid 24h before try to Reconfigure again.

on the menu when clicking the three dots, I only get a Documentation chose, I would like to have a Reload and a Delete option, to have a clean restart.

Thank you for the effort you have put into this.

Invalid authentication

Hello,
I don't know where to find log, please point at me where I can find it to provide them here.

Anyway I can log into the app and not into the integration using the same credentials. The only difference is that I can't put a 0 at the begining of the phone number. I suppose this is the problem maybe...

Excuse me for my poor English as it's not my naative language.
Thank you for your work.

Need to reload integration all the time

Version of the custom_component

Latest and kept up to date as updates appear :)
I use the newer vmoto app with the battery-powered ECU on a TC-Max.

Configuration

Add your logs here.

Describe the bug

This whole integration was working very well for me, but recently I find it constantly requires a reload to get certain parts to work. It does seem that most data is still coming through, but the most notable issue is when I go to turn on the bike's power and the power toggles (along with the other toggles for notifications etc) are all greyed out. This is fairly quickly repaired by just going to the integration page and choosing "Reload". After about 20 seconds of waiting, the toggle comes back, I can turn on my bike, move it out of the way of my bins to bring them out for the bin lorry and I'm sorted. But if I check even minutes later I can see the toggles have greyed out again.

I almost wonder if Vmoto have updated the app to only provide certain settings if the logged-in session checks in somehow. Frequent polling would undoubtedly be a bad idea, but perhaps if we could stick some kind of retain time to keep the switch status up to date and check once an hour or so and have the command to send include whatever the check-in requirement is... I'm absolutely guessing here 😅

Debug log


Please advice what sort of logs I can provide and how :)
If there's also some way to volunteer live data logs to you to check in on, I'd be happy to provide that if having access to another device would assist in your efforts, though obviously it'd need to be done in some way that is not public :) 

Publish API implementation separately into Pip

Your API implementation is clean and easy to read.

Could we perhaps publish it as a separate git repo on git hub and link it up with pip some how? That way someone could just run pip install socoPy and then have a simple import socoPy to utilise it :)

It would allow for a one stop shop for all python implementations to use a single wrapper of the API and for a community of open source folk to fork and submit PRs to it when API changes should be needed without everyone having to implement changes themselves :)

Speed reading is wrong sometimes

Version of the custom_component

1.0.0-beta.3

Describe the bug

Sometimes the speed entity has a (very) wrong value, possibly because of the GPS noise filter.

image
(Obviously a TCMax cannot reach speeds of 174 Km/h and above 🚀)

Debug log


None provided so far, needs further investigation..

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

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.

Notifications have started arriving in Chinese

I don't think this is something that can be fixed on this end, but it seems I'm now receiving all my warning's in Chinese.
Google translate seems to show they are the same "burglar alarm" notifications that I normally get, but obviously they're not being filtered out by my automations anymore as the wording is different.

I only mention it here in case there is some kind of language selection function in the configuration that might have gone wonky.

Let me know if any logs are of interest.

Screenshot 2024-04-08 at 12 58 16
Screenshot shows that the correct language was arriving at 02:33 last night but switched to Chinese about an hour later at 03:34.

I do wish there were a way to figure out which alerts are just vibration alerts and which are strong enough to actually set off the alarm as I note the alarm on the bike does not go off for all of these. But that's a whole other story and not the point of this ticket :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.