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 19464 times)

mike

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

A standard html url will not work this had me confused originally as well.

My turn to be confused as I actually have some of my std url codes Domiticz generates to make stand alone desktop icons to turn a device on or off?

For instance, domoticz sends "http://192.168.0.16:8080/json.htm?type=command&param=sa2=switchlight&idx=4&switchcmd=Off"     to turn x10 A2 switch off.  Then my standard cm15a (not one hooked to pi) sees A2 = off and runs a macro that shuts off A1 (modem DSL power) for 5 sec, then turns it back on, then resets A2 to on.
Logged

Tuicemen

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

Actually there are a number of ways you can send commands for X10. You can send to Domotics which your doing, or send directly to Mochad, or you can send to HA-Bridge. The fastest would be to send directly to mochad. Http commands to domoticz and mochad are simple url requests, Ha-Bridge uses restful commands(get/put/post/delete).
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

mike

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

Maybe that is my basic flaw in understanding...  yes, I can send command TO domo or mochad, and as others have shown to habridge via alexa (not sure if you can send json or url info to habridge to make it do something).  But I do not want to send TO domo -- I want domoticz to send to broadlink - the other way around...
Logged

Tuicemen

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

I realize you want Domoticz to send to HA-Bridge and It should be possible.
Domoticz has a Philips hue Hardware device which uses simular code as the HA-Bridge (it is a hue emulator).
 Setting up the Philips Hue hardware device in Domoticz should allow you to send on/off/dim to a HA-Bridge configured device.

I've not had much luck with this as yet, B:( it worked in HG :o
It was a simple code change in HG to its Philips hue hub code to allow for the HA-Bridge Security
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

mike

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

thanks.  I believe I saw support for the hue thing in domoticz settings;  I have not clicked it;  will try that.

I have not complicated it with security at all yet.  Everything is local here, not subject to internet access.
Logged

Tuicemen

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

My HA-Bridge is not accessible from the web either but I do have the security enabled on the HA-Bridge.
You may wish to post a question on the HA-Bridge Gihub issues page as there are several Domoticz users, one of them may have a solution that us newbies haven't stumbled on yet. ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

mike

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

hmmm...   I was spending more time on domoticz forum and domoticz heavy pages.  Perhaps the habridge forums may be the key.

For now I have been able to install supposed native broadlink python control into Domoticz.  I will experiment with it next to see if I make any progress...
Logged

mike

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

So I installed python 3.6 (I think), and it works but it must be in the wrong location?  Everything I am seeing seems to say it should be under:

/usr/local/lib/python3.5/:/usr/local/lib/python3.5/

but instead it is:

/home/pi/Python-3.6.3   

I have downloaded broadlink.zip with all its .py routines, so far unzipped it under 3 different directories, but none seem to be the right place yet.  Domoticz log complains:

 2018-10-08 11:58:14.423 Status: Mochad: connected to: 127.0.0.1:1099
2018-10-08 11:58:14.661 Status: PluginSystem: Entering work loop.
2018-10-08 11:58:15.016 Status: Python EventSystem: Initalizing event module.
2018-10-08 11:58:15.027 Status: EventSystem: Queue thread started...
2018-10-08 11:58:15.028 Status: EventSystem: Started
2018-10-08 11:58:16.252 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-08 11:58:16.252 Error: (rm) Module Import failed, exception: 'ImportError'
2018-10-08 11:58:16.252 Error: (rm) Module Import failed: ' Name: broadlink'
2018-10-08 11:58:16.252 Error: (rm) Error Line details not available.
2018-10-08 11:58:45.803 Status: (rm) Stop directive received.
2018-10-08 11:58:45.803 Status: (rm) Stopping threads.
2018-10-08 11:58:45.803 Status: (rm) Stopped.
2018-10-08 11:59:41.906 Status: (rm) Started.

another 4 hours down the drain.  give up for  lunch...

any hints what the above MEANS?

Logged

petera

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

Mike a big hint......a little more reading up needed.

Type python --version at the terminal to see what version is actually installed. What version of python does the plugin you're trying to install support.
Logged

mike

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

ya, I've been reading.  There are TWO pythons active not just one.  In my case python --version = python 2.7.13    & my python3 --version = python 3.6.3

I will see if I can delete all thosde other pythons in this pi...    I know I know, back up first!
Logged

petera

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

ya, I've been reading.  There are TWO pythons active not just one.  In my case python --version = python 2.7.13    & my python3 --version = python 3.6.3

I will see if I can delete all thosde other pythons in this pi...    I know I know, back up first!

No. Restore the image you have before you started experimenting with Python.
Logged

petera

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

Before you plough in to install a package run this command to see exactly what packages you already have installed sudo apt list --installed
Logged

mike

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

Same place I was heading....

I had just run this:

pi@raspberrypi:~ $ cd ..
pi@raspberrypi:/home $ cd pi
pi@raspberrypi:~ $ dir
Desktop    habridge-bak  oldconffiles  Python-3.6.3.tar.xz
Documents  MagPi         Pictures      python_games
domoticz   mochad        Public        Templates
Downloads  Music         Python-3.6.3  Videos
pi@raspberrypi:~ $ python --version
Python 2.7.13
pi@raspberrypi:~ $ python -V
Python 2.7.13
pi@raspberrypi:~ $ python3 --version
Python 3.6.3
pi@raspberrypi:~ $ python3 -V
Python 3.6.3
pi@raspberrypi:~ $ sudo apt install python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version (3.5.3-1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Shows I got python all mixed up.  Domoticz clearly states it does NOT use python or python 2.7 - just python 3 above 3.4

time for previous image!
Logged

mike

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

Actually going back to working image with stretch GUI, mochad, & domoticz and NOT including HA-bridge...  I will refrain from installing python-3.6 unless needed;  if so, I will research more and find a different thread showing how to install it since the last one I installed from link we shared here probably put it in the wrong place.
Logged

petera

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

Are you using the Terminal locally or from an SSH sesssion
« Last Edit: October 08, 2018, 04:16:51 PM by petera »
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.