Hi all,
i am trying to integrate the fully kiosk integration exactly like in : Fully Kiosk Browser
But finally I did not get it running in HA.
the sensors does not deliver any value.
in General the API call seams to work, cause if I post the following url into my browser I get a result:
http://MYDEVICEIP:2323/?cmd=deviceInfo&type=json&password=MYFULLYKIOSKPW
{"deviceName":"Galaxy Tab A7","batteryLevel":97,"........
"currentPage":"http://homeassXXX/lovelace/default_view","lastAppStart":"27.12.20 09:49:18"}
In my HA logs I can see following:
2020-12-27 10:04:02 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://XXXX:2323/?cmd=deviceInfo&type=json&password=XXXXX "HTTP/1.1 200 OK "
020-12-27 10:04:34 DEBUG (MainThread) [httpx._client] HTTP Request: GET http://XXXX:2323/?cmd=deviceInfo&type=json&password=XXXXX "HTTP/1.1 200 OK "
2020-12-27 10:04:34 DEBUG (MainThread) [homeassistant.components.rest.sensor] Data fetched from resource: {"status":"Error","statustext":"Please login"}
So it seams that in general it cannot login the rest api
My semsor.yaml looks following:
- platform: rest
name: openweather_report2
json_attributes:
- current
- daily
value_template: "{{ value_json['current']['dt'] | timestamp_custom('%Y-%m-%d %H:%M', true) }}"
resource: !secret openweathermap_rest
scan_interval: 3600
- platform: rest
name: tablet_ha
json_attributes:
- batteryLevel
- kioskMode
- screenBrightness
- motionDetectorState
- maintenanceMode
- appFreeMemory
- appUsedMemory
- totalFreeMemory
- totalUsedMemory
- hostname4
- ip4
- mac
- locationLatitude
- locationLongitude
- locationAltitude
- startUrl
- currentPage
resource: !secret tablet_ha_fullykiosk_rest
value_template: '{{ value_json.isScreenOn }}'
- platform: template
sensors:
tablet_ha_battery_level:
friendly_name: "tablet_ha_battery_level"
unit_of_measurement: '%'
value_template: "{{ states.sensor.tablet_ha.attributes.batteryLevel }}"
dayoftheweek:
value_template: >
{{ ['Mo','Di','Mi','Do','Fr','Sa','So'][now().weekday()] }}
with the following secrets.yaml:
tablet_ha_fullykiosk_rest: http://MYDEVICEIP:2323/?cmd=deviceInfo&type=json&password= MYFULLYKIOSKPW
tablet_ha_screen_on: "/usr/bin/curl -X POST 'http://MYDEVICEIP:2323/?cmd=screenOn&type=json&password= MYFULLYKIOSKPW'"
tablet_ha_screen_off: "/usr/bin/curl -X POST 'http://MYDEVICEIP:2323/?cmd=screenOff&type=json&password= MYFULLYKIOSKPW'"
tablet_ha_screen_state: '/usr/bin/curl --silent -X GET "http://MYDEVICEIP:2323/?password= MYFULLYKIOSKPW" |grep "Screen status" |grep "on\|off" |sed "s/<[^>]*>//g" |sed "s/Screen status//g" |sed "s/Turn on//g" |sed "s/Turn off//g"'
Does anybody has an idea which config I did wrong?
Many thanks in advance