Heatmiser integration

Hi. I have just switched from SmartThings to Hubitat and just checking all my devices compatibility. I am trying to find out if I can intergrate the heatmiser range for instance Neohub, Neostat etc
Has anybody got any experience with this?

I don't have one to test with, but quickly looking at the code, I think following the steps listed here App and driver porting to Hubitat the ST drivers might work in HE. Can't say for sure though without access to a device to test with...

I have a Neohub and Neostat for testing. All the documentation is available from Heatmiser if you ask for it (I did).

I'm currently trying to write a dedicated Hubitat driver for it, but I'm old and my coding is very rusty (and mostly out of date) so don't hold your breath waiting for my version if someone else is also writing one...

As soon as I get anything working I'll post it.

Oh cool I’ll ask although I’m not that proficient at Coding. Please let me know if you have success though and I’ll do the same.

Have you found my Heatmiser integration on ST? That should port very easily over to Hubitat, and Im probably about to test it out myself now that I have a Hubitat hub of my own.

1 Like

Hi Charles.
I have found it and nearly had it working on Smartthings before I jumped ship! I don’t think I’m clever enough to convert it to hubitat but can try.
If you’ve got converted code I’d be very grateful
Cheers.

I think there isn't a need for an intermediate device anymore according to the documentation for hubitat.

https://docs.hubitat.com/index.php?title=Raw_Socket_Interface

1 Like

Yup, that's what I'm thinking, so long as there are lots of options for configuring the exact behaviour of the packets (since Heatmiser requires custom termination bytes from memory). I built the integration so minimal changes are needed in the device handler if so, so fingers crossed!

That sounds very exciting, if only I knew how to do it ha ha. I’m not Clever enough so Hoping someone else can point the way. Thanks.

Quick experiment:

def on() {
    initialize()
	log.debug "Switch on Bathroom Heating"
	sendEvent(name: "switch", value: "on")
    def msg = '{"FROST_OFF":4}."\0\r"'
    log.debug "Sending msg = ${msg}"
    interfaces.rawSocket.sendMessage(msg)
    runIn(5, closeSocket)
}

Seems to work fine switching the thermostat on and off.

Yup I got that part working but it has a few problems which I will need to solve.

  1. The API isnt very good at recording which device it is talking about in responses, hence will need to use some state information to record this, so that responses can be tied back to a specific thermostat. Ive made a start on this and I think it will work.
  2. If you send a big command - e.g. INFO, then the response is received in multiple parts and doesnt get reassembled properly by Hubitat (and sometimes is received in reverse). I'll need to work out how to deal with this.... Might be back on this forum to work out a solution since all of my ideas so far have failed.... But will solve problem 1 first and check that other things work.

I assume you use info:1 rather than info:0? This is smaller and tied to a single stat. Is even that too big?

Yup, it gets chunked at 1452 bytes, so you get about 2/3 of it before cropping, even for a single stat.
Im seeing if I can keep track of the parts and reassemble somehow, but perhaps there is a smarter way....

This took me quite a long time to solve on the ESP8266 chip, so whilst its an improvement to skip the ESP, it is going to need much more thinking for the two challenges above!

1 Like

I'm assuming you're reassembling the data by checking if the first part of the return from INFO starts with {"devices":[ ?
I wonder if the admins could do anything with regards to the truncation of incoming data in a future platform update.

That was the plan, though it gets harder when the message is split into >2 parts!

I think it just needs some more intelligent rules on when to check the receive buffer, as currently I think its just immediate packets when they arrive.

1 Like

This is excellent news :+1::+1::+1:

@cjcharles any ideas how this author managed this? Looks like some integration into another eco system but he's somehow worked out how to control the backlight?!

"Identify Device -Flashes neoStat screen backlight - V53 "

1 Like

There is an identify command. It used to flash all Neostats and was a bit useless when I developed the original integration 3 years ago, but perhaps now you can flash a specific device. What use case were you thinking of?

I can share where I'm up to now as it's working for the basics, just the interface is pretty clunky.

I thought it would be nice for debugging or simply show that the stat is changing status by lighting the backlight. I cannot see the indentify command in the API. What is the call?

Found it, "IDENTIFY_DEV":n

Shame there isn't a way to simply switch on the backlight on motion in the room.