Android Flukso Viz alpha release.

http://dl.dropbox.com/u/11717494/FluksoViz.apk
This will install a Flukso Viz app.

This is an absolute work in progress, with plenty of bugs but I look for a volunteer to test it.

Should work with 3 phase Flukso setup. Will crash with 1 phase setup or lack of IP on the device (no wifi) Only tested on 480x800 resolution, and android 2.2 tablet. Month data is not displayed as I only own a flukso for 2 weeks and it didn't gather enough data to let me debug it.

Implemented features are:
-taping a realtime graph will change amount of the details displayed
-taping the large readout will enter the DeltaMode. Takes a total usage in the last second and subtracts it from. Useful for checking power of a particular light or device.
-The Today/Week table is self explanatory and the percentage sign on the end is a difference to the day/week before.
-For Today power consumed you might see a large number (that might change quickly) just past midnight as this is 24h power use extrapolated value based on the average power from midnight till now.

Screenshot. http://dl.dropbox.com/u/11717494/fluksoviz%20alpha.PNG

Sample installation video: http://www.youtube.com/watch?v=0FPnJHUa3QQ&feature=youtu.be

Source code released under GPLv3: https://dl.dropbox.com/u/11717494/FluksoViz.rar

icarus75's picture

Hello Benito,

Excellent work! Did you document the steps required to get a working Android/FluksoViz development environment starting from scratch?

Cheers
/Bart

sherlock's picture

Great, exactly as Bart says if there would be a tutorial how to setup the eclipse with the git hub I Would try to fix the most anoying bug with the graph droping to 0 on some ocasions when results in flukso are late, as soon as i'm back from australia end of jan.

jrbenito's picture

@Bart @Sherlock

I just uploaded a "mini tutorial" of how to setup the project (downloaded from git hub) into Eclipse. As said there, Eclipse has a lot of flavors and to avoid problems I prefer to download the bundle provided by Google/Android project. (I keep this eclipse only for Android projects and other copies of eclipse to other development). The tutorial is really simple and I avoid to put specific thing like "how to install git" (since this will be different in any OS flavor, for me it is just "sudo apt-get git").

Some ask on how to integrate Git and Eclipse. Well, there is a plugin but I never used. I got used to scripting all my development and by now I use git at command line more confortable than with any kind of GUI (except for Diff where I love Kdiff3). So if anyone knows about a tutorial for git inside eclipse we can link it in the Readme file.

Anyway, for those unfamiliar with git. A really dirt summary of what you need to do is:

git clone
-:> follow eclipse setup in the readme
git checkout -b my_new_dev_branch (never develop in master branch)
-:> do some code
git add
git commit -s
-:> do some more code
git add
git commit -s

At each commit you are saving the code changes you have made... At github one can find instructions on how to push back changes or send me a patch. If anyone needs help here I am.

Cheers,
Benito

jrbenito's picture

Hi Guys,

I´ve made some updates to repository. Most of them are related to "localization" of FluksoViz since I intend to translate it to Portuguese and make it easy to anyone translate into any language. Besides translation, some localization code are meant to configure things based on user locale like hours (ie. 9:00 PM for US but 21:00 for Brazil). Sure not all modifications I´ve made were happy ones, I had to revert some back but latest version of master branch is almost equal to Sherlock´s first version (done some slight adjustment in templates and cosmetic code changes).

In parallel I am testing in a variety of devices, some are really low resolution and they will need some "art" work in templates.

ToDo:

-Need to handle better when socket to flukso.net fails for some reason (now application stops)
-Need to implement a start/stop for local and remote thread (local FM2 and remote flukso.net)

@Sherlock:

What is the "delta" function? Is it working? (I think not)

jrbenito's picture

Hi all,

Happy new year everyone!

I have made a Javascript snippet (really quick & dirty) to access api.Flukso.net from a Google spreadsheet.

Here is the link: https://gist.github.com/4389251 (snippet code and link to gootle spreadsheet template at comments)

Best regards,
Benito.
ps: Does anyone bought and tested the flukso application that other guy is selling at Google Play Store?

sherlock's picture

Great you guys picked up the development.

Handling the sockets properly is a first thing to fix as it does crashes mostly on the local thread when it cant reach device. The remote is only called once a 15 minutes.

Handling time zones properly is the second thing.

Delta function does work and IMHO is very usefull. When you tap on the large power readout it should go take the current value and treat it as zero and continiue to read the power substracting the "delta"
I use it when i want to test how much power a particular device or apliance takes. Tap into delta mode and switch it on.

icarus75's picture

@sherlock @jrbenito That Play Store app seems suspiciously similar to FluksoViz. No wonder these platforms report having so many apps. :-)

Since FluksoViz is GPLv3 licensed, you could ask them to release the source to their app.

@jrbenito There are a number of Flukso API bindings out in the wild right now. One of my (many) todo's for 2013 is to collect them in a central repo. So thanks for sharing the js/gs code.

You might want to announce the gs bindings in a different forum thread. This one is getting pretty long already just dealing with FluksoViz.

jrbenito's picture

@Sherlock

Thanks, I will verify what I did wrong with delta function... It was probably broken while I was playing around. Fortunately we have Git to show code delta for us. Also, you said that thread2 (remote) is called once each 15 minutes, however in the code you first published the sleep of the thread2 is set to 60 seconds (https://github.com/jrbenito/FluksoViz/blob/d6ab932170cfa2093b13589bbdbc3... - line 1148). Maybe you changed it for debug and forgot to revert it back right? I will correct this.

@PeterRJ

Any help is welcome. I will gladly maintain the project by merging any contributions and doing some code here and there.

I will open a new topic as suggested by Icarus below. Please, post you PHP there also.

@Bart

I found that app really similar also. That is why I asked if some of you tried. Really nothing wrong in make money with an app even if it is based on GPL code. Although if it is based in our code it shall keep source open (while still selling the APK compiled). I found it very curious that the app appears in the market few days after Sherlock have published code and I made it available through Github.

It is time to publish APK of our free version to Google Play allowing less experienced people to download and use the code easily.

One more question: when query fluskso.net I shall query using GMT or local time?

For instance, here now is 11:43am local time. Since we have BRST now (Brazilian summer time), it is 01:43PM GMT. So, I think flukso.net might store GMT time for every reading around the globe to keep everyone in the same reference. If I understood it right and want to query a reading for 10:00 AM BRST I shall query 12:00PM GMT. Is that correct? The same applies for FLM02 devices?

Thanks.

tintar's picture

sherlock & jrbenito - most excellent app, thanks to you both!

at first it just refused to work, the same "wrong api key" / ioexception as some others had much earlier in the thread. but then I restarted the flukso and for some reason that made everything happy.

I see lots of flipping between 1-OK! 2-OFF! 3-OFF / 1-BAD! 2-OFF! 3-OFF in the upper left, but the watt numbers and graph look right so no complaints there ;-)

also crashes once in a while, but I attribute that more to the tablet* I'm running on is Android 2.2 (and not possible to upgrade higher than that) - and it doesn't always behave well with newer software. (interestingly it only seems to crash so far with the remote thread, if I do local-only it seems more stable)

*Pocket eDGe, 7" 800x480 - device also has an e-ink screen 6" 800x600, I'll see if I can't get FluksoViz running on the eink side too...

anyway, awesome work!

sherlock's picture

Great.
Anyone checked if it is safe to upgrade latest R223? the old app is still working?

tintar's picture

hola SHERLOCK!

my previous comments about FluksoViz, Guard Flukso -

and Energy Control (the few times I could get it working - not any fault of that app but thanks to google wallet weirdness) -

all 3 have worked(or not) the same with new firmware 223, as each had with previous flukso software - only variance in success of each was the client platform only.

my quote from before - "FluksoViz often crashes on my 2.2 tablet if remote is enabled. but if set to local-only, it never quits" - this is true with previous ?215? firmware as well as current 223. I have not tried to debug it, since the local data was sufficient for me.

have not yet checked FluksoViz on my phone with official 4.1, nor on my phone with hacked-up unsupported 4.1 ... but will give a try soon.

now that I have 2 flukso devices on the same network, FluksoViz still works the same as before, as it requires specified IP address.

haven't yet tried Guard Flukso with my new 2-flukso-setup, which should be interesting since my assumption is that it tries to auto-detect a flukso on the subnet (if you have more than 1, which one will it select?)

bazzle's picture

Sherlock.
Mine is the new Flukso with latest firmware.
Thats why I set up the Android app on my Win7 pc as the Minute tab not working for me on that release yet.

Baz

bazzle's picture

Now if there was away to get this working on my iPad :)