MQTT not working with input_numbers

I’m trying to integrate HA with my own Home Control system, the interface is MODBUS/IP. As the MODBUS implementation of HA is a desaster in terms of polling, I’m running the polling via “spicierModbus2mqtt” bridge on a separate VM, interfacing to MQTT.

That works like a charm for binary switches and inputs.

I have some MODBUS registers which are controlling dimmer packs (DMX512 protocol) in a range from 0-4095. And I can’t get these to sliders.

By default these registers are assigned to the type “sensor”. The discovery works, but the only thing I can do is to watch the value in HA, I can’t control them with a slider. “sensor” seems to be a “read only”.

I can’t use the type “light” as my channel is a pure analog value, it does not have a command switch.

From what I read, the correct entity type would be “input numbers”. So I changed the naming to MQTT in the modbus2mqtt script to the type “input_numbers”. I see all the topics correctly in the MQTT explorer, but HA does not discover them. I’m getting this error message in the MQTT log:

Protokolldetails ( WARNING )

Logger: homeassistant.components.mqtt.discovery
Source: components/mqtt/discovery.py:79
Integration: MQTT (documentation, issues)
First occurred: 16:29:14 (24 occurrences)
Last logged: 16:44:57

Integration input_number is not supported

Also in the log I don’t see any MQTT message when this analog value is changed. It seems HA does not handle these messages at all as “input_number” does not seem to be supported at all.

I’m fully stuck here. How can I get the MODBUS register to a slider in the GUI which moves when the value is changed in my control (read) and which I can change and it writes the new value back? I can’t find a proper entity type which is supported by the slider and also in HA/MQTT?

You have to automate it. See this example (noting 123’s solution to the loop problem): Input_number slider MQTT, Stuck in a loop

Thanks, Tom, Got it working that way! :+1:t2:

1 Like