FYI
The command should be
ls -l /dev/serial/by-id/
Easy mistake
FYI
The command should be
ls -l /dev/serial/by-id/
Easy mistake
Oops, missed that part about your script. Bet it is this and I can install it with wget?
https://www.mdar.co.uk/dl/velbus/velbus-tcp.sh
Will look if I can fix it manually. If not I can still remove snap and velbus-tcp and run the script, correct?
No need to run the whole script, but yes, that would fix the issues.
You could just run each snap command here…
snap connect velbus-tcp:raw-usb :raw-usb
# via VMBRSUSB
snap set velbus-tcp serial.port=/dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00 serial.autodiscover=false ntp.enabled=true tcp.host=0.0.0.0,127.0.0.1 tcp.port=27015,6000 tcp.relay=true,true tcp.ssl=true,false tcp.auth=true,false tcp.authkey=velbus,
However, the password after this will simply be
velbus
You can use this command to set whatever password you like
snap set velbus-tcp tcp.authkey=MyPassCode,
FYI, the comma at the end is very important
Because my script sets up two ports, the command requires TWO keys, but the second port isn’t asking for a key
If you only want one open secure port
Try this command
snap set velbus-tcp serial.port=/dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00 serial.autodiscover=false ntp.enabled=true tcp.host=0.0.0.0 tcp.port=27015 tcp.relay=true tcp.ssl=true tcp.auth=true tcp.authkey=YourChoiceOfPassCode
And change the HomeAssistant hub to
tls:YourChoiceOfPassCode@
machine’s IP :27015
Hi Mdar,
I ended up with this. Will try your commands tomorrow, and I think I’ll get it fixed with a clear head:
https://ibb.co/y6qhJnb
Okay
Very close
Does Velbuslink work?
I’m no expert on HomeAssistant, but my guess would be that you need to add a hub that connects to the TCP port of velbus-tcp ??
How it asks for the details is a mystery to me
In text form, it’s as above ^^^^ always used to work for people (as per the guide in the HA docs)
whatever you set it as
27015
I’m around during the day, going out to run an event after 17:00 CET / 16:00 GMT
Velbuslink works when I connect it to my dietpi. It loads the modules!
Might have an idea what else could be going on. Will check tomorrow and get back to you
I ended up running your script. These are the settings:
oot@DietPi:~# snap get velbus-tcp -d
{
"logging": {
"output": "stream",
"type": "info"
},
"ntp": {
"enabled": true,
"synctime": ""
},
"serial": {
"autodiscover": false,
"port": "/dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00"
},
"tcp": {
"auth": "true,false",
"authkey": "velbus,",
"cert": "/var/snap/velbus-tcp/common/certificate.pem",
"host": "0.0.0.0,127.0.0.1",
"pk": "/var/snap/velbus-tcp/common/privkey.pem",
"port": "27015,6000",
"relay": "true,true",
"ssl": "true,false"
}
}
So I’m trying to connect to velbus using the following setting as connection string to add the hub:
tls:velbus@127.0.0.1:27015
After which it starts loading, but ends up with “no devices or entities”. So I enalbed logging and uploaded the log file right here. There seem to be some error in there which might explain the behaviour.
You can start checking from:
2024-06-14 09:01:49.774 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by integration ‘velbus’ at homeassistant/components/velbus/config_flow.py, line 37: controller = velbusaio.controller.Velbus(prt) (offender: /mnt/dietpi_userdata/homeassistant/deps/lib/python3.12/site-packages/velbusaio/handler.py, line 40: with open(), please create a bug report at Issues · home-assistant/core · GitHub
home-assistant_2024-06-14T07-02-27.722Z.log (689.4 KB)
It might be my fault for being slightly inaccurate
Try this instead
tls://velbus@
dietPi LAN IP :27015
Or
tls:velbus@
dietPi LAN IP :27015
Add the Double back slash & Machine LAN address.
As I say, I’m no expert with HomeAssistant.
The HomeAssistant container won’t work with the 127.0.0.1 / loopback address
If you were using the loopback address with another program, the port is 6000 without TLS & passcode
Others have got to the same point as you.
Does this help ??
Hi @MDAR : I got it worked out:
127.0.0.1:6000 as connection string did the trick. It now loaded the modules in HA.
Thanks for your help!
That’s interesting.
I thought HA was in a container that prevented it accessing the loopback port.
Useful to know, thanks.
I’m glad you’ve got it working.
Actually, I think the Philips Hue Bridge might not be required. I’m using the Sonoff zigbee USB dongle and in theory it is possible to connect all your Philips Hue lamps to that dongle. I haven’t tested that though.
Think I’ll get myself a Hue Bridge though. I will now finish up on the velbus integrations and document my configuration.
Afther that I’ll start with the Philips Hue integration.
I think the Velbus integration will have been the hardest. Time will tell!
Would you care to share your documentation? I’m particularly interest in the coupling of the glass panel modules (VMBGP4) with the Philips Hue lamps as I currently do this through Home Assistant automations which is not ideal IMO.
Did you use a signum IOT module or a raspberry pi to connect your Sonoff zigbee USB dongle?
I would love to use the dongle in combination with the signum IOT module and de HA (lite) on it.
I used to have a containerized version of HA spinning on my Raspberry Pi. I then bridged my Sonoff zigbee USB dongle in this container. Now, I run HAOS on a dedicated server inside a VM using Proxmox.
So, small update after 6 months or so:
velbus-tcp has been running solid after it’s installation in june. I now can control the lights through my smartphone. Have yet to buy a Hue bridge. Been postponing that because I don’t really need it as of yet.
But here is the thing:
This whole project been running on a bare metal Home Assistant “core” version on my NUC. I would like to install proxmox and install HAOS as a VM in it. Will give me a lot more flexibility for a future project.
Wil velbus-tcp work if I set it up this way? Will I have to use USB-passthrough on Proxmox so the HAOS will “detect” the USB connection?
I don’t know much about proxmox, but if you must have velbus-tcp
running inside a VM for any reason then you must figure out how to make the USB device available to the VM. Generally USB devices are one of the most straightforward types of devices to make available to a VM, and once that’s done, software can’t tell the difference for most intents and purposes and will run without batting an eye. That includes velbus-tcp.
But. You could also run velbus-tcp
outside of the VM and access it from H-A via network. These two components do not require to be collocated. OR you could isolate further and run velbus-tcp
in its own container (proxmox appears to support LXC containers?) or even another VM if you wanted to. Options.
Hi @csoete
So I’m looking into running velbus-tcp module on HAOS. I have HAOS installed as a VM on proxmox. Proxmos is installed on an Intel Nuc.
How did you get it working? Obviously the velbus-tcp.sh script is not working in HAOS. Nor can I find it as an add-on in HAOS itself.
Can you point me into the right direction?
FYI
That script is purely for installation of the official Velbus Snap version of their TCP gateway into a Debian environment, I wouldn’t expect it to work in any other configuration.
It’s not an application in its own right.
The SNAP package that the script installs is also just a wrapper for the Python application.
I do know that the Velbus TCP gateway python application or the snap version can run in the root and be accessible from ProxMox environments, but only because someone I work with has done it to demonstrate it to me.
You can find more information about the Velbus gateway here
Alternatively, you can use Velserv , which is a C++ application. (Search this forum for more information)
Maybe what you really need is this