Hoe kan ik velbus installeren in homeassisant

ik heb een velbus installatie die ik graag zou bedienen met homeassistant, Velbus staat niet in de add-on store van homeassistant. Maar is wel beschikbaar bij github, maar weet niet hoe ik deze moet in homeassistant krijgen. Kunnen jullie mij helpen bij dit?

dit staat toch uitgelegd onder de documentatie van de velbus component?

Dit heb ik gedaan eerst geprobeerd met port: ‘/dev/ttyUSB00’ en ook met ttyAMC0, maar er gebeurt niets, er worden geen componenten van velbus gevonden. hieronder een kopie van configuratie.ymal

tts:
- platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml

script: !include scripts.yaml

velbus:
port: /dev/ttyACM0

media_player:

  • platform: plex
    show_all_controls: false
    use_episode_art: true
    remove_unavailable_clients: true
    client_remove_interval: 600

Example configuration.yaml entry

is /dev/ttyACM0 het correcte device?

normaal komt er in de log de debug voor het scannen van de bus

volledig opnieuw opgestart dit is de log file
19-07-29 14:58:33 INFO (SyncWorker_0) [hassio.docker.supervisor] Attach to Supervisor homeassistant/armv7-hassio-supervisor with version 170
19-07-29 14:58:34 INFO (MainThread) [hassio.utils.gdbus] Introspect org.freedesktop.systemd1 on /org/freedesktop/systemd1
19-07-29 14:58:34 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: org.freedesktop.systemd1 - /org/freedesktop/systemd1
19-07-29 14:58:34 INFO (MainThread) [hassio.utils.gdbus] Introspect org.freedesktop.hostname1 on /org/freedesktop/hostname1
19-07-29 14:58:34 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: org.freedesktop.hostname1 - /org/freedesktop/hostname1
19-07-29 14:58:34 INFO (MainThread) [hassio.utils.gdbus] Introspect de.pengutronix.rauc on /
19-07-29 14:58:34 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: de.pengutronix.rauc - /
19-07-29 14:58:34 INFO (MainThread) [hassio.host.info] Update local host information
19-07-29 14:58:34 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
19-07-29 14:58:34 INFO (MainThread) [hassio.host.services] Update service information
19-07-29 14:58:34 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
19-07-29 14:58:34 INFO (MainThread) [hassio.host.apparmor] Load AppArmor Profiles: {‘hassio-supervisor’}
19-07-29 14:58:34 INFO (MainThread) [hassio.host.services] Reload local service hassos-apparmor.service
19-07-29 14:58:34 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.ReloadOrRestartUnit on /org/freedesktop/systemd1
19-07-29 14:58:34 INFO (SyncWorker_1) [hassio.docker.interface] Attach to homeassistant/raspberrypi3-homeassistant with version 0.96.5
19-07-29 14:58:34 INFO (MainThread) [hassio.hassos] Detect HassOS 2.12 on host system
19-07-29 14:58:34 INFO (SyncWorker_0) [hassio.docker.hassos_cli] Found HassOS CLI homeassistant/armv7-hassio-cli with version 11
19-07-29 14:58:35 INFO (MainThread) [hassio.store.git] Load add-on /data/addons/git/a0d7b954 repository
19-07-29 14:58:35 INFO (MainThread) [hassio.store.git] Load add-on /data/addons/core repository
19-07-29 14:58:35 INFO (MainThread) [hassio.store] Load add-ons from store: 59 all - 59 new - 0 remove
19-07-29 14:58:35 INFO (MainThread) [hassio.addons] Found 4 installed add-ons
19-07-29 14:58:35 INFO (SyncWorker_3) [hassio.docker.interface] Attach to homeassistant/armv7-addon-configurator with version 3.4
19-07-29 14:58:35 INFO (SyncWorker_5) [hassio.docker.interface] Attach to homeassistant/armv7-addon-samba with version 8.1
19-07-29 14:58:35 INFO (SyncWorker_4) [hassio.docker.interface] Attach to homeassistant/armv7-addon-duckdns with version 1.8
19-07-29 14:58:35 INFO (SyncWorker_2) [hassio.docker.interface] Attach to hassioaddons/node-red-armv7 with version v4.0.5
19-07-29 14:58:35 INFO (MainThread) [hassio.updater] Fetch update data from https://version.home-assistant.io/stable.json
19-07-29 14:58:35 INFO (MainThread) [hassio.snapshots] Found 2 snapshot files
19-07-29 14:58:35 INFO (MainThread) [hassio.discovery] Load 0 messages
19-07-29 14:58:35 INFO (MainThread) [hassio.ingress] Load 5 ingress session
19-07-29 14:58:35 INFO (MainThread) [main] Run Hass.io
19-07-29 14:58:35 INFO (MainThread) [hassio.misc.dns] Start DNS port forwarding for host add-ons
19-07-29 14:58:35 INFO (MainThread) [hassio.api] Start API on 172.30.32.2
19-07-29 14:58:35 INFO (MainThread) [hassio.addons] Phase ‘initialize’ start 0 add-ons
19-07-29 14:58:35 INFO (MainThread) [hassio.addons] Phase ‘system’ start 0 add-ons
19-07-29 14:58:35 INFO (MainThread) [hassio.addons] Phase ‘services’ start 2 add-ons
19-07-29 14:58:35 INFO (SyncWorker_3) [hassio.docker.interface] Clean addon_core_samba application
19-07-29 14:58:35 INFO (SyncWorker_4) [hassio.docker.interface] Clean addon_core_duckdns application
19-07-29 15:10:15 INFO (SyncWorker_3) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-samba with version 8.1
19-07-29 15:10:17 INFO (SyncWorker_4) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-duckdns with version 1.8
19-07-29 15:10:22 INFO (SyncWorker_11) [hassio.docker.interface] Start homeassistant/raspberrypi3-homeassistant
19-07-29 15:10:53 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance
19-07-29 15:10:53 INFO (MainThread) [hassio.addons] Phase ‘application’ start 2 add-ons
19-07-29 15:10:54 INFO (SyncWorker_15) [hassio.docker.interface] Clean addon_core_configurator application
19-07-29 15:10:54 INFO (SyncWorker_3) [hassio.docker.interface] Clean addon_a0d7b954_nodered application
19-07-29 15:10:58 INFO (SyncWorker_3) [hassio.docker.addon] Start Docker add-on hassioaddons/node-red-armv7 with version v4.0.5
19-07-29 15:11:00 INFO (SyncWorker_15) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-configurator with version 3.4
19-07-29 15:11:02 INFO (MainThread) [hassio.api.security] /host/info access from a0d7b954_nodered
19-07-29 15:11:05 INFO (MainThread) [hassio.tasks] All core tasks are scheduled
19-07-29 15:11:05 INFO (MainThread) [hassio.core] Hass.io is up and running

krijg deze foutmelding:

Invalid config

The following components and platforms could not be set up:

Please check your config.

in mijn configuration heb ik het volgende gezet
velbus:
port: /dev/ttyUSB00

Ik heb echt geen idee waar het foutloopt
Hopelijk kunt u mij helpen, dank bij voorbaat

de configuration.yaml file is in een yaml formaat.
dus port: moet exact 2 spaties geindent zijn tov van velbus:

is /dev/ttyUSB00 het juiste device? want als dit niet het velbus device is zal het ook niet werken.
Maar tot hier geraakt ge zelfs niet

1 Like

Excuse my reply in English.

Have you tried –

velbus:
port: /dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00

Or can you see any other SymLinks that map your Velbus USB device to a particular TTY port?

ls -l /dev/serial/by-id/

de port staat 2 spaties geindent tov velbus, Hoe kan ik weten of ttyUSB00 het juiste device is. De VMBRSUSB is aangesloten op een usb poort van rapberry pi 3+

MDAR
I tried, but I get this Error in the log from homeassistant
serial.serialutil.SerialException: [Errno 2] could not open port /dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00 ls -l /dev/serial/by-id/: [Errno 2] No such file or directory: ‘/dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00 ls -l /dev/serial/by-id/’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 153, in _async_setup_component
hass, processed_config)
File “/usr/src/homeassistant/homeassistant/components/velbus/init.py”, line 27, in async_setup
controller = velbus.Controller(port)
File “/usr/local/lib/python3.7/site-packages/velbus/controller.py”, line 35, in init
self.connection = VelbusUSBConnection(port, self)
File “/usr/local/lib/python3.7/site-packages/velbus/connections/serial.py”, line 57, in init
raise VelbusException(“Could not open serial port”)
velbus.util.VelbusException: ‘Could not open serial port’
2019-07-29 21:44:19 ERROR (SyncWorker_0) [homeassistant.components.ios.notify] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information

Het is een acm device zie bootlog: https://1drv.ms/u/s!AnIqLpusHNu0gv05Hjsr-I0nJXQmPQ
zal het morgenavond eens proberen met ttyACM0

I don’t know much about HomeAssistant, but this looks more like a port assignment issue anyway.

So…

Can you confirm that the VMBRSUSB has been detected by your system?

Try the “ListUSB” command

lsusb

You should see something like this :-

Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 10cf:0b1b Velleman Components, Inc.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The next thing is to confirm that the Velleman USB device has been assigned to a ACMx port. (Where x is a number)
By using the “List” command

 ls -l /dev/serial/by-id

Which should return something like this :-

Total 0
lrwxrwxrwx 1 root root 13 Jul 10 21:46 usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00 -> ../../ttyACM0

Where ttyACM0 is the assigned port.

If all of the above works, there isn’t much left.

Other than to remind you that only one thing can connect to a port at a time.

Meaning that if you have VelServ, openHAB2 or OpenRemote running and directly connecting to the USB device, anything else will get rejected.

But… It looks like there is great news.

Apparently they have added TCP connection for Velbus.

The velbus integration supports the Velbus USB, Velbus serial and a TCP/IP gateway.

So I would suggest that you get either VelServ or Velbus TCP Snap working first, so that you can connect MULTIPLE bits of software to your Velbus network.

Then you can connect VelbusLink and monitor the bus to see when HomeAssistant (and others) start putting packets on the bus.

By using a configuration in Home Assistant that looks like this :-

Example configuration.yaml entry for a TCP/IP interface

velbus:
  port: '127.0.0.1:3678'

Where 3678 is the TCP port number and 127.0.0.1 is the LoopBack IP address.

As in the classic “Wizard of Oz” inspired T-Shirt slogan

There’s no
place like
127.0.0.1

My VelServ systemd script loads VelServ on port 6000

velbus:
  port: '127.0.0.1:6000'

By default VelServ runs on port 3788

velbus:
  port: '127.0.0.1:3788'

The official Velbus Snap TCP server runs on port 27015

velbus:
  port: '127.0.0.1:27015'

However…

After saying all that, I read your error log a bit more and saw this at the start

I’m surprised to see “ls -l /dev/serial/by-id/” in the error log

ls is the Linux command line List app (lower case L & S)

Where -l means Show details

And /dev/serial/by-id/ is what you want the List command to show you

I would have expected your error log to only contain

serial.serialutil.SerialException: [Errno 2] could not open port /dev/serial/by-id/usb-Velleman_Projects_VMB1USB_Velbus_USB_interface-if00

Or

serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyACM0

dan zal dit wel werken.
in de volgende versie (0.97) zal velbus ook geconfigureerd kunnen worden via de grafische interface (mijn pull request is gisterren gemergd) dan zal dit een pak simpeler worden om te testen.

2 Likes

Indeed we have this support since HomeAssistant 0.76
until now we almost catched-up with the openHab implementation of velbus, we can control most of the modules.

2 Likes

There’s a quote that @cedricb can be proud of.

But do you mean the downloadable Velbus binding from within openHAB2, or do you mean Cédric’s development version :wink:

Personally, I think it’s fabulous that people are making the MASSIVE effort to include Velbus into all these platforms :smile:

It makes my life just that little bit easier, for which I am truly grateful.

2 Likes

i’m mainly looking at the offically supported version, but i also played with the ‘private’ version to.

the private version has some modules we don’t support yet because i have no access to them to test them (like the vmban, the newer glass panels and the edgelit panels).

The fun thing about the homeassistant implementation is that velbus is supported out of the box, just install and your up and running (to promote it a bit ;))\

To bad velbus is not giving support on stuff like this, if i could lend those modules for a week it would be cool and they would be integrated fast. or if we could get a demo version of the upcomming modules that would also be handy

2 Likes

Home assistant Hassio opnieuw geïnstalleerd, heb nu verbinding kunnen maken met velbus.

Velbus:

port: ‘/dev/ttyACM0’ moeten instellen voor de verbinding.

Krijg nu deze foutmelding waardoor ik weet dat mijn verbinding werkt. Module 1 = VMBGPOD

2019-07-30 22:26:52 WARNING (Thread-2) [velbus] received unrecognized command 0 from module 1

2019-07-30 22:26:52 WARNING (Thread-2) [velbus] received unrecognized command 246 from module 1

Moet nu nog uitzoeken wat deze foutmeldingen betekenen:smiley::grinning:

1 Like

I would say…

“Don’t worry”

If my understanding is correct, the error message simply means that a message / packet from the module isn’t understood by Home Assistant.

Inderdaad Mdar is correct, dit zijn warnings en geen errors.

niet alle messages van de bus zijn nodig voor home-assistant (ik ben bezig om deze automatisch te ignoren zodat er geen warning meer komt). Dit zijn messages zoals een led op een module die aangaat, of die begint te knipperen.

Als ge deze logs ziet dan zou homeassistant moeten modules vinden van uw bus systeem en deze beginnen te tonnen op de gebruikersinterface.

Vandaag weer een poging gedaan, heb een nieuwe server geïnstalleerd, verse installatie van HA. Verbinding werkt, maar geen enkele module wordt toegevoegd…

2019-08-17 15:27:18 INFO (velbus-process-reader) [velbus] New message: {“name”: “ChannelNamePart3Message”, “priority”: 251, “address”: 33, “rtr”: false, “channel”: 5}
2019-08-17 15:27:18 INFO (velbus-process-reader) [velbus] New message: {“name”: “BlindStatusNgMessage”, “priority”: 251, “address”: 35, “rtr”: false, “channel”: 1, “timeout”: 21, “status”: “off”}
2019-08-17 15:27:18 INFO (velbus-process-reader) [velbus] New message: {“name”: “BlindStatusNgMessage”, “priority”: 251, “address”: 35, “rtr”: false, “channel”: 2, “timeout”: 21, “status”: “off”}
2019-08-17 15:27:18 INFO (velbus-process-reader) [velbus] New message: {“name”: “ChannelNamePart1Message”, “priority”: 251, “address”: 35, “rtr”: false, “channel”: 1}
2019-08-17 15:27:18 INFO (velbus-process-reader) [velbus] New message: {“name”: “ChannelNamePart2Message”, “priority”: 251, “address”: 35, “rtr”: false, “channel”: 1}
2019-08-17 15:27:18 INFO (velbus-process-reader) [velbus] New message: {“name”: “ChannelNamePart3Message”, “priority”: 251, “address”: 35, “rtr”: false, “channel”: 1}
2019-08-17 15:27:18 INFO (velbus-process-reader) [velbus] New message: {“name”: “ChannelNamePart1Message”, “priority”: 251, “address”: 35, “rtr”: false, “channel”: 2}
2019-08-17 15:27:18 INFO (velbus-process-reader) [velbus] New message: {“name”: “ChannelNamePart2Message”, “priority”: 251, “address”: 35, “rtr”: false, “channel”: 2}
2019-08-17 15:27:18 INFO (velbus-process-reader) [velbus] New message: {“name”: “ChannelNamePart3Message”, “priority”: 251, “address”: 35, “rtr”: false, “channel”: 2}
2019-08-17 15:28:05 WARNING (velbus-process-reader) [velbus] received unrecognized command 229 from module 2 (40)
2019-08-17 15:28:05 WARNING (velbus-process-reader) [velbus] received unrecognized command 229 from module 3 (40)
2019-08-17 15:28:05 INFO (velbus-process-reader) [velbus] New message: {“name”: “SensorTemperatureMessage”, “priority”: 251, “address”: 2, “rtr”: false, “cur”: 22.8125, “min”: 19.1875, “max”: 25.5625}