I have tried getting the plugging to work with Unifi Switch POE on/off.
Everything works apart from reporting power status.
This is what the log shows from State:
`State of Rooftop Camera is: total power limit(mw): 0
port opmode hpmode pwrlimit class poepwr pwrgood power(w) voltage(v) current(ma)
(mw)
34 auto dot3at -1 class 4 on good 24.50 53.49 458.00`
I have tried doing matching on "opmode" field (auto=On - off=Off) but it never register as in "on state" even on updates.
This is the config:
"accessory": "SSH", "name": "Rooftop Camera", "on": "swctrl poe set auto id 34", "off": "swctrl poe set off id 34", "state": "swctrl poe show id 34", "on_value": "auto", "exact_match": false,
Looking in the source code for determining on/off state this is the callback:
callback(null, accessory.matchesString(state));
The "old version" had a hard check (callback(null, state === On ? Off) but the new version returns an int if match is > -1 .
Should th callback not continue to return the On Off to be valid?
In any case - I can't get the device to register as "On"
Any ideas?
Kaz
I have tried getting the plugging to work with Unifi Switch POE on/off.
Everything works apart from reporting power status.
This is what the log shows from State:
`State of Rooftop Camera is: total power limit(mw): 0
port opmode hpmode pwrlimit class poepwr pwrgood power(w) voltage(v) current(ma)
(mw)
34 auto dot3at -1 class 4 on good 24.50 53.49 458.00`
I have tried doing matching on "opmode" field (auto=On - off=Off) but it never register as in "on state" even on updates.
This is the config:
"accessory": "SSH", "name": "Rooftop Camera", "on": "swctrl poe set auto id 34", "off": "swctrl poe set off id 34", "state": "swctrl poe show id 34", "on_value": "auto", "exact_match": false,Looking in the source code for determining on/off state this is the callback:
callback(null, accessory.matchesString(state));
The "old version" had a hard check (callback(null, state === On ? Off) but the new version returns an int if match is > -1 .
Should th callback not continue to return the On Off to be valid?
In any case - I can't get the device to register as "On"
Any ideas?
Kaz