Thanks Brian, I eventually realised that I could do it myself by simply editing the file. So I embarked on creating two different interfacers⦠and killed my emonhub⦠it now refuses to restart⦠which is far from helpful as I canāt see what is going on, zero log information being produced
I had to get SSH working, and work out commands to copy and change the *interfacer.py file⦠so I guess something went wrong here or in my tweaking of the config file⦠I commented all my changes out to try to get back to where I was but no good. Anyway too tired to fix now, will sleep on it.
Is there a way to see why emonhub canāt start?
Note my SSH password is: emonpi2016 (unlike some posts suggest)
Run a second SSH window with sudo journalctl -f -u emonhub. because it may be a python error, that is where you will see the python errors not in the log file of the application.
You can easily restore the emonhub folder back to where it was using git.
Thanks Brian, just the command I needed. It really doesnāt like me adding in a new Interfacer file. Iām not sure why. If I take it out everything is fine, put it in and I get this:
Feb 11 15:41:58 emonpi emonhub[5084]: Traceback (most recent call last):
Feb 11 15:41:58 emonpi emonhub[5084]: File "/usr/local/bin/emonhub/emonhub.py", line 40, in <module>
Feb 11 15:41:58 emonpi emonhub[5084]: setattr(ehi, name, getattr(getattr(namespace, name), name))
Feb 11 15:41:58 emonpi emonhub[5084]: AttributeError: module '__main__' has no attribute 'EmonModbusTcpInputRegInterfacer'
Feb 11 15:41:58 emonpi systemd[1]: emonhub.service: Main process exited, code=exited, status=1/FAILURE
Feb 11 15:41:58 emonpi systemd[1]: emonhub.service: Failed with result 'exit-code'.
Feb 11 15:42:03 emonpi systemd[1]: emonhub.service: Service RestartSec=5s expired, scheduling restart.
Feb 11 15:42:03 emonpi systemd[1]: emonhub.service: Scheduled restart job, restart counter is at 145.
Feb 11 15:42:03 emonpi systemd[1]: Stopped emonHub data multiplexer.
Feb 11 15:42:03 emonpi systemd[1]: Starting emonHub data multiplexer...
Feb 11 15:42:03 emonpi systemd[1]: Started emonHub data multiplexer.
Now I have no errors reported anywhere, yay!
But alas no new input signals appearing under Inputs either.
Emonhub is running happily enough, but itās log is just absent of any reference to the new Interfacer. Time to make tea and mull it over again. I wonder if you can have two Modbus TCP connections to the same device? Is it thinking āoh, Iāve already done thisā and just skips onā¦
Yes it would definitely be best if the pros built this extra functionality into the next update and I could return to a standard updateable configuration.
Iāve got it all working now. It just needed a restart to get the second Modbus TCP kicked into action. Happy days.
Thank you for all your help Brian, very much appreciated!
@glyn.hudson@TrystanLea - could we look at the best solution for this for the Modbus Interfacer.
Either it needs 2 interfacers as @Matthew_Lee has done, or an additional parameter to define the type of register, and the routines to read both (which is probably the better solution).