2014-08-08, 12:50
(2014-08-08, 05:58)giftie Wrote: [quote='wo0d1e' pid='1768052' dateline='1407412888']
Can anyone help with a HA query. I posted a little while back and @giftie helped a lot. I am setup in my new home now and everything is up and running including CE. I just still cannot get my LightwaveRF lights to work with the HA script. I know it is something simple I am over looking.
The Lightwave wifi link waits for data packets to be received via UDP on 255.255.255.255 port 9760 then activates the lights depending upon data received. For example I have an app called Irule that I use to control all my HA and media. In the app I have a gateway configured as above ip:255.255.255.255 port:9760 Protocol:UDP a device is assigned which simply sends a data packet to the wifi link. (Example !R2D1F0 = !Room 2 Device 1 Function 0 (OFF) 1= (ON).
So my theory goes that to duplicate the apps abilities I should be able to paste the code: utils.broadcastUDP( "!R2D1F0”, port=9760 ) within the Home_Automation.py script, at each trigger point like so:
The form seems proper, as it is the same that is used in the EventGhost home_automation.py.
Quote:The HA script is enabled in CE settings but can anyone shed any light on why the commands are not being received ? Do I need to put a tick at the end of each "Trigger at the start of" option in the HA settings ?You need to have any of the trigger's enabled in settings, ie the one for the feature presentation, pause and resume.
{quote]
also does the utils.broadcastUDP automatically broadcast over 255.255.255.255 or do I need to tell it somewhere in the script?
{/quote]
Yes the utils.broadcastUDP() does default to 255.255.255.255.
Couple of questions:
1> are you modifying the home_automations.py file found inside /userdata/addon_data/script.cinema.experience/ha_scripts ?
2> are you disabling then re-enabling Cinema Experience(in Settings>Addons>Enabled Addons>Program Addons, after you make these changes? This is needed due to the fact there is a part of the script(the part that handles the Pause/Resume) that is always running. There are some skins that have Cinema Experience as a requirement(Ace for instance). This causes the script not to be Disabled, you'll have to restart XBMC to get the same affect.
Also you can use a network packet sniffing program to view the network traffic and see if the broadcast is going out.
Couple of questions:
1> Yes
2> I will try this this evening when I am home from the office, looks to be a good start point Giftie. With Openelec XBMC running and CE I generally have mapped to /userdata/addon_data/script.cinema.experience/ha_scripts opened the script with Text Edit on Mac and made amendments. Then I have tested. I have never disabled the add-on first. Good Idea.
I will give the above a go and then fire up Wireshark if its a no go. I'm just glad the script layout looks good. I am sure it will be resolved in no time with your troubleshooting tips. :-)