Replies: 46 comments 149 replies
-
Wouldn't this already work by using SerialBridge ? |
Beta Was this translation helpful? Give feedback.
-
That would indeed work, but in that case it will be raw data that has to be parsed in Nodered. It would be nice to have commands like ReadInputRegister Address Type Register With a reply of the value. Same for ReadDiscreteInputRegister ReadCoilRegister and ReadHoldingRegister. For writing it would be useful to have WriteHoldingRegister Address Type Value Type is default 8 bits MSB integer (8MI) but can be 8, 16 or 32 bit MSB/LSB integer or float. |
Beta Was this translation helpful? Give feedback.
-
So it would need a specific ModbusGateway driver |
Beta Was this translation helpful? Give feedback.
-
Esp8266 would be mandatory for my projects. I can create an example cpp file with 2 functions for c++ in Arduino ide which may be ported to tasmota if preferred. |
Beta Was this translation helpful? Give feedback.
-
@jeroenst |
Beta Was this translation helpful? Give feedback.
-
@gemu2015 Here is doc I got from Polish representative. |
Beta Was this translation helpful? Give feedback.
-
Thanks for implementing this ModBus bridge. I have a few uses for ModBus in Tasmota myself. And MQTT2ModBus is one of them. Currently I use SML for that (at least for predefined reading). Can this solution be used to expose read values in the same manner (like display readings on WebUI and broadcast via MQTT)? Also I'd appreciate if I could use Tasmota as TCP2ModBus bridge concurrently (e.g. no reconfiguration). |
Beta Was this translation helpful? Give feedback.
-
My last paragraph was a suggestion for implementation. My linked issue contains information about what is necessary to convert between TCP and RTU modbus protocol (very little, actually). I was hoping you could have a look into it and maybe borrow a few lines from TCP bridge and 'just' insert the few protocol conversion steps. |
Beta Was this translation helpful? Give feedback.
-
Pls expand the current driver |
Beta Was this translation helpful? Give feedback.
-
@jeroenst: Yes, indeed (no problem in compiling your branch myself). I have a modbus slave (a Trovis heating regulator) of which the vendor offers a Windows tool suite which either communicates via serial RTU and a USB TTL adapter or via TCP and it's according slightly modified (wrapped) protocol. I had this working via a local running Python TCP to serial RTU gateway. Having this integrated into Tasmota would be fabulous. Especially if it works concurrently:
This (German) thread alone is home to many ppl seeking this feature. |
Beta Was this translation helpful? Give feedback.
-
This feature is now available in the development Branche. I encourage users to test this feature so bugs can be found and solved. |
Beta Was this translation helpful? Give feedback.
-
I am afraid, I could not make it work.
Compiled without any errors.
Tx light does flash on the Modbus UART adapter. |
Beta Was this translation helpful? Give feedback.
-
You must specify ModRX and ModTX in module configuration, not in the template. Or select Generic (0) in module configuration if you wish to use the template. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@jeroenst could you perhaps give me some pointers on how to use the modbus bridge in berry? |
Beta Was this translation helpful? Give feedback.
-
Neither pullup, or pulldown works.
The RPS has an LED and it flashes when the data is sent.
I just think there is some kind of timing issue that causes the RTS to be
pulled low before the data has been sent, even though it has a flush()
before going low which I assume is synchronous.
Either that, or the RTS is not high long enough before the data is sent. If
the same GPIO line is configured as a relay, it works every time.
…On Fri, Jun 16, 2023 at 3:30 PM JeroenSt ***@***.***> wrote:
I can confirm that module works fine but modules with a tx enable line
also work fine (normally).
—
Reply to this email directly, view it on GitHub
<#15703 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTSUVNDFYJCHA5F4LJVLWLXLPVQNANCNFSM5XD34LXQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
No it's not inverted. Relay on enables transmit, led is on solid. The led
flashes on when using Tx enable.
I'll need to get set up to compile tasmota, I've not done it before.
I'll add some delays in the code next week, busy on the weekend.
…On Fri, 16 Jun 2023, 5:38 pm JeroenSt, ***@***.***> wrote:
Is it possible the rts of your rs485 chip is inverted?
You can try to change high and low in the code or add some delays.
—
Reply to this email directly, view it on GitHub
<#15703 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTSUVOLFJFZ5LY6IZCUWYTXLQEPFANCNFSM5XD34LXQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I set up my machine to compile tasmota and cloned the latest repository.
That version (12.5.0.4) works correctly without any changes.
I downloaded and re-installed 12.5 and that worked correctly too.
I can't explain, I changed nothing in the hardware since testing with
setting the gpio as a relay.
…On Fri, Jun 16, 2023 at 5:52 PM Darryl Bond ***@***.***> wrote:
No it's not inverted. Relay on enables transmit, led is on solid. The led
flashes on when using Tx enable.
I'll need to get set up to compile tasmota, I've not done it before.
I'll add some delays in the code next week, busy on the weekend.
On Fri, 16 Jun 2023, 5:38 pm JeroenSt, ***@***.***> wrote:
> Is it possible the rts of your rs485 chip is inverted?
>
> You can try to change high and low in the code or add some delays.
>
> —
> Reply to this email directly, view it on GitHub
> <#15703 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABTSUVOLFJFZ5LY6IZCUWYTXLQEPFANCNFSM5XD34LXQ>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
Hi! i cant use the ModbusSerialConfig: whats wrong? |
Beta Was this translation helpful? Give feedback.
-
i take it this Recompile.modbusserialconfig is set to 3 for 8n1, baudrate is set to 9600 |
Beta Was this translation helpful? Give feedback.
-
I've been struggling with modbus for almost a week now. I cannot understand what is the problem. I use the xy-107 module and connected it to wemos d32 mini, vcc-3.3, tx-gpio1, rx-gpio3. and I don’t get a response from the device, maybe the tx and rx lines need to be pullup? |
Beta Was this translation helpful? Give feedback.
-
yes, tried, no changes |
Beta Was this translation helpful? Give feedback.
-
Hi, I suspect an error in Tasmotas 13.1.0: I compiled SML, scripts and rules into my Tasmota. It is connected via a RS485-converter with a ESP8266 (but I tried also Tasmota 12.4 and ESP32). My script for the smart meter SMD72D-M goes like that:
And here is the dump of sensor53: 09:26:37.500 > 01 04 00 00 00 02 71 cb You see, the demanded voltage (01040000) leads to "43 64 8f d4", the voltage of 228.49995. So Tasmota receives the data, doesn't it? The problem is that it displays a voltage of 0.00 at the front page. The mqtt-data is the same: I know, that Tasmota can handle everything, because I used a Tasmota-Sensor-bin with SDM630-Pins RX/TX set in "configure module". They produce some data. Unfortunately not the special data I 'm looking for. Any hint in some direction would be appreciated very much. I tried everything I can think of, an error in Tasmota seems the only explanation for me. Michael |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Attention: |
Beta Was this translation helpful? Give feedback.
-
Hello community, |
Beta Was this translation helpful? Give feedback.
-
Hello community, now I purchased a TTL RS485 converter this model: and tried to learn how to use the ModbusBridge of Tasmota. I used ESP32 S2 Mini (purple Board) and configured GPIO 3 as ModBr RX and GPIO 5 as ModBr TX. According testing in the console the ModBr seems to be active and in case of sending there is also a red LED blinking at the TTL converter. But so far I could not receive any results from the device. To be honest, I do not know how the ModBus RTU is configured at this cheap China energy counter I purchased for this training/testing purpose: https://de.aliexpress.com/i/1005006439685728.html?gatewayAdapt=glo2deu Can you advice/help how would you recommend to structure this testing to be sure the ModBusBridge is working and after this how is best way to find the usable configuration of such devices? Guess that there is not sth available like automatic scanner to check if sth responding at this adresse or register? Thank you very much in advance for your support in learning sth new. |
Beta Was this translation helpful? Give feedback.
-
that's what I thought. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
My chinese is enough (although not existent) to see it answers the variable4 I forgot to mention: the serial protocol parameters: 9600 baud, even parity, 8 bit bytes and one stop bit. You still need to know which bytes to send. Yes there are (not always used) standards, but that is not my expertise. What helped me in the past if sellers/manufacturers are not helpful was searching for the device on github |
Beta Was this translation helpful? Give feedback.
-
I have several devices that use modbus via rs485 connected with an esp8266 with own firmware.
Is it possible to create an mqtt to modbus gateway using tasmota?
In this case all devices that use modbus can be directly controlled and read via a domotica platform like Nodered.
I think this is just a minor implementation, receive commands via mqtt and parse them to the modbus device and send the parsed response back to mqtt.
I can make a small standalone example code/function but tasmota is to complex for me to implement this.
If someone could help it wouldn't take too much effort I think and will add a great extension of functionality for tasmota.
Beta Was this translation helpful? Give feedback.
All reactions