ThingLayer: An open source real-time web interface for IoT

Awesome work. Have you thought about open-sourcing this? Would love to build a tutorial out of this.

Ditto. Closest to what I’d like to see as a UI that I’ve seen so far.

@mager I am going to open source the server and put everything on github. I am in the process of building my own nav and sidebar as those are part of a closed source template that I purchased for another project. As soon as I am using all open source parts, I will put the project on github.

Question:

If another smart things user wants to try this out, will they have to install my oauth smart app to see their devices or will they get their devices when they go through the oauth flow? The app has it’s own authentication mechanism and the devices are partitioned by user on my server, but I don’t have another smart things account to test out importing someone elses devices.

Some specs on the app:

Rails 4.1
Devise for local user accounts
Ominauth for handle oauth2
mysql - for long term data storage
firebase - for real time events
I have written a ruby api wrapper that can talk to the smart app endpoints for most devices that smart things supports.

For example @user.smartthings.switces returns a json list of all of the users switches. The same goes for @user.smartthings.contacts

The oauth provider for ominiauth is already on my github, and the ruby api client will be on github as a separate gem if anyone wants to talk to smartthings with their own ruby/rails app.

2 Likes

As soon as I find out if you will need to install the smart app I am going to open my server to some beta testers. In the next two weeks all the code will be on github for those that want to contribute or build their own servers. I am writing the docs as I go but there are a lot of moving parts.

1 Like

I think they would have to create their own SmartApp based on your code because of the server element. I noticed you’re using your local network.

Maybe there is a way to make it generic by using localhost or something. Or if you’re using Ruby, they could use something Rack-based like Pow.

That is just my development box address. The hosted version will be located at https://thinglayer.net

If you would like to try it out:

Create an account
Create a location
Under location add a zone

Once you have a zone set up click services and connect your account to smartthings. Select just a few devices and finish the oAuth process.

Click the import link under smartthings

You should land on the things page where you can edit the new things and assign them to a zone and give them a descriptive name.

They should now populate on the dashboard and the zone page.

https://thinglayer.net

be gentle - it’s very alpha

1 Like

I’ve certainly upset it. Was able to import some devices and assign them to a zone but if I try to click dashboard I get a message ā€œWe’re sorry, but something went wrong.ā€

I also get the same error as Matt. Can you add lock to it? Like the look and feel of the webapp. Thanks for the hardwork.

What kind of devices @mattjfrank and yes I can add locks. The main goal was to see if you could import your devices via my smartapp. I will look into the errors first thing in the morning. My ISP is doing network upgrades at the moment.

Ok. The issue is that there is a lag time between when you authroize the devices and when their data makes it across. The quick fix is to trigger some event on each device you have added to a zone. Turn the lights on or off, open or shut the door, etc. When there are no events it is throwing an error. I won’t be able to fix this till the morning.

@jodyalbritton I removed the devices last night before going to bed because for some reason the devices I added are no longer responding to me. :frowning: I just ran a repair a bit ago and that didn’t seem to work. I’ll likely have to exclude them.

I added a few devices from my living room and dining room. Couple GE Bulbs, Couple Hue Bulbs, and a few virtual switches that control dual relay controllers.

[edit: The devices respond, the repair must have fixed the problem.]

Not sure what could have happened there with the non responding devices. I just pushed an update that fixes the missing events issues, added locks and batteries, and made some cosmetic changes. If you care to try again and let me know if you get the device non responding issue.

I added the locks and few other updates.

I don’t think I can handle dual relays at this point, probably best to avoid adding them. In the logs they generate two of the same type of switch event.

I didn’t add the dual relay devices. I added the virtual switches that control them independently. I took get errors in my logs related to the actual devices but not to the virtual switches that control them. I will try again adding 1 device at a time starting with devices that are not dual relay.

It appears I have broke it again, here is what I ran into.

  • Logging in, it kept telling me wrong password but it wasn’t. After I tried to register again it let me login.
  • Once logged in, my devices were still there with no way to remove them, even though I’d deleted the ST integration last night.
  • When trying to readd ST integration with 1 device, I received an error that it could not.
  • When going back to thinglayer.net now all I get is an error page.

Wow, it’s not often you see a video demo and the real thing lives up to it. But this definitely does.

What a great start!

This morning I tried setting this up and now I am not able to get past the log in screen.

I sent you a pm @cassmie

Anyone else that has login problems, feel free to pm me.