Posts: 1,061
Threads: 9
Joined: Sep 2008
07-09-2010, 07:01 AM
(This post was last modified: 05-26-2013, 07:29 AM by Fonceur.)
The
Tallus
Android
Riva application provides two way control over Charmed Quark Systems (CQC) home automation system via an Android phone or tablet (OS >= 1.6).
Information can be found on the
wiki. The trial application can be downloaded
here while Google Play has the regular version.
Ideally, you would want a template matching the resolution of your device, but orientation change and swiping to see the rest of the template is supported.
(original post)
I fixed Broconne's code to send a proper logon request (unsigned byte issue and mixed types), which probably means that most of the steps involving talking TO the RIVA server are fine... Now I need to take care of the remaining 99% that involves reading FROM the RIVA server and doing something useful with that incoming data...
Posts: 40,483
Threads: 491
Joined: Aug 2002
Start off with a black background template and a piece of static text on it. Implement support for drawing of stuff incrementally as required. As long as you implement all of the push/pop stuff, you can easily just ignore any drawing commands you don't yet understand. They just won't display anything. So you don't have to do a go for broke type thing and try to implement it all in one fell swoop. So the area fill, push/pop stuff, and text drawing commands should get you enought to draw that simple type of interface, and prove it's basically working. Oh, and of course you will have to implement the sequence ack message or the server will stop and wait for you.
Just be careful to follow the asynchronous/synchronous processing guidelines in the protocol doc.
Dean Roddey
Explorans limites defectum
Posts: 1,061
Threads: 9
Joined: Sep 2008
Broconne did a lot of the leg work already (he said about 80%), but he didn't have a riva license to actually test it, so there's still a lot of "connect the dots" to do...

Would probably have been faster if I had started from scratch, but it wouldn't have been as pretty internally...
Posts: 1,061
Threads: 9
Joined: Sep 2008
- I can send a login request.
- I get a login challenge back.
- I can create the MD5 password hash.
But as far as decrypting the challenge data and key, that's failing, as I'm getting 16 x 0 for each. So I guess I will need to print out the values from a challenge with the .NET RIVA client and figure out how to get the same result from the GNU Crypto Blowfish cipher... Probably another annoyance related to not having unsigned byte/short/integer in java.
Posts: 40,483
Threads: 491
Joined: Aug 2002
I wouldn't think so. The algorithm is very strict, so their implementation would have to deal with that or it wouldn't be of any use at all since it could never interoperate with any other working system. As long as you are passing them in a raw byte array or byte stream with the bytes, it should work out correctly.
Dean Roddey
Explorans limites defectum
Posts: 1,061
Threads: 9
Joined: Sep 2008
OK, I guess I'm using the GNU Crypto implementation wrong, as I can't even encrypt/decrypt some data and get the original back...

I wish they hadn't disabled Blowfish in the default cipher of Android...
Posts: 1,061
Threads: 9
Joined: Sep 2008
I found BlowfishJ 2.15, which works on the Android, so now I can successfully log on...
Posts: 1,061
Threads: 9
Joined: Sep 2008
Currently, I can read the 59 messages associated with a logon and the template on the RIVA account that Batwater setup for testing...
So now it's time to figure out how to actually display the UI on Android...
Posts: 40,483
Threads: 491
Joined: Aug 2002
A mere implementation detail :-)
Dean Roddey
Explorans limites defectum
Posts: 1,061
Threads: 9
Joined: Sep 2008
Would people be building new templates matching the size of there device (say 320x480) and only using the portrait (or landscape) orientation, or should I just go generic and expect people to reuse their 1024x768 (or whatever) templates and have some scrolling/swiping going on?