Hello.
My pimatic server is running on a Rasperry Pi and, from there, I have a valid working SSH root connection to another Raspberry Pi (sitting in 172.16.23.11).
I have created a ShellSensor device to try to obtain a temperature sensor value via ssh, and I can’t get it work properly.
I always get Host key verification failed error.
I have created my ShellSensor like this:
{
"attributeName": "temperature",
"attributeType": "number",
"attributeUnit": "ºC",
"command": "ssh root@172.16.23.11 'bash /storage/read_sensor.sh'",
"interval": 60000,
"id": "temperatura-sala",
"name": "Temperatura Sala",
"class": "ShellSensor",
"hap": {
"service": "Lightbulb"
}
}
I always get error message when saving the device:
error [pimatic-shell-execute]: [ShellSensor#temperatura-sala] Error: Command failed: /bin/sh -c ssh root@172.16.23.11 'bash /storage/read_sensor.sh'
Host key verification failed.
If I run this same command via SSH in my Pimatic Raspberry Pi server:
pi@homekit:~ $ /bin/sh -c "ssh root@172.16.23.11 'bash /storage/read_sensor.sh'"
18.25
Does anyone know why this happens and can help figure this out?
I’m also open to new/different ways of achieving this…
Thanks in advance.