Closed rock-crusher closed 2 years ago
Alright this is so confounding. Something about the pi OS is not right and all the goofy recommendations on the web are brutally complicated. We may be better off re-imaging the OS and starting over.
I do not think there is anything wrong with your pump. While it is writing to the port I am not so sure that the message is actually making it to the pump. All of the gymnastics that we have been performing wrt the port permissions makes me think that the messages make it to the transmit buffer they end up blowing out into the ether.
How do you feel about re-imaging the SD card and starting over?
I'm ok with what ever you recommend, but will need your help getting it done.
So I assume you bought a pi kit with a pre-loaded SD card. It should also have an adapter to put the SD card in with a USB port. Pull the SD card out of the pi and insert it into this adapter.
So are you a Mac or a Windows user?
Windows
Ok so follow these instructions to get the image installed on the Raspberry Pi. Once you do that we need to hook the pi up to a mouse, keyboard, and monitor to install XRDP.
https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up/2
EDIT: You want the following OS
Once you get the pi back up and running with a keyboard, mouse, and monitor.
Run the following commands so you can get access to it from your pc. Set the basic settings for the pi and hook up a network connection to it. Then run the following commands.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xrdp
After you do this you should be able to access your pi using Remote Desktop Connection (rdp). Open rdp and enter raspberrypi into the computer field and press connect. Answer yes to the prompts and the login screen for the pi should appear. You are now operating the pi headless so you can stop using the monitor, keyboard and mouse.
Next you will want to perform the install of the software starting with the pre-requisites. https://github.com/tagyoureit/nodejs-poolController/wiki/DIY-Standalone-Nixie-Pool-Controller#install-software-prerequisites
When you get to the part where you are selecting the interfaces. Disable the Serial Console and enable the Serial Port.
Once you get to that point go ahead and configure the MEGA-BAS and your relay card and let me know when you finish that configuration.
Ok, did all that, now just start everything all over again in DIY Standalone Nixie Pool Controller?
sorry the page didn't refresh, disregard my above comment
Once you get the pi back up and running with a keyboard, mouse, and monitor.
Run the following commands so you can get access to it from your pc. Set the basic settings for the pi and hook up a network connection to it. Then run the following commands.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xrdp
After you do this you should be able to access your pi using Remote Desktop Connection (rdp). Open rdp and enter raspberrypi into the computer field and press connect. Answer yes to the prompts and the login screen for the pi should appear. You are now operating the pi headless so you can stop using the monitor, keyboard and mouse.
Next you will want to perform the install of the software starting with the pre-requisites. https://github.com/tagyoureit/nodejs-poolController/wiki/DIY-Standalone-Nixie-Pool-Controller#install-software-prerequisites
When you get to the part where you are selecting the interfaces. Disable the Serial Console and enable the Serial Port.
Once you get to that point go ahead and configure the MEGA-BAS and your relay card and let me know when you finish that configuration.
Ok, I'll get started on this, thanks.
I have the Mega-BAS card and have not yet enabled RS-485 pass thru. I tried it and ran into the same issue. Ironically, there seem to be thousands of similar issues out there but I figured out a quick and easy way to do this that I didn't see mentioned anywhere. Give this a try and let me know if this works for you.
sudo raspi-config
.interface options
serial port
Final settings should look like:
When I answered yes to the login shell (easy to do!) that is where this problem is caused. I tried it about 3 times and was able to replicate the Unable to open port
each time I answered yes to the login shell question.
Hi tagyoureit,
unfortunately I haven't been able to complete getting everything installed.
I'm stuck once again, I can't seem to get PM2 installed and running.
When I try and run the command: sudo npm install -g pm2 I get this:
After installing node you must open a new console window or the path to num will not be found.
After installing node you must open a new console window or the path to num will not be found.
Sorry, I don't understand
I didn't have a problem installing pm2 last time around, now I'm having trouble and don"t understand. "open a new console window" ??
He means close the terminal and re-open it. That will start a new shell session.
Thank for that info tagyoureit. That is what I have been doing, or so I thought. I'll try again
Same thing, not working.
I give-up for now
It looks like you don't have node/npm installed yet. These instructions will get you through it: https://linuxize.com/post/how-to-install-node-js-on-raspberry-pi/
On the following command in the article, replace the 10
with 12
:
eg curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
should become
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
I think you may have missed the nvm install 12.18.3
command. This installs node and npm using the node version manager.
Hi guys, I'm giving this another try. I followed tagyoureit's suggestions above and it installed. So, got the pm2 done along with logrotate. Question 1, I didn't have to do this first time around, all I did before was copy past from DIY Standalone Nixie Pool Controller see attached image "b" below and it worked fine, so why this time different? Now, i'm having problem with REM. I got the Mega-Bas ok, but when trying to install the relay card the 3-0x03 unknown address is incorrect. It wont let me put in the correct address. When I click the + add device button and then click the add 12c address to put the correct address in, the window never opens, the program automatically chooses some generic one as shown in image "a" below which is wrong and will not work. Question 2, Why doesn't the window open so I can put in the correct address like it did before in the first time around? As per image "c" below, address 72 & 63 is what I want. It seems to get the 72 correct which I assigned for the Mega-Bas, but wrong for the other address (relay card) and I cant change it?
Anyway I'm stuck here and need help.
The detection method in REM is passive. It does this so that it does not interrupt communication with other devices. The 0x03 is not a correct address and it will disappear after REM restarts or the detection is re-run. So the address you need is 63 in decimal 0x3F is a hexadecimal address. So when the address screen pops up enter 63.
So to question 1. The reason this worked differently this time is because I believe you missed one of the commands to install nodejs using the nvm (Node Version Manager). That is the command nvm install 12.18.3
. There are a several of methods to get node and npm (Node Process Manager). The command that @tagyoureit had you run simply installs it from another packaged source.
If you look at this link you will see both methods of install. https://linuxize.com/post/how-to-install-node-js-on-raspberry-pi/
I cant get the address screen to open. I've rebooted etc. Can you help me get it open?
Hmmm... just to be sure you are clicking on the + symbol on the I2c Bus #1
tab.
If so what browser are you using?
yes
Which browser? Chrome, Edge, or something else?
chrome
Ok so I open run pm2 monit
and watch the console when you click on the plus symbol. It is very odd that your addresses in i2cdetect start at 8 not 3.
Shoot me a screenshot of your interfaces tab on the Raspberry Pi Configuration. It should have only I2C and Serial Port enabled. All others should be set to Disable.
I will disable SPI
This is screenshot
Ok so I open run
pm2 monit
and watch the console when you click on the plus symbol. It is very odd that your addresses in i2cdetect start at 8 not 3.
This is before disabling SPI
That tells me that the I2c bus is not communicating. If you stretch that screen to the right you will get more info. What hardware is installed on your pi?
just the building automation card & relay card if that is what you mean.
Run the following commands
pm2 stop REM
cd ~/relayEquipmentManager
npm start
This way we can watch the console when you run.
now what?
What is the complete error for the BAS trying to communicate?
Also when you ran npm start did any error messages appear in the console?
Run the following commands
pm2 stop REM
cd ~/relayEquipmentManager
npm start
This way we can watch the console when you run.
Hope this is what you were asking for?
Ok so it looks like you have more than one REM server loaded. Did you run pm2 stop REM
?
yes
do it again?
Yes this time it should show that REM is stopped. Do you have it running in any other window?
No, I'll do it again.
Wait, I do have it open now, but in one window is that ok?
If you mean on the pi then no that is not ok. When we run npm start
we are starting another copy and there can only be 1.
Here is my screen, is this ok?
I am talking about terminal windows. The web page is ok as this is not a REM server. Only the program launched by npm start
or a pm2 process is a server. You didn't also set up systemd from the same Wiki page did you?
The reason why I am saying that REM is still running is because of this message on the npm start. That indicates that the server is already running on the designated port when we are trying to start it.
Issue: In the nixie scheduler when setting the on/off times the minutes are not changeable while in the 12:00pm hour. When you try, it automatically reverts back to 12:00pm. For instance, if you set the time as 12:37pm the system automatically resets the time back to12:00pm for some reason. All the other hours 1-11 am or pm you can set any minute you desire.
I’m sure it’s just something I’m doing wrong. Any Ideas?