-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disconnect Timeout #2
Comments
Hi @agisofttm, thanks for your feedback. I've already added a wifi reset button to the home page, but I'm not sure if this suits your needs. If the esp can't conntect to the saved wifi it will also start the config portal. Regarding the timeout. This is only an inactivity timeout. As long as there is modbus traffic going on, the connection is kept alive, but after 10s of silence the connection is dropped to cleanup stale resources. Would it help to make this timeout configurable? Regards |
Hi @zivillian, Yes Wifi Reset on web page is do the thing, but because home page is missing after first configuration there is no way to reset settings or to debug. For that reason I added this on loop
and now I have access to home page via new IP on already configured SSID. Regarding Timeout - it will be amazing if you add this timeout configurable, because a lot of devices that use modbus are tested slowly for unknown registers (for example HVAC). Also I found that you use function for any function modbus reading Thank you very much :-) |
I've added a config option for the tcp timeout. Can you please test the build from here |
I'll take a look into the problem, that the webui is not reachable after initial wifi configuration. Regarding the debug page - initially i wanted to support all functions, but started with those two. For some functions additional input is needed or the output differs and didn't know how the web ui should look like, so this is only the first draft. If you have an idea how the input and output should be laid out, please open a separate issue or pr. |
Hi @zivillian
Thanks I'll test it today and give you feedback immediately.
I'll wait for the webui. I have an idea how it can look. Here is my screenshots from Gree Control page UI - especially for modbus debug commands. For writing registers or coils you need to select ID, address as well and after that you need to select a command value to write coil or register. |
Interesting is that WEB server appears, after I installed firmware from your link, but unfortunately when I change Timeout to 20000 (20sec) it show to save config, but after testing is still 10seconds - here is log: [11:30:30][webserver] GET /style.css |
you need to reboot to apply the config changes |
PErfect - thanks it is working now. I'll do further tests and give a feedback :-))) |
Hi @zivillian
Finally, @zivillian I have to thank and congratulate you. You really made a great job in a very short time. ;-) |
Hey @maufc, thanks for your feedback!
Once again, thanks for your feedback. It helps to focus on the relevant parts... Regards |
@maufc @zivillian I'm also think about ESP8266, but let's focus to run everything on ESP32 and after I'll try to port it to ESP8266 :-))) Also I found something interesting here. I use different types of MODBUS boards. One is cheap china MAX485 board without automatic flow control, and I need to create additional hardware to handle requests. Second one have a full TTL and no need to create anything. With first board there is an often error 0x2 but with second one there is no error, so hardware is important for eModbus I think. |
Hello @zivillian 1.I would say yes, a hardware button will be useful on site, when something happened to the connection and you don't got a computer to connect the device and completely flash it. What choices do you have in this case. Am I missing some feature of WiFiManager? |
Hi again. |
I took a look to eModbus documentation. |
I've added a config option for an (optional) RTS pin, but since all of my hardware does AutoRTS I'm not able to test it. |
I can confirm, that reading more than 20 registers shows a significant error rate, but I fear that this might be caused by eModbus/eModbus#198 |
the errors should be fixed with eModbus/eModbus#268 |
Hi @zivillian
Really nice, simple and working gateway but there is some little problems. First one is when client is connected to the gateway, after 10 seconds is disconnected as the debug says:
[11:28:38][D] 93697| ModbusServerTCPtemp.h [ 239] serve: Accepted connection - 1 clients running
[11:28:48][D] 103686| ModbusServerTCPtemp.h [ 350] worker: Worker stopping due to timeout.
Second one, can you integrate hardware gpio button for getting config portal on demand? Because with Wifi Manager when you set once SSID, then you cannot make a config to anything now.
Thank you
Kind Regards
ESP8266The text was updated successfully, but these errors were encountered: