Bindings creation for Stihl iMow?


I’m looking to a way to control an iMow robot directly from OH, but so far, no binding seems to exist.

I found out that an API was created for Home-Assistant, but unfortunately, I’m not skilled enough to try to convert it somehow for OH (not even to check if it would be possible).

Anyone able to look into it or guide me on how to start ?

Thanks a lot

1 Like

If it’s only about displaying stuff, i have just built a solution for basic usage, based on this GitHub Code.

Currently looks like this:

I’m pretty sure i can also control it that way, but didn’t implement it by now. The actual data is collected by a python script:

#!/usr/bin/env python3
from imow.api import IMowApi
from imow.common.actions import IMowActions
import asyncio
import aiohttp

async def main():
    async with aiohttp.ClientSession() as session:
        api = IMowApi(aiohttp_session=session, lang="de")
        # save token for later use if you want to recreate IMowApi(token=my_token) because the created token is valid for
        # 30 days
        token, expire_time = await api.get_token("", "MyCoolPassword", return_expire_time=True)

        await api.get_token()

        mowers = await api.receive_mowers()
        mower = mowers[0]
        await mower.update_setting("gpsProtectionEnabled", True)

        print(f"rasi_status_info= {mower.machineState}")
        match (mower.machineState):
            case "DOCKED":
            case _ :

if __name__ == "__main__":

Fetching the stuff is done by a rule:

rule "Rasi"
 Time cron "0/60 * * * * ? *"
    val filedata = executeCommandLine(Duration.ofSeconds(50), "/usr/bin/python3", "/home/ubuntu/")"DATA " + filedata);
    val lines = filedata.split("\n")"LINES " + lines);
    lines.forEach [ line |"LINE " + line);
        val field1 = line.toString.split('=').get(0)
        val field2 = line.toString.split('=').get(1)
"FIELDS " + field1);
"FIELDS " + field2);
        postUpdate(field1, field2)

The idea from the rule came from this post.