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

mike

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

Can someone tell me what is the link between n HA input and a broadlink output in ha-bridge?

I have all my domoticz devices defined and they list in ha-bridge folder domoticz-devices, right next to broadlink-devices.

I also have a working device in broadlink devices that arms/disarms my security panel.

The problem is I do not know how to LINK these two together. 

Any clues?
Logged

petera

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

Don't possess an RM Broadlink so I'll not be much help to you.

Looks like Tuicemen was in search of the same result if this link was anything to go by. Looks like you might need an SDK to achieve this https://github.com/bwssytems/ha-bridge/issues/236
Logged

Tuicemen

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

@petera that thread was prior to BWSsytems adding support for the Broadlink.
@mike I not sure I know what you mean by linking.
 If you mean when domoticz sees a command then send a command to HA-Bridge for the broadlink to send that would be a macro which I've not dug into setting up with domotics yet.

if you wish to know what command to send HA-Bridge for the Broadlink to send a command then that info is in the HA-Bridge readme and depends on if you have the security enabled.Ha-Bridge uses restful commands  which would be something like:
PUT   http://host:port/api/<username>/lights/<id>/state
host:port- would be domotics IP &port
Username- can be anything unless you enabled security then it must be the user name
<ID> is the device ID # ha-bridge assigned the device you wish to  (doesn't mater that it is broadlink)
State - is on or off
 
Or do you mean have Domotics see HA-Bridge configured Broadlink  devices like you security console?
« Last Edit: October 07, 2018, 12:53:11 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

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

@mike I'll fire up my Domoticz SD card I the PI or the ODROID to see if I can help with this. However I'm a bit in the dark about what your attempting when you say Link the two together.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

mike

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

Thanks.  Since I am not sure HOW the broadlink is triggered to send one of its memorized RF commands, I  do not know how to ask the question...

In HG IIRC, we loaded a 'helper' program that allowed HG to talk to the ha-bridge...  this helper program added 5 'devices?' to the HG pull down list, so in HG we could have it learn an X10 command then make an icon to place in a room and assign it to one of these 5 ha interface names.  Then habridge used that and would fire off its memorized RF command when it was seen.  I think this is how it worked...

In domoticz, ha-bridge has an integrated helper called domoticz.  It automatically imported EVERY device (switch) I previously programmed in domoticz - into habridge.  Next to each is the BUILD button but that does not seem to link to a previously made broadlink ID. 

Also in habridge is another helper called broadlink.  It let us send via broadlink, RF commands previously taught thru android program and/or that german helper site... 

So I easily copied and pasted my security ARM & DISARM codes from my old habridge (actually I had saved them as a text file from the German site for use with HG and still have them), into my habridge on the pi.  Since there is a test ON, test OFF button in the broadlink page of habridge, I verified both ARM and DISARM work just fine.

But I cannot figure out how to make domoticz turn them on with one of its icons!  domoticz said it learned my kr10a when I pressed arm and disarm but the icon made does nothing but give a fault when pressed.  I don't care, I just want SOME icon in domoticz LINKED to my broadlink ARM/DISARM.   but I cannot figure out what that link is yet!

I have both habridge ono windows and habridge on pi working just fine - they do not interfere with each other.  I suppose I will try to turnHG back on and see if I can learn what I did to teach it to send broadlink a command to run the ARM or DISARM RF signal...

I vaguely recall something about ROW and ID that was the key:  they must be the same for both input (domoticz) and output (broadlink) but do not recall enough to make any sense of it yet.



Logged

mike

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

I would give up on Habridge and just move to the integrated into domoticz direct control of broadlink with a python program, but I cannot get it to load into my pi.  I am not alone;  many many others cannot set the simple command "sudo pip3 install broadlink" to load and run either.  seems back in April openSSL coding changed and very few folks SSL are any good anymore.   I have given up for now trying to make that work.  If someone would list the directories each python portion of this broadlink program and its plugins should be in, I would try some more.  But so far no one has listed that info.
Logged

Tuicemen

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

There are actually several broadlink programs on GitHub you might try one of those if you wish to move away from HA-Bridge.

To enable Domoticz to send the broadlink command simular to HG you may need to edit the Philips hue hardware plugin or you may be able to just install it (if you've not enabled security in HA-Bridge)
With the Philips hue hardware enabled you should be able to see devices configured in HA-Bridge or manually install. I'll see if I can figure this out but my ODROID refuses to load Java B:(
I do have a Domoticz SD for my PI so I'll try with it next.Since I have security enabled on my HA-Bridge I may need to edit the hue hardware plugin for Domoticz (if I can figure that out. ::) :'
Another way would be to see if there is a restfull plugin for domoticz
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

petera

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

I would give up on Habridge and just move to the integrated into domoticz direct control of broadlink with a python program, but I cannot get it to load into my pi.  I am not alone;  many many others cannot set the simple command "sudo pip3 install broadlink" to load and run either.  seems back in April openSSL coding changed and very few folks SSL are any good anymore.   I have given up for now trying to make that work.  If someone would list the directories each python portion of this broadlink program and its plugins should be in, I would try some more.  But so far no one has listed that info.

Have you tried this as a solution. https://www.domoticz.com/forum/viewtopic.php?t=21645&start=260
Logged

mike

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


Have you tried this as a solution. https://www.domoticz.com/forum/viewtopic.php?t=21645&start=260

I think my issue with openSSL is more to do wtih python and or python3 itself not really installed on my pi...   It SAYS it is I think, but trying to upgrade it from 3.5 to 3.6 says it does not even exist.  trying other pip or pip3 commands come back with no such directory or program...

I will copy a couple pages of my command line stuff and post tomorrow;  maybe you can spot what i am missing.
Logged

petera

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


Have you tried this as a solution. https://www.domoticz.com/forum/viewtopic.php?t=21645&start=260

I think my issue with openSSL is more to do wtih python and or python3 itself not really installed on my pi...   It SAYS it is I think, but trying to upgrade it from 3.5 to 3.6 says it does not even exist.  trying other pip or pip3 commands come back with no such directory or program...

I will copy a couple pages of my command line stuff and post tomorrow;  maybe you can spot what i am missing.

Something like this will install the latest version of python. From there I'm sure you can work the rest out. http://www.knight-of-pi.org/installing-python3-6-on-a-raspberry-pi/
Logged

mike

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

there is  a renumber button in habridge for devices...  IIRC this number is used to link input to output stuff in habridge...   your pointing me to habridge readme  found in the bridge device tab:

Renumber Devices

This changes the numbering of the added devices to start at 1 and goes up from there. It was originally intended for a conversion from the previous system version that used large numbers and was not necessary. This also allows the system to try and number sequentially. If you use this button, you will need to re-discover your devices as their ID's will have changed.

I suspect this is why my inputs do not turn on outputs...  now to find how to delete all the discovered domoticz and let habridge rediscover them...
Logged

Tuicemen

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

The renumbering feature was for legacy numbering.
to remove your domotics device scroll to the right hand side of where the test on/off/dim/edit buttons are and select delete for each device you wish to remove.

HA-Bridge doesn't see domoticz activity it uses the domoticz device info for Alexa to send the correct commands to domoticz.
in order to have domoticz send a command to a device in HA-Bridge you need to send a http "PUT" command to HA-Bridge

https://github.com/bwssytems/ha-bridge/blob/master/README.md#set-light-state
Using chrome postman you can experiment with sending restful commands to the Bridge.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

mike

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



Something like this will install the latest version of python. From there I'm sure you can work the rest out. http://www.knight-of-pi.org/installing-python3-6-on-a-raspberry-pi/

wow!  Thanks!  It installed python3 and I wrote a quick python program verifying it worked!  Then it let me istall the broadlink and paey thing!   I'm to try making it work!

Python comes preinstalled on rasbian I believe.  The issue I think was it was old;  was ver 9.0.1 IIRC, which I thought was latestest, yet your link uninstalled that and installed ver 18. something!  I think this was probably the solution!
« Last Edit: October 08, 2018, 08:43:04 AM by mike »
Logged

mike

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

The renumbering feature was for legacy numbering.
to remove your domotics device scroll to the right hand side of where the test on/off/dim/edit buttons are and select delete for each device you wish to remove.

HA-Bridge doesn't see domoticz activity it uses the domoticz device info for Alexa to send the correct commands to domoticz.
in order to have domoticz send a command to a device in HA-Bridge you need to send a http "PUT" command to HA-Bridge

https://github.com/bwssytems/ha-bridge/blob/master/README.md#set-light-state
Using chrome postman you can experiment with sending restful commands to the Bridge.

Thanks.  Any command domoticz makes and sends to habridge as standard html/url is fine.  That just did not help me figure how to have THAT info trigger a broadlink learned security code - that works in habridge with the test buttons...

Perhaps the chrome test you found will help me understand!   I will check it out.  thanks.
Logged

Tuicemen

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

A standard html url will not work this had me confused originally as well.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!
Pages: 1 [2] 3 4 5
 

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