beep-projects / SystaPi

Adding WiFi and a REST API to Paradigma SystaComfort units
GNU General Public License v3.0
16 stars 3 forks source link

Scripts not running on raspberry pi #5

Closed matze1007 closed 2 years ago

matze1007 commented 2 years ago

I wan't to install Systapi but i cant get it work. I used the windows method, but with your cmdline.txt my pi don't boot up.

The normal image without your scripts boots up und it run's fine. After that i trie'd to run your script on Putty but secondrun ended with 100 errors in build.sh

I use a Raspi 3b+ ... that's the Problem ??

beep-projects commented 2 years ago

Can you attach the log files? /boot/firstrun.log /boot/secondrun.log

matze1007 commented 2 years ago

Sorry, i tried different times and on this attempt the script stops earlier. So there is no log with the errors of the build.sh

`update-alternatives: using /usr/lib/jvm/zulu11.50.19-ca-jdk11.0.12-linux_aarch32hf/bin/java to provide /usr/bin/java (java) in auto mode update-alternatives: using /usr/lib/jvm/zulu11.50.19-ca-jdk11.0.12-linux_aarch32hf/bin/javac to provide /usr/bin/javac (javac) in auto mode

copy SystaRESTServer from /boot to /home/pi

cp: -r not specified; omitting directory '/boot/SystaRESTServer'

build SystaRESTServer from source files

./secondrun.sh: line 114: cd: /home/pi/SystaRESTServer: No such file or directory chown: cannot access '/home/pi/SystaRESTServer': No such file or directory create service file /etc/systemd/system/SystaRESTServer.service reload services and enable SystaRESTServer.service Created symlink /etc/systemd/system/multi-user.target.wants/SystaRESTServer.service → /etc/systemd/system/SystaRESTServer.service. remove autoinstalled packages`

This time the script can't copy the files. I will try it again tomorrow.

beep-projects commented 2 years ago

Hi, i saw that I missed to document step 7 for the manual installation (and added it just now). That was the reason why your pi did not boot.

The run above is failing, because the recursive flag -R is missing from cp command. I have added it to the file in the repo. The entry should look like

copy SystaRESTServer to the pi homefolder for easy access

echo "copy SystaRESTServer from /boot to /home/pi" cp -R /boot/SystaRESTServer /home/pi/

matze1007 commented 2 years ago

Thanks. Now the pi boot's up. But the problem isn't solved. I post the errors:

./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:10: error: package org.junit does not exist import static org.junit.Assert.assertEquals; ^ ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:10: error: static import only from classes and interfaces import static org.junit.Assert.assertEquals; ^ ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:13: error: package org.junit does not exist import org.junit.Test; ^ ./src/de/freaklamarsch/systarest/tests/DataLoggerTest.java:10: error: package org.junit does not exist import static org.junit.Assert.assertEquals; ^ ./src/de/freaklamarsch/systarest/tests/DataLoggerTest.java:10: error: static import only from classes and interfaces import static org.junit.Assert.assertEquals; ^ ./src/de/freaklamarsch/systarest/tests/DataLoggerTest.java:11: error: package org.junit does not exist import static org.junit.Assert.assertFalse; ^ ./src/de/freaklamarsch/systarest/tests/DataLoggerTest.java:11: error: static import only from classes and interfaces import static org.junit.Assert.assertFalse; ^ ./src/de/freaklamarsch/systarest/tests/DataLoggerTest.java:15: error: package org.junit does not exist import org.junit.Test; ^ ./src/de/freaklamarsch/systarest/tests/FakeSystaWebTest.java:10: error: package org.junit.jupiter.api does not exist import static org.junit.jupiter.api.Assertions.; ^ ./src/de/freaklamarsch/systarest/tests/FakeSystaWebTest.java:19: error: package org.junit.jupiter.api does not exist import org.junit.jupiter.api.Test; ^ ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:10: error: package org.junit does not exist import static org.junit.Assert.assertEquals; ^ ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:10: error: static import only from classes and interfaces import static org.junit.Assert.assertEquals; ^ ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:11: error: package org.junit.jupiter.api does not exist import static org.junit.jupiter.api.Assertions.; ^ ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:22: error: package org.junit.jupiter.api does not exist import org.junit.jupiter.api.AfterAll; ^ ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:23: error: package org.junit.jupiter.api does not exist import org.junit.jupiter.api.BeforeAll; ^ ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:24: error: package org.junit.jupiter.api does not exist import org.junit.jupiter.api.Test; ^ ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:25: error: package org.junit.jupiter.api does not exist import org.junit.jupiter.api.TestInstance; ^ ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:33: error: cannot find symbol @TestInstance(TestInstance.Lifecycle.PER_CLASS) // fix incompatibility with JUnit5 ^ symbol: class TestInstance ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:25: error: cannot find symbol @Test ^ symbol: class Test location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:61: error: cannot find symbol @Test ^ symbol: class Test location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:122: error: cannot find symbol @Test ^ symbol: class Test location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:176: error: cannot find symbol @Test ^ symbol: class Test location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:208: error: cannot find symbol @Test ^ symbol: class Test location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/DataLoggerTest.java:30: error: cannot find symbol @Test ^ symbol: class Test location: class DataLoggerTest ./src/de/freaklamarsch/systarest/tests/DataLoggerTest.java:50: error: cannot find symbol @Test ^ symbol: class Test location: class DataLoggerTest ./src/de/freaklamarsch/systarest/tests/FakeSystaWebTest.java:27: error: cannot find symbol @Test ^ symbol: class Test location: class FakeSystaWebTest ./src/de/freaklamarsch/systarest/tests/FakeSystaWebTest.java:151: error: cannot find symbol @Test ^ symbol: class Test location: class FakeSystaWebTest ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:33: error: package TestInstance does not exist @TestInstance(TestInstance.Lifecycle.PER_CLASS) // fix incompatibility with JUnit5 ^ ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:36: error: cannot find symbol @BeforeAll // fix incompatibility with JUnit5 ^ symbol: class BeforeAll location: class SystaRESTAPITest ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:42: error: cannot find symbol @AfterAll // fix incompatibility with JUnit5 ^ symbol: class AfterAll location: class SystaRESTAPITest ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:64: error: cannot find symbol @Test ^ symbol: class Test location: class SystaRESTAPITest ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:90: error: cannot find symbol @Test ^ symbol: class Test location: class SystaRESTAPITest ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:119: error: cannot find symbol @Test ^ symbol: class Test location: class SystaRESTAPITest ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:148: error: cannot find symbol @Test ^ symbol: class Test location: class SystaRESTAPITest ./src/de/freaklamarsch/systarest/tests/SystaRESTAPITest.java:176: error: cannot find symbol @Test ^ symbol: class Test location: class SystaRESTAPITest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:36: error: cannot find symbol assertEquals(testCapacity, cb.capacity()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:37: error: cannot find symbol assertEquals(0, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:38: error: cannot find symbol assertEquals(true, cb.isEmpty()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:39: error: cannot find symbol assertEquals(false, cb.isFull()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:40: error: cannot find symbol assertEquals(null, cb.peek()); ^ symbol: method assertEquals(,Integer) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:41: error: cannot find symbol assertEquals(null, cb.remove()); ^ symbol: method assertEquals(,Integer) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:45: error: cannot find symbol assertEquals(defaultCapacity, cb.capacity()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:46: error: cannot find symbol assertEquals(0, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:47: error: cannot find symbol assertEquals(true, cb.isEmpty()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:48: error: cannot find symbol assertEquals(false, cb.isFull()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:49: error: cannot find symbol assertEquals(null, cb.peek()); ^ symbol: method assertEquals(,Integer) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:50: error: cannot find symbol assertEquals(null, cb.remove()); ^ symbol: method assertEquals(,Integer) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:53: error: cannot find symbol assertEquals(defaultCapacity, cb.capacity()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:54: error: cannot find symbol assertEquals(0, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:55: error: cannot find symbol assertEquals(true, cb.isEmpty()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:56: error: cannot find symbol assertEquals(false, cb.isFull()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:57: error: cannot find symbol assertEquals(null, cb.peek()); ^ symbol: method assertEquals(,Integer) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:58: error: cannot find symbol assertEquals(null, cb.remove()); ^ symbol: method assertEquals(,Integer) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:69: error: cannot find symbol assertEquals(true, cb.add(i)); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:71: error: cannot find symbol assertEquals(testCapacity, cb.capacity()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:73: error: cannot find symbol assertEquals(i + 1, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:75: error: cannot find symbol assertEquals(false, cb.isEmpty()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:77: error: cannot find symbol assertEquals(false, cb.isFull()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:79: error: cannot find symbol assertEquals(0, (int) cb.peek()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:82: error: cannot find symbol assertEquals(true, cb.add(i)); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:84: error: cannot find symbol assertEquals(testCapacity, cb.capacity()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:86: error: cannot find symbol assertEquals(i + 1, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:88: error: cannot find symbol assertEquals(false, cb.isEmpty()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:90: error: cannot find symbol assertEquals(true, cb.isFull()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:92: error: cannot find symbol assertEquals(0, (int) cb.peek()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:95: error: cannot find symbol assertEquals(false, cb.add(i)); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:97: error: cannot find symbol assertEquals(0, (int) cb.remove()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:99: error: cannot find symbol assertEquals(testCapacity, cb.capacity()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:102: error: cannot find symbol assertEquals(testCapacity - 1, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:104: error: cannot find symbol assertEquals(false, cb.isEmpty()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:106: error: cannot find symbol assertEquals(false, cb.isFull()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:108: error: cannot find symbol assertEquals(1, (int) cb.peek()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:110: error: cannot find symbol assertEquals(true, cb.add(i)); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:113: error: cannot find symbol assertEquals(true, cb.add(++i)); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:115: error: cannot find symbol assertEquals(2, (int) cb.peek()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:117: error: cannot find symbol assertEquals(true, cb.add(++i)); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:119: error: cannot find symbol assertEquals(3, (int) cb.peek()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:130: error: cannot find symbol assertEquals(true, cb.add(i)); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:132: error: cannot find symbol assertEquals(testCapacity, cb.capacity()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:134: error: cannot find symbol assertEquals(i + 1, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:136: error: cannot find symbol assertEquals(false, cb.isEmpty()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:138: error: cannot find symbol assertEquals(false, cb.isFull()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:140: error: cannot find symbol assertEquals(0, (int) cb.peek()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:143: error: cannot find symbol assertEquals(true, cb.add(i)); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:145: error: cannot find symbol assertEquals(testCapacity, cb.capacity()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:147: error: cannot find symbol assertEquals(i + 1, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:149: error: cannot find symbol assertEquals(testCapacity, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:151: error: cannot find symbol assertEquals(false, cb.isEmpty()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:153: error: cannot find symbol assertEquals(true, cb.isFull()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:155: error: cannot find symbol assertEquals(0, (int) cb.peek()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:159: error: cannot find symbol assertEquals(true, cb.add(i)); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:161: error: cannot find symbol assertEquals(testCapacity, cb.capacity()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:164: error: cannot find symbol assertEquals(i, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:166: error: cannot find symbol assertEquals(testCapacity, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:168: error: cannot find symbol assertEquals(false, cb.isEmpty()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:170: error: cannot find symbol assertEquals(true, cb.isFull()); ^ symbol: method assertEquals(boolean,boolean) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:173: error: cannot find symbol assertEquals(1, (int) cb.peek()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:188: error: cannot find symbol assertEquals(Integer.valueOf(i), cb.remove()); ^ symbol: method assertEquals(Integer,Integer) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:190: error: cannot find symbol assertEquals(testCapacity - i - 1, cb.size()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest ./src/de/freaklamarsch/systarest/tests/CircularBufferTest.java:194: error: cannot find symbol assertEquals(testCapacity, cb.capacity()); ^ symbol: method assertEquals(int,int) location: class CircularBufferTest Note: ./src/de/freaklamarsch/systarest/tests/DataLoggerTest.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 100 errors create service file /etc/systemd/system/SystaRESTServer.service reload services and enable SystaRESTServer.service

matze1007 commented 2 years ago

found it. Must copy the .github Folder to PI.

But my next question .... How can I "Datenübertragung aktivieren" on SystaComfort2 ??

beep-projects commented 2 years ago

Thanks for figuring this out, I must have lost JUnit somehow with the last commit.

For the Datenübertragung you mean this? https://github.com/xgcssch/SystaComfortPrometheusExporter#configure-systacomfort-controller

On my unit it was activated from the beginning ...

beep-projects commented 2 years ago

I can send you a link that should help if you tell me how to contact you, or send me a message via facebook https://www.facebook.com/Beep-projects-105097291965997

matze1007 commented 2 years ago

i've send you a message via facebook