Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get poe monitor values #98

Open
iniagolov opened this issue Aug 19, 2024 · 2 comments
Open

Can't get poe monitor values #98

iniagolov opened this issue Aug 19, 2024 · 2 comments

Comments

@iniagolov
Copy link

iniagolov commented Aug 19, 2024

Hello everyone.

From mikrotik console not problem:

> /interface/ethernet/poe/monitor numbers=0 once 
            name: ether2
         poe-out: auto-on
  poe-out-status: waiting-for-load

But from python :(

poe = api.get_resource('/interface/ether/poe/monitor').get(numbers='0')
print(poe)

routeros_api.exceptions.RouterOsApiCommunicationError: ('Error "no such command" executing command b\'/interface/ether/poe/monitor/print ?numbers=0 .tag=10\'', b'no such command')
poe = api.get_binary_resource('/interface/ether/poe').call('monitor', {'ether5': b'', 'once': b''})
print(poe)

routeros_api.exceptions.RouterOsApiCommunicationError: ('Error "unknown parameter ether5" executing command b\'/interface/ether/poe/monitor =ether5= =once= .tag=10\'', b'unknown parameter ether5')
@iniagolov
Copy link
Author

Work perfect :)

                        poe = api.get_resource('/interface/ether/poe').call('monitor', {'numbers': 'ether5', 'once': 'once'})
                        print(poe)

[{'name': 'ether5', 'poe-out': 'forced-on', 'poe-out-status': 'powered-on', 'poe-out-voltage': '47.9', 'poe-out-current': '84', 'poe-out-power': '4'}]

@iniagolov
Copy link
Author

All work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant