more G-Labs products

Author Topic: Help With a Program and Widget  (Read 1674 times)

January 13, 2016, 10:38:46 PM
Read 1674 times

leonowski

  • *
  • Information
  • Newbie
  • Posts: 2
Hello,

I am also new to homegenie.  I need help with a program and widget that I'm trying to set up.  Let me first start off by saying that I'm not a programmer.  However, I've been able to piece together what I need to do to get my program/widget working.  For the most part, it is working.  But, I have a couple of problems that I hope I can get help on.

First, what my program attempts to do is a simple web request (HTTP GET) to an address.  I have a lot of items in my home that can respond to simple HTTP GET requests.  I don't need the status - I just want to send the requests via a button in homegenie.  I've been able to do that with the attached hgx program.

The problem I'm having seems to be around the widget.  If I don't specify a widget using Program.UseWidget, the generic widget gets used.  It seems fine, however, in Homegenie plus, it does not appear as a clickable widget.  It does show up in the dropdown on the left of the UI.  The button does show up fine in the web based UI.  I would like it to appear in the Homegenie plus android app.

If I use the attached custom widget, it still appears in the regular web ui.  However, there is no trace of it at all in homegenie plus.  How do I make it appear in homegenie plus?

Also, how do I configure the widget so that I can change the HTTP GET URL from a widget settings button?  I haven't been able to figure that part out.

Thank you for any help you can provide.

January 14, 2016, 02:16:29 PM
Reply #1

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
I use the generic sensor widget to show status of devices, does yours have a button or something that caused you to create a custom widget?  Nevermind, re-read your question, maybe there is another builtin widget that would work for you like a switch?  Then they would probably show in the android app.  Maybe post a screenshot. 

Regarding widget settings (see docs for AddOption )  .... in your startup code:
Program.AddOption("device1_url", "http://192.168.1.1/on", "url for device 1", "text");

In your program code to get the value:
var url1= Program.Option("device1_url").Value;

Note this code is untested so I might have some errors.

April 17, 2016, 11:37:54 AM
Reply #2

Hoke

  • *
  • Information
  • Newbie
  • Posts: 10
This is an important question. I'm more than happy to purchase HomeGenie Plus to support the cause, but for now I've refunded my purchase until I can figure out how the make widgets visible in the Android apps

April 17, 2016, 08:42:13 PM
Reply #3

maxflax

  • ***
  • Information
  • Full Member
  • Posts: 90
This is an important question. I'm more than happy to purchase HomeGenie Plus to support the cause, but for now I've refunded my purchase until I can figure out how the make widgets visible in the Android apps

At the moment you can't get your own widgets into in the plus android app, but I've read that Gene has it on his agenda to implement.

April 18, 2016, 06:10:22 PM
Reply #4

Hoke

  • *
  • Information
  • Newbie
  • Posts: 10
Thanks maxflax, at least now I know I wasn't doing something wrong!

I'll try and use virtual modules in my module so I can use the generic widgets until custom widgets make it into the Plus app