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

Module VMBGP4-2, VMBGP4PIR does not yet support sub modules #69

Open
bvedomotic opened this issue Dec 7, 2020 · 31 comments
Open

Module VMBGP4-2, VMBGP4PIR does not yet support sub modules #69

bvedomotic opened this issue Dec 7, 2020 · 31 comments

Comments

@bvedomotic
Copy link

The problem

When I refresh the Velbus Integration i receive the flowing errors in the configuration logs:
Logger: velbus
Source: /usr/local/lib/python3.8/site-packages/velbus/controller.py:311
First occurred: 4:09:17 PM (6 occurrences)
Last logged: 4:09:35 PM

Module VMBGP4PIR does not yet support sub modules
Module VMBGP4-2 does not yet support sub modules

For the modules of this type i also have the flowing error in the configuration logs:
Logger: velbus
Source: /usr/local/lib/python3.8/site-packages/velbus/controller.py:161
First occurred: 4:12:46 PM (4 occurrences)
Last logged: 4:12:46 PM

Failed to completely load module VMBGP4PIRK at address 8 before timeout expired.
Failed to completely load module VMBGP4 at address 176 before timeout expired.
Failed to completely load module VMBGP4PIRBad at address 177 before timeout expired.
Failed to completely load module VMBGP4PIR Living at address 191 before timeout expired.

The rest of the modules works fine only those 2 types are not working and not present in the devices.

Environment

  • Home Assistant Core release with the issue:
    Version | 0.118.3
  • Last working Home Assistant Core release (if known):
    Not working sinds begin testing.
  • Operating environment (OS/Container/Supervised/Core):
    Installation Type | Home Assistant OS
  • Integration causing this issue:
    Velbus
  • Link to integration documentation on our website:
    https://www.home-assistant.io/integrations/velbus/

Problem-relevant configuration.yaml

It is the discovery that fails

Traceback/Error logs

Source: /usr/local/lib/python3.8/site-packages/velbus/controller.py:311
First occurred: 4:09:17 PM (6 occurrences)
Last logged: 4:09:35 PM

Module VMBGP4PIR does not yet support sub modules
Module VMBGP4-2 does not yet support sub modules

Logger: velbus
Source: /usr/local/lib/python3.8/site-packages/velbus/controller.py:161
First occurred: 4:12:46 PM (4 occurrences)
Last logged: 4:12:46 PM

Failed to completely load module VMBGP4PIRK at address 8 before timeout expired.
Failed to completely load module VMBGP4 at address 176 before timeout expired.
Failed to completely load module VMBGP4PIRBad at address 177 before timeout expired.
Failed to completely load module VMBGP4PIR Living at address 191 before timeout expired.

Additional information

@cereal2nd
Copy link
Collaborator

i think i have a fix for this, but i can not test this as i do not own these modules ...

@bvedomotic
Copy link
Author

I wil test it on my system, wil this update (fix) apply automatically on home assistant os or have i to wait following release update?

@cereal2nd
Copy link
Collaborator

i can not commit this until we test this out, as i can break other parts of the system.

2 options:
1- i provide a difff and you test it on your local system
2- you provide me with some (temporary) access to your system over an ssh tunnel or something like thats and i debug on your system.

@bvedomotic
Copy link
Author

I will try to setup a separate system that is connected on my velbus installation and inform you when it is accessible.

@AlbertHakvoort
Copy link

I've got the same issue @cereal2nd , I would like to try it

@ErikRat
Copy link

ErikRat commented Jan 16, 2021

I have a similar problem.
Module VMBGP4-2 does not yet support sub modules
Failed to completely load module VMB4RYLD at address 100 before timeout expired
This has worked until Home Assistant version 0.113.3
I have 10 x VMB4RYLD.
Sometimes it loads one or two of these modules and gives the error message for the others.
All the modules with an address higher than the one that was loaded last will give this error.

@cereal2nd
Copy link
Collaborator

i'm currently working on a complete new implementation in homeassistent

not sure when i will be able to push it.
people who want to test can alreeady try it.
https://github.com/Cereal2nd/velbus-aio

VMBGP*-2 are not yet supported, althought it should be an easy fix (if i can login to someones installation with these active)

@ErikRat
that the modules are not loaded after some time is not normal, maybe some buss errors?
i have this running in an installation with about 80 modules and it works perfect.

@ErikRat
Copy link

ErikRat commented Jan 17, 2021

@cereal2nd
My active installation runs on Home Assistant version 0.113.3, here it loads all modules without any problems. He will give the warning 'Module VMBGP4-2 does not yet support sub modules'.
But not the error message 'Failed to completely load module VMB4RYLD at address 100 before timeout expired'
I also get this warning in my logs
Logger: velbus
Source: /usr/local/lib/python3.8/site-packages/velbus/connections/serial.py:75
First occurred: January 16, 2021 15:28:46 (5 occurrences)
Last logged: 11:21:50
Stop executed
If I update my installation to a later version, the problems start.
Here is a list of all my modules:
10 x VMB4RYLD
1 x VMB4RYNOS
1 x VMB1RYNOS
1 x VMB1RY
1 x VMB4DC
1 x VMBGPO
1 x VMBGPOD
1 x VMBELO
6 x VMB8PBU
6 x VMBGP2

@cereal2nd
Copy link
Collaborator

cereal2nd commented Jan 17, 2021 via email

@ErikRat
Copy link

ErikRat commented Jan 17, 2021

I have a separate test environment on a raspberry pi 4. Here I can perform any tests, it also has a connection with my velbus installation.
Where can I find this file where I can adjust the timer?
Can I access the file via the terminal in home assistant?
Or do I have to use the file editor in home assistant.

@cereal2nd
Copy link
Collaborator

cereal2nd commented Jan 17, 2021 via email

@ErikRat
Copy link

ErikRat commented Jan 17, 2021

In my test environment this is HA image
My active installation
Operating System
Ubuntu 20.04 LTS
Docker version
19.03.11

@ErikRat
Copy link

ErikRat commented Jan 17, 2021

My concern is why does everything work in Home Assistant version 0.113.3 and not in a later version?
The only thing that has changed is the Home Assistant version.
Then it is Home Assistant that has broken something.

@KevChief
Copy link

KevChief commented Jan 17, 2021

I seem to have the same kind of error, but for modules VMBEL1 (failed to load address before timeout) and VMBEL4 (does not yet support sub modules)

@cereal2nd
Copy link
Collaborator

cereal2nd commented Jan 18, 2021 via email

@cereal2nd
Copy link
Collaborator

My concern is why does everything work in Home Assistant version 0.113.3 and not in a later version?
The only thing that has changed is the Home Assistant version.
Then it is Home Assistant that has broken something.

@ErikRat
Copy link

ErikRat commented Jan 18, 2021

I installed velbus in my test environment via custom components. And adjusted the timer in the controller file to 300 sec, but still the same result.
In my active installation Home Assistant version 0.113.3 the scan of the velbus takes 2 min, in the test installation Home Assistant core-2021.1.3 this scan takes 4min.I also see a lot of rtr errors in the log.

@cereal2nd
Copy link
Collaborator

rtr errors in the logs?
never seen this, can you copy paste one?

we now also load the module names, this could be one of the reasons why its slower

@cereal2nd
Copy link
Collaborator

the problem with the long loading times is that we need to send/recive a lot of messages on the bus

  • a scan => send 255 messages recieve a message or 2 messages for each module
  • a channel name request => send a message to the module, receive 3 * number_of_chanels messages
  • request module status (2 messages per module)
  • for each module request te module_name, send 64 messages, receive 64 messages

so yes on a big installation this ca take a while.

for example 10 * VMB4RYLD

  • 255 scan + 10 recieval
  • 10 * 64 * 2 => module name request
  • 1 + 3 * 5 * 10 => channel name request
  • 2 => module status request
    = 1750 messages, we should only send 1 message every 10 ms

so this takes already 3 minuts, the glasspanels also have submodules so that makes it a lot more messages

@ErikRat
Copy link

ErikRat commented Jan 19, 2021

Here are some of the many rtr errors.

2021-01-17 20:16:59 INFO (write_packets_process) [velbus] Sending message on USB bus: {"name": "ChannelNameRequestMessage", "priority": 251, "address": 102, "rtr": false}
2021-01-17 20:16:59 INFO (write_packets_process) [velbus] Sending message on USB bus: {"name": "ReadDataFromMemoryMessage", "priority": 251, "address": 103, "rtr": false}
2021-01-17 20:16:59 INFO (write_packets_process) [velbus] Sending message on USB bus: {"name": "ReadDataFromMemoryMessage", "priority": 251, "address": 103, "rtr": false}
2021-01-17 20:16:43 INFO (write_packets_process) [velbus] Sending message on USB bus: {"name": "ReadDataFromMemoryMessage", "priority": 251, "address": 100, "rtr": false}
2021-01-17 20:16:43 INFO (Thread-3) [velbus] New message: {"name": "ModuleStatusMessage2", "priority": 251, "address": 60, "rtr": false, "closed": [], "enabled": [1, 2, 3, 4, 5, 6, 7, 8], "normal": [1, 2, 3, 4, 5, 6, 7, 8], "locked": []}
2021-01-17 20:16:43 INFO (Thread-3) [velbus] New message: {"name": "ChannelNamePart1Message", "priority": 251, "address": 60, "rtr": false, "channel": 1}
2021-01-17 20:16:43 INFO (Thread-3) [velbus] New message: {"name": "ChannelNamePart2Message", "priority": 251, "address": 60, "rtr": false, "channel": 1}

These are all addresses of relay modules.
The addresses of my relay modules run from 100 to 113 and there is another VMB4DC at address 150. Relay 100 and 101 are still loading and the addresses after it are no longer loaded.

@cereal2nd
Copy link
Collaborator

cereal2nd commented Jan 19, 2021 via email

@ErikRat
Copy link

ErikRat commented Jan 19, 2021

This is what I see in the log of my fixed installation when I reload velbus. Here you see rtr = true.

2021-01-19 17:16:44 INFO (write_packets_process) [velbus] Sending message on USB bus: {"name": "ModuleTypeRequestMessage", "priority": 251, "address": 100, "rtr": true}
2021-01-19 17:16:44 INFO (Thread-2) [velbus] New message: {"name": "ModuleTypeMessage", "priority": 251, "address": 100, "rtr": false}
2021-01-19 17:16:44 INFO (write_packets_process) [velbus] Sending message on USB bus: {"name": "ModuleTypeRequestMessage", "priority": 251, "address": 101, "rtr": true}
2021-01-19 17:16:44 INFO (Thread-2) [velbus] New message: {"name": "ModuleTypeMessage", "priority": 251, "address": 101, "rtr": false}
2021-01-19 17:16:45 INFO (write_packets_process) [velbus] Sending message on USB bus: {"name": "ModuleTypeRequestMessage", "priority": 251, "address": 102, "rtr": true}
2021-01-19 17:16:45 INFO (Thread-2) [velbus] New message: {"name": "ModuleTypeMessage", "priority": 251, "address": 102, "rtr": false}
2021-01-19 17:16:45 INFO (write_packets_process) [velbus] Sending message on USB bus: {"name": "ModuleTypeRequestMessage", "priority": 251, "address": 103, "rtr": true}
2021-01-19 17:16:45 INFO (Thread-2) [velbus] New message: {"name": "ModuleTypeMessage", "priority": 251, "address": 103, "rtr": false}
2021-01-19 17:16:45 INFO (write_packets_process) [velbus] Sending message on USB bus: {"name": "ModuleTypeRequestMessage", "priority": 251, "address": 104, "rtr": true}

@cereal2nd
Copy link
Collaborator

cereal2nd commented Jan 19, 2021 via email

@ErikRat
Copy link

ErikRat commented Jan 19, 2021

May I ask which version of Home Assistant your velbus is running. Then I can also try this in my test environment. Because I have already increased the timer to 600 sec and still get no better result.
I am not a real programmer, can make small adjustments with help.
Can I try the older version of velbus for version 0.115?

@cereal2nd
Copy link
Collaborator

cereal2nd commented Jan 19, 2021 via email

@ErikRat
Copy link

ErikRat commented Jan 19, 2021

How can I do this
is the first time. Am Dutch speaking.

@cereal2nd
Copy link
Collaborator

cereal2nd commented Jan 19, 2021 via email

@ErikRat
Copy link

ErikRat commented Jan 24, 2021

@cereal2nd
When I run the scan.py script I get this error after it has scanned for + - 20 sec.

INFO: root: Exiting ...
WARNING: velbus: Stop executed
INFO: velbus: Sending message on USB bus: {"name": "ModuleStatusRequestMessage", "priority": 251, "address": 18, "rtr": false}
Exception in thread write_packets_process:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run ()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target (* self._args, ** self._kwargs)
File "/home/pi/Desktop/python-velbus-master/velbus/connections/serial.py", line 99, in write_daemon
self._reader.write (message.to_binary ())
File "/usr/lib/python3/dist-packages/serial/threaded/init.py", line 217, in write
self.serial.write (data)
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 531, in write
raise portNotOpenError
serial.serialutil.SerialException: Attempting to use a port that is not open

@cereal2nd
Copy link
Collaborator

cereal2nd commented Jan 25, 2021 via email

@ErikRat
Copy link

ErikRat commented Jan 25, 2021

My port settings are correct because I see the scan running in velbusLink and in my terminal.
It scans for about half a minute, then it has read in all module types.
But when he starts reading the name part, it goes wrong. This at a VMBGPO, after about 5 seconds it gives the message
INFO: root: Exiting ...
WARNING: velbus: Stop executed
Then he only scanned a total of 32 seconds.
Could it have something to do with the submodulles of the VMBGPO?
In the name part scan I also see no outgoing packets from the velbus, and in the module scan I do see these.

@bvedomotic
Copy link
Author

@ErikRat Hello,
In the past i had problems with VMBGPO because i didn't adresse all pages of the VMBGPO.
Are all the submodules adressed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants