I’ll be putting in your fixes to the main repo as well. Thank you @adrabkin for your research into this. I had no idea that there would be a length restriction. Yeah I’m also trying to figure out how to debug that command as well. Debugging the http response was easy but not sure about this command.
Edit: Changes have been checked in to github as well. Thanks for the help with that, I don’t know if I would’ve ever noticed that since I don’t have a multi
Note sure that’s needed in the POST command, I just saw that from a successful entry that was coming from the Cloud, so I decided to through it in for good measure.
After looking through some other posts, I think the key for capturing errors is in a callback and tying into physicalgraph.device.HubResponse, but I’m still trying a bunch of things to get it to actually fire on an error.
Ah I gotcha, well its not hurting it Might remove it if it does cause an issue. Yeah I’m looking through some posts as well to find a nice example of how this is accomplished since the documentation doesn’t really tell me much.
I added a Schlage lock to the Splunk App to log my lock/unlock. As soon as I lock/unlock I get the following error in the LiveLogging:
groovy.lang.MissingMethodException: No signature of method: script14636285660451520135105.genericHandlers() is applicable for argument types: (physicalgraph.app.EventWrapper) values: [physicalgraph.app.EventWrapper@126344a6]
Possible solutions: genericHandler(java.lang.Object), energyHandler(java.lang.Object)
Seems as soon as it hits the event handler it craps out.
I am using a custom Device Handler for the Lock.
Diving into the lock device handler to see if I can figure this out
Yeah sadly I don’t have a zwave lock (Yet, really considering a yale because well I like Yale locks) So I can’t really debug this. Let me know how the debugging goes and what the fix will be :).
https://artik.cloud/ has some cool graphing and its free for “hobbyist” usage. ST integration was pretty easy through the smartApp. I only have a few devices on it but it seems pretty nice. There is a data export option.
My other plan is to set up this:
Figure I have artik up and running so I will give it a month or two.
I am fairly new in trying to setting up splunk and programming with smart things. I setup a Splunk-light 6.4 instance, configured a new indexer and called it WilsonST. Can you help me understand if I set up the following correctly?
SSL - From your code, this looks to be a boolean value. I used false in this section because I wanted HTTP instead of HTTPS for splunk.
Local - From your code, this also looks to be a boolean value. I inputted True in this section because I want to connect to my splunk services.
So these are my inputs for each of the 5 questions:
Local Server - False
Splunk Hostname/IP - WilsonST
Use SSL - False
Splunk Port - 8088 (default port)
Splunk Authentication Token - KeyEnteredFromSplunk
You are correct that those items are boolean items. I put in the ssl request per request since initially we were sending the events from ST over the web to the box. But then I looked at how to use the local portion to have the hub just feed the events directly to splunk so that way we don’t have to have the port open on the FW for these events.
So if you have local server set to false and I’m assuming that WilsonST is your splunk server? Should you change local to be true? Also is WilsonST a dns resolvable name? In my case I just plugged in the IP address of the splunk box since I didn’t trust my DNS server Let me know how I can help you get this working. Thanks.
Unfortunately I am not an expert with splunk. (its literately my first time trying to set this up) I was thinking my hostname would be WilsonSt, but that looks more to be the name of my token.
Can you help me understand where my splunk hostname is located?
Local Server - False Splunk Hostname/IP - prd-p-2mm2hg3qnhs8.cloud.splunk.com Use SSL - True Splunk Port - 8089 (default port) Splunk Authentication Token - Token value added for WilsonST
I’m guessing that the 54.175.156.122 is the ip address of the splunk cloud instance.
I myself have a local splunk install. You might want to post on splunk answers and ask what is the best URL for splunk cloud to use the event collector. With a local instance I just point it to the local IP but I’m not sure when it comes to the cloud.
Post in the Splunk Answers and let me know what you get back from there. With the cloud instance it could be a different path which would require another boolean
So when you goto your app, all of your devices will be listed in either the actuator or sensor group. If you then put oauthPage: “deviceAuthorization” as the preference options, you can install the app via OAUTH. With that, you can have your SmartApp isntalled via OAUTH.
So, when you want to subscribe to the events you simply:
and you will subscribe to every single event the device throws out and commands as well. (the commands part is nice as you can verify if a command you sent went out) No need to hard code or manually enter all of the attributes. BTW, this also works well when creating generic Web Services.
I must say, much thanks to https://octoblu.com/ as their SmartApp had a lot of this. Just wanted to pass it along as my logging SmartApp is super small in code.
8089 is the service port for Splunk. You can’t connect to it with a web browser. There is web server like behind it, but its for REST API and event collection.
That IP is your IP of your splunk cloud instance
kris@mqdns1:/tmp> dig prd-p-2mm2hg3qnhs8.cloud.splunk.com
;; ANSWER SECTION:
prd-p-2mm2hg3qnhs8.cloud.splunk.com. 29 IN CNAME elb-prod.us-east-1.a1.cloud.splunk.com.
elb-prod.us-east-1.a1.cloud.splunk.com. 59 IN A 54.85.83.45
Can you try with SSL off. If you have SSL on you will need to get a certificate for it work…