1. The device does not respond if I connect the power (wall wart or usb). Only after pressing reset does everything start working.
Yes, I noticed that too. It seems the Ethernet shield doesn't bring the link up on first power on, only after a reset. No idea if there is a way to fix that. I would be rather interested in a solution to this.
2. After a few hours the device hangs up and the SNMP stops responding. I can still ping the device but no SNMP until I do a reset.
This sounds like the issue I was describing in my previous post. There seems to be a non-SNMP packet stuck in the buffer that gets processed over and over again. Still looking for a solution but I have a workaround using a watchdog timer (see below).
By comparing the first Weather Station code that I found initially in a previous post and the code in the post above I saw that you added a watchdog timer to the setup routine. I don't know what a watchdog timer is but I added it and will be testing for stability. Any tips would be greatly appreciated.
That relates to a hardware watchdog timer I built. It's based on a NE555 timer (but of course!

). It triggers a reset pulse if it did not get a timer pulse for 3 seconds. Let me know if you want the circuit diagram. In the loop() function I pulse the watchdog timer input once every loop if bool reset is false. Then, when a non-SNMP packet is received, I set bool reset to true. This causes the loop not to pulse the watchdog and 3 seconds later the Arduino resets. Bit of a dirty workaround but it works for now.
Also, I noticed that this line is commented out // Agentuino.responsePdu(&pdu);
I take it that is the line in the SNMP function that handles non-SNMP packets? I did put that in at some point hoping that replying to the non-SNMP packet would get it out of the buffer. It didn't work, so I commented it out (but leaving it there, just in case).
Have had any luck troubleshooting your issues?
Nothing more that what is mentioned above. Too many other projects going on at the moment. The weather station works as it is now, so finding better fixes has low priority. ;-)
The Agentuino library seems to be such a useful tool if it could be polished just a little more. I wonder if anyone would work on it for a bounty?
Agreed. Though I'm not sure whether the issues are in the Agentuino library or the underlying Ethernet and UDP libraries.. I wonder if LAVco is still working on it?