alsuren / mijia-homie

A Homie MQTT bridge for the Xiaomi Mijia 2 hygrometer-thermometer. This repo also serves as the monorepo for a handful of helper crates related to Homie and Bluetooth.
Other
65 stars 14 forks source link

mijia-homie crash #131

Open qwandor opened 3 years ago

qwandor commented 3 years ago
Jan 20 01:12:55 cottagepi systemd[1]: Started Bluetooth temperature sensor to MQTT publisher.
Jan 20 01:12:56 cottagepi mijia-homie[465]: The application panicked (crashed).
Jan 20 01:12:56 cottagepi mijia-homie[465]: Message:  called `Option::unwrap()` on a `None` value
Jan 20 01:12:56 cottagepi mijia-homie[465]: Location: /project/homie-device/src/lib.rs:588
Jan 20 01:12:56 cottagepi mijia-homie[465]: Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Jan 20 01:12:56 cottagepi mijia-homie[465]: Run with RUST_BACKTRACE=full to include source snippets.
Jan 20 01:12:56 cottagepi mijia-homie[465]: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Jan 20 01:12:56 cottagepi mijia-homie[465]:  1: __libc_start_main
Jan 20 01:12:56 cottagepi mijia-homie[465]:     at <unknown source file>
Jan 20 01:12:56 cottagepi systemd[1]: mijia-homie.service: Main process exited, code=exited, status=101/n/a
Jan 20 01:12:56 cottagepi systemd[1]: mijia-homie.service: Failed with result 'exit-code'.
Jan 20 01:13:06 cottagepi systemd[1]: mijia-homie.service: Service RestartSec=10s expired, scheduling restart.
Jan 20 01:13:06 cottagepi systemd[1]: mijia-homie.service: Scheduled restart job, restart counter is at 1.
Jan 20 01:13:06 cottagepi systemd[1]: Stopped Bluetooth temperature sensor to MQTT publisher.
Jan 20 01:13:06 cottagepi systemd[1]: Started Bluetooth temperature sensor to MQTT publisher.
Jan 20 01:13:06 cottagepi mijia-homie[1041]: The application panicked (crashed).
Jan 20 01:13:06 cottagepi mijia-homie[1041]: Message:  called `Option::unwrap()` on a `None` value
Jan 20 01:13:06 cottagepi mijia-homie[1041]: Location: /project/homie-device/src/lib.rs:588
Jan 20 01:13:06 cottagepi mijia-homie[1041]: Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Jan 20 01:13:06 cottagepi mijia-homie[1041]: Run with RUST_BACKTRACE=full to include source snippets.
Jan 20 01:13:06 cottagepi mijia-homie[1041]: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Jan 20 01:13:06 cottagepi mijia-homie[1041]:  1: __libc_start_main
Jan 20 01:13:06 cottagepi mijia-homie[1041]:     at <unknown source file>
J
qwandor commented 3 years ago

The crash is because local_ipaddress::get() returns None, presumably because there is no network connection at that point. This is a bit weird, as mijia-homie shouldn't be started until the network is up.