What's new

How to get status of aimesh nodes from command line?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

i had a quick look at your code for uour sensors, you check the state "home" or "not_home"
when my node was offline last week, it was still in "home" state...
If your node is offline, can you still ping it at that point?

If mine node is in offlline state , i can still ping it, i can even ping other lan devices connected to it, i can still SSH access to that speficic node
its just showing in Offline state on aimesh page, and all wifi devices are disconnected
it checks home and not_home to decide if it uses ethernet backhaul. In my case device_tracker.node1_lan_asuswrt is the MAC address when connected by ethernet.

YAML:
        {% if states('input_text.node1_mac') in states('sensor.aimesh_devices') and is_state('device_tracker.node1_lan_asuswrt', 'home') %}

It looks for MAC address you entered in the SNMP sensor. If it exists, it checks again the device tracker for ethernet backhaul.
I am not completely sure what will be the result of the cfg_device_list. But if it is offline, it should not appear there so it should detect the case of being pingable but offline.

As for the OID, I really cannot help much, you can do a walk in the MIB browser and scan through the results to see the what you want and find the OID. Just make sure that snmp.conf.add is working.
 
it checks home and not_home to decide if it uses ethernet backhaul. In my case device_tracker.node1_lan_asuswrt is the MAC address when connected by ethernet.

YAML:
        {% if states('input_text.node1_mac') in states('sensor.aimesh_devices') and is_state('device_tracker.node1_lan_asuswrt', 'home') %}

It looks for MAC address you entered in the SNMP sensor. If it exists, it checks again the device tracker for ethernet backhaul.
I am not completely sure what will be the result of the cfg_device_list. But if it is offline, it should not appear there so it should detect the case of being pingable but offline.

As for the OID, I really cannot help much, you can do a walk in the MIB browser and scan through the results to see the what you want and find the OID. Just make sure that snmp.conf.add is working.


indeed, how can i make sure the "snmp.conf.add" is working? i have never used a script on my router before :)
also, if i do a walk on mib, what do i need to look for?
 
i see this in log when i restart snmp, so i quess script is not working :)

Aug 23 22:17:33 rc_service: httpd 832:notify_rc restart_snmpd
Aug 23 22:17:33 custom_config: Found /jffs/configs/snmpd.conf.add, but custom configs are disabled!
 
Make sure that snmpd.conf.add is executable

chmod a+rx /jffs/configs/snmpd.conf.add

and custom scripts are enabled

1629751149690.png


try the aimesh.sh script to see the result. You should see that exactly in MIB browser.

sh aimesh.sh
 
ok, sensor working now, lets what happens when node goes offline next time

custom scripts were not enabled on router settings page

1629751195788.png
 
didnt create the template sensors yet, cause i also think they are not gonna work for me

when i saw last time, when node was offline, it was still in "home" state .... so the template sensor will never have the state "offline"

will check it when it happens, and see if the device is still listed in that other sensor
i have also setup my nodes to be fixed on ethernet only, never wireless
 
when it is offline it should diseppear from cfg_device_list but it is still on home state. So according to the template sensor
YAML:
      state: >-
        {% if states('input_text.node1_mac') in states('sensor.aimesh_devices') and is_state('device_tracker.node1_lan_asuswrt', 'home') %}
          Ethernet Backhaul
        {% elif states('input_text.node1_mac') in states('sensor.aimesh_devices') and is_state('device_tracker.node1_lan_asuswrt', 'not_home') %}
          Wireless Backhaul
        {%else%}
          Offline
        {%endif%}

if states('input_text.node1_mac') in states('sensor.aimesh_devices') should return false
is_state('device_tracker.node1_lan_asuswrt', 'home') should return true
the {%else%} part of the template should cover this and return Offline.
 
Hi,

mesh went offline again (192.168.0.2)

but i still see it active in sensor, see screens below
this is verry strange? why is is showing offline in aimesh status? when its still in the device list??


1630142993986.png


1630142811774.png


1630142830489.png
 
Are you running stock fw on the nodes or merlin fw? If merlin fw, try the stock fw.
How is this node connected to the main? Is there a switch in between?
 
Using Merlin fw... No switch between, direct connected to ports 1-4 on my ac88u
Can I only go to stock on node and not on my main router? Don't wanna reconfigure everything again
 
So you have the nodes configured with a MAC reservation? I'm going to remove my reservations from the main router , so the nodes are getting an dynamic IP instead...

When my node is offline, i see my log is flooded with DHCP requests from the node...

Maybe it needs to be within the dhcp range, there is maybe a reason why the nodes can't be configured as static...

I have no ideas left anymore...

If this is not going to work, i stop using mesh, and configure them as AP ...

Btw , if configured as AP, what's the best way to configure wireless? Put them on 1-6-11 ? Or all same channel? I see when it's in mesh, they are all same channel...
But if i read internet, seems best practice is 1-6-11
 
Yes, switch to asus stock latest fw on nodes. There is no benefit having merlin on nodes. Then remove the dhcp reservations. Let it be native. As far as I know, the ip of the nodes doesn't change at all. They dont change for me.
Test it like this and let's see.
 
You know you can run a script with crontab on the nodes just like the main router.
Maybe something like

#!/bin/bash
ping -c1 192.168.50.1 > /dev/null
if [ $? -eq 0 ]
then
echo ok
exit 0
else
reboot
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top