Closed alzzy closed 5 years ago
FYI, I reported that as issue #354 yesterday
Guys when you experience a problem with HG you need to run it in debug mode so your actual problem can be identified. There are so many variables at play here like browser type, OS, hardware etc that can cause the issue and not necessarily HG. Do you know how to run it in debug mode and report the issue
@genemars I thought running HG in debug mode and reporting the issue this way was standard procedure. It must be getting very time consuming for you trying to figure out these recent problems without it particularly as you are currently working on a different project.
Here is some log data. Module Double click log123118.txt
I did a manual install of stable.30. Still have the double click issue. I did notice that when I single click and the cm19a does not transmit, the flag in the HG gui in the upper right corner comes out after 4 or 5 seconds after the click announcing the command but the cm19a does not respond.
I'm trying this on my laptop and it's working. Whenever I submit a command the CM19 led flashes and the command is performed with no visible delay. So are you both @alzzy and @tuicemen experiencing the same problem? The log @azzly sent looks fine... this is mine:
2019-01-01 13:46:53.0602 Info WebServiceGateway x.x.x.x HTTP GET 200 /api/HomeAutomation.X10/C6/Control.On/undefined/ [OPEN]
2019-01-01 13:46:53.0602 Debug 20-40-BF-50-AF
2019-01-01 13:46:53.1943 Debug 20-40-BF-50-AF
2019-01-01 13:46:53.3305 Debug 20-40-BF-50-AF
2019-01-01 13:46:53.4665 Info HomeAutomation.X10 C6 X10 Module Status.Level 1
2019-01-01 13:46:53.4785 Info WebServiceGateway x.x.x.x HTTP GET 200 /api/HomeAutomation.X10/C6/Control.On/undefined/ [CLOSED AFTER 0,418 seconds]
2019-01-01 13:46:54.6947 Info WebServiceGateway x.x.x.x HTTP GET 200 /api/HomeAutomation.X10/C6/Control.Off/undefined/ [OPEN]
2019-01-01 13:46:54.6953 Debug 20-40-BF-70-8F
2019-01-01 13:46:54.8263 Debug 20-40-BF-70-8F
2019-01-01 13:46:54.9625 Debug 20-40-BF-70-8F
2019-01-01 13:46:55.0987 Info HomeAutomation.X10 C6 X10 Module Status.Level 0
If the CM19 led is not flashing then it means the command is not sent for some reason. Have you tried the CM19 on a different system than RPi. Is it working? Is it a RPi-only related issue? Have you tried different house-codes? I see you've been trying with "E" house code, do you have same result trying with a different house code (eg. "A")?
I have HG installed on a win 10 pc and I do not have this issue with the cm19a. It is very reliable. I do still see it on the RPi. On Win 10 when I send a command the LED flashes and the command is sent and the device responds. I also agree "No flash, no command sent"
PS, It does not appear to be house code dependent in my case
Also it appears to be related somehow to the web gui as tuicemen reported he saw the issue with the cm15 when triggered from the browser but that the overnight responses to HA bridge commands were successful. Also I know of another individual using the cm19a on a Pi Zero W with a different sd image and no web gui who gets reliable cm19a performance.
I thought that this in my earlier post might be a clue " I did notice that when I single click and the cm19a does not transmit, the flag in the HG gui in the upper right corner comes out after 4 or 5 seconds after the click announcing the command but the cm19a does not respond."
@alzzy let's check libusb again from HG folder:
ls -la lib/mib
-rwxrw-r-- 1 gene gene 24064 dic 28 18:06 CM19Lib.dll
lrwxrwxrwx 1 root root 37 gen 1 13:42 libusb-1.0.so -> /lib/x86_64-linux-gnu/libusb-1.0.so.0
-rwxrw-r-- 1 gene gene 6144 set 6 13:34 LibUsb.Common.dll
-rwxrw-r-- 1 gene gene 158208 set 6 13:35 LibUsbDotNet.LibUsbDotNet.dll
-rwxrw-r-- 1 gene gene 50688 dic 29 22:18 MIG.HomeAutomation.dll
-rwxrw-r-- 1 gene gene 31232 set 24 17:56 MIG.Protocols.dll
-rw-r--r-- 1 gene gene 2406991 set 25 16:03 p1db_custom.xml
is the libusb-1.0.so symbolic link pointing to the right location? This might be an issue with with the libusb path in which case also the CM15 driver should be broken.
Tuicemen, Can you check this> i have no idea how!
Just type ls -la lib/mig at the Terminal
@genemars I reckon to recreate this problem you will have to install HA Bridge on your Raspberry Pi. Calls are going back and forward between two servers HG and HA Bridge on a fairly low powered Raspberry Pi Zero which could be putting additional strain on the system.
Maybe if the OP ran HA Bridge in debug mode he could establish where exactly the problem lies.
So I just intalled latest raspbian stretch lite on a pi zero (no wireless). I had a few issues with my Wi-Fi dongle and USB keyboard that I resolved using an external powered USB switch. After installing homegenie I tried connecting the CM19. And it was recognized but behaved exactly how you guys described. So I rebooted the Pi with only CM19 and the keyboard attached (no wi-fi dongle this time, no network). Then I typed from console the following commands:
wget http://127.0.0.1/api/HomeAutomation.X10/C7/Control.On
wget http://127.0.0.1/api/HomeAutomation.X10/C7/Control.Off
and it worked as it should have. So the problem is probably the power adapter and the CM19 not designed for low powered devices.
I am not sure that is a valid conclusion as the issue was also seen with the cm15a which does not rely on the Pi for power. Furthermore , Tuicemen noticed that the system with cm15a ran fine when triggered by the HA bridge but sometimes took a double click when triggered from the web gui. So I don't agree.
@alzzy the cm15 does not rely on usb for powering itself but it will still absorb some power when attached to the usb port. What power supply are you using? Using the web UI will involve network communication, that will require more power I guess. I still believe this might be the cause.
@alzzy I'm now using a 5.2V 1.35A power supply and everything is running fine on a RPi Zero (v1.2 2015) with a 4 port USB switch, TP-link wifi dongle, CM19.
I am confused. So what is the fix? You saying my 2.5 A 5v supply is not adequate?
@alzzy I'm confused too... it lasted for a few minutes then it hung and I had to reboot. Does anyone tried upgrading mono from xamarin repos? I'm gonna try this too.
genemars, Let me know what u learn?
This time after the reboot I did wait like 5 minutes before opening the web ui and its working. Not sure if it will last. 🙂
ok... its not mono related. I had issues before installing hg when trying to configure the wifi, the keyboard stopped working once I connected the USB wifi. There were no ways to make the usb keyboard work when the wifi was plugged in. So I unplugged the keyboard and plugged another one (a usb wireless). This one worked even with the wifi plugged in. My conclusion is that might be eitger the rpi firmware buggy or the usb hardware weak.
Well that explanation doesn't seem to fit either as I know someone using the same hardware but with some what different software and he has excellent performance with cm19.
azzly so I have no clue at all. Anyway my RPi is still working fine since last reboot an hour ago.
Well I guess I am dead in the water then as they say. The implementation that works using the same hardware is triggered by a voice command via alexa and that appears reliable, in my situation it is triggered by a web gui and it isn't reliable. Does that provide any focus?
@genemars in all this discussion have you considered that the addition of the HA Bridge server on the same Raspberry Pi Zero W on top of HG is creating an additional load on the low spec Pi processor and memory. The OP should either disable the HA Bridge and run his tests again or move his system to the more powerful Raspberry Pi 3+.
let's try this:
cd /usr/local/bin/homegenie/html
wget -O index2.html http://127.0.0.1/hg/html/index.html
http://<rpi_address>/hg/html/index2.html
on the wget is that -O the letter cap. O
@alzzy yes it is uppercase -O
.
i get a 404 error not found
on the putty screen in response to the wget
@alzzy what port is hg running on?
8080
so change the url in the wget command accordingly
wget -O index2.html http://127.0.0.1:8080/hg/html/index.html
http://<rpi_address>:8080/hg/html/index2.html
geesh, even I shoulda figured that out. LOL ok I am in . Will do a little testing
No joy! same problem.
Its like if you give it enough time between toggling a device on or off, the Pi goes to sleep and it takes 1 click to wake it up and a second click to send the command.
and that time needs to be many seconds, sometimes even longer.
alzzly, tried disabling HA bridge?
no, how do I do that
oh in the gui. I can stop the bridge. I will try that!
No doesn't help
Do i need to undo the index2 somehow?
@alzzy not necessary. This morning my RPi zero was still running happily with no issues. So the only moment I've been able to reproduce this issue was in the beginning of my tests when I had problems with the USB HUB connector and the power supply. In that case the problems with the USB I/O where already evident even before HomeGenie was installed, any extra device connected to the USB HUB was making the whole system unreliable and slow.
Gene has put considerable effort into trying to id and correct this issue. I have helped with some of the testing. The results seem to confirm the conclusion that the PiX10 hub is not compatible with the cm19a. It seems to be a systems issue, ie HW + SW, as the cm19a does seem to play well with the Pi Zero w in one known instance where it is used as an Alexa Hub. Or that could be a "Random Success".
The fact that one user has reported a similar issue with the cm15 is bothersome wrt the PiX10 Hub application.
Gene, Thanks for all the help with this.
Gene just to confirm that the CM19 driver is working solid on both the Raspberry Pi Zero W and the Raspberry Pi 3+. HG in general is a lot more responsive on the Raspberry Pi 3+ probably because both the memory is double that of the Raspberry Pi Zero W and the processor is quite a bit faster and there's no need for USB powered hubs.
I just published v1.2-stable.31 which now allow using UPnP library in automation programs. So I created an example program that simulates a Belkin Switch so that Alexa can discover it. Anyone who can test this with Alexa?? To test this:
If we make this work maybe HA bridge will not be required anymore? Right?
@genemars I been tring to fight off a bad christmas virus that got ito my eyes so ive not been able to comment on things as late I'll attemp to test this as soon as I can see straight.
Initial test of your Belkin Switch program. Alexa not discovering a chosen device
I am using cm19a in HG on the Pix10hub 1.1 release. Running on Pi Zero W.
I have my cm15a unplugged (also its RF interface is disabled). I have shutdown my Alex10 app and its HA bridge. I have no other x10 software running and the cm19a is my only x10 interface. I use at v572a tranceiver. I have cm19a selected as the x10 interface in HG. Interface function is erratic. If a command is not sent to cm19a for several seconds, it takes two clicks of an x10 module On or Off button in HG for the cm19a to transmit the command. Its like the first click wakes it up and the second transmits the command. I have tried 2 different cm19a's with the same results. Note: my RF connection and v572 transceiver response is very reliable as I have very excellent results with cm19a controlling my devices when running it with Alex10. The other thing I noticed is that it appears the flash of the led on the CM19a when sending a command is shorter in duration when using HG than when using Alex10 if that means anything.
Any help is appreciated!