-
-
Notifications
You must be signed in to change notification settings - Fork 986
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
integrated dual HomeMatic+homematicIP support for HmIP-RFUSB #1683
Conversation
support for the HmIP-RFUSB usb rf-sticks by eQ3/ELV.
occupied by the cp210x driver but use the new generic_raw_uart support instead allowing for advanced dualcopro support for HomeMatic/BidCos-RF and homematicIP support in parallel.
I'm not sure, but I see chances, that this PRwill break the old Homematic OCCU Addon as the new generic-raw-uart modules will be used for the HmIP-RFUSB sticks instead of the CP210x kernel modules. |
Ah yeah, you are right. I forgot about that in my PR description. This will be indeed the case. However, adding a simple But then, what purpose does this old and largely outdated HomeMatic OCCU Addon serve these days anyway? AFAIK it is largely outdated, not up to date and largely limited in functionality anyway. And IMHO the bottom line should be, that HAos should not force the modprobe of cp210x proactively itself anyway but let the addons - which require a certain hardware - decide to either modprobe cp210x manually or use |
It is not that easy: After the raw-uart device is created, a modprobe of the cp210x and the echo to the new_id will not claim the stick to a ttyUSB device, insteadit will remain as raw-uart device. |
I see, we have the kernel udev rule.
I am not familiar with the HomeMatic OCCU Add-on, but it sounds that maybe phase it out would make sense? From analytics it seems that there is still a fairly large user base:
@pvizeli do you have thoughts on that? |
And even if you don't want to phase put the old OCCU addon, please keep in mind that users only have to change their config from However I still think it is fair to really think about phasing out the old addon in favour of joining forces on the RaspberryMatic add-on. |
By side of that, I think this should be fine. |
AFAIK there isn't a real migration path besides creating a normal
Great! Would then be really nice if this PR can be merge rather sooner than later and integrated into the next rel-7 release so that the RaspberryMatic add-on can then use the new dual copro firmware for the HmIP-RFUSB. |
I don't think the backup function will work. The idea of the add-on was not to run a full CCU, just having some things like zwave. |
Ok, then we probably would just need to document the migration path from old addon to the RaspberryMatic addon by stating that a re-teaching of all homematicIP devices would be required? |
Is the driver binding to the device automatically or is there some user space help needed? Will I guess that would mean we break |
/dev/raw-uart should be available right from plugging in the RFUSB and no user-space tool is required to init&access this dev node.
Indeed. However, if you could generate a dev build with this PR integrated I could more easily test this. |
What I essentially wonder is, if we would merge this PR, can the user then use I guess that depends on the device type/major number of |
We can do this now with the test build label 🚀 |
I think we can maybe generate the tarfile manually in the structure which we can import into your addon? So we release a version of the add-on that only downloads that file for the migration |
A filter subsystem=tty will not work, as the driver creates no tty device because the additional tty stuff is not needed for the HmIP-RFUSB and the dev major of raw-uart is dynamic. |
That's exactly what I have in mind once the dev test build is ready so that I can test that procedure and give instructions on how to migrate from the old addon to the new one. My hope is, that I can work out a small backup procedure that will generate a compatible backup file (*.sbk) which can then be directly restored in the RaspberryMatic add-on. |
@jens-maus it seems that ODROID C4 failed, probably due to a race condition. But the rest is read and available: |
Thx. However, how can I update an already running haos install and provide it a raucb file for updating to it? Is there some CLI magic I don't know? At least I didn't find something on the net yet. |
Ok, I did a fresh 8.0.dev2021122901683 ova install in my Proxmox environment now and voila, I could verify that this PR perfectly works and immediately shows up a connected Unfortunately @agners has released a new 7.1 HAos version just a few hours ago as I hoped to see this PR integrated before the next release. However, I will then see how we can document a migration route for the old/obsolete HomeMatic Add-on ASAP. |
Good! But that was to be expected since the RaspberryMatic CCU Add-on has more permissions. I was more wondering if HomeMatic CCU can be used with
Sorry, I did not want to hold up 7.1 any longer. We can make 7.2 pretty soon once we feel things are ready. |
Ok, I had a quick look over the current state of affairs regarding the old Homematic add-on. As @alexreinert pointed out before the Regarding a potential migration route from the old Homematic add-on to the newer RaspberryMatic add-on, I also had a quick look over the current data storage within the old add-on. In principle it should be indeed possible to get the WebUI based backup routines in the old add-on to export all the data in a somewhat compatible |
Maybe it would be an option to change the subsystem filter to "raw-uart"? |
The statistics above say that 251 users are using the Add-on (granted, only some are using HmIP-RFUSB, but that number is also just those who opt-in to send statistics). Just merging this and hence cause people's home break when they upgrade the OS is not nice IMHO. At a bare minimum, I think we should mark the old Add-on as deprecated or similar and write a blog post. And then we should also wait for a while to give people the chance to migrate to the new Add-on. Ideally we want people using the new Add-on before breaking the old. If we can come up with a solution which allows to continue using the old Add-on with a minimal change, then I think we can push out this change much quicker, and people can move to the new Add-on over a longer period of time.
Afaik, currently dynamic devices are not really supported by the subsystem filter. Using them requires the Add-on to disable the protection mode (there is that open issue home-assistant/supervisor#2690). Ideally we should get that sorted, then add raw-uart to the subsystem filter. |
Well, but this "wait period" could be of course quite a very long road. As it stands, the RaspberryMatic add-on really requires this PR for full HomeMatic+homematicIP support with the
Can't we simply remove the whole subsystem filter in the
Besides this, finally solving home-assistant/supervisor#2690 would be great for the RaspberryMatic add-on alone as well. More and more users are coming up, complaining or raising security questions regarding the necessity to remove the protection mode (cf. jens-maus/RaspberryMatic#1642) and if solving this issue would remove the necessity to remove the protection mode would be indeed great for the new add-on as well. Nevertheless, I still think we shouldn't wait for this issue to be solved first, but perhaps simply remove the subsystem filter from the old add-on and instruct users via the changelog to change their device node to |
Yeah, fixing dynamically loaded kernel modules and updating cgroup dynamic is high on my list as the os-agent supports it. I think a blogpost + describes a migration path with deprecating the old add-on looks like the path forward. @jens-maus is it possible to generate a tar file with the device paring data that can be imported without patching your add-on? Repairing all devices is quite a high pain if you have a lot of relays and other devices that are not directly exposed. |
This is great news! When do you think you will have that implemented so that the RaspberryMatic add-on can be used without having to disable protection mode. And at the same spot: What about the still open issue regarding missing multicast udp routing (cf. home-assistant/plugin-multicast#17 + jens-maus/RaspberryMatic#1373)? Because this also severely limits the current functionality of the RaspberryMatic add-on. If advice, I could at least help in that regard.
Well, a straight tar file of the But still, I think for a first step it would be great to get the |
@pvizeli @agners Please note that I only very briefly tested the backup export routines I implemented in the old homematic add-on. So help would be indeed appreciated from users actually using the old homematic add-on with some devices. Looking forward to get this PR implemented so that we can proceed with this PR here! |
Now that the add-on is updated I'll have another look at this tomorrow and merge it so we have some dev builds. We then can backport it that it makes it into 7.3. |
Just a short notice: With the latest 99.0.2 version of the old "Homematic CCU" add-on binding the HmIP-RFUSB via raw-uart seems to work now. Thus, the add-on migration process should be done now like we discussed. So please see if you can merge this PR ASAP and also backport it to 7.3 and generate some dev build of it so that I and others can test it accordingly. But using your last 8.0dev version, I could perfectly verify that this PR works fine. |
* updated generic_raw_uart to latest version which comes with dualcopro support for the HmIP-RFUSB usb rf-sticks by eQ3/ELV. * remove 99-hmip-rfusb.rules to keep a HmIP-RFUSB device free from being occupied by the cp210x driver but use the new generic_raw_uart support instead allowing for advanced dualcopro support for HomeMatic/BidCos-RF and homematicIP support in parallel.
This PR updates the
generic_raw_uart
kernel module package to its latest version.This newer version of
generic_raw_uart
integrates support for theHmIP-RFUSB
line of homematic RF USB sticks, which essentially is necessary to utilize the new 4.4.x dualcoprocessor firmware coming with the latest RaspberryMatic Add-on and which significantly enhances the capabilities of theHmIP-RFUSB
to communicate and being compatible not only to homematicIP devices but also to the older BidCos-RF/HomeMatic devices by eQ3/ELV. In addition, this newerHmIP-RFUSB
firmware also integrates support to link aHmIP-HAP
or evenHmIPW-DRAP
homematicIP-Wired Gateway, which previously was only possible when using the GPIO-basedRPI-RF-MOD
rf module.