Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Android: Switches do not update correctly #902

Closed
s0129 opened this issue Mar 2, 2014 · 19 comments
Closed

Android: Switches do not update correctly #902

s0129 opened this issue Mar 2, 2014 · 19 comments
Assignees

Comments

@s0129
Copy link
Contributor

s0129 commented Mar 2, 2014

On android switches with multiple mappings do not update when pressed. This works correctly on the http version.
An example is the android Demo 'Discrete Widgets'.
Switch item=Scene_General label="Scene" mappings=[1=TV, 2=Dinner, 3=Reading]
If you select Dinner the UI is not updated until the app is closed and then reopened.

Regards

Simon

@belovictor belovictor self-assigned this Mar 3, 2014
@belovictor belovictor assigned teichsta and unassigned belovictor Mar 3, 2014
@belovictor
Copy link
Contributor

This is not a bug in Android but in REST API of openHAB. To repeat it just use curl:
curl -H "X-Atmosphere-Transport: long-polling" -H "Accept: application/xml" http://demo.openhab.org:8080/rest/sitemaps/demo/0301
And then try to click widgets in demo.openhab.org/widget overview page of classic UI - nothing will happen to this long polling request.

@kaikreuzer
Copy link
Member

I can reproduce this against the demo server, but not against my local 1.4.0 installation.

@belovictor
Copy link
Contributor

Strangely, I can't reproduce it on release which I just downloaded either, though, there are lost events and group items sometime are not updated with values, this particular issue can't be reproduce. smee204, can you confirm that you use the 1.4.0 release of openHAB and latest HABDroid from Google Play?

@s0129
Copy link
Contributor Author

s0129 commented Mar 19, 2014

I am currently running from github master (fetched a few weeks ago) with
the latest android app. I was using 1.4.0 but can't remember if this issue
happened on that version. I have just tried rolling back to 1.4.0 but the
openhab android app force closes everytime it opens. Must be a problem with
my configuration. Unfortunately I wont get any time to look at this until
next week.

I will update you when I get a chance to roll back to 1.4.0 properly and I
will also try updating to the current master.

On 18 March 2014 19:20, belovictor notifications@github.com wrote:

Strangely, I can't reproduce it on release which I just downloaded either,
though, there are lost events and group items sometime are not updated with
values, this particular issue can't be reproduce. smee204, can you confirm
that you use the 1.4.0 release of openHAB and latest HABDroid from Google
Play?

Reply to this email directly or view it on GitHubhttps://github.com//issues/902#issuecomment-37976198
.

@andrey-desman
Copy link

I'm developing binding for HDL/SmartBus system and I see this issue with android app.

Web UI works like a charm: if I click on/off the light goes on or off and UI element displays correct state. If I switch the light on or off via hardware switch, the web UI reacts like it should.

However, in android app it looks like this:
The light is off, android app displays off.
I click the on/off button and the light goes to on (binding gets ON command). Android UI displays ON state and then goes back to OFF quickly. If I click it again, it goes to ON again (binding gets ON command once more) and stays in ON state. If I click it another one time, it will send OFF command to binding and display OFF state (the light goes off as well).
If I change the element state from web UI or via physical button, android app doesn't display the state change at all.

@s0129
Copy link
Contributor Author

s0129 commented Mar 28, 2014

I can confirm that I don't get this problem if I download the 1.4.0 release
from openhab downloads page.
It seems to be a problem when using the version I got from github master a
few weeks ago.

Regards

Simon

On 22 March 2014 16:49, andrey-desman notifications@github.com wrote:

I'm developing binding for HDL/SmartBus system and I see this issue with
android app.

Web UI works like a charm: if I click on/off the light goes on or off and
UI element displays correct state. If I switch the light on or off via
hardware switch, the web UI reacts like it should.

However, in android app it looks like this:
The light is off, android app displays off.
I click the on/off button and the light goes to on (binding gets ON
command). Android UI displays ON state and then goes back to OFF quickly.
If I click it again, it goes to ON again (binding gets ON command once
more) and stays in ON state. If I click it another one time, it will send
OFF command to binding and display OFF state (the light goes off as well).
If I change the element state from web UI or via physical button, android
app doesn't display the state change at all.

Reply to this email directly or view it on GitHubhttps://github.com//issues/902#issuecomment-38356997
.

@kaikreuzer
Copy link
Member

Closing it. Feel free to reopen if it reoccurs.

@Fl0te
Copy link

Fl0te commented Jan 29, 2015

Hi andrey-desman.

How is it going on the HDL/SmartBus binding?

@aaronsutton
Copy link

I'm still having this issue using openHAB 1.6 and android version 1.5.1.1. Is there any resolution to this?

@mauroMCW
Copy link

same issue for me, suddenly hadroid can't update devices status.
Web front-end via browser works fine.
Habdroid works only if I click on "Clear images cache" or exit and enter again in the application.
No logs related to this issue on openhab.log.
I tried to delete all habdroid data, reboot the terminal and reinstall the application.

I have 22 items in habdroid home page. I don't know if that can interfere.
Openhab Version 1.6.2
Habdroid Versio 1.5.1,1
Android Lollipop

@kobelka
Copy link

kobelka commented Apr 17, 2015

I have the same problems as mauroMCW

@mauroMCW
Copy link

Fixed restarting openhab service on server side.

@aaronsutton
Copy link

Restarting the service does not correct this issue for me. For me, it
wasn't that this issue suddenly surfaced, I've never had the switches
update properly.

@belovictor
Copy link
Contributor

This is a problem with openHAB updates, not with the app.

@aaronsutton
Copy link

This issue still exists for me with openHAB 1.7. Is it resolved in 2.0?

@brunoabele
Copy link

Same problem on openHAB 1.7.1 with HabDroid 1.7.0.1, web interface work fine

@1technophile
Copy link

same problem on 1.7.0 with habdroid

@stefanst
Copy link

same problem with 1.7.1 and Habdroid. Web UI works fine.
Did some more testing:

  • Running the server on my Win7 box results in the app updating properly
  • Running the server with the same configuration on my Raspberry Pi2 leads to the issue with the Android app not updating

The Web UI works well for both servers- Win7 and Raspbian.

@chjop
Copy link

chjop commented Nov 12, 2015

Since this is issue is closed and this is the wrong tracker I comment here: openhab/openhab-android#129

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests