Please login or register.

Login with username, password and session length
Pages: 1 [2] 3 4 5

Author Topic: Putting it all together: PiXHub/HA-Bridge/Alexa  (Read 16759 times)

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 358
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #15 on: January 09, 2019, 01:38:15 PM »

I put the on or off bridge item in browser Lamp responds! I put Dim entry and get this:

{"Status":"Error","Message":"{\"ClassName\":\"System.FormatException\",\"Message\":\"Input string was not in a correct format.\",\"Data\":null,\"InnerException\":null,\"HelpURL\":null,\"StackTraceString\":\"  at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <52f79f713f22467ab348e590c85015fb>:0 \\n  at System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00015] in <52f79f713f22467ab348e590c85015fb>:0 \\n  at System.Int32.Parse (System.String s) [0x00007] in <52f79f713f22467ab348e590c85015fb>:0 \\n  at MIG.Interfaces.HomeAutomation.X10.InterfaceControl (MIG.MigInterfaceCommand request) [0x0074d] in <c86d986153dd46358f54499cd8a040dd>:0 \\n  at MIG.MigService.Gateway_PreProcessRequest (System.Object sender, MIG.ProcessRequestEventArgs args) [0x003f9] in <01eec8bfa28f444d82b2dc82f7810fbf>:0 \",\"RemoteStackTraceString\":null,\"RemoteStackIndex\":0,\"ExceptionMethod\":null,\"HResult\":-2146233033,\"Source\":\"mscorlib\"}"}
Logged

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 358
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #16 on: January 09, 2019, 02:43:40 PM »

If I follow the Control.Dim with a space and a number it does not dim but it does not throw that error. Webpage responds with {"ResponseValue":"OK"}. Does that help any?
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #17 on: January 09, 2019, 02:54:51 PM »

It is impossible for anyone I know of to include a sample backup which will work for everyone.
You were in the test group If you had an Objection to the sample backups being included you should have voiced you opinion then and I wouldn't have included anything in HA-Bridge. Also the tutorial states these addresses must be changed to work correctly.

I'm not sure how your on off calls are working if they're no using the Pis  IP B:( but then you've been getting lots of strange goings on.
The error message your getting back in your browser does indicate a issue with the call.
be sure there is no space or character after the word dim also many calls are case sensitive try the word dim instead of Dim.
You don't state if you've looked at the HG documentation for api calls. I know there is a level call and I think a bright call try those as well.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #18 on: January 09, 2019, 02:59:17 PM »

If I follow the Control.Dim with a space and a number it does not dim but it does not throw that error. Webpage responds with {"ResponseValue":"OK"}. Does that help any?
I'm afraid I can't help with HG or HA-Bridge dims anymore then I've already suggested.

I spent several months attempting to figure out dim calls to the HA-Bridge from Alex10 and I don't use dimming so I'll not waste another few months again on something I don't use and possibly never will.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #19 on: January 09, 2019, 03:04:34 PM »

So the Pix10Hub image comes with example entries ith the Bridge. This is what is comes with and this is what I have been trying:

http://192.168.1.10:8080/api/HomeAutomation.X10/B16/Control.Dim.

What sw on the hub is processing this command/script?

That command will use HG's API interface to send a dim command to X10 device B16.  If HG doesn't have a dimmable module on B16, I do not know if it will perform any action (I only send commands to turn the lights up to full bright via the "100% on" script that is included in HG).  I would recommend trying the same API call with an ON or OFF command to verify that HG is able to control the module.

I do not remember the exact format for the command but I believe it's just:
http://192.168.1.10:8080/api/HomeAutomation.X10/B16/Control.On

If that doesn't work, you should be able to find it in the documentation.

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 358
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #20 on: January 09, 2019, 03:07:56 PM »

I AM using the Pis IP . I said that several times. Its at 192.168.1.10 and static. Have been using it since day 1!!

I came in late to the test group and only got my Pi a day or  so before 12/22. so I did not have time to do a lot of testing. If I had found it I would have objected!

I am not getting lots of strange results, more like 3. Two related to dimming, 1 the double click problem with the cm19.

I will look at the HG api calls and see what I can find out.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #21 on: January 09, 2019, 03:16:48 PM »

So although I don't use dim with my dimmable modules, it appears the following works on my system.  I replaced the IP with yours so they should be able to just be clicked on.  If your HG is located somewhere else, make sure you change it in the browser prior to sending or else you will get no response.

Dim to 100%:
http://192.168.1.10:8080/api/HomeAutomation.X10/A2/Control.Dim/100

Turn module on:
http://192.168.1.10:8080/api/HomeAutomation.X10/A2/Control.On

Turn module off:
http://192.168.1.10:8080/api/HomeAutomation.X10/A2/Control.Off

List all interfaces:
http://192.168.1.10:8080/api/HomeAutomation.HomeGenie/Config/Interfaces.List

List all modules:
http://192.168.1.10:8080/api/HomeAutomation.HomeGenie/Config/Modules.List

This is all in the HG documentation on Gene's site.  I highly recommend reviewing it as it will give you a lot of answers to things that people here may not be familiar with.  I used the site to give you these commands as I don't generally use them myself.

https://genielabs.github.io/HomeGenie/api/mig/core_api_config.html

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 358
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #22 on: January 09, 2019, 03:21:35 PM »

The dim call that works from the browser is:

http://192.168.1.10:8080/api/HomeAutomation.X10/B16/Control.Level/35 for example. I will enter into bridge and retest. Thanks for the help. Now I know what an API is.
Logged

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 358
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #23 on: January 09, 2019, 03:30:15 PM »

It does NOT work from the bridge "Test Dim" button. I will see If I can command a dim from HG gui next.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #24 on: January 09, 2019, 03:53:34 PM »

It does NOT work from the bridge "Test Dim" button. I will see If I can command a dim from HG gui next.

Try /A1/Control.Level/50
Logged

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 358
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #25 on: January 09, 2019, 04:08:36 PM »

Petera, yes that is what i tried a few posts earlier with some success.

Now From the HG gui with that command in the bridge, it does kinda work. It can take up to 10 seconds or more for a response from the device and sometimes, although widget registers a command, the device never responds. And that's not just to dimming but to On/Off. Not very reliable from the gui. Seems very reliable from the browser. Won't dim from the bridge.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #26 on: January 09, 2019, 04:09:42 PM »

The dim call that works from the browser is:

http://192.168.1.10:8080/api/HomeAutomation.X10/B16/Control.Level/35 for example. I will enter into bridge and retest. Thanks for the help. Now I know what an API is.

That Dim call is a one step increment. No numbers associated with it. You woudnt even notice it. The Level call allows you to define what percentage between 1 and 100.

I've posted so many links to the HG documentation. This is in the MIG API section. I just wish people would read them. Maybe you could let others know if you were successful.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #27 on: January 09, 2019, 04:12:16 PM »

Petera, yes that is what i tried a few posts earlier with some success.

Now From the HG gui with that command in the bridge, it does kinda work. It can take up to 10 seconds or more for a response from the device and sometimes, although widget registers a command, the device never responds. And that's not just to dimming but to On/Off. Not very reliable from the gui. Seems very reliable from the browser. Won't dim from the bridge.

Did I already suggest to you to disable the bridge and address directly between HG and the CM19
Logged

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 358
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #28 on: January 09, 2019, 04:12:53 PM »

Please read my earlier posts. Thanks.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Putting it all together: PiXHub/HA-Bridge/Alexa
« Reply #29 on: January 09, 2019, 04:14:51 PM »

Level is the command that would be used in programming but I couldn't find a reference to what should be used in the API other than what was in the documentation I linked.  As for the delay, I can't help you there as I don't know how the HA-Bridge is designed to communicate.  HG is very quick to interpret an incoming command to an outgoing command generally.  If the command is sent promptly I have no idea why it would be delayed.  IMO, you would be best to watch the commands on the PLC either from a second CM15A as a monitor, or a XTBM, or HG's logging, or etc.  Without knowing what is actually being sent it's difficult to diagnose the issue especially since I have never looked at your software (HA-Bridge) or hardware (Alexa).
Pages: 1 [2] 3 4 5
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.