Atag One support via Homie/MQTT thing

Hi @ArdKuijpers,

There’s been a major update to pydantic. As a matter of fact, the atag one library does not run anymore.

Traceback (most recent call last):
  File "/opt/atagone-mqtt-bridge/app.py", line 5, in <module>
    from atagmqtt.atag_interaction import main
  File "/opt/atagone-mqtt-bridge/atagmqtt/atag_interaction.py", line 8, in <module>
    from .device_atagone import DeviceAtagOne
  File "/opt/atagone-mqtt-bridge/atagmqtt/device_atagone.py", line 17, in <module>
    from .configuration import Settings
  File "/opt/atagone-mqtt-bridge/atagmqtt/configuration.py", line 4, in <module>
    from pydantic_settings import BaseSettings
ModuleNotFoundError: No module named 'pydantic_settings'

Any chance you have time to update your library?

Thanks,
Florian

I will update as soon as I have a chance. In the meantime I suppose you could install an older version of the pydantic module to get things running. Alternatively, you could use the docker image of you are familiar with docker.

Hi Ard,

tried to build the docker image on a Rpi4 without success:

 > [builder 1/5] RUN apt-get update     && apt-get install gcc=4:10.* git=1:2.* -y     && apt-get clean:
1.713 exec /bin/sh: exec format error
------
Dockerfile:6
--------------------
   5 |     FROM base as builder
   6 | >>> RUN apt-get update \
   7 | >>>     && apt-get install gcc=4:10.* git=1:2.* -y \
   8 | >>>     && apt-get clean
   9 |     COPY requirements.txt /app/requirements.txt
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update     && apt-get install gcc=4:10.* git=1:2.* -y     && apt-get clean" did not complete successfully: exit code: 1

There is no need to build it yourself. It is on the Docker hub: ATAG MQTT bridge docker.

Hi @Ltty,

I’ve updated the Dockerfile and fixed the code so it runs with a recent version of pydantic-settings. So everything should be working either directly in Python on your RPi or in a self built Docker container.

1 Like

Amazing, thank you. Sorry for being such a pain in the ass :smiley:

Hi @ArdKuijpers,

I’m recently seeing the following warnings in OpenHab

2024-01-19 11:54:19.392 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command 'manual' from channel 'mqtt:homie300:2a29288b20:atagone:centralheating#mode' not supported by type 'TextValue': Value manual not within range
2024-01-19 11:54:19.398 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command 'manual' from channel 'mqtt:homie300:2a29288b20:atagone:controls#ch_2Dmode' not supported by type 'TextValue': Value manual not within range

Any idea what this means?

Thx,
Florian

Hi @Ltty,

I have no idea and cannot reproduce that. Those channels work fine here. What version of Openhab are you running?

I found the issue, can’t explain the root cause though.

What I see in the mqtt format is that available values are: manual,automatic,vacation,extend,fireplace
In Openhab I however see Auto,away,Extend,Manual,boost in the channel configuration.

I updated the channel configuration to match the mqtt format and the warning is gone.