-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App doesn't sign in, although Webinterface does #3
Comments
Thanks for your feedback. Did you try to set the url in the settings page? The icon is on the top right and please note that if your heimcontrol instance is running on something else than port 80, you need to specifiy the port in the url, for example: http://heimcontrol:8080/ |
Yep! I've tried the DynDns URL as well as the local network URL. Same URL and credentials are working over the browser though.. The adb logs are pointing to something like Thanks |
Do you have the newest version of heimcontroljs? We only just recently added the API support, so if you have an older version there won't be an api endpoint. |
Installed the app and heimcontrol.js just yesterday. How could I update? |
If you pulled from github then you will have the newest version 👍 Can you try to make a post request in the terminal like: and tell me what you get back? |
Thank you for this excellent support. Maybe wrong version which is installed? Getting this code: SyntaxError: Unexpected token } |
Check whether in the heimcontrol.js file (in your local heimcontrol js repo) around line 147 you find this route: If you don't have this route you have a wrong version of heimcontroljs. |
Thank you ver much again! I checked and decided to reinstall heimcontrol.js.. I'll get back. By the way. Is there a chance to push a http-request directly to the Pi? I opened an issue for this. I would like to switch a rc-socket by an url or so. Do you know if this is possible? |
I don't think heimcontrol supports this yet, although I think one could pretty easily add that. I don't have an rc socket that I could try it out with, but I might have some time next week to look into it (if you can wait that long ;)). If you feel like you could do it on your own, I could give you some tips to point you in the right direction on how to implement it. Once it's implemented in heimcontrol, I think I could pretty easily add the functionality to the heimdroid app. |
I would love to try, but I'm not the kind of programmer. More consumer ;).. Checked the file: Around Line 147 Seems to be correct! Another Issue: Same again, Browser is working, App not. Seems API is missing. Wonder why?! |
Alright, did you check for this line I will look into the rx socket feature when I have some spare time. |
Hm. I'm getting a Token now. So thats alright. But App..Still not working. Still Error 0 :D.. Sorry dude.. I think there is no connection to the network..although my phone is connected to it. How can I check it? |
Alright, getting a token is a good sign:) |
I'm sorry. I tried everything. Token is there, browser access works, but the app still doesnt sign in. Is there a problem in Android 4.3 or so? Server Adress is 100 % correct, Credentials as well. Reinstalled the app, still no success. Is there a permission missing? |
I actually run 4.3 myself, and I have tried it on 4.2 and 4.4 on other phones as well, it seems to work fine, although I've never tried it with dynds but a direct ip instead and always connected to the wifi on the same network. I think you might be running into some problem with your router firewall or the firewall of the host you are running heimcontrol on. Are you running heimcontrol on a raspberry? What linux distribution? |
Thanks for the screenshots, they help. I assume you tried to add a / at the end of the url, so ...8080/. In the terminal window where you started heimconroljs with node, what does it print out the moment you hit the button? Lastly, one thing you could try to do is change your heimcontrol instance to port 80 and try again without a port. Bear with me, i still hope to figure out where the problem is. |
Ps: i run the pacman mod myself, so the mod shouldnt be a problem |
Well, actually I don't know how to change the port. I'm also running a small apache websever on port 80.. NATTING the port in the router doesnt help? I hope Apache, doesn't interfer with the API? Yes, I tried with and witout the :8080/ What do you mean by printing out when hitting the button? The Login-button in the App? Terminal-Windows stays the same. Can I get a logfile from the app? In Logcat I can't see any errors.. |
You started heimcontrol with |
I tried the Terminal-thing, but as I described whithout any success. When I log in via the browser and via the "curl", that it gives me a feedback, but when I try to login with the app, there is nothing, no GET/POST message from the APP I also tried another port (80), but there is no server-ping I guess..Hm. Well. Anyway. Never mind! ;) |
I'm going to close this for now, I'll let you know when I figure out what the problem might be. |
Hi. Just wanted to get back. I completely reinstalled everything, but still doesn't work ;).. |
With the token you get, you can send a socket event called gpio-toggle to the server to changes the toggle state. Use the token from the api as the auth token and find a socket library to make the request. Check out the heimcontrol docs to figure out which fields to pass (I think it's value (1 or 0 depending whether you want to turn it on or off) and id for which toggle you want to trigger). |
Oh. Man you're fast ;).. I looked it up as you said. But honestly I don't really know how to start this (I've hardly knowledge of Javascript or Node.js). If you have some spare time, could you feed me with the right keywords I've to search for on google? Do I need to write a script and place it on the webserver or can I call the heimcontrol.js app directly with an URL which contains the information of the token and GPIO on/off? The passage you told me says the following: /**
/**
/**
Gpio.prototype.api = function(req, res, next) {
var exports = Gpio; return exports; }); found here: http://ni-c.github.io/heimcontrol.js/api/files/plugins_gpio_index.js.html#l114 Thank you very much! :) |
I think it would be much easier to get the app working than try to implement something yourself with socket. Sockets can be somewhat tricky to work with. I've been kind of busy with work, but I will try a dyndns setup as soon as possible to figure out what your problem might have to do with. I'm guessing it's a firewall or selinux issue, hard to tell. |
I have the same problem. Just installed the latest heimcontrol.js on my new raspberry pi and set everything up. What firewall could be a problem? I don't have a firewall active on my smartphone and router firewall should be no problem? Is there a firewall on the raspberry pi with raspberian that could be a problem? |
Alright, I think I might have found the bug. Can one of you try to install version 0.1.2 (newest link) and report back please? |
http://jorism.github.io/Heimdroid/app/heimdroid.apk |
correction: with my android tablet the login worked immediately with the use of alias instead of IP I currently use webcam, RGB, and Arduino modules on the home screen of heimcontrol |
Same here. Although i use switches. But great for the solution to login
|
Alright, thank you very much for your help! I only use the GPIO toggles, so far I didn't have a reason for implementing any other features. |
Awesome work mate. Rcswitch for duino would be perfekt <3
|
I don't know if anybody saw it. But power consumption of the app seems very high although the Phone is in Standby. |
This is because the socket is always open even in standy. I can add a feature to turn this off and only reconnect when the app is resumed. Can you please open an issue for this? Thanks |
Hello,
I'm getting 'Error 0 while trying to log in' Error when I try to get into the Heimcontrol installation.
I can access it via the Browser of my phone with same credentials..Is there something I have to follow to get everything write?
It's a Sony Xperia Phone on 4.3 Android by the way.
Thanks, Awesome Project!
The text was updated successfully, but these errors were encountered: