NWA210AX - Automatic SSH login from Openhab

Miky
Miky Posts: 10  Freshman Member
First Comment Friend Collector Second Anniversary
edited May 21 in Wireless
Hi,

i need autoconnect from Openhab to Zyxel AP, to turn on-off the wifi.
I'm able to turn on-off the wifi manually with a ssh connection from my Macbook.

But i'm not able from Openhab because i need to write it in a single command line like that:
ssh2 -p PASSWORD USER@ZYXEL_IP /configure terminal/wlan slot1/no activate

Someone more experienced than me can help me to find the correct line?

All Replies

  • Zyxel_Bella
    Zyxel_Bella Posts: 526  Zyxel Employee
    Zyxel Certified Network Engineer Level 2 - Switch Zyxel Certified Network Engineer Level 1 - Switch Zyxel Certified Network Administrator - Switch 50 Answers

    Hi @Miky

     

    Thanks for sharing the experience combining Openhab with Zyxel access point.

    To enable/disable wireless network at specific time, we have SSID schedule for users to setup.

    If the above functions do not meet your needs, could you share the applications that you’re going to implement?

    We’d like to advice if any features on AP could meet your work.

    Thank you

     

    Regards,

    Bella


  • Miky
    Miky Posts: 10  Freshman Member
    First Comment Friend Collector Second Anniversary
    Hello Bella,

    thank you for your quick help!
    A time control is too rigid for my application, so I want to link the AP to openhab.

    I've now understood that the problem it`s probably because I'm running Openhab as a docker and maybe there's no pre-installed shell.

    Thanks
    Miky
  • zyman2008
    zyman2008 Posts: 219  Master Member
    25 Answers First Comment Friend Collector Seventh Anniversary
    edited March 2022
    Hi @Miky,
    Try this command,
    echo -e "configure terminal\nwlan slot1\nno activate\nexit\nexit\nexit" | sshpass -p yourpassword ssh admin@192.168.1.1