[ALPHA] BayWeb Thermostat Device Handler

I still have an older cloud connected thermostat from BayWeb (http://www.bayweb.com/) that I use which is not officially supported. I created a basic SmartApp and Device Handler for this that enables the basic functionality. It appears to work but may have some limitations. If you still have one of these BayWeb thermostats and want to try this out you will first need to enable the API support in your online account. Then you can clone the smartapp and device handler from my repo here:

You will need to enter your device id and keycode to connect.

If anyone tries this out I would appreciate any feedback. This is my first custom device handler so it has lots of warts.


irion7, I also have a Bayweb. Can you provide more information on how to install the programs you wrote into my hub?


There are a few steps that you need to take on the bayweb site to get setup to use this.

  1. Login to your bayweb account, on the dashboard page find the widget for your thermostat. Click the dropdown arrow and choose settings.
  2. On the settings page, go to the API tab. Click the box next to enable API. Set the API access to Read and Write, and next to Key click the box labeled Generate new key.
  3. Take note of your device ID and Key, you need these later.

With the API access setup on your bayweb account you can now setup the Smartthings access. Using the Smartthings Web IDE, first create a new Device Handler from code and copy the Device Handler code in. Click save, then publish. Next add the SmartApp the same way under your SmartApps.

Once both of those are installed, you go to the Smartthings App, in the Marketplace, under My Apps, select the Bayweb Connect app. Then type in your device Id and Key. Select done at the top right and you should be all set.

I hope this helps.

Thank you for your response. I was able to install the App and Device handler, but after adding the device, when I open the mobile app, none of the data displays (see screen shot). I was able to confirm that API access from Bayweb is working properly. Also, when I used the Simulator in the SmartThings IDE, I received a few ‘java.lang.NullPointerException’ errors (lines 323, 519 & 800). I don’t know enough about Java to troubleshoot these errors. Any ideas?


I’m not sure what the problem is. You could try checking to ensure that your Device ID and KeyCode are entered correctly. I believe that they are case sensitive. You can check them by going to the web ide, then under your location you can list installed smartapps and after you click on Bayweb (Connect) you can verify the deviceid and keycode are correct. If there are errors that show in the error log that may also be helpful.


Hi, just some feedback that stumbled on this today, installed it and got it to work. Thanks for sharing this.

To share with others that may be confused like I was: after using the “Connect” app to setup the connection with the Bayweb API, there’s not a lot of feedback if everything worked correctly, the “Connect” app will just take you back to the previous page without really letting you know it was successful. The next step you should take is to go to the “Things & rooms” page and look under “Things”. You should see a “Bayweb” entry there for the device.

Good to hear that it is working for you. I have been running into issues where it will work the first time every day, but other requests to set the thermostat setpoint fail. I believe I am running into API access limits on Baywebs side. I’m going to email Bayweb support and see if they can increase the API usage allowance, and see if that fixes the problem.

irion7, jaysauls said that the Bayweb device appears after using the “Connect” app to setup the connection with the Bayweb API. This didn’t happen for me so I installed the device manually (and had no data). Today I ran the SmartApp in the Simulator and it appears to work properly – however when I did the same with the Device Handler it failed. Then I re-installed the Device Handler with the same result:

b78accb2-a280-465a-bdcd-3246e060a5e9 4:58:52 PM: error java.lang.NullPointerException: Cannot invoke method pollChildren() on null object @ line 145
b78accb2-a280-465a-bdcd-3246e060a5e9 4:58:52 PM: debug Executing ‘poll’ using parent SmartApp
b78accb2-a280-465a-bdcd-3246e060a5e9 4:58:52 PM: debug refresh called

It works for you and jaysauls so I’m doing something wrong. Any ideas?

I got Device Handler and SmartApps install and my ID and Key set in the Simulator’s debug log I see that it connected to Bayweb and got info back:
updated 1 thermostats: [e7990f65-15b5-45fe-bfec-202e2a2dc6bc-76B191CE:[data:[deviceAlive:true, deviceTemperatureUnit:F, timeStamp:1514427671, heatMode:true, activitySetpoint:50, coolingSetpoint:68, outsideAirTemp:37, door:0, minCoolingSetpoint:68, temperature:68, mode:1, autoMode:off, thermostatOperatingState:idle, coolMode:false, outsideHumidity:0, auxHeatMode:off, activity:1, maxCoolingSetpoint:89, in2:0, in1:0, wind:9, in3:0, relay_y2:0, hold:on, solar:0, relay_w2:0, thermostatFanMode:auto, maxHeatingSetpoint:80, heatingSetpoint:68, minHeatingSetpoint:50, humidity:0, thermostatSetpoint:68, thermostatMode:heat]]]
e7990f65-15b5-45fe-bfec-202e2a2dc6bc 9:21:07 PM: debug poll results returned resp.data [in2:0, in1:0, iah:0, wind:9, in3:0, sp:68, relay_y2:0, hold:1, door:0, solar:0, relay_w2:0, iat:68, fan:0, oat:37, mode:1, timestamp:1514427671, act_sp:50, oah:0, act:1]
e7990f65-15b5-45fe-bfec-202e2a2dc6bc 9:21:07 PM: debug polling children:
e7990f65-15b5-45fe-bfec-202e2a2dc6bc 9:21:07 PM: debug pollHandler()
e7990f65-15b5-45fe-bfec-202e2a2dc6bc 9:21:07 PM: debug Connecting to bayweb for device
e7990f65-15b5-45fe-bfec-202e2a2dc6bc 9:20:44 PM: debug addBayWeb()

In Simulator there is no UI:
Nothing available to simulate.

How do i get the thermostat actually show up under My Home?

I have not tried to use the simulator, I don’t think I populated the simulator section in the device handler.

If you have a real bayweb device it should have created the device after you ran the Bayweb Connect smartapp. The best advice I can give is to uninstall the smartapp and try installing the smartapp and device handler again.

I switched to a different thermostat recently so I no longer have access to my bayweb device for testing.