xoseperez / espurna

Home automation firmware for ESP8266-based devices
http://tinkerman.cat
GNU General Public License v3.0
2.98k stars 635 forks source link

Problems with serial port (modbus) #1345

Open jsponz opened 5 years ago

jsponz commented 5 years ago

I want to connect a Node MCU board to a modbus device via serial port with a RS-485 adapter.

If I use the examples of the modbus library (https://github.com/4-20ma/ModbusMaster), it works: I can send and receive data from the modbus device via serial port.

But if I use the same code to read/write with the library integrated in Espurna, I have a timeout. Nothing is read, nothing is written. Hardware connection are the same in both cases.

Would it be possible that Espurna is making use of the serial port? Serial debug is off.

mcspr commented 5 years ago

It is a shot in the dark without the code. But if you disable serial debug, check that you do the Serial.begin() bit manually.

jsponz commented 5 years ago

I will prepare some code... Just traveling.

xoseperez commented 5 years ago

This could be a very interesting enhancement. Modbus is used in the industrial context a lot. Keep us updated.

kaminskihub commented 5 years ago

Any news on this? Modbus support would be very very cool.

jsponz commented 5 years ago

Project is on hold. Family project is taking time :-)

I will update shortly.