homeDash is an Android browser for displaying dashboards with MQTT integration and a motion sensor.
After configuration press the little play button on the top right.
To return to the configuration screen pull down or up from the screen border and press back.
To close the background service swipe out the app from the Android task manager.
- Motion
- Pressure
- Light
- Battery / Charging
topic /homedash/command
- Load URL
{"url":"http://someurl.org"}
- Run JavaScript in current page
{"jsExec":"Alert('Hello World');"}
- Screen wake up
{"wakeup"}
- Clear browser cache
{"clearBrowserCache"}
- platform: mqtt
state_topic: "/homedash/sensor/battery"
name: "homedash battery"
unit_of_measurement: "%"
value_template: '{{ value_json.value }}'
- platform: mqtt
state_topic: "/homedash/sensor/brightness"
name: "homedash brightness"
unit_of_measurement: "lx"
value_template: '{{ value_json.value }}'
- platform: mqtt
state_topic: "/homedash/sensor/pressure"
name: "homedash pressure"
unit_of_measurement: "mb"
value_template: '{{ value_json.value }}'
The motion sensor only sends a message on motion but doesn't reset. The motion sensor state can be reset with an automation. Since Home-Assistant doesn't provide a service to set a sensor state we use an REST API call.
binary_sensor:
- platform: mqtt
state_topic: "/homedash/sensor/motion"
name: "Motion"
payload_on: '{"sensor":"cameraMotionDetector","unit":"Boolean","value":"true"}'
device_class: motion
// the ugly part:
// reset the motion sensor
- alias: Turn off motion detection
trigger:
platform: state
entity_id: binary_sensor.motion
to: 'on'
for:
seconds: 10
action:
service: rest_command.reset_motion_sensor
rest_command:
reset_motion_sensor:
url: 'http://localhost:8123/api/states/binary_sensor.motion'
payload: '{"state": "off" }'
method: 'post'