Samsung SmartThings Integration

pete_c said:
Understood Ano.

Yes the Zigbee wireless devices were being tested with two Almond + and one Almond 2015 hub devices which are currently in off mode; I tested the HAI ZIM with only one appliance and one lamp module (the other wireless stuff doesn't connect to the ZIM).

The current VRCOP Z-Wave network is a duplicate of the Z-Wave dot me network except that the status of the devices are not seen to change between the two controllers (IE: one network with two controllers).

Primary lighting switches here are all UPB (inside and outside lighting) and X10 (Christmas).

The Zigbee devices have only been used to tinker with (Securfi door switches, PIRs, water switches, appliance and lamp modules - no wall switches).

BTW this is just really to get familiar first with the Samsung Smarthub as I will be just using it with the OP2 panel devices (and Amazon Alexa stuff). The only reason I got the Samsung hub was for rsw686's new stuff.

I wish that Samsung had a bit more than the mobile apps / W10 tiles stuff. Securifi has a Almond management web interface, touchscreen interface and mobile apps to manage it. They left the OpenWRT interface in place so you can do both for router management. Well too the Amazon Alexa. (sans cloud or with cloud these days).

 
To me the SmartThings app looks very primitive and unpolished.  Techies might think its OK, but for average users, I'm not so sure. 
 
Yeah here I still am going baby steps with it so do not have comments.
 
That said relating to the Securifi Almond + initial look see (before release) I had the same feelings about it. (primitive and unpolished).
 
I did have two faces (modes of helping) ; one for the forum and one internal.
 
Over the years much of the development has been pushed to the users of it (doing it for free).
 
Internal development issues were mostly lack of programmers, management of said programmers, willy nilly guidance and a major language barrier. 

I have seen similar in the use of subcontracting overseas entities many years ago and wife has seen the same training folks overseas for call center operations here for a big bank.
 
cobra said:
For the HAI SDK info? I think that's dead. I filled it out a few months back and never heard anything. Use the links posted in this thread for what's available online.
I did get a reply email and got access. Played around with the version of the SDK Ryan linked, as well as old ones. Got it to connect to OmniLink 1, but the classes are just not documented for OmniLink 1 well enough for me to get all the code changed. So bought an upgrade chip. Popped in, changed CoreServer.cs to set the model to Omni IIe, instead of the default constructor which is OmniPro II. BTW I emailed tech support and they were pretty responsive. That's how I figured out how to connect to IIe.
 
So now my problem is the smartapp doesn't add the devices, even though HAILogger sees all the switches and thermostats. Livelog says welcome=null. I checked I can access the logger from outside of my firewall. There is a configuration for Area. Is that just 1?
 
Thanks for your help. It's a well written piece of code!
 
junying said:
I did get a reply email and got access. Played around with the version of the SDK Ryan linked, as well as old ones. Got it to connect to OmniLink 1, but the classes are just not documented for OmniLink 1 well enough for me to get all the code changed. So bought an upgrade chip. Popped in, changed CoreServer.cs to set the model to Omni IIe, instead of the default constructor which is OmniPro II. BTW I emailed tech support and they were pretty responsive. That's how I figured out how to connect to IIe.
 
So now my problem is the smartapp doesn't add the devices, even though HAILogger sees all the switches and thermostats. Livelog says welcome=null. I checked I can access the logger from outside of my firewall. There is a configuration for Area. Is that just 1?
 
Thanks for your help. It's a well written piece of code!
 
HAILogger doesn't need to be exposed to the outside. It communicated over the LAN to the SmartThings hub, when in turn communicates with the SmartThings cloud. The configuration for Area should be 1 (2, 3, etc) for the area you want the SmartThings mode to follow. Basically when you arm area 1 to away the mode on SmartThings will change to away as well.
 
Check that you can access the API from a web browser on your network by going to http://HAILoggerIPAddressHere:8000/ListZonesContact If that works then the SmartThings app should work. You did add all the Device Handlers to SmartThings IDE when you added the SmartApp to the IDE right?
 
rsw686 said:
HAILogger doesn't need to be exposed to the outside. It communicated over the LAN to the SmartThings hub, when in turn communicates with the SmartThings cloud. The configuration for Area should be 1 (2, 3, etc) for the area you want the SmartThings mode to follow. Basically when you arm area 1 to away the mode on SmartThings will change to away as well.
 
Check that you can access the API from a web browser on your network by going to http://HAILoggerIPAddressHere:8000/ListZonesContact If that works then the SmartThings app should work. You did add all the Device Handlers to SmartThings IDE when you added the SmartApp to the IDE right?
Ah local IP. That was the difference. Once I changed it over everything worked perfect. Thank you!
 
junying said:
Ah local IP. That was the difference. Once I changed it over everything worked perfect. Thank you!
Just noticed ListThermostats shows only 3, even though the logger sees 4 in ThermostatStatus. Any idea where it might be in the code? I know the IIe can support 4 Thermostats. Thanks.
 
junying said:
Just noticed ListThermostats shows only 3, even though the logger sees 4 in ThermostatStatus. Any idea where it might be in the code? I know the IIe can support 4 Thermostats. Thanks.
OK found it. In HAIService.ListThermostats, your for loop is "i < WebService.HAC.Thermostats.Count", when it should be "<=". Should I submit a patch or do you just want to fix it?
 
It truely is a masterful set of code! Thank you so much.
 
:angry2: Things were working great for a while.  Now when I restart the logger I get the following error: ERROR: WebService: An exception occurred: HTTP could not register URL http://+:8000/. Your process does not have access rights to this namespace.
 
Any advice? I did remove MySQL because I wasn't using it. I'm not sure what I changed to stopped it from working. 
 
Thanks.
 
ano,
 
That error message is saying there is a conflict for that port / url. Please check that you don't have another instance of the logger running. You can also use these commands in a command prompt to verify what is running on that port / url.
 
netstat -a
netsh http show urlacl
 
Nevermind, I solved it. Had to select "Run as Administer" even know my account is an administrator account.
 
rsw686 this is some really impressive work.  I do a fair amount of coding and I can tell this took a really long time.  I have two issues.  One is installing the service I get a message that says "this assembly was built by a runtime newer than its currently loaded runtime."  The main app is running with .Net 4.5.2 installed.  I assume the installer was created with .Net 2 or 3?  I am updating windows now and going to make sure all the .Net frameworks are installed.
 
The second part is I installed all the device files and connected it to smartthings.  It found all the devices and all that is working awesome.   It won't seem to change the status of smartthings when arming and disarming from the Omni Pro.  It doesn't do anything at all. I see the status changing in the logs on HAILogger.
 
You have the mappings like this:  
 
FF, DAY -> Home
NIGHT -> Night
AWAY -> Away
VACATION -> Vacation 
 
My Smartthings out of the box only has Armed (Away), Armed (Home) and Disarmed.  Do I have to add the others?
 
Also is there a way to have smartthings move to disarm when the omni is set to off when I do get that working or is that already setup like that?
 
I do see Area 1 changing the status in the Smartthings app from Off to Day and Away but the smartthings status never changes.  Do I have to setup an automation rule to watch Area 1 to change the status of the smartthings status?
 
Thanks again,  This is really awesome stuff!
 
rsw686 you can ignore my last post.  I was confused by the location mode vs the armed mode on smartthings.  I didn't realize they were two different things.  I assumed the alarm mode of smarthings would reflect the mode of the Omni pro but then saw the Mode on the status screen and saw it changing. 
 
Is there not an advantage to setting the security mode in conjunction with the Omni or is that not even possible?
 
Thanks
 
So using Smarttiles since HAILogger doesn't sync with the smartthings alarm status I tried to add the Area 1 to my tiles but it only shows Area 1 and it in the closed state instead of the nice color circle with the AWAY, HOME or OFF status.  Has anyone modified the tile to show the actual status?  Here is a screen shot:
 
 
 

Attachments

  • 1-9-2017 11-28-54 AM.jpg
    1-9-2017 11-28-54 AM.jpg
    16.8 KB · Views: 10
I modified the code a little to arm the Smartthings hub so it matched the Omni.  Just modify the OmniPro Area Device handler and change the code under the parsefromparent(data) function.  I added OFF so it would show disarmed on the Smartthings hub when the Omni is disarmed.  Thanks again for integration Ryan, it really is awesome to be able to use our Omni's sensors with smartthings.
 
Code:
if (data.id.toString() == parent.area) {
		if (data.mode == "NIGHT"){
		        parent.setLocationMode("Night")
                        parent.sendLocationEvent(name: "alarmSystemStatus" , value : "stay" )
		}else if (data.mode == "AWAY"){
			parent.setLocationMode("Away")
                        parent.sendLocationEvent(name: "alarmSystemStatus" , value : "away" )
		}else if (data.mode == "VACATION"){
			parent.setLocationMode("Vacation")
                        parent.sendLocationEvent(name: "alarmSystemStatus" , value : "away" )
                 }else if (data.mode == "OFF"){
			parent.setLocationMode("Home")
                        parent.sendLocationEvent(name: "alarmSystemStatus" , value : "off" )
		}else{
		        parent.setLocationMode("Home")
                        parent.sendLocationEvent(name: "alarmSystemStatus" , value : "stay" )
        }
}
 
Back
Top