Replies: 17 comments 40 replies
-
Hi @Neukam I can add the ability to write coil registers. The reason this is not a functionaliy today is that I have yet to run into a controller that uses coils that can be written. The ones I have tested with only used coils as read only and reserved write functionality for registers or modbus file access. I will test this later today, but so far you JSON file looks great. Give me a couple of days to add writing coil registers. Let me know if you have any feedback on the JSON file documentation in the wiki as I would like it to improve over time to make it easier to add support for new controllers. |
Beta Was this translation helpful? Give feedback.
-
I've been working on on the config. I've made some good progress and added some functionality. I have the hours working and disableoutagecheck. I have a placeholder in for the 1/3 phase check. I have datetime working, but settime is not working. Setting the time through Modbus might not be supported. I feel like my config is at a good point to share my progress. |
Beta Was this translation helpful? Give feedback.
-
I think the powergraph is fixed. It now shows a blue line all the way across at 0. It doesn't show the data from when I ran the generator this afternoon. I'm assuming the data doesn't survive a restart. Here is the output from modbusdump.py when attempting to write to coil 3 (auto) (genenv) root@genmon:~# python3 genmon/OtherApps/modbusdump.py -i 192.168.77.54 -t 8899 -a 10 -s 3 -w 1 -c Modbus Timeout Error(s) detected: 1 Same output from modbusdump.py when attempting to write to holding register 74 (controller time: day) (genenv) root@genmon:~# python3 genmon/OtherApps/modbusdump.py -i 192.168.77.54 -t 8899 -a 10 -s 74 -w c Modbus Timeout Error(s) detected: 1 |
Beta Was this translation helpful? Give feedback.
-
Reactive Power needs to be "type": "int" to show a negative value. I changed that on my end. Logs sent |
Beta Was this translation helpful? Give feedback.
-
Everything's looking good with the config. Oil temperature can probably be removed from status. I put it there in case others wanted it and had it hidden based on returning zero. I'm not using it and I doubt many others are going to use it either. I think it depends on CAN communication from an engine ECU. I was able to hook my laptop up directly to the controller and was able to control it using 0x05 but not 0x0f. I forgot to test writing the date and time. I might take the controller with me to work and test it later. |
Beta Was this translation helpful? Give feedback.
-
I'm using PowerHud Modbus Tester with a cheap CH340 based rs485 adapter.
Same situation here, works with 0x06 but doesn't work with 0x10 |
Beta Was this translation helpful? Give feedback.
-
Writing single coils and holding registers is working, however the server seems to hang for up to a minute before sending the command, most of the time (but not always). When this happens status bar goes red and the notification says "Disconnected from server". Photo attached. This behavior was observed before you implemented the changes as well. I'm not sure what's causing it, it could be the wifi adapter. The command does eventually get sent and the system does resume normal operation. Setting time and date is working. Does/can genmon periodically set the time automatically or after a DST event? The test button doesn't do anything on this controller and should probably be removed. Attached is a copy of the HGM4000LT protocol manual. It doesn't show any function for input coil 2 and shows status coil 0x28 as Reserved. I can't think of what function "Test" would perform on this series of controller, unless it has something to do with ECU communication with electronically controlled engines. It would be useful to have Switch State, Engine State, and Generator Output on the Maintenance page. Feedback from these is important when controlling the generator remotely, for example to make sure the generator is "Normal Running" before transferring the load. |
Beta Was this translation helpful? Give feedback.
-
Logs sent. Ignore anything before 8:53. That's when I reconnected the controller |
Beta Was this translation helpful? Give feedback.
-
The time and data behaves like this: You can press the Set Generator Time button to initiat a sync of the generator time to the monitor system time. I will remove the test button. I can duplicate the switch state, etc on the maintenance page, but I will leave it on the status page as this is in line with all the other controllers supported by genmon as this is probably the most basic status information. It is not clear about the timing of the "Disconnect" messages, are they happening before you issue a command or after (include the time commands in this as well as the coil commands). Does this occur if no commands have been issued? The "Disconnected from Server" messages occur when the web app failed to communicate with genmon. The web app polls genmon every in two threads. One polls every 3 seconds and the other polls every 5 seconds. If more than 5 messages are missed the message is displayed in the web interface. Normal modbus reads occur in a separate thread and have no bearing on the web app, however commands (like buttons) that issue a modbus write are a different. If the controller delays responding to the modbus command it could possibly cause this message. I looked at your logs and nothing is reported as abnormal. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I have a pi zero sized hat for rs485, but it doesn't solve the power problem. Pis are great, but they're not always the easiest or cleanest to deploy. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I've started testing with the Pi and everything seems to be working fine. Commands get sent almost instantly. The server isn't disconnecting or hanging. The clock now updates on the next minute change. Next I need to test the Pi with the EW11 to confirm that the EW11 is the problem. |
Beta Was this translation helpful? Give feedback.
-
That looks good.
|
Beta Was this translation helpful? Give feedback.
-
I haven't said this enough, Thank you so much for all the effort you've put into helping some random guy on the internet get his one off generator system working |
Beta Was this translation helpful? Give feedback.
-
More weirdness, I connected the pi to the controller with the EW11 and everything is still working well. It seems the EW11 is not the problem. Not sure what's going on with the proxmox/ubuntu setup... |
Beta Was this translation helpful? Give feedback.
-
I reinstalled Ubuntu as a VM and had the same problems. I don't know what the issue is. I'm wonder if it's a dependency issue. Every install was a minimal install without a GUI |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Checklist
Version
Genmon Version V1.19.05
Ubuntu 24.04.2 LTS Proxmox LXC
Have you submitted your log files from the About page? Note that outbound email must be working for logs to be submitted.
I have not submitted logs
What is/are your question(s)?
I am creating a custom config for a SmartGen HGM4010NC controller that I have installed on my 21kW generator (Isuzu 4LE1 powered Allmand light tower). I have the RS485 connected to an EW11 wifi bridge. I have communication between Genmon and the controller and can see status and alarms. I would like to add buttons to set the generator's mode (Auto, Manual, Start, Stop, etc). If I understand correctly, buttons command_sequence uses function code 0x10 to write to holding registers. My controller needs function code 0x05 to write to coil registers to set the mode. Is this possible with genmon?
Attached is a modbus dump, a PDF of the HGM4000 series protocol documentation, and my config JSON (work in progress).
Additional information
modbusdump.txt
SmartGen_HGM4000.json
HGM4000N_Protocol_en.pdf
Beta Was this translation helpful? Give feedback.
All reactions