yavdr / yavdr-ansible

ansible playbooks for yaVDR
GNU General Public License v3.0
11 stars 10 forks source link

Download firmware for WinTV dual HD model 1590 #34

Closed blau222 closed 3 months ago

blau222 commented 5 months ago

https://github.com/yavdr/yavdr-ansible/blob/5ea90ec4961c740da46bfb9d313e6e20e1581a5c/roles/autoinstall-firmware/tasks/main.yml#L10

Please add further USB IDs for the 1590 model of WinTV dual HD: 2040:0265 Hauppauge WinTV-dualHD DVB in Isoc mode 2040:8265 Hauppauge WinTV-dualHD DVB in Bulk mode

blau222 commented 4 months ago

I have now realised that the 1592 model has the same USB IDs and works with the same firmware. It seems that the hardware of both models is identical. Model 1590 and model 1592 differ only in the language of the packaging as far as I know. The 1590 is offered in English and German, whereas the 1592 is offered in Italian, Spanish and French.

seahawk1986 commented 4 months ago

So the list of usb idss that require the firmware should be "2040:0264", "2013:025f", "2040:0265" and "2040:8265"?

seahawk1986 commented 4 months ago

I reorganized the IDs in lists that are used as variables: https://github.com/yavdr/yavdr-ansible/blob/focal/roles/autoinstall-firmware/defaults/main.yml and updated the condition checking for a match: https://github.com/yavdr/yavdr-ansible/blob/focal/roles/autoinstall-firmware/tasks/main.yml#L10 - could you please check if the lastest commit works for you?

blau222 commented 4 months ago

Yes. I think it looks good. But I haven't tested it in practice yet. My two Hauppauge WinTV-dualHD (model 1590 and model 1592) have these USB-IDs: 2040:0265 and 2040:8265 and require the firmware: dvb-demod-si2168-b40-01.fw What is the best way to test it without jeopardising my running system? Thank you!

seahawk1986 commented 3 months ago

I just pushed a commit that adds some additional rules and fixes the order of evaluation for the length of the set operation (so it doesn't trigger if the union is empty) - please use tha latest commit for your tests.

Youi can run sudo -H ansible-playbook yavdr07.yml -b -i 'localhost_inventory' --connection=local --tags="autoinstall-firmware" to execute only the role to check for firmware - if the status of the task is ok, then it has seen that the firmware with the given checksum already exists and doesn't need to do anything. If the when condition wouldn't trigger the task (because the USB-ID doesn't match), then the state would be skipping - e.g. have a look at the output for those two tasks:

TASK [autoinstall-firmware : Firmware dvb-demod-si2168-b40-01.fw for Hauppauge WinTV HD Solo/Duo, PCTV 292e] ***********
ok: [localhost]

TASK [autoinstall-firmware : Firmware dvb-demod-si2168-02.fw for Hauppauge WinTV quadHD] *******************************
skipping: [localhost]
blau222 commented 3 months ago

I have now tested it like this: The system has a WinTV dual HD model 1590 in bulk mode. First I moved my existing yavdr-ansible. Then I got a new yavdr-ansible from git: git clone https://github.com/yavdr/yavdr-ansible Then I stopped the VDR. Then I moved the existing firmware. Then first run: sudo -H ansible-playbook yavdr07.yml -b -i 'localhost_inventory' --connection=local --tags="autoinstall-firmware" Result:

TASK [autoinstall-firmware : Firmware dvb-demod-si2168-b40-01.fw for Hauppauge WinTV HD Solo/Duo, PCTV 292e] **************************
changed: [localhost]
TASK [autoinstall-firmware : Firmware dvb-demod-si2168-02.fw for Hauppauge WinTV quadHD] **********************************************
skipping: [localhost]

The firmware should now be available. Checked: yes, it is now there. Then second run: sudo -H ansible-playbook yavdr07.yml -b -i 'localhost_inventory' --connection=local --tags="autoinstall-firmware" Result:

TASK [autoinstall-firmware : Firmware dvb-demod-si2168-b40-01.fw for Hauppauge WinTV HD Solo/Duo, PCTV 292e] **************************
ok: [localhost]
TASK [autoinstall-firmware : Firmware dvb-demod-si2168-02.fw for Hauppauge WinTV quadHD] **********************************************
skipping: [localhost]

Then reboot. Result: Everything works perfectly again.

Thank you. Should I close this issue?

seahawk1986 commented 3 months ago

Great, I can close it, too.