Putting it all together: PiXHub/HA-Bridge/Alexa

Started by Geewiz, January 08, 2019, 01:55:11 PM

Previous topic - Next topic

petera

Quote from: alzy on January 11, 2019, 02:15:48 PM
Quote from: petera on January 09, 2019, 07:00:10 PM
Quote from: alzy on January 09, 2019, 06:07:14 PM
petera-I am not sure....

1.as Control.Dim is in the api but throws an error in the browser so is the api wrong or is the response wrong?

2. Control.Level appears to solve the dimming issue but I need to test with Alexa.
and
3. as i said:

"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." this type of performance IS an issue for me!!

For the moment forget about the HA Bridge. Disable it as advised. Now issue the commands from the browser address bar. You shoukd get the ok response and yiur light should dim. In the HG api issue the same commands. You should get the same or similar reaction time and your light should dim.

I won't comment on the HA Bridge other than to say it sounds like you are experiencing some form bottleneck or latency between HA Bridge and HG which you will need to trace.

Ok so I have a brand new Pi Z W and a new power supply. I have the Bridge disabled. From the browser I get anywhere from about a 1 sec. to about 8 sec. response to dims. I also have seen about the same spread with On/Off although the longer times are alot less frequent.

Ok so the Control.Level is working on dim so I'm now suggesting latency is between the CM19 and your transceiver. You've confirmed that HG to CM19 comms is working so I suggest you start looking at repositioning your transceiver or changing your house code. You could have noise on the PL from the transceiver to the lamp module.

You could run HG in debug mode and watch the commands being received and the time it takes for them to be acted on. You can watch the gateway being opened and see the response times. To do this it's

sudo systemctl stop homegenie.service
cd /usr/local/bin/homegenie
sudo mono HomeGenie.exe

alzy


alzy


petera

Quote from: alzy on January 11, 2019, 05:49:50 PM
I am using cm11a.

Ok so it's pure PL comms. Run the debug anyway and post a sample of the X10 traffic from the debug. Again I wouldn't rule out noise, house code problems either. You're experiencing the same issues with the CM19. Is that correct.

alzy

The latency is in the Pi Zero. When I enter the command with the browser, it responds with a "waiting for 192.168.1.8" which is my Pis IP. At the same time that message disappears the device responds. I don't believe the Pi zero is up to the task of running HG. When it sends a response to the browser, the device responds to the cm11a. And that can take up to 8 or so seconds.

alzy

I cannot confirm that the cm19 responds the same. I stopped using it cuze it was never claimed to be compatible with the hub and also it limits the capability of the system.

petera

Quote from: alzy on January 11, 2019, 06:04:15 PM
The latency is in the Pi Zero. When I enter the command with the browser, it responds with a "waiting for 192.168.1.8" which is my Pis IP. At the same time that message disappears the device responds. I don't believe the Pi zero is up to the task of running HG. When it sends a response to the browser, the device responds to the cm11a. And that can take up to 8 or so seconds.

Just run HG in debug mode as I suggested and post the X10 results. I can see gateway responses from there.

Here's some basic automation to play about with. Just read and follow the examples

http://old.homegenie.club:8080/www.homegenie.it/forum/HomeGenieHelp18c5.doc?action=dlattach;topic=1420.0;attach=2219

alzy

petera- When you have a second please take a look at the attached HG Debug and tell me what you think. thanks!

petera

Quote from: alzy on January 12, 2019, 09:22:30 AM
petera- When you have a second please take a look at the attached HG Debug and tell me what you think. thanks!

I've just had a quick look at the file. Are you running the Energy Monitor and the Philips Hue programs.

alzy

Not the energy monitor, but i left the other items that came with it there so I could study them.

petera

Your gateway responses between 0.5 secs and 1.75 secs are well within the expected response times.

My suggestion is that you disable any programs in HG that you are not using.

Also could you try plugging your CM11 into different outlets around the house and measure response times. You could also create a test X10 Lamp Module in HG and experiment with different house codes to rule that out.

Could you open the Programs page in HG and do a screen cap and post here so I can see what programs are running on your system.

alzy


alzy

different outlets around the house and different house codes- didn't help.

disabled all programs in HG that I am not using- Mad a huge improvement, only experience an occasional long response time! so it is a processor issue?

alzy

FYI disabling the programs did not improve cm19a performance

petera

Quote from: alzy on January 12, 2019, 12:53:27 PM
FYI disabling the programs did not improve cm19a performance

Some of the standard installed programs on HG are making a lot of web calls to the server and as a result the Pi Zero W really isn't suitable for this type of application when you add other factors into the equation.

Possibly stripping HG back to the X10 basics and along with the CM11 or the CM15 you'd probably get away with it.

My own recommendation would be a Raspberry Pi 3b or 3b+ which would more than cover your needs and allow you to run your system comfortably with a CM19 too. That's roughly what my setup consists of.

You could always repurpose your Pi Zero W as a standalone HA Bridge server or there's plenty of other Pi projects out there that would comfortably interface with HG too.

SMF spam blocked by CleanTalk