Had to restart the App for the digital button to start working again


#1

My issue is about the Android application. The device is a raspberry pi 3 model B (not +) through MQTT.

It happened to me yesterday that I would click on the digital app button, the state of the virtual button would change (color change) but the action would not propagate to the raspberry pi (no message received).

I had to close the app and restart it for the virtual button to start working again.

To me it seems that the app was silently ignoring a communication error with the server. I would prefer the app to fail in error cases because I have no other way of telling if the action went through if I’m not in my home.

What would be the next step to help diagnose this?


#2

Hi @francoisgervais.
Thanks for reporting this issue. i will put this forward to the team for development.

A workaround can be In your code when you read the status of the button, store the value in a variable and send it back again to another two state widget. so that you can come to know the state of the button.


#3

That’s a geat idea, I’ll do that, thank you


#4

Hi @shramiksalgaonkar,

I implemented your suggestion and it works great. Now I get a way better insurance that the rpi actually got the command.

Here I made a video showing the issue if that helps solving it to some degree.

One would think that the button icon state would only change once the server acknowledged the transaction but we see in the video that this is not the case. It happily changes state even if the server didn’t get it. Once the app is restarted, it works as expected.

Oh and I’m sorry if that bothers, my daughter is talking quite a bit and I had to talk in french also, pretty chaotic video hehe.


#5

thanks for reporting this issue and glad the workaround is working for you. As for this issue, the team is trying to find a solution.

Not a problem at all. I hope she is liking what her father is doing with cayenne :slightly_smiling_face: