Giter Site home page Giter Site logo

Comments (8)

apbarratt avatar apbarratt commented on July 19, 2024 1

It's interesting seeing that they stay true to form with their error codes. Unpleasant catastrophic failure is 999 on the API, and likewise when the ECU needs replacing on their bikes it's error 99 that flashes on the display.

from ha-super-soco-custom.

apbarratt avatar apbarratt commented on July 19, 2024

Prior to this error, I'd attempted deleting the entity for last warning to see if it would come back. I've now reloaded the integration and the entity has indeed returned, but I have more errors:

Logger: homeassistant
Source: components/sensor/__init__.py:532 
First occurred: 12:16:44 (1 occurrences) 
Last logged: 12:16:44

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 521, in state
    if value.tzinfo is None:
       ^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'tzinfo'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 970, in _async_registry_updated
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 654, in _async_write_ha_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 596, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 532, in state
    raise ValueError(
ValueError: Invalid datetime: sensor.bike_last_warning has timestamp device class but provides state unknown:<class 'str'> resulting in ''str' object has no attribute 'tzinfo''

and an almost identical one:

Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:532 
Integration: Sensor (documentation, issues) 
First occurred: 12:16:44 (2 occurrences) 
Last logged: 12:16:44

Error adding entities for domain sensor with platform super_soco_custom
Error while setting up super_soco_custom platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 521, in state
    if value.tzinfo is None:
       ^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'tzinfo'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 471, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 749, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 850, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 654, in _async_write_ha_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 596, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 532, in state
    raise ValueError(
ValueError: Invalid datetime: sensor.bike_last_warning has timestamp device class but provides state unknown:<class 'str'> resulting in ''str' object has no attribute 'tzinfo''

from ha-super-soco-custom.

drakhart avatar drakhart commented on July 19, 2024

Hi, Andy! Thanks for reporting these errors. I'm indeed getting the 1st one too. I'll take a look at both of them when I have some spare time.

from ha-super-soco-custom.

drakhart avatar drakhart commented on July 19, 2024

As you mention this is a problem with the API server (on their end). It even crashes when you try to fetch the warning messages in the official app v1.0.7 (going to menu > Message > Alarm Message), which is the latest version afaik.

When intercepting traffic from the app you can see that it simply returns this response with no further details:

{
  "success": false,
  "status": 999,
  "message": "System Error",
  "data": null
}

I'm afraid that we'll have to wait for an API fix from Vmoto Soco.

from ha-super-soco-custom.

drakhart avatar drakhart commented on July 19, 2024

Nice easter egg indeed (if that's in fact an intended thing), but to be honest their lack of respect for any HTTP and REST standards makes me wanna cry inside.

from ha-super-soco-custom.

drakhart avatar drakhart commented on July 19, 2024

I forgot to mention: that response (and every other response for that matter) actually comes as 200 OK. And many other things I've seen. 🤷

from ha-super-soco-custom.

drakhart avatar drakhart commented on July 19, 2024

It looks like the warnings endpoint started working again today, but I'm unable to reconnect the HA integration and check because it's not sending the SMS code. Can someone please confirm?

from ha-super-soco-custom.

drakhart avatar drakhart commented on July 19, 2024

I can confirm that the last warning entity is available again.

Screenshot_2023-09-02-09-41-53-61_c3a231c25ed346e59462e84656a70e50

from ha-super-soco-custom.

Related Issues (19)

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.