Port of HA "binding" of Sunseeker lawn mower to OpenHAB?

Has anyone attempted to port the home assistant “binding” to Sunseeker lawn mower to OpenHAB?

A quick search of the openhab-addons repo shows that no one has submitted anything to OH yet.

Porting between HA and openHAB is extremely difficult as they are written to two very different programming languages. For the most part “porting” will involve a reimplementation from scratch, using the HA Python code to document what to do.

Another alternative is to create an external Python program that imports the relevant parts of the HA plugin and creates an API that OH can use (e.g. MQTT, direct interaction with the openHAB REST API, etc.). This approach is less work but still can be challenging depending on how the HA plugin is built.

1 Like

This all is beyond my coding skillset. Let’s hope the sunseeker mower gets popular enough for someone to take this project up at some point of time.

My very first project with openHAB, and in fact the reason why I’ve opted for OH and not HA, was with a device not supported neither by OH nor HA. As it has a Web interface I’ve used the HTTP binding to manage it. At the time this binding did not support POST commands but @J-N-K quickly implemented it. Another plus for OH team.

Connecting a non-supported device requires knowing the physical interface (wifi, bluetooth, infrared, etc) and the protocol.

There are OH users that have HA+NodeRed installed just to create the “things” that link to OH items. @Pedro_Liberal is one of them and maybe he can help you if you want to do something similar.

It looks this one is a bit more difficult: You need a HTTP connection to get the device information and the device communication is done with MQTT. I guess the “account” as a bridge and the “mowers” as things below that would be a good design. Unfortunately I don’t have time to do that.

Looking at the specs this mower uses bluetooth, and this probably rules out the http binding.

I had a look at the code of the HASS “binding”. They contact some server via HTTP to get access tokens and devices and then control the devices via MQTT. Probably there is some bluetooth-ethernet gateway. Looks a bit similar to the Tuya setup.

The mower I have has both bluetooth and wifi. It also comes with an app that can connect to the mower remotely via the manufacturers cloud.

1 Like

From what I read from the HASS code, the cloud connection is what they use.

From what you state here, the Worx Landroid binding seems to operate the same way. General informations are retrieved by http, command and status updates goes through MQTT (Worx Landroid Binding - #507 by glhopital)

2 Likes

This is the manufacturer homepage.