Open reesion opened 1 year ago
I've changed the instructions a bit: I had written some comments in between <
and >
and that was not shown on Github. I also listed the items that needed attention in configuration.yaml.
shell_command is a HomeAssistant thing as is configuration.yaml.
Other than enabling passwordless SSH login there is nothing to upload or configure on your iOS device. With passwordless SSH login HA is able to download Items.data, when the file is downloaded the script will extract data from that file and send a MQTT-message containing the data (all done on your HA-machine).
Hope this will help. Otherwise take a look at https://gist.github.com/DomiR/8870918, there are some pointers in the topic itself and the comments.
Hi,
Thanks for the response. I have managed to perform all the steps. However, there is no new device showing up under MQTT for me. I suspect the ssh_command is not working.
It is showing error in the logs
Logger: homeassistant.components.shell_command Source: /usr/src/homeassistant/homeassistant/components/shell_command/init.py:117 Integration: Shell Command (documentation, issues) First occurred: 18:23:16 (1 occurrences) Last logged: 18:23:16
Error running command: ssh -i /config/ssh/id_rsa -o 'StrictHostKeyChecking=no' mobile@192.168.1.179 '/config/shell_command/find_my/findmy.sh'
, return code: 127
NoneType: None
Also, I tried to run the SSH command in the HA SSH/Terminal Addon and it gives error as well
The file is definitely there in /config/shell_command/find_my/findmy.sh
Any idea?
Hi again,
I figured out that I have entered the wrong IP. I have used the IP address of my iOS device instead of my HA. Thus, it is reporting no such file or directory.
I have figured out that i need to include sudo as well as i am running HassOS
/config/shell_command/find_my/findmy.sh: line 80: unexpected EOF while looking for matching `'' ➜ ~
It looks like it found the Items.data file from my iOS device but not downloading it?
Hi again,
I have managed to get it working after modifying your codes.
I have used the below codes to get it working. The path you have in your codes does not exist for me, not sure why.
scp mobile@192.168.1.179:/private/var/mobile/Library/Caches/com.apple.findmy.fmipcore/Items.data $scriptlocation/Items.data
Also, i your codes throws an error if the device name had a " ' " in it.
Thanks again
Hi,
I am stuck with the step of copying the keys to the iOS device.
My question is how Do i copy those keys to the iOS device? I am using Windows.
Also, in the configuration.yaml, what is 'root@192.168.1.100 should match your SSH login' ? Is this the details for the iOS device or the Home Assistant?
Thank you