Please login or register.

Login with username, password and session length

Author Topic: Serial port problems with Debian Buster and Heyu? [SOLVED]  (Read 3601 times)

BryanS19

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 8
Serial port problems with Debian Buster and Heyu? [SOLVED]
« on: November 18, 2019, 10:59:54 AM »

Hello everyone. While I'm sure I have an account here somewhere, this is a new one because I've been lurking so long and the email and password are long gone.

I've been running Heyu on a Raspberry Pi2 w/Wheezy via a USB-Serial converter to a CM11 for years. This has worked flawlessly, but I've been turning off old Pis in favor of a consolidated x86 machine that has real serial ports, a real hard drive, that sort of thing. There are also other issues with Wheezy, and the notification systems I've set up to sent stuff to Twitter and whatnot are slowly collapsing because of SSL and packages being outdated, so it's an issue with trying to get things moved over to just be compatible with modern things.

Heyu installed via make without issues. I've added my user to the dialout group. I have other programs accessing other serial ports as this user without issue. However, Heyu would work once or twice, then it would give me:

"HEYU: Can't open tty line.  Check the permissions."

Fair enough, I tried root. Same thing, it may work once or twice before giving me that same error. I set permissions on the serial port (/dev/ttyS1) to 777, same thing. There should be no reason root cannot access a port with 777 privileges.

I tried the USB-serial converter that had been running for years, same thing. It would work once or twice, then give me the permissions error. There was no rhyme or reason as to when or why it would give me this, and it persisted through a reboot.

I have to assume it's something to do with the CPU architecture, or related to the age of Heyu itself. I'm hoping someone else has some ideas, I'd like to turn the Pis off once and for all (but I guess I can run one just because...)
« Last Edit: November 24, 2019, 07:08:22 PM by BryanS19 »
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Serial port problems with Debian Buster and Heyu?
« Reply #1 on: November 18, 2019, 04:10:49 PM »

The SSL issue is not likely to improve unless you update to the latest build of Raspbian.  I have my RPi1 running with HG on Stretch still and it works great...except for notifications.  Of course, my notification system is run through Mono which is a different beast than your setup seeing as I assume you are using other libraries.  Either way, updating should resolve your SSL issue.

Are you planning on staying with Linux on your x86 platform?  If so, you'll need to build your configuration again anyway.  Seems stepping back to a desktop system won't help in the long run other than giving you a different setup for your serial ports.

BryanS19

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 8
Re: Serial port problems with Debian Buster and Heyu?
« Reply #2 on: November 19, 2019, 04:02:28 PM »

I really don't have any intention of running Pis at this point, I appreciate what the Raspberry Pi foundation has done but I had decided some time ago that I wanted to move to a real machine with real drives and real hardware on real ports. That's really my main goal in moving, the SSL issues that started happening was just the incentive to start the process. Almost everything, save Heyu and a very old thing that needs php5 (not sure what I'm going to do with that, maybe the Jessie sources on that?) has been migrated to a single embedded x86 box. I'm going to try and avoid things that need particular versions of packages this time.

My notifications are a mix of Tweepy, scripts, and things I've cobbled together over the years. Tweepy's depends complain, and some of the cobbled stuff has quit because of various SSL things.


As far as the Heyu problem, it was built from sources as required with a different CPU architecture. There were no issues during the build, just the can't access the serial ports problem during execution. Since it happens regardless of real or emulated hardware. I have other things that I've moved over, including a weather radio monitor program that has no issues with the real hardware ports, so I have to assume that something in Heyu is too old for the new system.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Serial port problems with Debian Buster and Heyu?
« Reply #3 on: November 19, 2019, 05:10:21 PM »

I understand that having true ports is beneficial over emulated ones.  And, I have not looked at using the USB->serial adapters for more than short term project type applications (I don't recall if any of these were on RPi).  From what I have read on the forum, most people have issues with Linux and not so much the RPi itself.  The difference between x86 and Arm architecture will change some things when implementing an HA solution, but I don't recall seeing any issue that was not possible to solve.  I personally had enough issues implementing my HA setup on Windows that I bailed and found another solution using a SBC and, while it has had its own issues, nothing is impossible on either platform.

BryanS19

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 8
Re: Serial port problems with Debian Buster and Heyu?
« Reply #4 on: November 20, 2019, 07:22:09 AM »

Nothing I've done has made Heyu work reliably on the Buster/x86 platform, so I guess my only option is to keep a single Pi running on a known good configuration. I was hoping to have a single point of management, but it is what it is, I guess.

My only other option is to see if I can work the Python CM11 stuff into something useful.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Re: Serial port problems with Debian Buster and Heyu?
« Reply #5 on: November 20, 2019, 11:50:21 AM »

Are you using Heyu with RF or just PLC?  I never got my hass setup working with RF but I keep looking for others that succeeded.

BryanS19

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 8
Re: Serial port problems with Debian Buster and Heyu?
« Reply #6 on: November 20, 2019, 02:40:47 PM »

By PLC I assume you mean talking to a CM11 device that plugs into a wall outlet? That's the only thing I've tried with Heyu. I'm pretty sure that a CM17 won't work either, since Heyu can't seem to access the serial port.


Bottlerocket, the program designed specifically to talk to a CM17 Firecracker is in the Buster repository, I may see what that does.


Edit: I've just been throwing things at the problem to see what happens. I tried something - I added this to my conf file:

CHECK_RI_LINE NO

and now Heyu starts without permissions errors.

Heyu, of course, reports errors when attempting to send bytes as there is no CM11 attached currently, but that's at least a start. Usually, the RI line being an issue will say something along the lines of RI STUCK, but this is at least progress...I will report back after further troubleshooting. The "permissions" thing may have been a red herring of sorts, just a general error. I should know more soon.


Edit 2: It's still working, so I'm going to connect a real CM11 to the system this weekend. I may try to do the CM17 as well.
« Last Edit: November 21, 2019, 07:26:26 AM by BryanS19 »
Logged

BryanS19

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 8
Re: Serial port problems with Debian Buster and Heyu? [SOLVED]
« Reply #7 on: November 24, 2019, 07:11:09 PM »

I think I can mark this as solved. The RI line appeared to be causing the issue, so adding CHECK_RI_LINE NO to my .conf file fixed all the issues I was having with serial ports not working.

After solving a problem with how the new version of Sunwait works vs. the old DIY version I had running on my Pi, the lighting contoller scripts I've been running for years are operational and working again.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: Serial port problems with Debian Buster and Heyu? [SOLVED]
« Reply #8 on: November 25, 2019, 07:05:58 AM »

I think I can mark this as solved. The RI line appeared to be causing the issue, so adding CHECK_RI_LINE NO to my .conf file fixed all the issues I was having with serial ports not working.

After solving a problem with how the new version of Sunwait works vs. the old DIY version I had running on my Pi, the lighting contoller scripts I've been running for years are operational and working again.

Such a shame in this day and age reverting back to the old x86 desktop room heaters after using a Raspberry Pi for so long. I really do suggest you have another look at the newer range of Raspberry Pi boards, particularly the Raspberry Pi 3 + or the Pi Zero W. Heyu is a breeze on these units and of course Pi3 + will boot directly from either a USB connected SSD drive or standard USB hard drive.

Any issues you experienced with SSL etc on the RPI would have been long resolved since the days of Wheezy. Raspbian Buster is a very solid and capable OS and Heyu runs fine on it with the CM11.

It's a long time since I've seen an actual serial port on a motherboard so I'm assuming the x86 unit you're deploying is quite old and not very economical running 24/7. Maybe if you outlined exactly what setup you deploy you could be pointed in the right direction with a single board computer solution.
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.