mercenaruss / zigstar_addons

Home Assistant add-ons for Flashing ZigStar Devices
Apache License 2.0
55 stars 3 forks source link

Error: option 'device' required even for network devices? #15

Closed Stadicus closed 7 months ago

Stadicus commented 7 months ago

I'm trying to flash the ZigStar UZG device (version 0.3) with the CC1352P7 chip according to their instructions. First I tried using the ZigStar Multitool (that does not seem to support CC1352P7 according to https://github.com/xyzroe/ZigStarGW-MT/issues/22). As recommended, I'm now trying to flash the UZG with the ZigStar Home Assistant addon, following the official UZG instructions.

I installed the ZigStar TI CC2652P7 Flasher Add-on, which seems suited to the job according to https://github.com/mercenaruss/zigstar_addons/commit/7c9327db5895db52ee1641af288401c65abca632.

I enter all relevant information into the configuration form, but then I get the following error message on save:

Failed to save add-on configuration, Missing required option 'device' in ZigStar TI CC2652P7 FW Flasher (193f5383_zigstar-cc2652p7-flasher). Got {'device': None, 'network_device': '192.168.1.5:6638', 'usb_mode': False, 'coordinator_fw': False, 'router_fw': False, 'firmware_url': 'https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/bin/CC1352P7_coordinator_20230507.zip', 'trigger_bsl': True}

grafik

Checking the YAML configuration, I see that the argument device is expected and is configured with null. This seems to be only relevant for USB devices, and I can't select anything because the UZG is connected via Ethernet.

device: null
network_device: 192.168.1.5:6638
usb_mode: false
coordinator_fw: false
router_fw: false
firmware_url: >-
  https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/bin/CC1352P7_coordinator_20230507.zip
trigger_bsl: true

Any recommendation how I can get this to work?

mercenaruss commented 7 months ago

In add-on description is a instruction how to flash over usb or network. You didn't select the firmware you want to flash Coordinator or Router. You didn't select any usb device just to make addon happy.

Stadicus commented 7 months ago

Yes, I've read the instructions. As you can see in the screenshot, I don't have any USB devices to choose from.

If I understand you correctly, I also need to activate the toggle "Coordinator Firmware", even though I provide the custom firmware URL? I'll try this, but then the description "Will download and flash latest..." is quite misleading.

Do you know from experience what "dummy USB device" I could plug into the Pi so that I can select it "just to make the form happy"?

mercenaruss commented 7 months ago

ohh okay, you need UART usb device to make a dummy device or just write in config manually: dev/ttyUSB0 dev/ttyS1

Stadicus commented 7 months ago

I tried the above options, without luck...

grafik

grafik

Stadicus commented 7 months ago

Ok, I think the form needed a full system reboot to be happy. After physically restarting the Pi, the Sonoff USB coordinator showed up and I was able to flash the UZG over the network. 🎉

ZyberSE commented 7 months ago

I'm having a similar issue. Getting this when saving no matter what I do.

Failed to save add-on configuration, Missing required option 'device' in ZigStar TI CC2652P7 FW Flasher (193f5383_zigstar-cc2652p7-flasher). Got {'device': None, 'network_device': '192.168.1.134:6638', 'usb_mode': False, 'coordinator_fw': False, 'router_fw': True, 'firmware_url': 'https://github.com/Koenkk/Z-Stack-firmware/raw/7398d834eb3a790876c280293c4181da96cc7114/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20221226.zip', 'trigger_bsl': True}

mercenaruss commented 6 months ago

@ZyberSE you need to choose any usb device from list