I’m fairly new to HG and have it on a Pi which I’m also new to.
I figure this should be possible but not figured it out yet.
I want to send a command from HG to HA-Bridge to turn on my X10 security Console.
I figure I need to create a program in HG that does a PUT http://host:port/api//lights//state
I wish to do this when I change the security alarm system widget in HG to armed away.
I can arm/disarm HG security widget with a RF signal which HA-Bridge would be sending anyway
Create a Virtual Device in the form of a switch in HomeGenie that will pass your on or off call to your HA Bridge
yes I figured that much out. It is the web send code part I’m not sure about
Ok so you should be able to work it out from this link http://genielabs.github.io/HomeGenie/api/mig/overview.html
I think you should use NetHelper
class in your program (https://bounz.github.io/HomeGenie-BE/api/ape/a00009.html), something like this:
Net.WebService("service_url").Put("put_data").Call();
that basically shows how to send commands to HG I can already do that.
I need an example how to send from HG
the documentation will help though with other possible calls to HG.
Thanks
Bounz I think that’s what I’m looking for thanks I’ll play around a bit with it.
I looked at the NetHelper class and believe that will work. I then looked at the Phlips Hue program code and the code is almost exactly what the HA-Bridge uses so I believe I can modify it to work for HA-Bridge.
This will allow me to control anything HA-Bridge can and any thing the Broadlink RM can. I still have to do some experimenting as my Setup uses authentication and the Hue program doesn’t have that code. My suspicion is the call will look something like this Net.WebService(“service_url”).WithCredentials.(“User”,“Password”).Put(“put_data”).Call();
Using jshan code from the old forum you probably have most of what you need to achieve your goal. http://old.homegenie.club:8080/www.homegenie.it/forum/index620a.html?topic=1530.0
I actually tried to download the hgx file but it fails to download for me
Check your messages and let me know if you got it
Thanks Got it, connection is slow here this morning.
To check it out you just need to install it.
This is going to sound silly but remember I’m new at this.
How do I install a HGX file?
Go to Configuration-Settings and move to the bottom right of the screen. Right click on the tab Actions and select Install Interface. Select Upload Package from File and point browser to where that file you downloaded is located.
Ok done that but now I’m lost. where do I go to set it up/view it?
Go into Programs and select Messaging and Social. Click on that and it should load the program.You can examine the code there.
If you need any further programs from the old forum just click on this link, http://old.homegenie.club:8080/www.homegenie.it/forum/index.html Select App Contributions and you should see the .hgx programs attached to the contributors post.
They are all downloadable at the moment.
Ok I’ve done something wrong it doesn’t show up.
Doing this from memory. Back at a screen now.
Select Programs. Down at the bottom right of the screen there is a tab for Actions. Click on that and select Import Program. Select the file you downloaded. That should add the new program to your Program list
Regards
Peter