After trying almost every script there is, I started at the beginning; pfSense.
After some time I've managed to get a CLI command to get the info if a certain iPhone is connected to the WiFi or not.
Code: Select all
sshpass -f <(printf '%s\\n' PASSWORD ssh USER@IP-PFSENSE nmap -p 62078 IP-IPHONE | grep '62078/tcp open'
But whatever script I use, there is no output at all or there is an error; "no such file or directory", but from the CLI it works fine. Even adding the path to sshpass and ssh it doesn't work
I am no programmer, so when it gets complicated I make use of AI and these scripts don't work either;
Code: Select all
return {
on = {
timer = { 'every minute' }
},
execute = function(domoticz)
local bashCommand = [[
/bin/bash -c 'sshpass -f <(printf "%s\n" PASSWORD) ssh USER@IP-PFSENSE nmap -p 62078 IP-IPHONE | grep "62078/tcp open"' 2>&1
]]
local resultaat = io.popen(bashCommand)
local output = resultaat:read("*a")
resultaat:close()
domoticz.log(resultaat)
end
}
2025-08-14 22:13:00.048 Status: dzVents: Info: ------ Start internal script: Script #1:, trigger: "every minute"
2025-08-14 22:13:00.052 Status: dzVents: Info: ------ Finished Script #1
While i would expect: 62078/tcp open
Is there a simple way to get this executed and the output stored in a variable?