claudegel / sinope-130

Neviweb130 custom component for Home Assistant to manage devices connected via a GT130 and wifi devices from Sinopé
GNU General Public License v3.0
63 stars 13 forks source link

Add attribute/fonction to MC3100ZB #198

Closed claudegel closed 7 months ago

Denis-Ot commented 7 months ago

Oups, Hi Claude, some attributes don’t work anymore after this update… IMG_1924

claudegel commented 7 months ago

Your firmware is at 0.0.6 and mine is 0.1.1. There must be an attribute that is still not supported by your device. Please look in your log, home-assistan.log for something about missing parameter. If not already done add this to configuration.yaml

logger:
  default: warning
  logs:
    homeassistant.custom_components: debug
    custom_components.neviweb130: debug

and restart HA

claudegel commented 7 months ago

Did you just add this device to Neviweb ? I'm curious to know why your device is still at FW 0.0.6. What is your hardware version ? mine is 0.

Denis-Ot commented 7 months ago

Hello, I will look for the log soon. Hardware same as you: 0 And more than 1 year installed in Neviweb. Very strange why the firmware is different with the same hardware… IMG_1926

claudegel commented 7 months ago

So there should be an attribute still not supported by your firmware. As soon as we find it I'll be able to put an exception in the code. On time for christmass :)

claudegel commented 7 months ago

Maybe you can try to remove it from Neviweb and add it back. New devices added are checked for firmware update. Maybe it will save your problem. But I still need to find what's wrong to correct this for everyone.

Denis-Ot commented 7 months ago

Just in case, I changed the setting in Neviweb: no battery installed, because that's true and there was a warning with that and maybe the firmware doesn't update in this situation: indication low battery... Suppressed and add done, waiting if new firmware will updated…

Denis-Ot commented 7 months ago

Is it good for you this? IMG_1927

claudegel commented 7 months ago

The DVATTRNSPTD is device attribute not supported. But there should be a ligne below that mention the name of the attribute. This is what I need

Denis-Ot commented 7 months ago

After identifier? If yes: …. - … ( MAC address)

claudegel commented 7 months ago

No it is something added by HA about unknown attribute. I need to crash mine to get the error so you can see what I need.

claudegel commented 7 months ago
2023-12-24 12:19:31.424 ERROR (MainThread) [homeassistant.components.switch] neviweb130: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 575, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/neviweb130/switch.py", line 1245, in update
    self._input_1_on_delay = device_data[ATTR_INPUT_1_ON_DELAY]
                             ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'inputOnDebounceDelay3'   <-- this is what I'm looking for
claudegel commented 7 months ago

I've removed my battery to be like your device and rebooted but there is no error. So it should be your old firmware that do not support some new attributes. I'll make a patch so you can test and let ypu know when it's ready.

Denis-Ot commented 7 months ago

Sorry but I don’t find error or KeyError but this: IMG_1943

Also and I don’t know if it is related: my GT125 is offline since 2 days ago… the Web LED is off and also offline in Neviweb… Already rebooted many times but not yet with the Web LED green…

claudegel commented 7 months ago

GT125 is not related but if you need a new one Sinopé still have some spares. what you sent is the initialisation line, Setting up neviweb130.... what I need should be in Updating neviweb130 switch MC3100ZB.... Anyway I've created a new branch: https://github.com/claudegel/sinope-130/tree/test-MC3100/custom_components/neviweb130 This should work for you. just pick the file switch.py and replace the one you have in HA. Then once it is back we will add back the new attributes to find which one is bad.

Denis-Ot commented 7 months ago

Ok fine, after changing the power supply, the GT125 is live again, ;). Good to know for the stock at Sinopé. I will try the « new »  file later, thanks very much and I let you know for the result and debug to find what was the problem, merry Christmas.

claudegel commented 7 months ago

I've talked to another user and his firmware is like mine 0.1.1

Denis-Ot commented 7 months ago

Hello Claude, the switch file was changed and now the attributes are back.

claudegel commented 7 months ago

You;ve pick the switch.py file from the brancj test-MC3100 ?

Denis-Ot commented 7 months ago

Yes.