Sinope thermostats api - Working! Modes and presence driver in post #2

Yay! New update, new error message. O_o I don’t know if I’m getting closer or not.

dev:552018-03-02 15:42:13.655:errorNo encoder found for request content type */* on line 69
dev:552018-03-02 15:42:13.613:warn[uri:, path:api/device/82931/setpoint, headers:[Session-Id:lDG0KUBw0SXKUyBqctOtTHBl95JDowo3OohSFmp], body:[temperature:11.0]]

Sounded like the new update was updated successfully :grin:

Specifying the content-type in the headers might help it find the encoder. Should be able to modify line 63:

headers: ["Content-Type": "application/json", 'Session-Id' :],

Thanks for the suggestion. I still get the same error code and no change to the setpoints after that edit though.

Almost had it! There’s another parameter for requestContentType in the documentation on ST. After adding that in the error went away on my test. The params definition should look like this:

	def params = [
		uri: "${}",
		path: "api/device/${}/setpoint",
		requestContentType: "application/json",
		headers: ["Content-Type": "application/json", 'Session-Id' :],
	 	body: ['temperature': temperature]

By Jove, you’ve got it! :smiley: Thank you! I’m going to try to get the controls for home/away added to the basic api so I can use them for Modes. I’ve added the api to the OP so it’ll be easier to find for new people and deleted out the other versions to simplify things.

I think I’ve found a bug, or maybe it’s an intentional feature with unintentional results? I am unable to add a second device on the same IP without a 500 server error. I can add one device on the hex ip, and one on the dec ip, and both work fine. The Sinope hub is a single IP for all their devices, and the device selection is by the name that corresponds with the name designated in

@mike.maxwell @patrick is there a workaround for the “one device per ip” issue?

When you get that working, please let me know how you did it. Now that my SimpliSafe is working reasonably, I need to figure out a way to implement the capacities (i.e. alarm states) with Modes and I can’t since it won’t show up on the drop down list of selected capacities.

No real workaround except to do the handling in an app and create virtual devices for commands and storing states.

I think I’ve found one. I need to set a 3rd designation from the Device Network ID field. For example, ip:port:devicename which allows me to save the separate devices, and the final :devicename is just ignored by the system.

1 Like

interesting hack!

I started looking at what needed to be changed for Sinope Thermostat with Mode driver. It’s riddled with the missing content type change that mattw advised me of. I might try to rewrite some of it to reduce the redundancy somewhat. params is redefined for every single function, so there’s dozens of locations to fix.

Updated second post with API modified with mostly working mode and presence commands.

1 Like

Sooo, just setting up my Hubitat, and I'm hoping I can get my Sinope Thermostats working with it as well.

I know next to nothing about coding... but I can copy/paste :slight_smile:

I went through the process to create a Virtual Device, but I'm not sure what I should be using for Device Network ID

Anyone willing to help me with a little step by step?

Device Network ID for virtual devices is any unique alpha-numeric string you want. Not sure if you can use spaces in them, I never do.

1 Like

Ok, got that figured out. Copy/pasted the code, gave each one a unique ID. Your example used the 192.168... do I need to include the IP address for the Sinope Hub, or can I use any random number I want?

How the heck do I correlate which one is which?

A workaround for the “one device per ip” limitation in Hubitat is to add a 3rd designation for the Device Network ID field. This can be the name of your stat, or just a unique number series, whichever is more convenient for your own system.

For example,

Look in your neviweb site for thermostat name.

Finally getting a chance to take another run at this. I can see the IP address of my Neviweb Hub in my router, but I can't figure out the port, either for the Hub, or the individual t-stats. Is that what I'm supposed to be entering for the Device Network ID?

So the IP address I'm supposed to enter.... IP for my computer, my Hubitat, or my NeviWeb?

Your local neviweb ip.

1 Like

Download the Hubitat app