Please login or register.

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

Author Topic: x10 with domoticz, mochad, & ha-bridge on Pi, with external broadlink RM  (Read 19459 times)

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057

both. if in house I use SSH, if in workshop I use terminal on the pi.  I have been in workshop all day.  about to quit for the day.

I accomplished going back to last working cc of raspbian without habridge and without my changed python3 stuff.

So true to form, I am back to SSL failures!!!!!!!!!!!!!!!!!!!!!!!!!!!   nothing will install into the python3.5 area or directories.

I will fiddle a bit more in house via SSH then go back and try to install python3.6.3 again, paying attention to where I start my install from - maybe I was in home/pi when Iran that install before?
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751

Mike, Python is in the apt repositories. Sudo apt command is usually the safest way to install a package. Most of those other links you are looking at involve compiling a particular version of Python and then installing it. That means it is quite difficult to remove should it end up in the wrong place.

Unless its absolutely necessary otherwise do all your package installs from the repositories. If you do have to compile be careful where the compiled package ends up. Compiled solutions assume you have knowledge of the file/folder structures and permissions and ownerships.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057

Yes, I am beginning to see any python >3.5 gets installed in WEIRD locations - NOT in same one with python 2.7 & python3.5     guess that is just how it goes.  the new directory is then pointed to in path command it seems...

so I found github has ver 3.7.1;  might as well go all the way!  so I am installing it at this time.  i was able to drop it into a folder under /usr/src...

what is an 'apt repository?'  I found some eplanations of a command called GIT that will get aps from github?  No clue how to master THAT yet...

Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751

Yes, I am beginning to see any python >3.5 gets installed in WEIRD locations - NOT in same one with python 2.7 & python3.5     guess that is just how it goes.  the new directory is then pointed to in path command it seems...

so I found github has ver 3.7.1;  might as well go all the way!  so I am installing it at this time.  i was able to drop it into a folder under /usr/src...

what is an 'apt repository?'  I found some eplanations of a command called GIT that will get aps from github?  No clue how to master THAT yet...

An apt repository is where a particular distribution of Linux stores its packages. They are fully tested and certified for that distribution. They are installed with the command sudo apt-get in Raspbian and removed cleanly by sudo apt-get remove or sudo apt-get purge.

GitHub or git is a place where individuals publish their source code projects to. They can be downloaded or cloned and are compiled locally on the users machine. Unless there's clear explicit instructions on how to to do this it is not a method I'd recommend unless you know what you are doing.

As an example, Mochad is not in any repository and there's a number of different versions all stored in different developers Githubs. There is thankfully explicit instructions on how to compile and install.

As I explained in an earlier post, one sure way of breaking a Raspbian installation is the incorrect installation of a package from a GitHub.

The weird locations you refer to are only weird by way of where you are located when you start the process. I'm assuming you are always in your /home/Pi folder when you should be directing the process to /usr/local/bin or such like. Remember different folders have different read/write permissions and ownerships.

I could go on all night but suffice to say you need to fully understand the file and folder structures to build your own particular version of a package from the GitHub.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057

yep.  poor python 3.7.1rc1 is crashing away right now in SSH after trying hard to install and make for the last couple hours.  Seems it has run my pi out of memory:

virtual memory exhausted: Cannot allocate memory
virtual memory exhausted: Cannot allocate memory
virtual memory exhausted: Cannot allocate memory
Makefile:1623: recipe for target 'Parser/node.o' failed
make[3]: *** [Parser/node.o] Error 1
Makefile:1623: recipe for target 'Parser/listnode.o' failed
make[3]: *** [Parser/listnode.o] Error 1
Makefile:1623: recipe for target 'Parser/firstsets.o' failed
make[3]: *** [Parser/firstsets.o] Error 1
Makefile:1623: recipe for target 'Parser/grammar.o' failed
make[3]: *** [Parser/grammar.o] Error 1
Makefile:1623: recipe for target 'Parser/pgen.o' failed
make[3]: *** [Parser/pgen.o] Error 1

Soooo...  tomorrow I will reimage and start over with python3 ver 3.6, which does have a bunch of exact how to's to install.  I will start it in the same directory as the other 2 distributed pythons and use sudo to gain permission to do so.  or maybe just let it install in home/pi again since it does not seem to reallyl matter where it is.  I think what was missing before was my adding a Path statement to point to it and also not giving the .py files permission to run with that permissions command (forget what it is off hand now) that domiticz did not include but is likely required.

leaning toward this install:
https://tutorials.technology/tutorials/67-Installing-python-36-on-raspberrypi.html
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057

anyone ever have ann image write take 5 hours?  2.6MB/sec...     started it at 9:30am and it is 85% finished with verify...  might be first time I am imaging 16gb across my home network - had to move my images to my network 2tb drive - filled up my local SSD C: drive!  probably will not image across network again but cc image back to local SSD C: drive first next time...
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!

if your using wi-fi and not wired I can see it taking a long time. it will be considerably longer over the network then locally from same PC and you may encounter errors.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082

I would suggest changing your backup approach.  When I create a backup, I use RPi-clone.  The problem with the standard backup is that if you use a 16GB SD, it will create a 16GB image.  The image only needs to save the data and not the blank space.  However, the image will save all the blank space too.  If you are using a 16GB card now and want to create a new card to test on, you can't use a smaller one since it will not have enough space to write all the blank space.  When using RPi-clone it will only copy the files to the new drive so it will be very quick and can copy a system on 32GB card down to a 2GB card potentially.  You can also run a scheduled backup which will only copy newly modified files.

I understand you are creating an image that can be stored somewhere else.  What I am doing is using a second SD card installed in a USB adapter to duplicate the file system over to.  If the original fails, I can pull the backup and simply put it in the RPi card slot.  If you use an image, you need a running system to write the image.

That said, if you are planning on sharing your setup, the image file will be a better approach.

https://github.com/billw2/rpi-clone

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057

THANK you bkenobi!!   Yes,, I filled ll the free space on my 250gb SSD C: windows drive doing 5-6 images.  So decided to move them to the network RAID drive but then had the speed issue - yes tuicemen, my network connection was wifi (the etherneet connection are used for my cameras on another network mask).

I will definitely learn this rpi clone thing and switch to it.  I have open USB ports on my 8 port powered USB unit on pi so can easily use that!   

Thanks!

I am right now in midst of python 3.7.0 install on my pi so I can add broadlink RM native support.  o far so good.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751

anyone ever have ann image write take 5 hours?  2.6MB/sec...     started it at 9:30am and it is 85% finished with verify...  might be first time I am imaging 16gb across my home network - had to move my images to my network 2tb drive - filled up my local SSD C: drive!  probably will not image across network again but cc image back to local SSD C: drive first next time...

Taking an image write of a 16gb card takes typically 20 minutes or so. That's a write from the USB card reader via a desktop to an external USB2.0 drive. Simplest way to do it. The external USB drive is 500gb so stores approx 30x16gb image writes.

There must be some serious bottleneck on your home network.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057

So after 3 days of installing python3-3.7.0 and it showing as python3 -V,    until a reboot...   I cannot get it back.  I am back to showing 3.5.3 as my version - which will not work with broadlink install...

I have kept trying until last night my SD card seems to have died when I frustratingly tried to swap monitor hdmi cables while powered up.  Sd card won't start pi anymore, so back to last backup - that had working python3 -3.6.3   

So I tried to continue where I left off here...   It has working mochad, working domoticz, working python3.  I thought my issue may have been I never gave the plugins permission to run, so did chmod +x to each of the plugins.   reset domoticz, it loaded broadlink into hardware  like before, but still won't run.  Here is my domoticz log - it appears someone somewhere is still pointing to python3- 3.5   --- any clue how to fix this?

 2018-10-11 12:08:24.829 Status: Domoticz V4.10049 (c)2012-2018 GizMoCuz
2018-10-11 12:08:24.833 Status: Build Hash: 098a95eb, Date: 2018-10-08 07:22:42
2018-10-11 12:08:24.834 Status: Startup Path: /home/pi/domoticz/
2018-10-11 12:08:25.121 Sunrise: 07:44:00 SunSet: 19:05:00
2018-10-11 12:08:25.121 Day length: 11:21:00 Sun at south: 13:05:00
2018-10-11 12:08:25.121 Civil twilight start: 07:17:00 Civil twilight end: 19:32:00
2018-10-11 12:08:25.121 Nautical twilight start: 06:46:00 Nautical twilight end: 20:03:00
2018-10-11 12:08:25.121 Astronomical twilight start: 06:15:00 Astronomical twilight end: 20:34:00
2018-10-11 12:08:25.944 Active notification Subsystems: (0/13)
2018-10-11 12:08:25.122 Status: EventSystem: reset all events...
2018-10-11 12:08:25.906 Status: PluginSystem: Started, Python version '3.5.3'.
2018-10-11 12:08:25.970 Status: WebServer(HTTP) started on address: :: with port 8080
2018-10-11 12:08:26.037 Starting shared server on: :::6144
2018-10-11 12:08:26.021 Status: WebServer(SSL) started on address: :: with port 443
2018-10-11 12:08:26.028 Status: Proxymanager started.
2018-10-11 12:08:26.039 Status: TCPServer: shared server started...
2018-10-11 12:08:26.040 Status: RxQueue: queue worker started...
2018-10-11 12:08:28.043 Status: EventSystem: reset all events...
2018-10-11 12:08:28.045 Status: EventSystem: reset all device statuses...
2018-10-11 12:08:28.052 Status: Mochad: trying to connect to 127.0.0.1:1099
2018-10-11 12:08:28.054 Status: Mochad: connected to: 127.0.0.1:1099
2018-10-11 12:08:28.154 Status: PluginSystem: Entering work loop.
2018-10-11 12:08:28.671 Status: Python EventSystem: Initalizing event module.
2018-10-11 12:08:28.673 Status: EventSystem: Queue thread started...
2018-10-11 12:08:28.674 Status: EventSystem: Started
2018-10-11 12:09:10.096 Status: (Broadlink RM2) Started.
2018-10-11 12:09:11.297 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/BroadlinkRM2/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2018-10-11 12:09:11.298 Error: (Broadlink RM2) Module Import failed, exception: 'ImportError'
2018-10-11 12:09:11.298 Error: (Broadlink RM2) Module Import failed: ' Name: broadlink'
2018-10-11 12:09:11.298 Error: (Broadlink RM2) Error Line details not available.
2018-10-11 12:09:33.681 (Mochad) Security (ARM/Disarm DS7000)
2018-10-11 12:09:34.400 (Mochad) Security (ARM/Disarm DS7000)
2018-10-11 12:09:39.696 (Mochad) Lighting 1 (Ele Workshop Music)
2018-10-11 12:09:39.720 (Mochad) Lighting 1 (Ele Workshop Music)
2018-10-11 12:09:43.220 (Mochad) Lighting 1 (Ele Workshop Music)
2018-10-11 12:09:43.244 (Mochad) Lighting 1 (Ele Workshop Music)
2018-10-11 12:09:44.083 (Mochad) Lighting 1 (Ele Workshop Music)
2018-10-11 12:10:18.796 Error: Broadlink RM2 hardware (3) thread seems to have ended unexpectedly
2018-10-11 12:10:32.802 Error: Broadlink RM2 hardware (3) thread seems to have ended unexpectedly
2018-10-11 12:10:46.808 Error: Broadlink RM2 hardware (3) thread seems to have ended unexpectedly
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057

I wonder if hot swapping hdmi plugs caused my SD card to crash and burn?  I went to reimage it and it only showed the 30mb boot partician;  it got so hot it almost melted the SD card adapter. 

Guess I shorted another piece!

Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751

Mike I mentioned it before, not advisable to unplug the HDMI at the Pi Zero while it's powered up.

In the meantime have a read of this link from start to finish. Don't just start ploughing away at the first solution https://www.domoticz.com/forum/viewtopic.php?t=16859&start=80

In the meantime, if you're not already registered on the Domoticz forum I'd advise you to do so. They seem to be a knowledgeable bunch over there and I'm sure they'll save you hours of hair pulling.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!

@mike I think you best stick with what is known to work with the Zero W. :o
Your exploits are enough to deter anyone from playing with a PI and X10.
I my self have not had good luck with Domoticz and a SBC but I at least haven't toasted anything (Yet)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751

@mike I think you best stick with what is known to work with the Zero W. :o
Your exploits are enough to deter anyone from playing with a PI and X10.
I my self have not had good luck with Domoticz and a SBC but I at least haven't toasted anything (Yet)

As you can see from this report Python is fast taking hold of the programming world. It's here to stay so it's worth getting your head around it. https://www.hpcwire.com/2018/08/07/python-remains-the-most-popular-programming-language/

Many developers on the GitHub start really good projects that work well when they are created. Unfortunately they get distracted and fail to maintain them. Python versioning is happening at such a pace even a point version upgrade can kill a very worthy project if it's not maintained. Documentation is another bugbear with these "crazy developers"  :)

It's vital to keep an eye on these changes when you introduce 3rd party projects into your mainstream setup.

In Mikes situation he needs to understand that you can't have two different versions of Python residing on the same system unless they are protected in a virtual environment.
Logged
Pages: 1 2 3 [4] 5
 

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