arrow1800 / Victron-VirtualBattery

8 stars 2 forks source link

problem with install #8

Closed drtinaz closed 1 year ago

drtinaz commented 1 year ago

I have followed all the instruction, but when I get to the last step I get the following result

./data/dbus-virtual-battery/install.sh: line 8: syntax error near unexpect ed token newline' ./data/dbus-virtual-battery/install.sh: line 8:<!DOCTYPE html>'

arrow1800 commented 1 year ago

hi @thomasinaz41213 i think this was/is caused by the wrong line endings in those files. i changed it. could you try again?

drtinaz commented 1 year ago

I have deleted and re uploaded the files but still get the same result when i run the install script

drtinaz commented 1 year ago

I finally got it figured out. Being brand new to all this linux stuff I was not transfering the files correctly from the github. It is working now. Thank you so much.

On another note, would it be possible to add the option for a stepped maximum charging voltage based on soc?

drtinaz commented 1 year ago

hi @thomasinaz41213 i think this was/is caused by the wrong line endings in those files. i changed it. could you try again?

I got everything working but now I can't uninstall it. The uninstall script seems to have a problem.

root@einstein:/# ./data/dbus-virtual-battery/uninstall.sh kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] ./data/dbus-virtual-battery/uninstall.sh: line 8: ./restart.sh: No such fi le or directory

I tried to run the uninstall script from the root directory as well as from dbus-virtual-battery directory with the same results

arrow1800 commented 1 year ago

I finally got it figured out. Being brand new to all this linux stuff I was not transfering the files correctly from the github. It is working now. Thank you so much.

On another note, would it be possible to add the option for a stepped maximum charging voltage based on soc?

yes offcourse. you can build this yourself in node-red. an example (still tuning it myself as well):

image

arrow1800 commented 1 year ago

hi @thomasinaz41213 i think this was/is caused by the wrong line endings in those files. i changed it. could you try again?

I got everything working but now I can't uninstall it. The uninstall script seems to have a problem.

root@einstein:/# ./data/dbus-virtual-battery/uninstall.sh kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] ./data/dbus-virtual-battery/uninstall.sh: line 8: ./restart.sh: No such fi le or directory

I tried to run the uninstall script from the root directory as well as from dbus-virtual-battery directory with the same results

committed a minor fix for the uninstall.sh script. you can try again.

running these scripts (install,restart,uninstall) is the easiest from the root folder -> root@einstein:/#

run them by typing this: ./data/dbus-virtualbattery/filename.sh

please let me know if it works

morres83 commented 1 year ago

I also encountered a problem, the scripts are somehow dependent on the folder name and file names. In other scripts it was the same (folder name= file name).

For my MQTT version I will do the same (folder name= file name), then I am consistent throughout my other scripts.

arrow1800 commented 1 year ago

I also encountered a problem, the scripts are somehow dependent on the folder name and file names. In other scripts it was the same (folder name= file name).

For my MQTT version I will do the same (folder name= file name), then I am consistent throughout my other scripts.

is there still a problem that needs to be fixed or is this more like an enhancement?

morres83 commented 1 year ago

Please check with ps on your system how the processes are called. It seems that SERVICE_NAME is equal to the folder name, so this line in uninstall.sh might fail.

kill $(pgrep -f 'supervise virtualbattery')

So either call the folder also virtualbattery (and update README), or update the uninstall.sh file so such it contains the folder name.

arrow1800 commented 1 year ago

modified. closing this issue for now, if anything new arises, feel free to make a new issue