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

VMB4AN problems: mixed up channel names, sensor update #130

Open
sidlgor opened this issue Dec 18, 2024 · 6 comments
Open

VMB4AN problems: mixed up channel names, sensor update #130

sidlgor opened this issue Dec 18, 2024 · 6 comments

Comments

@sidlgor
Copy link
Contributor

sidlgor commented Dec 18, 2024

I recently developed a custom Velbus module for controlling pumps and heating for my pool. I therefore mimic the VMB4AN module so I can transmit alarms and measured temperatures onto the Velbus. This all works fine up to VelbusLink which recognizes the module, reads the channel names and shows correct actual values of the sensors.

Correct channel names and sensor values in VelbusLink
image

However in Home Assistant integration I encounter following problems:

1e problem: Channel names and channel numbers seems mixed up. The VMB4AN protocol document defines channels 1 to 8 as the alarms, 9 to 12 as the sensors and finally 13 to 16 as analog outputs. I narrowed down a bit the problem to the identification off the channels in the channel name request (0xEF) and response (0xF0) messages. Where in most modules the channel Id is send by a 8-bit bitmask the VMB4AN identifies the channel by its actual number (1 to 16) or 255 for all channels in request message. The reason for this change seems obvious because the 16 channels could not be fitted into a 8 bit mask. Also memory map behaves different for additional channels …

Mixed up channel numbers / names in Home Assistant cache
{
“name”: “VMB4ANPool”,
“channels”: {
“1”: {
“name”: “Analog Out 1”,
“type”: “Sensor”
},
“2”: {
“name”: “Analog Out 2”,
“type”: “Sensor”
},
“3”: {
“name”: “Analog Out 3”,
“type”: “Sensor”
},
“4”: {
“name”: “Analog Out 4”,
“type”: “Sensor”
},
“5”: {
“name”: “ZwemDakAuto”,
“type”: “Sensor”
},
“6”: {
“name”: “ZwemPompen”,
“type”: “Sensor”
},
“7”: {
“name”: “ZwemFilter”,
“type”: “Sensor”
},
“8”: {
“name”: “ZwemDakPomp”,
“type”: “Sensor”
},
“9”: {
“name”: “Sensor 1”,
“type”: “SensorNumber”
},
“10”: {
“name”: “Sensor 2”,
“type”: “SensorNumber”
},
“11”: {
“name”: “Sensor 3”,
“type”: “SensorNumber”
},
“12”: {
“name”: “Sensor 4”,
“type”: “SensorNumber”
},
“96”: {
“name”: “SelectedProgram”,
“type”: “SelectedProgram”
}
}

2e problem: Sensor data is not updated (is handling of raw sensor data message 0xA9 implemented?)

Some pictures of custom module
VMB4AN_1
VMB4AN_2
VMB4AN_3

@cereal2nd
Copy link
Owner

the vmb4an is implemented but really basic, i never had a module to test with ...

so no garantees

@sidlgor
Copy link
Contributor Author

sidlgor commented Dec 18, 2024

I don't have a 'real' vmb4an either. I just have my home brew implementation which seems to work fine in velbuslink (because there are several ways to get the channelnames I can't even be 100% sure about my module implementation).
Anyway I can debug the integration myself ... but I will need to setup a new test environment ... no problem, I will do that after holidays :-)
You mention that the module is (basic) implemented. Is this including handling the raw sensor data (message 0xA9)? I really can't find any implementation in code (module.py) ... I could implement the decoding of the message but I have no idea how to pass the current sensor value to has. A 'basic' implementation would be a great help or some example of passing a numeric value to has.

@cereal2nd
Copy link
Owner

the raw message should be implemented, but the channel numbering can be wrong.

as velbus uses different types of channel assignments int there modules we need to handle this on a per module basis.
So i expect this to be the problem.

is there a way i can run a scan/debug tool on your system?

@sidlgor
Copy link
Contributor Author

sidlgor commented Dec 19, 2024

the raw message should be implemented, but the channel numbering can be wrong.
The content of the cache file seems to point that way

as velbus uses different types of channel assignments int there modules we need to handle this on a per module basis.
So i expect this to be the problem.

I absolutely agree, but I also would like to check the raw sensor data message (channel id is important there to). Could you point me to the implementation of the message (0xA9) ?

is there a way i can run a scan/debug tool on your system?
No problem. I am running HAS docker on a PI4 with velserv and VSCode. Just tell me what to do.

@cereal2nd
Copy link
Owner

cereal2nd commented Dec 19, 2024

@MDAR
Copy link

MDAR commented Dec 19, 2024

@cereal2nd

I have a VMB4AN in my main demo rig if you want to access it

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

3 participants