-
Notifications
You must be signed in to change notification settings - Fork 25
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
Wishlist: status control #116
Comments
How would it look on android? Mit freundlichen Grüßen / With kind regards
|
I can't judge that, because I don't know what UI capabilities there are there... |
We just had a little chat about it during breakfast. Generally that functionality is quite specific and probably not very useful for a majority of users. But as HomA aims to be extensible it would be good if there was a more generic feature that allows such functionality to be implemented. One suggestion we came up with was to add a /meta/style tag to the text control. One problem now is how the CSS would interpret the value to apply different styles. I guess there is some CSS3 magic to achieve this. Would that be a viable alternative? |
While it pleases me you're considering this, the CSS thing sounds pretty messy to me, particularly since it won't, as you say, work on Android (or on iOS later, I assume). Supposing your proposed "card" interface is implemented on Android, I'm assuming it would have the approximate appearance of the current Web interface? Are there other 'controls' possible then? If you can point me to some description of Android's GUI possibilities, I'll gladly look to see if I find something suitable, also in view of a possible future iOS implementation. |
Theres an overview of intput controls at http://developer.android.com/guide/topics/ui/controls.html and general building blocks at http://developer.android.com/design/building-blocks/index.html. The thing is, that I would happily implement controls that are generally useful but at the moment I think it would probably result in a feature creep when we'd start to add custom controls for edgy usecases that might also be satisfied with standard controls. Besides that, I agree with the CSS solution being pretty messy. |
The "right" way to introduce this kind of extension is to add a new control type (/meta/type = nagios for example). This means that all interfaces need to be aware of that and handle the new control type in the appropriate way. In contrast to that, adding just a new meta attribute will not break interfaces (like the Android app) that are not aware of it. This requires the least effort to "hack" that functionality into the web interface. A little less messy may be not to add a /meta/style attribute to the control but something like /meta/class or /meta/CSSclass. The web interface could then add that class to the DOM element. This would be a generic way to let users influence the look of the web interface but requires changes to the css file of the interface. There could also be something like a user.css file where those additional styles can be placed in and which gets included in the main style sheet. |
@stylpen 's approach is certainly cleaner whereas the /meta/style approach would not require the use of an additional css file as everything would be stored in the MQTT tree, of course. As of now, I've not found a viable golden solution for this :/ |
I'm just trying to shoehorn everything into homA and MQTT, that's all. ;) |
Yes and that's awesome. The above was not meant to be criticism not to use homA for that, only the attempt to find an optimal solution how to fit everything into homA ;) At the moment we're writing our bachelor thesis so bigger features might have to wait a bit. However that shouldn't stop us from discussing ideas. Just the implementation might take a little longer. |
Thanks guys. I've glanced at the possible Android controls, and can't think of something generic enough. |
Just came to my mind. What about a generic "image" control that can display e.g. base64 encoded images? That one could be used for more elaborate usecases like displaying rudimentary charts, webcam images or little status color tiles. Definately possible with the webinterface, probably somehow also in Android. |
Sounds like just what the doctor ordered. I didn't dare suggest that, even though the thought crossed my mind. On Jul 2, 2013, at 17:20, Alexander Rust [email protected] wrote:
|
Mh, so the implementation for the webinterface turned out to be pretty trivial. However, while playing with it I noticed that Paho returns an unknown error for longer message payloads (such as a base64 encoded image), so that I was just able to get it working with a standard url source. @jpmens could you try to reproduce that Paho fails with longer message payloads so I can file a bug for this? Just publish some value for a text control that is a bit longer (as I was on the plane I had somewhat limited debugging capabilities, but I guess the limit is some power of two > 128 byte) |
@binarybucks The text control breaks here at a length > 89
If I add a single char to |
I fixed it. It was a websocket server issue. There are new x86 Linux binaries (version 0.5). Raspberry Pi and OSX versions will be compiled soon. |
Pulled new WSS_osx a moment ago, and confirm I can send a text payload > 89. Thanks. |
Android side should be fairly easy to implement according to the research I did while my kernle is compiling: for non-data urls the http image can be acquired via
for base64 encoded data uris this should do
|
Maybe a nice enhancement? A control that can take one of four values (0, 1, 2, 3) to display a Nagios/Icinga status as in
0 = green = OK
1 = yellow = WARNING
2 = red = CRITICAL
3 = grey? = UNKNOWN
Mock screen shot:
The text was updated successfully, but these errors were encountered: