Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Results 1 to 6 of 6

Thread: fully automatic remote update

  1. #1

    Title
    Moderator
    Join Date
    Jul 2011
    Location
    germania
    Posts
    5,122
    Thanks
    106
    Thanked 1,434 Times in 1,137 Posts

    fully automatic remote update

    Hi,
    I have several boxes spread in my home. I make an update if I am in the mood or want to test something. As I am using a home automation system I thought why not use this to automatically update all my boxes when I am not at home. Telnet or ssh cannot be used directly because they cannot react on the output send by the server. I found that expect as shell is my solution.

    Good news is that it works already partly:-)
    Bad news is that it only works partly:-(

    Here is my script:
    Code:
    #!/usr/bin/expect -f
    set timeout -1
    set IPaddress "[lindex $argv 0]"
    set Username "user"
    set Password "pass"
    
    spawn ssh -y-o "StrictHostKeyChecking no" $Username@$IPaddress
    expect "*assword: "
    send "$Password\r"
    expect ":~#"
    send "init 4\r"
    expect ":~#"
    send "opkg update\r"
    expect ":~#"
    send "opkg upgrade\r"
    expect ":~#"
    send "reboot\r"
    exit
    it works perfectly until it enters "opkg upgrade\r" then it does not wait long enough for the reboot and just finishes. The ip of the box is the first parameter when calling this script.

    Anyone an idea?

    Ralf
    ---
    Sat:VU+ Ultimo4K/Solo4K/Duo2/2*Solo2/Ultimo
    Remote: Harmony 200, 700, Link, Smart Control, Smart Companion, Elite, 2*Ultimate, Keyboard

  2. #2
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,338
    Thanks
    6,421
    Thanked 9,146 Times in 6,224 Posts
    Andy posted a command a few years ago which won't get interrupted. I'll ask him, if he remembers.

    PLi's options for restoring defaults to yes and has a time-out. If we changed to this, you can flash and restore.

  3. #3
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,338
    Thanks
    6,421
    Thanked 9,146 Times in 6,224 Posts
    Scrap above post.

    Try "init 42". yes, forty two. Should update and reboot automatically.

    https://github.com/OpenViX/enigma2/b...ma2.sh.in#L135

  4. #4

    Title
    Moderator
    Join Date
    Jul 2011
    Location
    germania
    Posts
    5,122
    Thanks
    106
    Thanked 1,434 Times in 1,137 Posts
    Hi,
    this will not help me. I need an external upgrade feature as all my boxes are on a switchable power plug and my home automation software should switch on, upgrade and switch off.

    Ralf
    ---
    Sat:VU+ Ultimo4K/Solo4K/Duo2/2*Solo2/Ultimo
    Remote: Harmony 200, 700, Link, Smart Control, Smart Companion, Elite, 2*Ultimate, Keyboard

  5. #5

    Title
    Senior Member
    Join Date
    Mar 2017
    Posts
    211
    Thanks
    91
    Thanked 20 Times in 18 Posts
    Quote Originally Posted by Trial View Post
    Hi,
    this will not help me. I need an external upgrade feature as all my boxes are on a switchable power plug and my home automation software should switch on, upgrade and switch off.

    Ralf
    Init 42 in a Cron job?

    Sent from my ONEPLUS A6003 using Tapatalk

  6. #6

    Title
    Moderator
    Join Date
    Jul 2011
    Location
    germania
    Posts
    5,122
    Thanks
    106
    Thanked 1,434 Times in 1,137 Posts
    Hi,
    boxes are not connected to power so cron impossible.

    Ralf
    ---
    Sat:VU+ Ultimo4K/Solo4K/Duo2/2*Solo2/Ultimo
    Remote: Harmony 200, 700, Link, Smart Control, Smart Companion, Elite, 2*Ultimate, Keyboard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.