more G-Labs products

Author Topic: HomeGenie Plus for Android  (Read 33075 times)

November 18, 2015, 09:58:11 PM
Reply #90

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
HomeGenie Plus 1.0 r13 has been published.

18-Nov-2015 Rev 13:
- Added UPnP Media Browser and Renderer widgets (requires HG r501 to enable all features)
- Various minor fixes and improvements


November 21, 2015, 07:09:54 AM
Reply #91

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
Tests and Updated on 14 Nov. 11:30 :
I have tested with multicolor led strip, and your update doesn't work for change to fixed color. If I choice any color, the Led are shut off. With HG Plus under droid, Any action in the 4 default colors the led are shut off also. And I don't have access to a color wheel anymore.

Sorry, I didn't notice your update until this morning. I've reinstalled HomeGenie on a new server and will try the above code on the new server.

Could you let me know the following:
- Did you import the .hgx file as a new program or overwrite the existing one?
- How did you update the widget code?

November 21, 2015, 11:32:17 PM
Reply #92

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
For HGX file, I update te  code of my first prog.
For widget local code, I copy the file qt the good place.

Cheer

November 22, 2015, 07:38:25 AM
Reply #93

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
Hi Dani,

Are you running v501 by chance? After upgrading to 501 I've been having lots of problems with controlling the virtual channels (even after a clean install and no modifications to the '502 - Fibaro RGBW code')

I uninstalled and went back to v500 and all is working properly again.

Marcel.

November 22, 2015, 06:28:48 PM
Reply #94

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Marcel,

Yes since 501 I cannot control individual color by setting the virtual channel of my led strp, only On/Off and Program setup work properly for me. Status.Level is not sent to the virtual channels.

Cheers
Dani

November 30, 2015, 02:20:24 PM
Reply #95

swaner

  • *
  • Information
  • Newbie
  • Posts: 21
Hi Gene, this is a really nice and super fast application. Good work!

However, I am experiencing a problems for devices using my addon for tellstick.
The dimmer functionality and sensors are working fine but when I try to toogle the lights (on/off) by pressing the lamp icon nothing happends.
This functionality works when testing directly in the browser (clicking on/off). Is the app sending some other command such as "toogle"? Please see the code executed here: https://github.com/swaner/HomeGenieTelldusInterface/blob/master/TelldusLib/Tellstick.cs#L97

I don't really know how to troubleshoot. So if you have any advice what might be wrong with my code please let me know.

Thanks again  ::)

November 30, 2015, 03:16:28 PM
Reply #96

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Gene, this is a really nice and super fast application. Good work!

However, I am experiencing a problems for devices using my addon for tellstick.
The dimmer functionality and sensors are working fine but when I try to toogle the lights (on/off) by pressing the lamp icon nothing happends.
This functionality works when testing directly in the browser (clicking on/off). Is the app sending some other command such as "toogle"? Please see the code executed here: https://github.com/swaner/HomeGenieTelldusInterface/blob/master/TelldusLib/Tellstick.cs#L97

I don't really know how to troubleshoot. So if you have any advice what might be wrong with my code please let me know.

Thanks again  ::)

Hi swaner,

you need to implement the Control.Toggle command: if the module is currently on, then it will be turned off and vice-versa.

Cheers,
g.

December 07, 2015, 08:39:55 PM
Reply #97

pim555

  • ****
  • Information
  • Sr. Member
  • Posts: 143
Hi Gene,

I am using a virtual switch that I can operate properly from within the web UI. However, when I press the switch from within the Android app I get attached error.

The virtual switch code is also attached.

Cheers
Pim

December 08, 2015, 06:56:50 AM
Reply #98

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
I am using a virtual switch that I can operate properly from within the web UI. However, when I press the switch from within the Android app I get attached error.

Your virtual switch is missing Control.Toggle
Code: [Select]
case "Control.Toggle":
if (module.Parameter("Status.Level").DecimalValue == 0)
{
  module.Parameter("Status.Level").Value = "1";
  Program.RaiseEvent(module, "Status.Level", "1", "VirtualSwitch");
}
 else
{
  module.Parameter("Status.Level").Value = "0";
  Program.RaiseEvent(module, "Status.Level", "0", "VirtualSwitch");
}

Untested code, but it should work, i think.

December 08, 2015, 05:48:49 PM
Reply #99

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

Is it possible one day to import personnal widget in HomeGenie Plus ?
Or I must forget that idea ?

December 08, 2015, 09:29:40 PM
Reply #100

pim555

  • ****
  • Information
  • Sr. Member
  • Posts: 143
@mvdarend,

I added the control.toggle handling but that did not resolve the issue.

Turns out that when the switch is set from the Android app, the third parameter is NULL, hence the code that retrieves this parameter raises an exception. When I commented out the third argument (see below) the error is gone.

What does the third parameter contain? It is not used in the code for the virtual switch anyway so commenting out should not harm.

Code: [Select]
var moduleDomain = "HomeAutomation.Virtual.Switch";

When.WebServiceCallReceived(moduleDomain,(args) =>
{
  string[] request = ((string)args).Split('/');
  var response = "{ 'ResponseValue' : 'ERROR' }";
  try
  {
    string moduleId = request[1];
    string command = request[2];
 //   string parameter = request[3].Replace("%20", " ");
   
    var module = Modules.InDomain(moduleDomain).WithAddress(moduleId).Get();

    switch(command)
    {
      case "Control.On":
        module.Parameter("Status.Level").Value = "1";
        Program.RaiseEvent(module, "Status.Level", "1", "Virtual Switch");
        break;
      case "Control.Off":
        module.Parameter("Status.Level").Value = "0";
        Program.RaiseEvent(module, "Status.Level", "0", "Virtual Switch");
        break;
      case "Control.Toggle":
if (module.Parameter("Status.Level").DecimalValue == 0)
{
  module.Parameter("Status.Level").Value = "1";
  Program.RaiseEvent(module, "Status.Level", "1", "VirtualSwitch");

Cheers
Pim

December 09, 2015, 06:53:52 AM
Reply #101

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
Quote
What does the third parameter contain? It is not used in the code for the virtual switch anyway so commenting out should not harm.
I hadn't noticed that line in your code.

I created my own virtual switch code some time ago which is very similar to what you have, but I've never tried fetching a third parameter. (Didin't even know one was sent :))

December 09, 2015, 11:01:21 AM
Reply #102

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
One thing I'm missing from HomeGenie plus is the ability to quickly dim the colored lights (without having to 'reprogram' one of the preset buttons.)

It would be great if you could have a slider under the colour selecter like this:

Edit: Forgot that I was supposed to submit requests here

Edit 12-12 Thanks Gene, it works great!
« Last Edit: December 12, 2015, 08:55:10 AM by mvdarend »

December 13, 2015, 09:40:10 AM
Reply #103

pim555

  • ****
  • Information
  • Sr. Member
  • Posts: 143
As I use the new app as the main mobile app, ie not specifically for a stationary controller, I find it annoying that I need to enter the password everytime I want to add modules to the app.

Would it be possible to grant this right from within the web app?

For example: in the web application you assign read/write rights for the mobile app without explicit authorization. Ideally you can do this per instance/user of the app. So some apps could only read (those on stationary controllers or for specific people) and others can also always add modules.

Cheers
Pim

December 13, 2015, 03:31:38 PM
Reply #104

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

For some special widget I build for french thermostat use with Specific Qubino module. In  france we have 5 modes to control electric heater by a spcial wire : Stop, NoFrost, Eco, Comfort-2°, Comfort-1° and Comfort.. So I build a specific Widget.
For my thermostat so I buld a spécific widget that permit directly to pass from Stop, NoFrost, Eco, Comfort and Program mode that using Hour tables.
Is it possible one day to import personnal widget in HomeGenie Plus ? Or I must forget that idea ?

Cheers
Dani