Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Lutron RadioRa2
Re: Lutron RadioRa2
Good Morning,
I have installed and tried your RR2 plugin and have made a connection to my system. I have read the documentation and have played around with a few of the preset commands by entering the integration information generated by my RR2 configuration software. I am very new (as of today) to attempting to do anything with EG and have some questions that I am not sure belong in this plugin post or best suited for another.
Executing commands specific to my RR2 system from the pre-set command macros in EG renders LED and OUTPUT "events" in the log on the left of the screen, this is fine and I understand that I can "drag" these events into the command tree on the right and have the event trigger other actions. What i cannot figure out however, is how to turn some of the logged items that are reported from my system as "unexpected response" into a usable event. For example, I have a PICO RF control configured in my RR2 system. I have the device activated in RR2 but it is not programmed to do any actions within the RR2 software specifically. The reason that I have done it this way is so that I can have it do "other" things that the RR2 software would not allow me too by using EG as the third party integration. The PICO control shows a unique response in the EG log for each button press and release; but they do not show up as events with the lighting bolt, they show up as "unexpected response: ~device,20,4,3 (for example) and are preceded with an icon that is an small exclamation mark on the left.
Is there anyway that I can have EG interperet these logged "responses" as events in order to have the PICO trigger unique actions in EG? The advantage of this for one example would be this:
In RR2 if you program a 5 button PICO to a load or scene, you can only control that load or scene with ON, OFF, PRESET, RAISE and LOWER.
If you were to interperet however the button presses with EG on a PICO that is not programmed to a specific load in RR2, you could turn the button presses into what ever "raw" command you want to send back to the RR2 processor using the "responses" unique to the button press and release, thereby turning a five button PICO into a device that could literally send 10 different commands (one for press, one for release of each of 5 buttons) to the RR2 processor. It would not longer be a slave to a single load or scene as the RR2 configuration software would have it. Furthermore, you could be able to control things external to the RR2 system with the PICO control using EG as the intermediary.
I hope that have used the terms "response" "command" "event" "action" appropriately to articulate clearly what I am actually asking here. I do appreciate any feed back at all.
Sincerely,
C.
I have installed and tried your RR2 plugin and have made a connection to my system. I have read the documentation and have played around with a few of the preset commands by entering the integration information generated by my RR2 configuration software. I am very new (as of today) to attempting to do anything with EG and have some questions that I am not sure belong in this plugin post or best suited for another.
Executing commands specific to my RR2 system from the pre-set command macros in EG renders LED and OUTPUT "events" in the log on the left of the screen, this is fine and I understand that I can "drag" these events into the command tree on the right and have the event trigger other actions. What i cannot figure out however, is how to turn some of the logged items that are reported from my system as "unexpected response" into a usable event. For example, I have a PICO RF control configured in my RR2 system. I have the device activated in RR2 but it is not programmed to do any actions within the RR2 software specifically. The reason that I have done it this way is so that I can have it do "other" things that the RR2 software would not allow me too by using EG as the third party integration. The PICO control shows a unique response in the EG log for each button press and release; but they do not show up as events with the lighting bolt, they show up as "unexpected response: ~device,20,4,3 (for example) and are preceded with an icon that is an small exclamation mark on the left.
Is there anyway that I can have EG interperet these logged "responses" as events in order to have the PICO trigger unique actions in EG? The advantage of this for one example would be this:
In RR2 if you program a 5 button PICO to a load or scene, you can only control that load or scene with ON, OFF, PRESET, RAISE and LOWER.
If you were to interperet however the button presses with EG on a PICO that is not programmed to a specific load in RR2, you could turn the button presses into what ever "raw" command you want to send back to the RR2 processor using the "responses" unique to the button press and release, thereby turning a five button PICO into a device that could literally send 10 different commands (one for press, one for release of each of 5 buttons) to the RR2 processor. It would not longer be a slave to a single load or scene as the RR2 configuration software would have it. Furthermore, you could be able to control things external to the RR2 system with the PICO control using EG as the intermediary.
I hope that have used the terms "response" "command" "event" "action" appropriately to articulate clearly what I am actually asking here. I do appreciate any feed back at all.
Sincerely,
C.
Re: Lutron RadioRa2
Crunchie,
The "unexpected" response is simply the error handling that I added into the plugin. Basically, the original intent was to define all devices in the RA2 plugin at the top there (inside the plugin PY) - where you set the device ids, descriptions, and then also what type of device it is. This allows the plugin to send and interpret the proper commands and responses to the items in your system. If you have a device on your RA2 system that is not defined in the plugin, then this would trigger the error handling (e.g. "unexpected response") when it picks up an event from the repeater that it does not know how to interpret.
I'm not exactly sure what you have or what you are trying to do, but it sounds like what needs to happen, is that the Pico device needs to be coded into the plugin, and then additionally, you need to make sure you program your devices into the plugin configuration before importing the plugin into EG. I do not own any pico devices, so I did not bother to put this into the plugin.
Please let me know if this makes any sense.
Thanks
The "unexpected" response is simply the error handling that I added into the plugin. Basically, the original intent was to define all devices in the RA2 plugin at the top there (inside the plugin PY) - where you set the device ids, descriptions, and then also what type of device it is. This allows the plugin to send and interpret the proper commands and responses to the items in your system. If you have a device on your RA2 system that is not defined in the plugin, then this would trigger the error handling (e.g. "unexpected response") when it picks up an event from the repeater that it does not know how to interpret.
I'm not exactly sure what you have or what you are trying to do, but it sounds like what needs to happen, is that the Pico device needs to be coded into the plugin, and then additionally, you need to make sure you program your devices into the plugin configuration before importing the plugin into EG. I do not own any pico devices, so I did not bother to put this into the plugin.
Please let me know if this makes any sense.
Thanks
Re: Lutron RadioRa2
Hi Rdgerken,
I think that key is that as you state, some coding needs to be done to make what I want to work happen. I would also mention that it is not just the pico button presses that show up as "unexpected responses" however. I have some keypads as well that if the buttons are physically pressed in the "real world" elicit the same response. It only seems to be output actions that actually "trigger" events. I am just starting to learn Python so I am no where near the level to make the modifications to the code that you have written to make this happen, but learning is fun and having your code as as the basis of an interesting project for me to apply what I will learn in python is an added bonus. Can you tell me what version of Python that this is written in? I have been studying your plugin and trying to figure out the TriggerEvent parts so that I can understand how to make the unexpected responses be coded to elicit an event in EG to this end.
Pico's are just another "device" in the system so if there is some code that turns a ~device,x,x,x into an event with the specifics of integration and component it will work for not only the PICOS but for all other button pushes as well on VCRX, Keypads etc.
thanks for your reply and I hope to carry it further in time.
Best
C.
I think that key is that as you state, some coding needs to be done to make what I want to work happen. I would also mention that it is not just the pico button presses that show up as "unexpected responses" however. I have some keypads as well that if the buttons are physically pressed in the "real world" elicit the same response. It only seems to be output actions that actually "trigger" events. I am just starting to learn Python so I am no where near the level to make the modifications to the code that you have written to make this happen, but learning is fun and having your code as as the basis of an interesting project for me to apply what I will learn in python is an added bonus. Can you tell me what version of Python that this is written in? I have been studying your plugin and trying to figure out the TriggerEvent parts so that I can understand how to make the unexpected responses be coded to elicit an event in EG to this end.
Pico's are just another "device" in the system so if there is some code that turns a ~device,x,x,x into an event with the specifics of integration and component it will work for not only the PICOS but for all other button pushes as well on VCRX, Keypads etc.
thanks for your reply and I hope to carry it further in time.
Best
C.
Re: Lutron RadioRa2
All,
I have improved the plugin. I have added Pico support, and I also went back and cleaned up some issues with LED control. I also found some other issues that I cleaned up as well.
On firmware version 6.2.0 - I'm having the following issues which I think might be issues in the Lutron Firmware.
*UPDATE 2 - Apparently the Flash/Rapidflash is by design. I'm told the keypads don't support that feature. I'll leave it in the plugin though, because the LED state is honored in the firmware and reports back those states - even though the hardware doesn't. Still no more information on the issue when flashing an output.
VERSION REMOVED - SEE LATER POSTS
I have improved the plugin. I have added Pico support, and I also went back and cleaned up some issues with LED control. I also found some other issues that I cleaned up as well.
On firmware version 6.2.0 - I'm having the following issues which I think might be issues in the Lutron Firmware.
- When sending a command to flash the output of a dimmer / switch - my entire system flashes, not just the one output I'm commanding. So, even though I think I programmed this properly, use at your own risk. (I got the same results when sending the command via raw telnet session)
- When sending a command to flash or rapidflash the LED of a wall keypad / hybrid keypad - the actual LED doesn't do anything (Off and On seem to work fine). However, when viewing keypad in Home+, it shows the way that it is supposed to. There is a footnote in the integration protocol about this, but I don't understand what they mean.
*UPDATE 2 - Apparently the Flash/Rapidflash is by design. I'm told the keypads don't support that feature. I'll leave it in the plugin though, because the LED state is honored in the firmware and reports back those states - even though the hardware doesn't. Still no more information on the issue when flashing an output.
VERSION REMOVED - SEE LATER POSTS
Last edited by rdgerken on Thu Nov 21, 2013 2:16 am, edited 2 times in total.
Re: Lutron RadioRa2
*Added TIMECLOCK Actions and Events
*Improved Code comments and instructions
The motivation for adding TIMECLOCK to the plugin is for the following reasons:
1. Access to the astronomic clock for sunrise / sunset times.
2. The ability to enable / disable motion sensors on demand.
3. Change the TIMECLOCK mode.
* File has been updated - I made a small error in that timeclock actions could get created with spaces in the classnames, which is not allowed. You would only see this if you used the "copy as python" on the timeclock actions - I think. Also, when sending a command to fire a timeclock event, the data coming back from the repeater (which triggers the event) does not seem to have any specific order. It is always consistent, so you can program it as such - but I don't understand the method to the madness when it comes to identifying the timeclock event monitoring. For example - you might have events 2,3,4,5 - but when you fire a 2, you may get a 3 back - when you fire a 3, you may get a 5 back, etc. You just have to match them up manually I guess.
*Improved Code comments and instructions
The motivation for adding TIMECLOCK to the plugin is for the following reasons:
1. Access to the astronomic clock for sunrise / sunset times.
2. The ability to enable / disable motion sensors on demand.
3. Change the TIMECLOCK mode.
* File has been updated - I made a small error in that timeclock actions could get created with spaces in the classnames, which is not allowed. You would only see this if you used the "copy as python" on the timeclock actions - I think. Also, when sending a command to fire a timeclock event, the data coming back from the repeater (which triggers the event) does not seem to have any specific order. It is always consistent, so you can program it as such - but I don't understand the method to the madness when it comes to identifying the timeclock event monitoring. For example - you might have events 2,3,4,5 - but when you fire a 2, you may get a 3 back - when you fire a 3, you may get a 5 back, etc. You just have to match them up manually I guess.
- Attachments
-
- __init__.py
- TIMECLOCK Added, Improved comments/instructions - BUGFIX
- (49.45 KiB) Downloaded 245 times
Re: Lutron RadioRa2
There are some nice improvements in this version:
* Added Icon
* Cleaned up code even more
* Added an "Authenticated" event - I had some issues where certain EG macros were firing before the login had occurred. With this event added, you now have a way to trigger off of this Authenticated event instead of something like Main.Init
* Added better error handling in the event that a command is attempted before the login process is complete - which is also where the "Authenticated" event comes into play.
* Restructured core data listening code. Previous code used the arbitrary collect_incoming_data buffer for processing - It was not using the found_terminator search call to process data. This should improve incoming data processing dramatically - if you have ever gotten a situation where incoming data was run together and couldn't be parsed. This happened occasionally for me in the past, and I'm hoping this will correct that.
* Added Icon
* Cleaned up code even more
* Added an "Authenticated" event - I had some issues where certain EG macros were firing before the login had occurred. With this event added, you now have a way to trigger off of this Authenticated event instead of something like Main.Init
* Added better error handling in the event that a command is attempted before the login process is complete - which is also where the "Authenticated" event comes into play.
* Restructured core data listening code. Previous code used the arbitrary collect_incoming_data buffer for processing - It was not using the found_terminator search call to process data. This should improve incoming data processing dramatically - if you have ever gotten a situation where incoming data was run together and couldn't be parsed. This happened occasionally for me in the past, and I'm hoping this will correct that.
- Attachments
-
- __init__.py
- Authentication Event, Incoming Data processing improvements
- (57.05 KiB) Downloaded 227 times
Re: Lutron RadioRa2
I have written some python code which extracts the configuration directly from the main repeater, so that the configuration can be done on the fly instead of needing to modify the py file directly. I am not sure if the value equation is there though... sure, it'd be a nice feature to fully develop, but I don't know if it's really worth it at this point. If anyone is interested in this functionality, let me know.
-
Killedbyalbany
- Posts: 7
- Joined: Thu Apr 29, 2010 2:36 pm
Re: Lutron RadioRa2
Oh wow, I checked out for a while on this. Glad to see there is RR2 support in such active development.
I'm not much for coding, but I am an RR2 dealer with a lot of equipment at my disposal, so shout if you need anything tested, etc.
I'm not much for coding, but I am an RR2 dealer with a lot of equipment at my disposal, so shout if you need anything tested, etc.
Re: Lutron RadioRa2
Hey Killed...
I wouldn't say there is huge active development... it's really just been me, myself, and I working on it. Nobody has really gotten involved from the community unfortunately. I am very pleased with the improvements and additions I have made to the plugin. I've been using it for quite some time now, and it does the job nicely and has been rock solid. I am still learning python and also wxpython, so I hope to use this as a little project to continue to learn. As I mentioned in a previous post, I have the python worked out that will automatically load the configuration into the plugin from the main repeater, but the only part I currently don't know how to do is all the graphics stuff - and therefore have yet to implement any of that into the plugin thus far. Maybe once I learn that, I can implement something a little more user friendly.
That being said, I appreciate your offer to do some testing. I have a few items supported in the plugin that I have not been able to test, because I don't own any of those devices.
Currently, the plugin supports VCRX and Pico - but I don't have either of those, so those have not been tested. If you feel like getting involved, I would appreciate any feedback on how those work. I would LOVE to have some feedback from someone - anyone! I am not sure why anyone who has a RadioRA2 system would not have this plugin installed on their system - the conditional logic that you can implement really is a must have in my opinion.
Thanks,
Ryan
I wouldn't say there is huge active development... it's really just been me, myself, and I working on it. Nobody has really gotten involved from the community unfortunately. I am very pleased with the improvements and additions I have made to the plugin. I've been using it for quite some time now, and it does the job nicely and has been rock solid. I am still learning python and also wxpython, so I hope to use this as a little project to continue to learn. As I mentioned in a previous post, I have the python worked out that will automatically load the configuration into the plugin from the main repeater, but the only part I currently don't know how to do is all the graphics stuff - and therefore have yet to implement any of that into the plugin thus far. Maybe once I learn that, I can implement something a little more user friendly.
That being said, I appreciate your offer to do some testing. I have a few items supported in the plugin that I have not been able to test, because I don't own any of those devices.
Currently, the plugin supports VCRX and Pico - but I don't have either of those, so those have not been tested. If you feel like getting involved, I would appreciate any feedback on how those work. I would LOVE to have some feedback from someone - anyone! I am not sure why anyone who has a RadioRA2 system would not have this plugin installed on their system - the conditional logic that you can implement really is a must have in my opinion.
Thanks,
Ryan
Re: Lutron RadioRa2
Hi rdgerken
I just installed eventghost and your RadioRA 2 plugin. I am trying to add conditional logic to my system but I am a bit confused on how to do it. The plugin is already installed and I added 4 devices so that i could do some tests.
I have keypads placed outside the rooms in the house. So when i go in, i can turn on one set of lights in the room, and when i go out i can turn the entire room off. Currently i have one button on the keypad that turns one set of lights in the room (and can also turn this set of lights off), and i have another button set to "room monitoring" which turns all lights in the room off (including the bathroom lights and walking closet). When i go in I press Button 1, and when i go out I press Button 2.
What i want to do is have this done with only one button. So i would program the button to "room monitoring" for all lights in the room, and i would like eventghost to check for LED status every time the button is pressed. If the button is pressed and LED is off, that means that all the lights where off before the button was pressed and eventghost should turn on only one set of lights and set the LED to on. If the LED was On when the button was pressed, i want eventghost to do nothing, and the the Lutron repeater would turn all lights off.
I already know how to get led state, and set led state, press a button or set a light to a level, but have no idea how to do the If Then part.
I would greatly appreciate if you could give me some pointers on this.
I just installed eventghost and your RadioRA 2 plugin. I am trying to add conditional logic to my system but I am a bit confused on how to do it. The plugin is already installed and I added 4 devices so that i could do some tests.
I have keypads placed outside the rooms in the house. So when i go in, i can turn on one set of lights in the room, and when i go out i can turn the entire room off. Currently i have one button on the keypad that turns one set of lights in the room (and can also turn this set of lights off), and i have another button set to "room monitoring" which turns all lights in the room off (including the bathroom lights and walking closet). When i go in I press Button 1, and when i go out I press Button 2.
What i want to do is have this done with only one button. So i would program the button to "room monitoring" for all lights in the room, and i would like eventghost to check for LED status every time the button is pressed. If the button is pressed and LED is off, that means that all the lights where off before the button was pressed and eventghost should turn on only one set of lights and set the LED to on. If the LED was On when the button was pressed, i want eventghost to do nothing, and the the Lutron repeater would turn all lights off.
I already know how to get led state, and set led state, press a button or set a light to a level, but have no idea how to do the If Then part.
I would greatly appreciate if you could give me some pointers on this.
Re: Lutron RadioRa2
Mike,
Due to the nature of everything being asynchronous (and me never being able figure out how to do an async callback), it's fairly complex to do what you are asking - but it is possible.
I have set up a fairly complex macro for a "Shower" scene in my master bathroom, that while running, is abortable - and indicated via the LED state. I don't know if this will help you or not, but I suspect it will. Another thing to keep in mind, I believe there can be no programming on the button that you are using in the RA2 software - otherwise RA2 will always be updating that LED with it's programmed state. In the example I provide, there is no programming in the RA2 software for this button, and everything is done by EG. Also, I don't think the RA2 hardware supports slow flash, fast flash LED states. You can use them, but they will just come on solid. However, in the iOS and Android apps, the flashing shows correctly.
The contents of the Python Script for "Conditional Set Master Bathroom Sink Level" is here, since it's not viewable in the attached screenshot:
By all means, there may be a better way to do this, but this is what I came up with. Also, if you are wondering why I use single script / script actions for everything - that's so when I update the plugin, I don't break everything - as EG doesn't make the connection to these actions if I want to remove the RA2 plugin. Also, right clicking the RA2 plugin actions that are created for you, copy as python / paste into your macro python scripts - is your best friend when setting up macros like this.
Good luck,
Ryan
Due to the nature of everything being asynchronous (and me never being able figure out how to do an async callback), it's fairly complex to do what you are asking - but it is possible.
I have set up a fairly complex macro for a "Shower" scene in my master bathroom, that while running, is abortable - and indicated via the LED state. I don't know if this will help you or not, but I suspect it will. Another thing to keep in mind, I believe there can be no programming on the button that you are using in the RA2 software - otherwise RA2 will always be updating that LED with it's programmed state. In the example I provide, there is no programming in the RA2 software for this button, and everything is done by EG. Also, I don't think the RA2 hardware supports slow flash, fast flash LED states. You can use them, but they will just come on solid. However, in the iOS and Android apps, the flashing shows correctly.
The contents of the Python Script for "Conditional Set Master Bathroom Sink Level" is here, since it's not viewable in the attached screenshot:
Code: Select all
if eg.event.payload[0] == "0":
eg.plugins.LutronRadioRA2.MaestroSetZoneLevel65(u'50,4')Good luck,
Ryan
Re: Lutron RadioRa2
Hello again Ryan / rdgerjken
Your information was extremely helpful. Thanks!
It took me a while to understand but i think i finally got it.
Attached is the screenshot of what i did.
I also followed your advice on copying the commands to phyton.
I tested this only for a few minutes and it also works even if you switch the lights on or off manually from a dimmer or from the home control app.
The only problem is that if for some reason you manually disable or enable one of the macros in EG that are supposed to be auto enabled or autodisabled, the first time you press the button to turn off all lights, the lights will come one again automatically, which is anoying, buy after that happens it starts working again, plus there should be no reason for the macros to manually enable or disable themselves other that some weird system crash (i think).
Ill keep testing for a few days, and post back if i change something.
Now i am going to try this with the shades. My shades have somfy motors, conected to a vcrx and some relays that prevent the motors from trying to go up and down at the same time if someone presses them simultaneously.
Right now i am using 3 buttons for each shade, one up, another down, and the third for stop.
Ill try to combine all functions into one button.
For this may i ask you how can i declare variables that retain the information in them and that can be used across several macros?
I want to use this to let EG know which way the shades were moving the last time they moved.
Ill post back when i do the shades.
Again, i cannot thank you enough for the information you gave me.
Your information was extremely helpful. Thanks!
It took me a while to understand but i think i finally got it.
Attached is the screenshot of what i did.
I also followed your advice on copying the commands to phyton.
I tested this only for a few minutes and it also works even if you switch the lights on or off manually from a dimmer or from the home control app.
The only problem is that if for some reason you manually disable or enable one of the macros in EG that are supposed to be auto enabled or autodisabled, the first time you press the button to turn off all lights, the lights will come one again automatically, which is anoying, buy after that happens it starts working again, plus there should be no reason for the macros to manually enable or disable themselves other that some weird system crash (i think).
Ill keep testing for a few days, and post back if i change something.
Now i am going to try this with the shades. My shades have somfy motors, conected to a vcrx and some relays that prevent the motors from trying to go up and down at the same time if someone presses them simultaneously.
Right now i am using 3 buttons for each shade, one up, another down, and the third for stop.
Ill try to combine all functions into one button.
For this may i ask you how can i declare variables that retain the information in them and that can be used across several macros?
I want to use this to let EG know which way the shades were moving the last time they moved.
Ill post back when i do the shades.
Again, i cannot thank you enough for the information you gave me.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Lutron RadioRa2
The thing is that as soon as you disable/enable something, EG considers this as a changed configuration but it is not saved automatically. To keep this persistent (means that it hopefully will survive eventual system crashes and restarts) you need to save the configuration every time it is changed. You can do this by simply adding the following python command at the end of each macro... there should be no reason for the macros to manually enable or disable themselves other that some weird system crash (i think).
Code: Select all
eg.document.Save()My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Lutron RadioRa2
Hello
I have been using eventghost for the past few weeks and the macros work well
But I am having big delays between actions.
When I turn on a lutron light from a lutron keypad without eventghost, the light goes on instantly.
When I turn on a lutron light from an eventghost macro, it takes over one second for the light to turn on. Sometimes even 2 seconds.
The eventghost machine is wired to a router, and the radiora repeater is wired to the same router.
How can I eliminate this delay.
I posted a copy of my macro a couple of posts above this post.
I have been using eventghost for the past few weeks and the macros work well
But I am having big delays between actions.
When I turn on a lutron light from a lutron keypad without eventghost, the light goes on instantly.
When I turn on a lutron light from an eventghost macro, it takes over one second for the light to turn on. Sometimes even 2 seconds.
The eventghost machine is wired to a router, and the radiora repeater is wired to the same router.
How can I eliminate this delay.
I posted a copy of my macro a couple of posts above this post.