Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Poweroff Recalbox remotely

    Recalbox General
    poweroff recalbox remotely
    2
    2
    466
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • xalex75
      xalex75 last edited by

      Hi.
      I just setup a RPI4 with Recalbox on USB SSD drive.
      Everything works really well.
      I'm now setting up a sort of "parental control" in home assistant.
      I can schedule power hours to the RPI by using a zigbee powerplug, I can monitor when Recalbox is online by using a ping binary sensor thta check when the host is responding, how long it is on and I can set a time limit.
      At the moment when the time limit is finished, a google speaker tells my doughter that's almost time to shutdown, ad after few minutes it say that NOW it must be shut down.
      I'm trying to replace the last message with a command that powers off correctly the Recalbox machine. Simply switching off the powerplug is not what I want and will probably corrupt recalbox.
      I've been able to poweroff recalbox manually by connecting to it in SSH, but it need password so I can't automate the command in home assistant. I've read about creating keys to disable password access, but I'm not good in linux and I didn't succeed.
      I saw that the web interface has a poweroff button.
      So I think that probably I can call the same command from home assistant, but I don't know how. Is there a REST command that can do that?
      Thanks.

      1 Reply Last reply Reply Quote 0
      • williamcarlos
        williamcarlos last edited by

        I hope you have already resolved your issue and I am including it here for other users.

        you can use Chrome's Developer tool to check the Post command and this example below is what I'm currently using to control Recalbox through Homeassistant

        These commands are for Recalbox 9.2 New Web ui

        ###############################################
        rest_command:
        emulationstation_reiniciar:
        url: http://172.16.8.6/api/system/frontend/restart
        method: POST
        headers:
        accept: "application/json, text/html"
        user-agent: 'Mozilla/5.0 {{ useragent }}'
        payload: '{}'
        content_type: 'application/json; cha**et=utf-8'
        verify_ssl: false

        emulationstation_parar:
        url: http://172.16.8.6/api/system/frontend/stop
        method: POST
        headers:
        accept: "application/json, text/html"
        user-agent: 'Mozilla/5.0 {{ useragent }}'
        payload: '{}'
        content_type: 'application/json; cha**et=utf-8'
        verify_ssl: false

        emulationstation_iniciar:
        url: http://172.16.8.6/api/system/frontend/start
        method: POST
        headers:
        accept: "application/json, text/html"
        user-agent: 'Mozilla/5.0 {{ useragent }}'
        payload: '{}'
        content_type: 'application/json; cha**et=utf-8'
        verify_ssl: false

        recalbox_reiniciar:
        url: http://172.16.8.6/api/system/reboot
        method: POST
        headers:
        accept: "application/json, text/html"
        user-agent: 'Mozilla/5.0 {{ useragent }}'
        payload: '{}'
        content_type: 'application/json; cha**et=utf-8'
        verify_ssl: false

        1 Reply Last reply Reply Quote 1
        • First post
          Last post

        Want to support us ?

        72
        Online

        98.7k
        Users

        28.1k
        Topics

        187.0k
        Posts

        Copyright © 2021 recalbox.com