nanowebcoder / NanoVeraHuesBridge

A C# version of a Philips Hues Bridge which allows Amazon Echo to speak to Vera and control lights, doors, stereos and more.
Apache License 2.0
14 stars 4 forks source link

Firewall and Scenes #4

Open eli167 opened 8 years ago

eli167 commented 8 years ago

what do I need to keep open on my firewall? also how to I get a url for a Scenes like 142 or 143 the example in the pdf didn't work one last thing on the Amazon Echo Bridge Configuration how do I change the refresh timer ?

nanowebcoder commented 8 years ago

1) By firewall are you referring to the FW software on the PC or the gateway to the internet? Nothing about the bridge goes over the internet itself, so you do not need to modify a firewall at the gateway. If you want to run a firewall on your PC, then you need to permit the NanoVeraHuesBridgeService.exe to go through the firewall and configure the ports as you have defined them in the config file. For example:

If this is your config:

239.255.255.250
        <setting name="MulticastPort" serializeAs="String">
            <value>1900</value>
        </setting>
        <setting name="LocalIP" serializeAs="String">
            <value>10.10.1.26</value>
        </setting>
        <setting name="LocalPort" serializeAs="String">
            <value>8080</value>
        </setting>

Then PC needs to permit: UDP inbound and outbound on Port 1900 TCP/IP inbound on port 8080

Also, if your Vera is on its standard port (3480), you’ll need to permit TCP/IP on port 3480 (or whatever port you might have configured vera to use).

2) The URL for a scene, looks something like this:

a. http://10.10.1.91:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=14&output_format=json So its composed: http://{HOST}:{PORT}/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum={SCENE_NUM}&output_format=jsonhttp://%7bHOST%7d:%7bPORT%7d/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=%7bSCENE_NUM%7d&output_format=json Where HOST and PORT are your vera’s IP and port (3480 is standard). SCENE_NUM a couple of ways. What I use is the XML dump of the vera configuration:

http://{host}:{port}/data_request?id=user_data2&output_format=xml

Then search through the resulting XML for the name of your scene and you’ll find a block of XML like so. The ID num is highlighted below:

            You can test the URL in your browser.  If doesn’t work, you should get a response back from vera (assuming you have the right IP and port) that explains why it didn’t work (most likely reason is you didn’t use the correct scene num).  If it did, you should get a JSON structure back that says success:

{ "u:RunSceneResponse": { "OK": "OK" } }

If you use a non-existent number scene num, I get:

ERROR: Invalid Scene

If your browser gets nothing back, or times out. Then double check the IP address and port number (and make sure your PC’s firewall is letting you get through).

3) As for Amazon Echo Bridge Configuration refresh timer… I don’t know what you are referring to. It has nothing to do with this project.

From: eli167 [mailto:notifications@github.com] Sent: Friday, June 10, 2016 7:13 AM To: nanowebcoder/NanoVeraHuesBridge NanoVeraHuesBridge@noreply.github.com Subject: [nanowebcoder/NanoVeraHuesBridge] Firewall and Scenes (#4)

what do I need to keep open on my firewall? also how to I get a url for a Scenes like 142 or 143 the example in the pdf didn't work one last thing on the Amazon Echo Bridge Configuration how do I change the refresh timer ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/nanowebcoder/NanoVeraHuesBridge/issues/4, or mute the threadhttps://github.com/notifications/unsubscribe/AQjlVG_Hv5AuOCn0-K-2_3lYzEgLP3cFks5qKUa8gaJpZM4Iy2md.