2018-06-20 23:28:07.991 Error: (WiFi Presence) 'onStart' failed 'AttributeError':'module 'Domoticz' has no attribute 'Status''.
It should be solved after updating to the latest (beta) version of Domoticz. The Domoticz.Status method is relatively new. The plugin framework is still in beta and under development, so things change rapidly.
EDIT
Fun fact: the plugin crashed because it tried to tell you how successful it was in finding the command and interfaces to use for detection ... using the Domoticz.Status to write to the log.
Looks like the ssh part is working fine.
Last edited by EscApe on Wednesday 20 June 2018 23:40, edited 1 time in total.
EDIT
Fun fact: the plugin crashed because it tried to tell you how successful it was in finding the command and interfaces to use for detection ... using the Domoticz.Status to write to the log.
The plugin could theoretically work with accespoints. It depends on you accespoint though. If the accespoint supports ssh access you should configure the acces point as the 'router ip' for the plugin, so it can directly query the wireless chipset on the accespoint. If not, you can query the mac information the (real) router has in its bridge. That list should include all mac addresses in your local network. To do so add '#forcegeneric' behind the router ip address you configured for the plugin (see instructions and previous messages in this forum thread).
Querying the wireless chipset will give you the quickest and most reliable response to present/absent changes.
Querying the mac address list on the router bridge is also quick te respond to presence but can take a few minutes for absence (people leaving).
Very good plugin. Works great on my D-Link with LEDE/OpenWrt 17.01 configured as access-point. Sadly I have also a Fritzbox which provides wlan to the front of my house while the D-Link is for the back and garden. Any plans for support of multiple routers?
To make it a bit difficult the Fritzbox does not support any of the present methods. I could put the presence on mqtt to read it from there. Smart home a is giant field of things that doesnt work together ...
Thanks!
I only know the Fritzbox by name and nothing of its command line capabilities. If you can figure out a way to get a mac address list from it, then it can probably be incorporated into the plugin. I have no plans to interface with mqtt or anything other than the router itself. But there are (theoretical) options...
Lets say your D-Link is router A and the Fritzbox router B
You could make the plugin work on A and use another way to get a general Anyone-home kind of status from B to toggle the 'Override button' of A. That way you would at least have only one 'Anyone home' status to monitor for automation tasks.
This might also be the way to use multiple routers (have not tried is). Just add the plugin twice. Once for A and once for B. The anyone home of B could again control the override of A. In case of your Fritzbox we would first have to figure out a way to get the maclist from the router. Does the fritzbox offer ssh? If it is linux/busybox based i would expect it to at least support the brctl or arp method.
Thanks for the plugin, I am using it with an Ziggo TP-Link Arcer C7 running Lede.
A request for the "Anyone" feature, I would like to blacklist some Wifi devices which are always online, so I can detect if there are any 'Guests' in the house.
derjoern wrote: ↑Saturday 23 June 2018 15:11
Very good plugin. Works great on my D-Link with LEDE/OpenWrt 17.01 configured as access-point. Sadly I have also a Fritzbox which provides wlan to the front of my house while the D-Link is for the back and garden. Any plans for support of multiple routers?
To make it a bit difficult the Fritzbox does not support any of the present methods. I could put the presence on mqtt to read it from there. Smart home a is giant field of things that doesnt work together ...
I assume 1 of the routers is the main router and the other one is connected to the LAN port of the 1st router right?
In that case you run the script on the first one and let the first one also handle all DHCP requests.
You put the plugin with #forcegeneric and it will read also the adresses used by LAN ports.
I have a simular setup with 2 routers where 1 is the Asus and the other a crappy Dlink and i see any client from any router.
Maybe you can already achieve what you want by adding the plugin twice? Once for devices that are always connected and one for devices that you want to monitor for presence. See previous post (just above yours) for an explanation on how this could work.
I have never tried adding the plugin twice, but it should work. You will of course have twice as many queries on the router, so i would set the poll interval a bit higher.
Could you let me (us) know if adding it twice works and serves your needs?
Monitoring devices that are always connected is not the purpose of this plugin.
2018-06-27 15:51:12.976 Error: (WiFi Presence) No usable commandline to check presence. Trying again to detect router capabilities.
2018-06-27 15:51:12.976 Error: (WiFi Presence) If you keep getting this message: check your (authentication) settings and router status.
2018-06-27 15:51:12.976 Error: (WiFi Presence) Make sure your router supports ssh and the commands used by this plugin. If this message persists disable the plugin (for now), or the plugin might flood the Domoticz eventsystem
2018-06-27 15:51:13.052 (WiFi Presence) Returncode ssh command: 255
2018-06-27 15:51:13.052 (WiFi Presence) Output from router: b''
2018-06-27 15:51:13.053 Error: (WiFi Presence) Router command failed with returncode: 255
2018-06-27 15:51:13.053 Error: (WiFi Presence) Raw data from router: b''
2018-06-27 15:51:13.053 Error: (WiFi Presence) Could not determine router capabilities
There should not be a space in #forcegeneric (although i think that would be handled by the plugin.. not sure)
It looks like the entire ssh connection subprocess is failing. Can you enable debug mode en share the log from where the plugin starts up?
Did the plugin work without errors before you added #forcegeneric?
Please update to the latest version. The #forcegeneric option is new and older version of the plugin will treat it as part of the router address (there's no router called 192.168.3.1#forcegeneric, so the plugin fails).
Prutsium wrote: ↑Wednesday 27 June 2018 13:18
I assume 1 of the routers is the main router and the other one is connected to the LAN port of the 1st router right?
In that case you run the script on the first one and let the first one also handle all DHCP requests.
You put the plugin with #forcegeneric and it will read also the adresses used by LAN ports.
I have such setup sadly my first router has no ssh. I could throw the stock firmware away, but that is no route I'm willing to go.
EscApe wrote: ↑Saturday 23 June 2018 22:08
Lets say your D-Link is router A and the Fritzbox router B
You could make the plugin work on A and use another way to get a general Anyone-home kind of status from B to toggle the 'Override button' of A. That way you would at least have only one 'Anyone home' status to monitor for automation tasks.
My plan is to use the Domoticz JSON-Api to trigger the switches from node-red. I don't if this will cause havok, because your plugin will turn it off and node-red on. I will see.
Ik you set the override button mode to 'indefinitely' you can have full control over that button from another script or through the domoticz api. That is one of the use cases for the override.
Just don't try to control the Anyone-home or other devices directly.
EscApe wrote: ↑Wednesday 27 June 2018 19:49
Please update to the latest version. The #forcegeneric option is new and older version of the plugin will treat it as part of the router address (there's no router called 192.168.3.1#forcegeneric, so the plugin fails).
Just updated the plugin and it works good. Thanks!
Today again time. Was bothering me why it did not work.
My router AC828 unfortunately does not support WL etc. commands. only ARP.
What I at least format from the debug log is that not the arp but the wl command is invoked.
I have manually changed the method to "arp" and it works again.
So I think that something is wrong in calling when checking the environment in python.
But unfortunately I am not a python programmer, but I wanted to let you know @escape.
Synology DS918+ /DS412+
ASUS BRT-AC828, RT-AC86U, RT-AC68U