Hi guys,
I'm new here, but been reading a lot of your posts. For me (a noob at C# whatsoever) it helped me out a great deal. I've playing around with HG for a few of months now. I love it, but I'm running into a couple of issues now of which I hope you can help me with.
I'm trying to talk to a OpenTherm-gateway which allows me to read a load of data and set my temperature setpoint of my central heating. It uses a fairly simple serial protocol. I did this before in a VB-program on a windows machine and it worked. Now I installed HG on a windows server, wrote a program for it in HG C# and voile, it worked too.
Now, to save some kWh´s, I´ve bought me a Raspberry PI and loaded the HG-image. So far so good.
I would have thought that if I export the program I made on the server and transfer and import it to the RPI, it should work. Well, I was wrong there. I'm using a PL2303 USB-Serial converter, which i've found working on the server.
The protocol is a simple send REQ -> recv ACK -> send MESSAGE -> recv MESSAGE. All in byte form. I thought It might be the USB-Serial converter, but I've wrote a Python script on the RPI and it works OK. Then I tried writing some info to a file and then just reading it with HG, but as I've read, that's not supported. So I'll have to do the whole serial thing through HG.
So back to the C# program I wrote for HG. I found out that if I start my program on HG, it does send the REQs every 2 seconds. The gateway is replying, but it doesn't show on HG.
As soon as I go to the RPI terminal and hit "cat /dev/ttyUSB0" (and abort it), suddenly all the data I was requesting pops up in HG.
Then it sort of works! But then... after a minute or so, it looks like HG stops responding.
If you guys have any ideas or suggestions, please let me know.
Thanks,
Johan