-
Notifications
You must be signed in to change notification settings - Fork 130
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
IA7 Issue Tracking #490
Comments
print_speaklog is a bit of a kludge. The print_speaklog_current_time returns $Print_Log_Time instead of $Speak_Log_Time and json_server.pl print_speaklog sub has to add an empty array item otherwise the javascript self-call doesn't get activated. |
javascript.js updateStaticPage mixed content script also doesn't work with a time parameter. So right now it constantly polls all objects via json which might put a load that could impact other processing. Fixed: added item= parameter to json_server.pl |
Be good to load all the libraries locally (bootstrap, font awesome, jQuery) to reduce the dependancy of the internet on local MH operations. Have started this. Done |
Remove Audrey stuff since the Audrey can't operate IA7 anyways Done |
Add in the weather station & RRD graphs Weather station added. Issue: graphs don't show up on iPads? |
I'm trying to follow the docs on the IA7 wiki page. The first thing I would need to do fails for me: I've set the ia7_enable parameter. But then I should do:
I don't find this 'collections.json' file in my data folder. Am I missing something? I'm running the latest version from master. Should I see somewhere in the logs when this file is created? |
Ah, can you change that to data\web\collections.json? Its showing there on my branch. Sent from my mobile device.
|
Hmm, it does not show up for me in data/web either. I verified that ia7_enable is working fine and that the wiki link is fixed. So I have your latest changes in my clone. |
Do you have a separate data directory? This file exists in the mh/data directory. You should be able to find it on my github page. Collections.json is there otherwise things wouldn't work! You only need to copy it if you want to have a separate unique version. Sent from my mobile device.
|
OK, I was not completely following your thought process :-) I was under the impression the Now I understand it is the collection of times that show on the web interface. The file is indeed present in the MisterHouse install directory /data/web. I've adapted the wiki to make this more clear. And I have to say: this method of adapting the web interface is very convenient/much nicer compared to the IA5 method over overwriting html files. |
@hplato one thing I wonder: how is authentication for the web interface handled? Some time ago I have 'whitelisted' all devices on my local private LAN to be able to easily control our house. On the IA5 interface there was a login button on the upper right that allowed people to fill in a password for 'admin access'. Would people who have no such whitelist run into problems when testing out the IA7 interface? |
@hplato thinking further about the location to put the custom collections.json file: is data/web the best place to put this? I was under the impression that everything that is under 'data' are generated files at runtime and no user configuration. Would local/web or local/ia7 not be a better place to put such configuration? |
Good point. Maybe a config item that would point to where a user-specific configuration could be?
|
I whitelist my LAN so I’ve never used the authentication button. Could add as a button on the ‘gear’ sunscreen? What do you think?
|
Authentication linked to 'gear': yep, that would ensure people who don't have a whitelist on their setup to control the login. |
OK, I don’t use the authenticate button. Looking at stock IA5, my link is: http://ip/UNSET_PASSWORD?user=admin Is this the correct link? If so it’s trivial to add it to IA7 through a collection item.
|
Yes, this looks to be the correct link according to me! |
OK, I added a link in the settings for authorize. However I’m not having much luck making it work. Something to look at after I figure out the mixed mode problem.
|
@hplato am I correct that you told about an update to IA7 where you allow direct state changes from the web interface for devices that have only an on and an off state? I don't see this reflected in the current master for xPL_Plugwise devices. Every time I want to change the state of such device I still get a popup asking me to what state to change. On that screen there is only on and off. Do I need to set a specific feature for a device to enable this functionality? Regards, |
What should there be? Ia7 parses the states json output for object (i think it's set_states). When i get to my pc i'll send you the url you can use to output the raw json data. Sent from my mobile device.
|
I use curl to check the json to see if it’s a javascript to json_server issue. So to see the details about your object, you can do: $ curl --compressed "http://127.0.0.1:8080/json/objects?items=&fields=state,type,states,state_log” So in my case, here’s what I get for state, state_log and the states. Those are the states that are shown in the state modal dialog. I also filter it a little to remove non-end user states, such as status, a bunch of the % values, etc… {
|
Hey @hplato for the object I'm testing with the response is:
Before we try to debug further: is my assumption correct that if an object has only on and off as state you should be able to change the state immediately by clicking the object in the web interface? I thought I understood that one of your latest changes to the web interface code was to implement this (instead of serving the pop-up dialog that asks you what to do with the object where you can then only click the alternate state). Maybe I just misunderstood your comment on this topic. To me this would be a useful feature: serve the popup if an object has multiple states, and toggle the state from the interface directly in case there are only two states. What is your view on this? |
No, the substate dialog will always show up. I removed that single button that showed up when no states at all are defined. Challenge about direct set, is that it isn’t always clear if there are multiple states, plus there is no way to see an object log. So it might be more expedient, but might create unexpected results where a user hits one button and a modal comes up so they can choose. Select another button and it changes immediately. Anyways, that’s my thinking. Maybe a one-push change can occur if the outside icon is different, there could be other ways to do this. Right now, I’d prefer to keep features smaller since I have to do a bunch of code cleanup...
|
OK, no problem. I just misunderstood your comment. Let's keep this as a possible improvement/feature for later. |
Minor comment: the hardcoded v4.0 in the new web interface code is not really required. That value will get filled in automatically from the $Version variable in the next stable. As it is now the version in the web interface will be '4.0 4.0' when we release the next stable. |
Thanks Lieven, didn’t know that. Mine just showed: Version: develop-ref Build 626 (55a32bd) Hence why I put in 4.0. Is there a common method we can use for a version consistent for both stable and development? Maybe $Version is whatever the stable base is, and then a $Version_dev (or better name) that is set to the development details? howard
|
Hey @hplato,
Actually, this method is already implemented. The version you see when running master shows you that you're running master ( If you're running stable this version string will show the stable version number (that is fetched from the VERSION file in the root folder of stable releases). This is documented here: Specific section:
I will remove the hard-coded 4.0 from the code in master, OK? |
my VERSION file just says ‘unstable’. We can remove it, however after the release, most of us will probably be on master again, so it would be great to have some sort of connection back to the root version that we’re working from. So anyone downloading stable v4 will see 4.0 in the Version string. Anyone else that just pulls master down after the release to bring to 4.0, will still see develop-ref, which really given git’s distributed branch setup, doesn’t really mean anything meaningful. (My understanding that build 626 (55a32bd) isn’t unique, and dependant on what branches have commitments. Unless the builds can be uniquely connected to releases?) Or maybe it’s just me and I like version numbers. If so I can always edit my local copy of main.shtml :) Also, I have 3 branches that I’d like to submit, code for razberry, a vents thermostat, and I’ve updated get_email since a few email addresses I was getting weren’t being parsed correctly. I’ll attempt to initiate push requests howard
|
Hey Howard,
Yes, it should as you’re running master. If the contents of the file is ‘unstable’ it reports ref-develop and the SHA of the commit so that other developers can see what version somebody is running when they report problems on the mailing list or through tickets.
That is the purpose of the SHA code. develop-ref shows that somebody is running master. The SHA code shows what version of master. There is no doubt about what version somebody is running exactly through this mechanism.
No, this is not a correct understanding. An SHA code is a unique identifier of a specific commit in a specific repo.
To specific commits actually. E.g. if you checkout hollie/misterhouse master now you will get the short version of commit add5318.
If you want version numbers I’m afraid you will need to run stable :-) Master is by definition unstable and has hence no version number.
Well received and they will be merged in. Thanks for the code contributions you’re making. Much appreciated! Best regards, |
OK, good with this. Not to beat a dead horse, I agree that anyone using master should have a common version. I guess I’m thinking about my own case, where I don’t run on master, but rather a ‘running’ branch which is based off master, but has other branches of stuff merged in. I’ve done this to keep a clean master to allow for successful merges or any fixes or work that I’ve done. In my case, my commits will be different hence no way to map a build number to a certain version of stable. So I’ll keep a version in my local file :) Plus I snuck in a IA7 version number in that same main.shtml so that I can keep track if/when features are added to just the web interface... howard
|
I think these issues have been addressed. Integrated authentication added in IA7 v1.2 |
Created a wiki page for usage, wanted to create a thread to track issues.
https://github.com/hollie/misterhouse/wiki/Modern-Web-Interface---IA7
The text was updated successfully, but these errors were encountered: