Giter Site home page Giter Site logo

Comments (13)

matt8707 avatar matt8707 commented on July 19, 2024

Fullykiosk changed some names in the api.
currentFragment screensaver is now isInScreensaver true etc..
I'll update the changes tomorrow

from hass-config.

roh735 avatar roh735 commented on July 19, 2024

ok, thank you, waiting on your update.
Thank you, closing this issue in this case.

from hass-config.

Mohdbakr avatar Mohdbakr commented on July 19, 2024

also, isScreenOn changed to screenOn

from hass-config.

matt8707 avatar matt8707 commented on July 19, 2024

Thanks, I missed that

from hass-config.

roh735 avatar roh735 commented on July 19, 2024

sorry but for me its didnt help, same problem

see my code please help
switch.yaml

switch:

  - platform: command_line
    switches:
      fullykiosk_screen:
        friendly_name: Display
        command_on: !secret fullykiosk_screen_on
        command_off: !secret fullykiosk_screen_off
        command_state: !secret fullykiosk_screen_state
        value_template: "{{ value == 'on' }}"

  - platform: template
    switches:
      fullykiosk_screensaver:
        friendly_name: Screensaver
        icon_template: mdi:power-sleep
        value_template: "{{ is_state_attr('sensor.fullykiosk', 'isInScreensaver', true) }}"
        turn_on:
          - service: shell_command.fullykiosk_screensaver_on
        turn_off:
          - service: shell_command.fullykiosk_screensaver_off

input.yaml

input_number:

  fullykiosk_brightness_slider:
    name: Brightness
    icon: mdi:brightness-6
    initial: 20
    min: 0
    max: 100
    step: 1
    unit_of_measurement: '%'

sidebar_information.yaml

- type: entities
                      title: Tablet
                      class: add_header
                      show_header_toggle: false
                      entities:

                        - entity: switch.fullykiosk_screen

                        - type: custom:slider-entity-row
                          entity: input_number.fullykiosk_brightness_slider
                          hide_state: false

                        - entity: switch.fullykiosk_screensaver

                        - entity: sensor.fullykiosk_battery

                        - entity: sensor.fullykiosk_plugged

                        - entity: binary_sensor.fullykiosk_motion

                        - type: custom:bar-card
                          width: 55%
                          height: 2em
                          decimal: 0
                          unit_of_measurement: '%'
                          positions: *bar_card_positions
                          severity: *bar_card_severity
                          entity_row: true
                          entities:

                            - entity: sensor.fullykiosk_memory
                              name: Memory - 2GB
                              icon: mdi:memory
                              tap_action:
                                action: call-service
                                service: homeassistant.update_entity
                                service_data:
                                  entity_id: sensor.fullykiosk_memory

                            - entity: sensor.fullykiosk_storage
                              name: Storage - 32GB
                              icon: mdi:sd
                              tap_action:
                                action: call-service
                                service: homeassistant.update_entity
                                service_data:
                                  entity_id: sensor.fullykiosk_storage

from hass-config.

matt8707 avatar matt8707 commented on July 19, 2024
  - platform: rest
    name: fullykiosk
    json_attributes:
      ['batteryLevel', 'screenBrightness', 'plugged', 'motionDetectorStatus', 
      'lastAppStart', 'internalStorageFreeSpace', 'internalStorageTotalSpace', 
      'ramFreeMemory', 'ramTotalMemory', 'isInScreensaver']
    resource: !secret fullykiosk_rest_resource
    value_template: '{{ value_json.screenOn }}'
    scan_interval: 10

also double check secrets url/password

from hass-config.

matt8707 avatar matt8707 commented on July 19, 2024

For faster troubleshooting, you can do the commands directly from your browser
http://IP:PORT/?cmd=stopScreensaver&password=PASSWORD

from hass-config.

roh735 avatar roh735 commented on July 19, 2024

platform: rest I have as well same one in sensor.yaml
ip and pass are correct for sure i was checking manually from browser
its something wrong here probably because if not its means that something wrong with my tablet
its my secrets commands

fullykiosk_brightness_slider: "/usr/bin/curl -k 'http://111.111.111.111:2323/?cmd=setStringSetting&key=screenBrightness&value={{ (states.input_number.fullykiosk_brightness_slider.state | int * 2.55) | round(0) }}&password=pas123'"
fullykiosk_load_start_url: "/usr/bin/curl -X POST 'http://111.111.111.111:2323/?cmd=loadStartURL&password=pas123'"
fullykiosk_restart_app: "/usr/bin/curl -X POST 'http://111.111.111.111:2323/?cmd=restartApp&password=pas123'"
fullykiosk_screen_on: "/usr/bin/curl -X POST 'http://111.111.111.111:2323/?cmd=screenOn&type=json&password=pas123'"
fullykiosk_screen_off: "/usr/bin/curl -X POST 'http://111.111.111.111:2323/?cmd=screenOff&type=json&password=pas123'"
fullykiosk_screen_state: '/usr/bin/curl --silent -X GET "http://111.111.111.111:2323/?password=pas123" |grep "Screen status" |grep "on\|off" |sed "s/<[^>]*>//g" |sed "s/Screen status//g" |sed "s/Turn on//g" |sed "s/Turn off//g"'
fullykiosk_rest_resource: "http://111.111.111.111:2323/?cmd=deviceInfo&type=json&password=pas123"
fullykiosk_screensaver_on: "/usr/bin/curl -X POST 'http://111.111.111.111:2323/?cmd=startScreensaver&password=pas123'"
fullykiosk_screensaver_off: "/usr/bin/curl -X POST 'http://111.111.111.111:2323/?cmd=stopScreensaver&password=pas123'" 

from hass-config.

matt8707 avatar matt8707 commented on July 19, 2024

Did you double check json_attributes and value_template in rest, because some changed

from hass-config.

roh735 avatar roh735 commented on July 19, 2024

yes, see attached

image

from hass-config.

matt8707 avatar matt8707 commented on July 19, 2024

If the commands work in the browser, and your setup is exactly as mine, I have no idea what could be wrong

from hass-config.

roh735 avatar roh735 commented on July 19, 2024

here looks like all working
image

image

from hass-config.

roh735 avatar roh735 commented on July 19, 2024

so probably something wrong with my tablet, sorry for that.
thank you for your help, you did amazing job and this design the best what I was seen before :)

from hass-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.