Just sharing a quick tip (mostly for my future self after the next update breaks things again ), but hopefully useful to others too.
I had a cryptic hostname showing up for my Dreame L10s Ultra running Valetudo, which was making things messy in my Unifi UDM-Pro.
Here’s how I fixed it:
Steps:
SSH into the robot
(Assuming you’ve already done this when flashing Valetudo — there are plenty of guides out there.)
Check which config file is being used:
Run:
cat /data/config/ava/iot.flag
If it contains dmiot, then it uses: /etc/dmio/device.conf
Otherwise, it uses: /etc/miio/device.conf
Edit the config file:
Open the correct file with:
vi /etc/dmio/device.conf
or
vi /etc/miio/device.conf
Find the line starting with model= and change it to something readable.
Important: Dots (.) will be replaced by underscores (_) in the hostname generated by your network equipment.
Example from my L10s Ultra:
Original line:
model=dreame.vacuum.r2228o
→ Resulted in a hostname like: dreame_vacuum_r2228o_MAC:Address
New line:
model=Valetudo.L10sUltra.DreameVac
→ Hostname becomes: Valetudo_L10sUltra_DreameVac
Much cleaner and easier to recognize on the network!
I know this involves Valetudo (which is technically outside the HA ecosystem), but since many of us use it with Home Assistant, I figured it was worth sharing here.
I have an L10s Pro Ultra Heat, and just wanted to change the hostname reported to the router via DHCP.
I tried editing /etc/miio/device.conf and /data/config/miio/device.conf but they reverted on boot. I tried setting the secret environment variable from /data/_root_postboot.sh, and that appeared under Valetudo > System Information > System ID, but not DHCP.
Ultimately, I added this patch to my /data/_root_postboot.sh. I don’t know if this is the correct/best approach but it works for me:
cp /usr/bin/udhcpc.sh /data/udhcpc_tweaked.sh
sed -i 's/hostname:$hname/hostname:mopsy/' /data/udhcpc_tweaked.sh
chmod +x /data/udhcpc_tweaked.sh
mount --bind /data/udhcpc_tweaked.sh /usr/bin/udhcpc.sh