rttools / hodmin

CLI-Tool for Homie-devices
12 stars 5 forks source link

List not showing firmware names or hashes. #3

Closed ThreeSixes closed 7 years ago

ThreeSixes commented 7 years ago

Hello, I'm having some trouble with the hodmin list and pushFW commands. While the firmware is being parsed correctly it seems the list and pushFW commands don't work properly despite the firmware being detected correctly in the back end.

$ hodmin list
I, [2017-06-22 10:01:34 #9590]  INFO -- : Scanning dir: /home/x/fw/homie/**/*.bin
I, [2017-06-22 10:01:34 #9590]  INFO -- : FW found: ecoplug, 1.1.0, cbad0b38e18d07a6ece94fcf07456e12
I, [2017-06-22 10:01:34 #9590]  INFO -- : Homie-Device detected: mac=XXXXXXXX4781, ONLINE,  running ecoplug, 1.0.0, upgr=true
I, [2017-06-22 10:01:34 #9590]  INFO -- : Homie-Device detected: mac=XXXXXXXXb91f, ONLINE,  running ecoplug, 1.0.0, upgr=true
I, [2017-06-22 10:01:34 #9590]  INFO -- : Homie-Device detected: mac=XXXXXXXX9644, ONLINE,  running ecoplug, 1.0.0, upgr=true
I, [2017-06-22 10:01:34 #9590]  INFO -- : Homie-Device detected: mac=XXXXXXXX40be, ONLINE,  running ecoplug, 1.0.0, upgr=true
I, [2017-06-22 10:01:34 #9590]  INFO -- : Homie-Device detected: mac=XXXXXXXX1dfe, ONLINE,  running ecoplug, 1.0.0, upgr=true
I, [2017-06-22 10:01:34 #9590]  INFO -- : Homie-Device detected: mac=XXXXXXXX9377, OFFLINE,  running itead-sonoff-button, 1.1.0, upgr=false
I, [2017-06-22 10:01:34 #9590]  INFO -- : Homie-Device detected: mac=XXXXXXXX91f2, OFFLINE,  running itead-sonoff-button, 1.1.0, upgr=false
I, [2017-06-22 10:01:34 #9590]  INFO -- : Homie-Device detected: mac=XXXXXXXX41af, OFFLINE,  running itead-sonoff-button, 1.0.0, upgr=false
I, [2017-06-22 10:01:34 #9590]  INFO -- : Homie-Device detected: mac=XXXXXXXXbede, ONLINE,  running itead-sonoff-button, 1.0.0, upgr=false
┌────────────┬──────┬────────────┬──────────────┬───────────────┬──────────┬──────────┐
│    mac     │online│  localip   │     name     │checksumfw_name│fw_version│upgradable│
├────────────┼──────┼────────────┼──────────────┼───────────────┼──────────┼──────────┤
│XXXXXXXX4781│ true │192.168.X.X│  shoplights  │               │          │   true   │
│XXXXXXXXb91f│ true │192.168.X.X│ officelights │               │          │   true   │
│XXXXXXXX9644│ true │192.168.X.X│  backlights  │               │          │   true   │
│XXXXXXXX40be│ true │192.168.X.X│ frontlights  │               │          │   true   │
│XXXXXXXX1dfe│ true │192.168.X.X│   joshlamp   │               │          │   true   │
│XXXXXXXX9377│false │192.168.X.X│   inline2    │               │          │  false   │
│XXXXXXXX91f2│false │192.168.X.A│   inline1    │               │          │  false   │
│XXXXXXXX41af│false │192.168.X.X│shop2OfficeFan│               │          │  false   │
│XXXXXXXXbede│ true │192.168.X.X│  officeCool  │               │          │  false   │
│            │      │            │              │               │  1.1.0   │          │
└────────────┴──────┴────────────┴──────────────┴───────────────┴──────────┴──────────┘
$ hodmin -m *4781 pushFW
ERR: No valid firmware-referrer found. (Chksum:, Name: )
rttools commented 7 years ago

Maybe this is because of copy and paste your screened output, but this header line: │ mac │online│ localip │ name │checksumfw_name│fw_version│upgradable│

should look like this: │ mac │online│ localip │ name │checksum | fw_name│fw_version│upgradable│

Did you change your listing in hodmin.yaml?

You should try standard layout defined in hodmin.yaml first: output: list: "HD.mac HD.online HD.localip HD.name FW.checksum FW.fw_name FW.fw_version"

Use just one space to separate column headers.

And if checksum and name now shows up, please specify one of them within your pushFW command: $ hodmin -m 4781 pushFW -c cbad # See Readme for details Hope this helps

ThreeSixes commented 7 years ago

Thanks! It does look like the configuration was messed up. Now I just need to get to the point where the firmware images actually install on the devices....