Ariela - Home Assistant Android Client


#1325

Hello Ionut, great work on the app so far! I love all the features it has and am currently using it on an old GS4 as a control panel.

I’m trying to get the back camera to work on my old Galaxy S4 but doing the mqtt publish to topic “homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera” doesn’t seem to be triggering it. Does anything need to go in the payload?

Also, once I do get it working, is there a way to shut off streaming from HA? If not, I suggest adding one.


#1326

Thanks! Also I just wanted to let you know that the circle sliders in lovelace light card seem not to be working in Ariela. I’m using Yeelights if that needs to be mentioned.
Light card sliders works just fine in webui.


#1327

Its also a change in an HA update, i had to change mine as well. Remove the list of attributes, then use the same topic that you have in state_topic: in json_attributes_topic:

for example, this is what i have now:

- platform: mqtt
  name: "Austin's Phone BT"
  state_topic: "homeassistant/sensor/android_austin_phone_bluetooth/state"
  value_template: "{{ value_json.enabled }}"
  json_attributes_topic: "homeassistant/sensor/android_austin_phone_bluetooth/state"
- platform: mqtt
  name: "Austin's Phone Wifi"
  state_topic: "homeassistant/sensor/android_austin_phone_wifi/state"
  value_template: "{{ value_json.status }}"
  json_attributes_topic: "homeassistant/sensor/android_austin_phone_wifi/state"
- platform: mqtt
  name: "Austin's Phone Battery"
  state_topic: "homeassistant/sensor/android_austin_phone_battery/state"
  unit_of_measurement: '%'
  value_template: "{{ value_json.level }}"
  json_attributes_topic: "homeassistant/sensor/android_austin_phone_battery/state"

#1328

Nice app :+1:

ariela_wear_error

Unfortunately I’m getting the above error on Wear. I’m running the latest version and have uninstalled and reinstalled on the watch, as I saw suggested earlier in the thread, but to no avail.


#1329

Did you selected the MQTT client to use. If yes, please enable debug mode and send me the logs.
Streaming camera will just send one picture per mqtt publish call, so you will not have to stop anything.

Please enable debug mode and send me the logs so i can investigate.

I will see what i can do.


#1330

Hello all,

Version 1.2.9.6 is out.
What’s new:

  • redesign Settings screen
  • improve thermostat card slider touch behaviour
  • improve light card slider touch behaviour
  • fixed negative step counter sensor value
  • small UI changes
  • change wear app name to “Ariela”
  • added option (forced) to send credentials to wear app

#1331

I had selected the build-in client as the documentation specified. I also checked to make sure the app has camera permissions, and it does. So, then I opened my MQTT client on my PC and connected to my HA MQTT server, subscribed to everything, and published to “homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera” and the pc client saw it, but Ariela never posted a reply. All the other sensors updated though.

I got you 3 log files to look over.
log file1
log file2
log file3

I looked through them too, and this is one of the parts that seems relevant:

log excerpt

D/HA_HassWebSocket( 4159): onMessage: message = {“id”: 3, “type”: “event”, “event”: {“event_type”: “call_service”, “data”: {“domain”: “mqtt”, “service”: “publish”, “service_data”: {“topic”: “homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera”, “payload_template”: “”}}, “origin”: “LOCAL”, “time_fired”: “2019-02-26T15:10:50.401600+00:00”, “context”: {“id”: “0224300ef09e466aa3c09856bbe40f1e”, “user_id”: null}}}
D/HA_MQTTAddon( 4159): onMQTTTopicReceived: topic = homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera payload =
D/HA_BackCameraMQTTSensor( 4159): onMessageArrived: app to start =
E/HA_MqttService( 4159): traceCallback: tag = HA_MqttConnection message = messageArrived(homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera,{})
E/HA_MqttService( 4159): traceCallback: tag = HA_DatabaseMessageStore message = storeArrived{ssl://192.168.0.230:ArielaMQTTClient:com.surodev.ariela}, {}
D/HA_BackCameraMQTTSensor( 4159): Camera found
E/HA_PressureMqttSensor( 4159): sendSensorData: didn’t passed 10 seconds since we send last update
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_MqttService( 4159): traceCallback: tag = HA_DatabaseMessageStore message = storeArrived: inserted message with id of {c19e1845-c9ad-47bf-920e-7a0ecb6c4a02} - Number of messages in database for this clientHandle = 0
E/HA_MQTTAddon( 4159): messageArrived: topic = homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera message =
D/HA_MQTTAddon( 4159): onMQTTTopicReceived: topic = homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera payload =
E/HA_MqttService( 4159): traceCallback: tag = HA_MqttConnection message = messageArrived(homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera,{})
E/HA_MqttService( 4159): traceCallback: tag = HA_DatabaseMessageStore message = storeArrived{ssl://192.168.0.230:ArielaMQTTClient:com.surodev.ariela}, {}
E/HA_MqttService( 4159): traceCallback: tag = HA_DatabaseMessageStore message = storeArrived: inserted message with id of {60899034-9992-41f3-8918-285d56d972d1} - Number of messages in database for this clientHandle = 0
I/art ( 4159): Background partial concurrent mark sweep GC freed 106799(4MB) AllocSpace objects, 14(1379KB) LOS objects, 40% free, 19MB/32MB, paused 1.098ms total 116.180ms
D/HA_BackCameraMQTTSensor( 4159): onMessageArrived: app to start =
D/HA_BackCameraMQTTSensor( 4159): Camera found
E/HA_HassWebSocket( 4159): Error in onMessage()
E/HA_HassWebSocket( 4159): java.lang.RuntimeException: takePicture failed
E/HA_HassWebSocket( 4159): at android.hardware.Camera.native_takePicture(Native Method)
E/HA_HassWebSocket( 4159): at android.hardware.Camera.takePicture(Camera.java:1484)
E/HA_HassWebSocket( 4159): at android.hardware.Camera.takePicture(Camera.java:1429)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.mqtt.BackCameraMQTTSensor.sendCameraImage(BackCameraMQTTSensor.java:104)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.mqtt.BackCameraMQTTSensor.onMessageArrived(BackCameraMQTTSensor.java:93)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.addons.MQTTAddon.onMQTTTopicReceived(MQTTAddon.java:277)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.ArielaStateMachine.onMQTTTopicReceived(ArielaStateMachine.java:388)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.addons.HassWebSocket.onMessage(HassWebSocket.java:701)
E/HA_HassWebSocket( 4159): at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:323)
E/HA_HassWebSocket( 4159): at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219)
E/HA_HassWebSocket( 4159): at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105)
E/HA_HassWebSocket( 4159): at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:274)
E/HA_HassWebSocket( 4159): at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:214)
E/HA_HassWebSocket( 4159): at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
E/HA_HassWebSocket( 4159): at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
E/HA_HassWebSocket( 4159): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/HA_HassWebSocket( 4159): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/HA_HassWebSocket( 4159): at java.lang.Thread.run(Thread.java:818)
D/HA_HassWebSocket( 4159): onMessage: message = {“id”: 3, “type”: “event”, “event”: {“event_type”: “call_service”, “data”: {“domain”: “mqtt”, “service”: “publish”, “service_data”: {“topic”: “homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera”, “payload_template”: “”}}, “origin”: “LOCAL”, “time_fired”: “2019-02-26T15:10:50.504672+00:00”, “context”: {“id”: “ff721e048abd473b8673d32683c622d3”, “user_id”: null}}}
W/CameraBase( 4159): An error occurred while connecting to camera: 0
E/HA_MQTTAddon( 4159): messageArrived: topic = homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera message =
D/HA_MQTTAddon( 4159): onMQTTTopicReceived: topic = homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera payload =
D/HA_BackCameraMQTTSensor( 4159): onMessageArrived: app to start =
D/HA_MQTTAddon( 4159): onMQTTTopicReceived: topic = homeassistant/camera/android_jason_galaxy_s4_backcamera/get_backcamera payload =
D/HA_BackCameraMQTTSensor( 4159): Camera found
W/CameraBase( 4159): An error occurred while connecting to camera: 0
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_PressureMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_PressureMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_PressureMqttSensor( 4159): sendSensorData: didn’t passed 10 seconds since we send last update
E/HA_AmbientTempMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_RelativeHumidityMqttSensor( 4159): sendSensorData: last sended data = new value
D/HA_BackCameraMQTTSensor( 4159): onMessageArrived: app to start =
D/HA_BackCameraMQTTSensor( 4159): Camera found
W/CameraBase( 4159): An error occurred while connecting to camera: 0
E/HA_HassWebSocket( 4159): Error in onMessage()
E/HA_HassWebSocket( 4159): java.lang.RuntimeException: Fail to connect to camera service
E/HA_HassWebSocket( 4159): at android.hardware.Camera.(Camera.java:545)
E/HA_HassWebSocket( 4159): at android.hardware.Camera.open(Camera.java:385)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.mqtt.BackCameraMQTTSensor.sendCameraImage(BackCameraMQTTSensor.java:101)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.mqtt.BackCameraMQTTSensor.onMessageArrived(BackCameraMQTTSensor.java:93)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.addons.MQTTAddon.onMQTTTopicReceived(MQTTAddon.java:277)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.ArielaStateMachine.onMQTTTopicReceived(ArielaStateMachine.java:388)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.addons.HassWebSocket.onMessage(HassWebSocket.java:701)
E/HA_HassWebSocket( 4159): at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:323)
E/HA_HassWebSocket( 4159): at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219)
E/HA_HassWebSocket( 4159): at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105)
E/HA_HassWebSocket( 4159): at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:274)
E/HA_HassWebSocket( 4159): at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:214)
E/HA_HassWebSocket( 4159): at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
E/HA_HassWebSocket( 4159): at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
E/HA_HassWebSocket( 4159): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/HA_HassWebSocket( 4159): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/HA_HassWebSocket( 4159): at java.lang.Thread.run(Thread.java:818)
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_PressureMqttSensor( 4159): sendSensorData: didn’t passed 10 seconds since we send last update
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_PressureMqttSensor( 4159): sendSensorData: didn’t passed 10 seconds since we send last update
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_PressureMqttSensor( 4159): sendSensorData: didn’t passed 10 seconds since we send last update
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_PressureMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_AmbientTempMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_RelativeHumidityMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_PressureMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value
E/HA_LightMqttSensor( 4159): sendSensorData: last sended data = new value


#1332

Hello,

From the logs attached it seems that Ariela do not have the camera permission enabled. Could you please check if in Settings -> Apps -> Ariela -> Permission, the camera permission is checked?

LE: Also found this in the logs, i will investigate:

E/HA_HassWebSocket( 4159): java.lang.RuntimeException: Fail to connect to camera service
E/HA_HassWebSocket( 4159): at android.hardware.Camera.(Camera.java:545)
E/HA_HassWebSocket( 4159): at android.hardware.Camera.open(Camera.java:385)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.mqtt.BackCameraMQTTSensor.sendCameraImage(BackCameraMQTTSensor.java:101)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.mqtt.BackCameraMQTTSensor.onMessageArrived(BackCameraMQTTSensor.java:93)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.addons.MQTTAddon.onMQTTTopicReceived(MQTTAddon.java:277)
E/HA_HassWebSocket( 4159): at com.surodev.arielacore.service.ArielaStateMachine.onMQTTTopicReceived(ArielaStateMachine.java:388)


#1333

It appears to have camera permissions: Imgur


#1334

I found the issue. The tomorrow update will contain a fix for the issue. Thank you very much for the support.


#1335

Hi Ionut, amazing response time :+1:

Unfortunately, I still can’t get the Wear app to work. Have updated the app on the phone (I’m using the pro version, if that makes a difference), uninstalled and reinstalled on the watch, restarted phone and watch, but still get the same error as my previous post (Won’t let me post two images as I’m a new user). I’ve force synced the credentials repeatedly and each time I get the message that they have been successfully synced.

Interestingly, if I enter the local server IP into the external server settings the error changes to this:
ariela_wear_error_2

With the blacked out port being the local IP for home assistant.


#1336

That’s a good sign that the credentials were synced. Unfortunately i think the watch is not using the local wifi in order to get internet and that’s why the connection failed. Please try to put the correct external IP and see if works.


#1337

Hi,

Don’t even try to connect to HA over a http connection as you are providing easy access to your house for (almost) the entire internet; the username and password are sent in clear. And, with (probably) same password for several accounts/devices, madness follows.

First set HA to be accessible over https (if using Hassio, I found Duckdns + Nginx addons quite easy but there are different opinions from the community so you might want to check them up) and only then worry about connecting your watch :slight_smile:


#1338

Hello all,
Version 1.2.9.7 is out.
What’s new:

  • fixed MQTT front camera retrieve issue
  • fixed MQTT back camera retrieve issue
  • fixed light card brightness set issue
  • NEW: support for person entities
  • fixed picture entity camera image retrieval
  • NEW: stream camera support
  • do not gray out picture entity image if having camera

#1339

Once again, thanks a lot for your effort on this.

One feature request : would it be possible to have Ariela device as media player? This is possible with Fully Kiosk app and a Lovelace plug-in. This is very useful for an Android tablet used as a control panel to allow to send TTS message to the tablet.


#1340

Thank you, i am glad you like the app. I will add your request to my TODO list.


#1341

Well, that applies primarily if you’re connecting over internet. If you’re just connecting via your local network, you should be fine using http. It’s still recommended to use https though, of course.


#1342

The camera is working. Good work, Ionut!


#1343

Then I see no reason blurring the IP of the HA instance if not doing port forwarding and sole access is local as 192/172/10.168.1.50:8123 or any such variation is meaningless for machines behind NAT.

Using https is not recommended. Should be mandatory :slight_smile:


#1344

If you’re confident no one is using a sniffer on your local network, http is fine for local access. So, yeah, it is pretty pointless to blur it out. Now, if it was the external IP, then that’s a whole other discussion. https should be required for that. When accessing from outside your home you don’t know who might be eavesdropping on your traffic. Hopefully your home network is secure enough that no one is getting on it uninvited. And hopefully you have good virus protection and don’t download any spyware or anything that would expose your local traffic to a bad actor.

I just always connect over Internet using https myself. Mine’s setup to not work on http at all. lol. And I have MFA enabled and would encourage everyone to do likewise.