Comments (15)
Ahhh okay awesome, disabling instant run worked. Thanks for the help.
from home-assistant-android.
I just ran into the same issue, and have been pulling my hair out why the auth wasn't working. It might be worth putting a note in the README about the Instant Run incompatibility with Ason.
from home-assistant-android.
@w1ll1am23 Hi! Thanks for the report, and the offer to contribute! That would be very appreciated :)
On your issue, could you send me a logcat of the login process? I'd need to know if there's any http error or what warnings/errors my authentication process logs.
from home-assistant-android.
@Maxr1998 sure thing, https://pastebin.com/JntX9k2e
I have been looking at this since I opened it can can't figure out what is going on, but I am new to Android so that doesn't mean much.
from home-assistant-android.
@w1ll1am23 Ok, nothing special visible in the logs. At least we now know that the socket connection works fine, and that there is a response from the Home Assistance instance.
Could you repeat your logging again, but this time with Log.d(TAG, message.toString());
added directly after this line in your local build?
from home-assistant-android.
Ahhh there ya go. I was wondering if those extra keys were causing the problem, but wasn't sure how they got added in.
This is from the send method
06-27 15:39:40.095 28801-28837/io.homeassistant.android D/HassService: send: {"api_password":"MY_PASSWORD","type":"auth","$change":null,"serialVersionUID":1751593233156997204}
This is from the on message received.
06-27 15:38:01.306 27844-27949/io.homeassistant.android D/HassService: onMessage: {"message":"Message incorrectly formatted: extra keys not allowed @ data['$change']. Got None\nextra keys not allowed @ data['serialVersionUID']. Got 1751593233156997204","type":"auth_invalid"}
from home-assistant-android.
I don't think it matters, but I commented out
import io.homeassistant.android.location.LocationUpdateReceiver;
and everything in
updateLocationTracker
In the settingsActivity because that package doesn't exist...
from home-assistant-android.
Ah, so that's the cause! This is actually an upstream bug of the Ason library, whose serializer also includes compiler-generated fields. Luckily, you can easily fix this (for now) by just disabling instant run in Android Studio - then it always has to do a full build, but at least these fields don't get included.
from home-assistant-android.
It actually does, even two times ;) [1] [2]
It's just not in the main
source set because it's flavor-dependent.
from home-assistant-android.
Glad you could fix it! As I said, looking forward to any contribution, no matter how big or small :)
from home-assistant-android.
@dixonl90 actually, a fix was merged into Ason just two days ago, and since I'm currently building from my own fork anyway until there is a new upstream release, you can use Instant run without any problems now ;)
from home-assistant-android.
Fab, thanks for the update. :)
from home-assistant-android.
Hi guys. For one like me which is not a developer: Is this still a problem and is there any way to use this app as of today? I have downloaded it from F-droid recently and I am unable to login.
from home-assistant-android.
Hi @MrManor, no, the problem you're having is probably not related to this issue - I suppose it's more caused by the new login system Home Assistant uses now. I didn't get around to support that yet, however, the app should still work if you enable the legacy api key - that's at least how I use it atm.
from home-assistant-android.
the app should still work if you enable the legacy api key
Ok, thanks. I'll try using legacy key.
from home-assistant-android.
Related Issues (20)
- Support Android < 5.0 (API-21) HOT 4
- Use data binding HOT 1
- Add quicksettings tile HOT 6
- Conversion Error HOT 5
- Support HTTP basic auth HOT 2
- Gradle wrapper is missing HOT 3
- App is showing a white screen with no way to get front end back HOT 14
- Provide pure-floss build flavor HOT 2
- Usage of location and battery tracking HOT 5
- Translate button is not working HOT 7
- How about hostnames? HOT 1
- Toggle button for switches HOT 1
- Using self signed certificate only shows "Connection errror: Invalid IP, or is the server offline?" HOT 7
- Better indicate that this app is unofficial HOT 9
- Find a better name HOT 4
- Nested groups not supported? HOT 3
- Build new Version HOT 1
- Dark theme / Tasker integration / certificates
- Clarify the "Home Assistant URL/IP" login field HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from home-assistant-android.