CM11 And X10
Moderator: leecollings
-
- Posts: 16
- Joined: Friday 16 December 2016 14:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: barcelona,SPAIN
- Contact:
CM11 And X10
Good morning, my name is Andrew. I am new to this forum, installed on a raspberryPi2 DomoicZ, the truth is that it is a past.
I have a house currently domotized using X10, with Marmiteck controllers, and all this is controlled with a CM11, I have followed all the steps of the WIKI, and from console I get to act on the controllers, but I am not able to join the .LUA In DomoticZ.
For me to work.
I use an RFcomm and that goes perfect
I have a house currently domotized using X10, with Marmiteck controllers, and all this is controlled with a CM11, I have followed all the steps of the WIKI, and from console I get to act on the controllers, but I am not able to join the .LUA In DomoticZ.
For me to work.
I use an RFcomm and that goes perfect
-
- Posts: 139
- Joined: Thursday 19 February 2015 21:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: CM11 And X10
does the blocky script work? that is a bit more plug and play so you can see if domoticz interfaces correctly
-
- Posts: 16
- Joined: Friday 16 December 2016 14:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: barcelona,SPAIN
- Contact:
Re: CM11 And X10
hello
I generate the virtual switch, but do not join with the script command
What do I do wrong? From console if I execute the command, which executes the script works for me.
thank you very much
I generate the virtual switch, but do not join with the script command
Code: Select all
pi@raspberrypi:~/domoticz/scripts/lua $ cat script_device_Apparaat01.lua
commandArray = {}
if (devicechanged['Apparaat01'] == 'On') then
os.execute('sudo -u pi /home/pi/heyu-2.10/heyu on c5')
elseif (devicechanged['Apparaat01'] == 'Off') then
os.execute('sudo -u pi /home/pi/heyu-2.10/heyu off c5')
end
return commandArray
thank you very much
-
- Posts: 139
- Joined: Thursday 19 February 2015 21:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: CM11 And X10
if you have the lua scripts runing in the event section with based on changing devices you don't need to put them as actions with the virtual switch...
so just add the part between commandarray to a lua device script under configuration--> events
if the commands work from the command line, they should work through a lua script
but I think you have a typo...
os.execute('sudo -u pi /home/pi/heyu-2.10/heyu on c5')
should be
os.execute("sudo -u pi /home/pi/heyu-2.10/heyu on c5")
on my pi I have heyu runing from "/usr/local/bin/heyu"
but if the string works from the command promt there should be no difference in lua when you run it with os.execute
so just add the part between commandarray to a lua device script under configuration--> events
if the commands work from the command line, they should work through a lua script
but I think you have a typo...
os.execute('sudo -u pi /home/pi/heyu-2.10/heyu on c5')
should be
os.execute("sudo -u pi /home/pi/heyu-2.10/heyu on c5")
on my pi I have heyu runing from "/usr/local/bin/heyu"
but if the string works from the command promt there should be no difference in lua when you run it with os.execute
-
- Posts: 16
- Joined: Friday 16 December 2016 14:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: barcelona,SPAIN
- Contact:
Re: CM11 And X10
hello, thank you very much,
In my installation is the correct route as the light turns on
I have managed to understand how it works and I have managed to turn the x10 heyu lights on since DomitcZ, I am very happy.
From there it leads me to another problem, as I can do DIM to the blinds, I can make them an ON and an OFF, but not DIM.
Any Script?
the last question..
You can have the system monitor Heyu monitor for changes and show them change the status of the switches,
If I turn on DomoticZ, perfect but if I do from the physical device does not change the state.
Code: Select all
/home/pi/heyu-2.10/heyu on c5
I have managed to understand how it works and I have managed to turn the x10 heyu lights on since DomitcZ, I am very happy.
From there it leads me to another problem, as I can do DIM to the blinds, I can make them an ON and an OFF, but not DIM.
Any Script?
the last question..
You can have the system monitor Heyu monitor for changes and show them change the status of the switches,
If I turn on DomoticZ, perfect but if I do from the physical device does not change the state.
-
- Posts: 139
- Joined: Thursday 19 February 2015 21:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: CM11 And X10
I have a CM15pro to monitor the status of my 2 way devices and the CM11a to check the level of the 2way dimmer switches when the are turned on, see this topic:
viewtopic.php?f=56&t=11949
by now it is working fine, will update the topic with my latest scripts
viewtopic.php?f=56&t=11949
by now it is working fine, will update the topic with my latest scripts
-
- Posts: 16
- Joined: Friday 16 December 2016 14:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: barcelona,SPAIN
- Contact:
Re: CM11 And X10
Thank you very much, it looks good, but I do not understand, should I do a follow-up for each of the elements of the installation?
-
- Posts: 139
- Joined: Thursday 19 February 2015 21:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: CM11 And X10
you can have 1 lua script with the off and on device changes for every device and initiate the heyu commands
-
- Posts: 16
- Joined: Friday 16 December 2016 14:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: barcelona,SPAIN
- Contact:
Re: CM11 And X10
Could you give an example? The LUA command, is always running
thank you very much
thank you very much
-
- Posts: 139
- Joined: Thursday 19 February 2015 21:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: CM11 And X10
Setup --> More options --> Events
make a lue scripts, type device with code like this
make a lue scripts, type device with code like this
Code: Select all
commandArray = {}
--first switch on c5
if (devicechanged['VirtualSwitch'] == 'On') then
os.execute("sudo -u pi /home/pi/heyu-2.10/heyu on c5")
end
if (devicechanged['VirtualSwitch'] == 'Off') then
os.execute("sudo -u pi /home/pi/heyu-2.10/heyu off c5")
end
--add more switchs on other codes
return commandArray
-
- Posts: 16
- Joined: Friday 16 December 2016 14:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: barcelona,SPAIN
- Contact:
Re: CM11 And X10
Good thanks for your response, later I realized that I should have used it for what Json needed.
This is the code that usu in the x10config
But it does not work for me, it does not change the state in domoticz, although if I put the address in the browser I execute the order
What am I doing wrong
This is the code that usu in the x10config
Code: Select all
#################DOMOTICZZZZ
####Comedor
SCRIPT Persina_bufet off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=21&switchcmd=On&level=0"
SCRIPT Persiana_herminio off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=22&switchcmd=On&level=0"
SCRIPT Persiana_antonio off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=23&switchcmd=On&level=0"
SCRIPT Lampara_Mesa off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=24&switchcmd=On&level=0"
SCRIPT Luces_PasilloP1 off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=25&switchcmd=On&level=0"
SCRIPT Doble_espacio off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=26&switchcmd=On&level=0"
SCRIPT Cortinero off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=27&switchcmd=On&level=0"
#Banyo
SCRIPT lavamanos off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=29&switchcmd=On&level=0"
SCRIPT ducha off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=31&switchcmd=On&level=0"
#Cocina
SCRIPT Luz_Cocina off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=32&switchcmd=On&level=0"
SCRIPT Persiana_Pica off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=33&switchcmd=On&level=0"
SCRIPT Persiana_salida off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=34&switchcmd=On&level=0"
#Lavadero
SCRIPT Lavadero off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=35&switchcmd=On&level=0"
SCRIPT Persiana_lavadero off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=36&switchcmd=On&level=0"
#Recibidor
SCRIPT Entrada off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=37&switchcmd=On&level=0"
SCRIPT vestibulo off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=38&switchcmd=On&level=0"
#Siestera
SCRIPT Luz_Siestera off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=39&switchcmd=On&level=0"
SCRIPT Presiana_Siestera off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=40&switchcmd=On&level=0"
#Escaleras
SCRIPT Luz_escalera_tramo1Planta off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=41&switchcmd=On&level=0"
SCRIPT Luz_escalera_tramoParking off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=42&switchcmd=On&level=0"
################ Segunda Planta #####################
#Desapacho
SCRIPT Luz_despacho off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=18&switchcmd=On&level=0"
SCRIPT Persiana_despacho off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=20&switchcmd=On&level=0"
But it does not work for me, it does not change the state in domoticz, although if I put the address in the browser I execute the order
What am I doing wrong
-
- Posts: 16
- Joined: Friday 16 December 2016 14:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: barcelona,SPAIN
- Contact:
Re: CM11 And X10
I do not run the scripts I have open the heyu monitor in a cosola, and I do not see them running,
Should I do something else?
Thank you
Should I do something else?
Thank you
-
- Posts: 16
- Joined: Friday 16 December 2016 14:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: barcelona,SPAIN
- Contact:
Re: CM11 And X10
Good morning and happy new year
I have tried to put the code in the 2 ways and it does not run.
I must put something else, I activate the switch and in domoticZ does not know.
I have tried to put the code in the 2 ways and it does not run.
Code: Select all
SCRIPT C5 off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=18&switchcmd=On&level=0"
SCRIPT Persiana_despacho off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=20&switchcmd=On&level=0"
-
- Posts: 139
- Joined: Thursday 19 February 2015 21:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: CM11 And X10
if you run the curl command from the command prompt, does it work?
-
- Posts: 16
- Joined: Friday 16 December 2016 14:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: barcelona,SPAIN
- Contact:
Re: CM11 And X10
If that works, what is not ejencuta is the SCRIP
-
- Posts: 9
- Joined: Saturday 07 January 2017 16:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: CM11 And X10
I have the same issue. The commands do work from the command line.webtense wrote: ↑Thursday 05 January 2017 11:11 Good morning and happy new year
I have tried to put the code in the 2 ways and it does not run.
I must put something else, I activate the switch and in domoticZ does not know.Code: Select all
SCRIPT C5 off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=18&switchcmd=On&level=0" SCRIPT Persiana_despacho off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=20&switchcmd=On&level=0"
Any thoughts on this?
-
- Posts: 9
- Joined: Saturday 07 January 2017 16:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: CM11 And X10
SOLVED!PeterHarrie wrote: ↑Friday 11 August 2017 22:07I have the same issue. The commands do work from the command line.webtense wrote: ↑Thursday 05 January 2017 11:11 Good morning and happy new year
I have tried to put the code in the 2 ways and it does not run.
I must put something else, I activate the switch and in domoticZ does not know.Code: Select all
SCRIPT C5 off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=18&switchcmd=On&level=0" SCRIPT Persiana_despacho off rcvi :: curl "http://192.168.1.9:8080/json.htm?type=command¶m=switchlight&idx=20&switchcmd=On&level=0"
Any thoughts on this?
You should not only start heyu itself by 'heyu start', you also need to start the engine and enable scripting.
use:
heyu engine
heyu script_ctrl enable
You only need to start the engine by 'heyu engine' the rest will be started automatically and scripts are enabled by default.
Who is online
Users browsing this forum: No registered users and 1 guest