Can't create jacks with esp32 driver.

SHARK_2

New Member
Review score
+0 /0 /-0
View Badges
Joined
Dec 13, 2020
Messages
10
Reaction score
5
Review score
+0 /0 /-0
Location
Warsaw
Rating - 0%
0   0   0
Hi @Ranjib,

First thank You for great update with support of esp32.

I've made some custom boards with esp32 :D
pH reader (ver 1.0):
download

PowerLed Lamp driver:
download

Expansion ports:
download

But I need Your help, I can't create jacks using esp32 driver.
download

download

download

In log i get:
Code:
May 10 13:14:01 home reef-pi[513758]: 2023/05/10 13:14:01 API Request:'   GET /api/me' from: 192.168.3.13:51294
May 10 13:14:09 home reef-pi[513758]: 2023/05/10 13:14:09 API Request:'   PUT /api/jacks' from: 192.168.3.13:51294
May 10 13:14:09 home reef-pi[513758]: 2023/05/10 13:14:09 ERROR: Failed to create. Error: invalid pin 0: driver rpi for jack test1 not found: driver by id rpi not available
May 10 13:14:09 home reef-pi[513758]: 2023/05/10 13:14:09 API Request:'   GET /api/jacks' from: 192.168.3.13:51294
May 10 13:14:11 home reef-pi[513758]: 2023/05/10 13:14:11 API Request:'   GET /api/me' from: 192.168.3.13:51294
May 10 13:14:21 home reef-pi[513758]: 2023/05/10 13:14:21 API Request:'   GET /api/me' from: 192.168.3.13:51294
May 10 13:14:23 home reef-pi[513758]: 2023/05/10 13:14:23 API Request:'   PUT /api/jacks' from: 192.168.3.13:51294
May 10 13:14:23 home reef-pi[513758]: 2023/05/10 13:14:23 ERROR: Failed to create. Error: invalid pin 27: driver rpi for jack test1 not found: driver by id rpi not available
May 10 13:14:23 home reef-pi[513758]: 2023/05/10 13:14:23 API Request:'   GET /api/jacks' from: 192.168.3.13:51294

download


The strange thing is that I choose esp32 as the driver, but log and gui says about rpi driver.

The esp32 itself works - I can change the brightness of individual channels:
download


Can You (or someone else) give me a hint what I am doing wrong?
 
Avast

Sral

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
746
Reaction score
820
Review score
+0 /0 /-0
Location
Germany
Rating - 0%
0   0   0
I was able to "cheat" the app and add jacks, but it didn't work for me right from the start.
How exactly did you cheat ?

Also: what Browser and device were you using to access ReefPi ? Might be an issue with the drop-down UI, as it seems to try and use the rpi driver even though you have selected the esp32-driver.

Have you restarted or rebooted ReefPi after establishing the driver ?
 
OP
OP
S

SHARK_2

New Member
Review score
+0 /0 /-0
View Badges
Joined
Dec 13, 2020
Messages
10
Reaction score
5
Review score
+0 /0 /-0
Location
Warsaw
Rating - 0%
0   0   0
Hi @Sral

I configured the driver to a nonexistent IP address. Thanks to this, I was able to add jacks without any problems. After this procedure, I reconfigured the Driver to the target IP and it worked.

I am able to control all channels of the lamp. Unfortunately, I noticed another problem. I don't know why, but from time to time reef-pi sets "0" PWM on some channels, even though at this particular time there should be a different value
 
OP
OP
S

SHARK_2

New Member
Review score
+0 /0 /-0
View Badges
Joined
Dec 13, 2020
Messages
10
Reaction score
5
Review score
+0 /0 /-0
Location
Warsaw
Rating - 0%
0   0   0
Log from esp32 serial (look at pin 27):
Code:
PWM Pin19 DutyCycle:89
PWM Pin27 DutyCycle:41
PWM Pin26 DutyCycle:0
PWM Pin25 DutyCycle:103
PWM Pin33 DutyCycle:109
PWM Pin17 DutyCycle:127
PWM Pin16 DutyCycle:98
PWM Pin19 DutyCycle:89
PWM Pin18 DutyCycle:89
PWM Pin27 DutyCycle:41
PWM Pin26 DutyCycle:0
PWM Pin25 DutyCycle:103
PWM Pin33 DutyCycle:109
PWM Pin17 DutyCycle:127
PWM Pin16 DutyCycle:97
PWM Pin18 DutyCycle:89
PWM Pin19 DutyCycle:89
Value:27.69
PWM Pin27 DutyCycle:40
PWM Pin26 DutyCycle:0
...
PWM Pin18 DutyCycle:89
PWM Pin27 DutyCycle:40
PWM Pin26 DutyCycle:0
...
Value:27.62
PWM Pin19 DutyCycle:89
PWM Pin27 DutyCycle:40
PWM Pin25 DutyCycle:102
...
PWM Pin27 DutyCycle:39
PWM Pin26 DutyCycle:0
PWM Pin25 DutyCycle:102
PWM Pin33 DutyCycle:108
PWM Pin17 DutyCycle:127
PWM Pin16 DutyCycle:96
PWM Pin19 DutyCycle:89
PWM Pin18 DutyCycle:89
Value:27.56
PWM Pin27 DutyCycle:39
...
PWM Pin27 DutyCycle:39
PWM Pin26 DutyCycle:0
PWM Pin25 DutyCycle:102
PWM Pin33 DutyCycle:108
PWM Pin17 DutyCycle:127
PWM Pin16 DutyCycle:96
PWM Pin27 DutyCycle:0
Value:27.56
PWM Pin19 DutyCycle:89
PWM Pin27 DutyCycle:38
...
PWM Pin27 DutyCycle:38
PWM Pin26 DutyCycle:0
PWM Pin25 DutyCycle:102
PWM Pin33 DutyCycle:108
PWM Pin17 DutyCycle:127
PWM Pin16 DutyCycle:95
PWM Pin18 DutyCycle:89
Value:27.50

But don't see (attachment) this in reef-pi log (grep L2#CH1 /var /log /syslog | less - L2#CH1 is pin nr 27).

Whether the PWM values sent in POST should not be INT??

Screenshot 2023-05-12 at 21.59.33.png
 
Last edited:

Sral

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
746
Reaction score
820
Review score
+0 /0 /-0
Location
Germany
Rating - 0%
0   0   0
Hi @Sral

I configured the driver to a nonexistent IP address. Thanks to this, I was able to add jacks without any problems. After this procedure, I reconfigured the Driver to the target IP and it worked.

I am able to control all channels of the lamp. Unfortunately, I noticed another problem. I don't know why, but from time to time reef-pi sets "0" PWM on some channels, even though at this particular time there should be a different value
Interesting. Might be a communication or url translation error. Have you noticed this only on pin 27 ?
If yes, is pin 27 the first in the list of jacks by any chance ?
 
Top Shelf Aquatics
OP
OP
S

SHARK_2

New Member
Review score
+0 /0 /-0
View Badges
Joined
Dec 13, 2020
Messages
10
Reaction score
5
Review score
+0 /0 /-0
Location
Warsaw
Rating - 0%
0   0   0
Interesting. Might be a communication or url translation error. Have you noticed this only on pin 27 ?
If yes, is pin 27 the first in the list of jacks by any chance ?
Yes pin 27 is the first in the list of hacks:
Code:
const int jackPins[JACK_COUNT] = { 27, 26, 25, 33, 16, 17, 18, 19 };
const int pwmChannels[JACK_COUNT] = { 0, 1, 2, 3, 4, 5, 6, 7 };
//const int analogInputPins[ANALOG_INPUT_COUNT] = { 34 };
const int oneWirePin = 4;

And I didn't analyze (yet) rest of jacks.

I also have problem with esp32 crash from time to time.
 

Sral

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
746
Reaction score
820
Review score
+0 /0 /-0
Location
Germany
Rating - 0%
0   0   0
Yes pin 27 is the first in the list of hacks:
Code:
const int jackPins[JACK_COUNT] = { 27, 26, 25, 33, 16, 17, 18, 19 };
const int pwmChannels[JACK_COUNT] = { 0, 1, 2, 3, 4, 5, 6, 7 };
//const int analogInputPins[ANALOG_INPUT_COUNT] = { 34 };
const int oneWirePin = 4;

And I didn't analyze (yet) rest of jacks.

I also have problem with esp32 crash from time to time.
Interesting. That suggests to me that it is a url translation error. The URL translation went wrong sometimes in my tests, likely causing a value of 0 for the 0th Jack and also causing Null-pointers that crash the ESP32.

You could try using my modified PathVariableHandler library instead of the original. If my thinking is right it might both reduce the number of crashes and also keep the jacks from erroneous values of 0.
 
OP
OP
S

SHARK_2

New Member
Review score
+0 /0 /-0
View Badges
Joined
Dec 13, 2020
Messages
10
Reaction score
5
Review score
+0 /0 /-0
Location
Warsaw
Rating - 0%
0   0   0
Interesting. That suggests to me that it is a url translation error. The URL translation went wrong sometimes in my tests, likely causing a value of 0 for the 0th Jack and also causing Null-pointers that crash the ESP32.

You could try using my modified PathVariableHandler library instead of the original. If my thinking is right it might both reduce the number of crashes and also keep the jacks from erroneous values of 0.
I just built a sketch with your library, let's see how my esp32 will behaves.
 
CLICK TO VIEW

Sral

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
746
Reaction score
820
Review score
+0 /0 /-0
Location
Germany
Rating - 0%
0   0   0
Another method might be to simply insert an unused pin as the first Jack-pin. That way hopefully none of your light channels will encounter this specific error.

You can also try my modified ESP32-code, it catches a few more Null-pointer exceptions and enables the usage of a flowmeter, multiple temperature sensors and I2C sensors, specifically only Robo-Tank pH and any Atlas Scientific sensors at the moment.
 
OP
OP
S

SHARK_2

New Member
Review score
+0 /0 /-0
View Badges
Joined
Dec 13, 2020
Messages
10
Reaction score
5
Review score
+0 /0 /-0
Location
Warsaw
Rating - 0%
0   0   0
Another method might be to simply insert an unused pin as the first Jack-pin. That way hopefully none of your light channels will encounter this specific error.

You can also try my modified ESP32-code, it catches a few more Null-pointer exceptions and enables the usage of a flowmeter, multiple temperature sensors and I2C sensors, specifically only Robo-Tank pH and any Atlas Scientific sensors at the moment.
I will give it a try later.

For now I can tell that this is not only PIN "0" problem:
Code:
10:19:28.136 -> PWM Pin27 DutyCycle:82
10:19:28.136 -> PWM Pin26 DutyCycle:19
10:19:28.136 -> PWM Pin25 DutyCycle:69
10:19:28.136 -> PWM Pin33 DutyCycle:69
10:19:28.136 -> PWM Pin17 DutyCycle:92
10:19:28.136 -> PWM Pin16 DutyCycle:69
10:19:28.136 -> PWM Pin18 DutyCycle:86
10:19:28.136 -> PWM Pin19 DutyCycle:86
10:19:48.168 -> PWM Pin27 DutyCycle:82
10:19:48.168 -> PWM Pin26 DutyCycle:19
10:19:48.168 -> PWM Pin25 DutyCycle:69
10:19:48.168 -> PWM Pin33 DutyCycle:69
10:19:48.168 -> PWM Pin17 DutyCycle:93
10:19:48.168 -> PWM Pin16 DutyCycle:0
10:19:48.168 -> PWM Pin19 DutyCycle:87
10:19:48.168 -> PWM Pin18 DutyCycle:87
10:19:48.168 -> Value:26.50
10:20:28.234 -> PWM Pin27 DutyCycle:82
10:20:28.234 -> PWM Pin26 DutyCycle:20
10:20:28.234 -> PWM Pin25 DutyCycle:70
10:20:28.234 -> PWM Pin33 DutyCycle:70
10:20:28.234 -> PWM Pin17 DutyCycle:93
10:20:28.234 -> PWM Pin16 DutyCycle:70
10:20:28.234 -> PWM Pin18 DutyCycle:87
10:20:28.234 -> PWM Pin19 DutyCycle:87
10:20:48.267 -> PWM Pin27 DutyCycle:83
10:20:48.267 -> PWM Pin26 DutyCycle:20
10:20:48.267 -> PWM Pin16 DutyCycle:70
10:20:48.267 -> PWM Pin17 DutyCycle:93
10:20:48.267 -> PWM Pin25 DutyCycle:70
10:20:48.267 -> PWM Pin33 DutyCycle:70
10:20:48.267 -> PWM Pin19 DutyCycle:87
10:20:48.267 -> PWM Pin18 DutyCycle:87
10:20:48.267 -> Value:26.50
10:21:28.332 -> PWM Pin27 DutyCycle:83
10:21:28.332 -> PWM Pin26 DutyCycle:21
10:21:28.332 -> PWM Pin25 DutyCycle:70
10:21:28.332 -> PWM Pin33 DutyCycle:70
10:21:28.332 -> PWM Pin17 DutyCycle:94
10:21:28.332 -> PWM Pin16 DutyCycle:70
10:21:28.332 -> PWM Pin18 DutyCycle:87
10:21:28.332 -> PWM Pin19 DutyCycle:87
10:21:48.365 -> PWM Pin27 DutyCycle:83
10:21:48.365 -> PWM Pin26 DutyCycle:21
10:21:48.365 -> PWM Pin25 DutyCycle:70
10:21:48.365 -> PWM Pin33 DutyCycle:70
10:21:48.365 -> PWM Pin17 DutyCycle:94
10:21:48.365 -> PWM Pin16 DutyCycle:70
10:21:48.365 -> PWM Pin18 DutyCycle:87
10:21:48.365 -> PWM Pin19 DutyCycle:87
10:21:48.365 -> Value:26.50
10:22:28.431 -> PWM Pin27 DutyCycle:83
10:22:28.431 -> PWM Pin26 DutyCycle:22
10:22:28.431 -> PWM Pin25 DutyCycle:71
10:22:28.431 -> PWM Pin33 DutyCycle:71
10:22:28.431 -> PWM Pin17 DutyCycle:94
10:22:28.431 -> PWM Pin16 DutyCycle:71
10:22:28.431 -> PWM Pin19 DutyCycle:87
10:22:28.431 -> PWM Pin18 DutyCycle:87
10:22:48.463 -> PWM Pin27 DutyCycle:84
10:22:48.463 -> PWM Pin26 DutyCycle:22
10:22:48.463 -> PWM Pin25 DutyCycle:71
10:22:48.463 -> PWM Pin33 DutyCycle:71
10:22:48.463 -> PWM Pin17 DutyCycle:95
10:22:48.463 -> PWM Pin16 DutyCycle:71
10:22:48.463 -> PWM Pin18 DutyCycle:87
10:22:48.463 -> Value:26.50
10:22:48.463 -> PWM Pin19 DutyCycle:87
10:23:28.529 -> PWM Pin27 DutyCycle:84
10:23:28.529 -> PWM Pin27 DutyCycle:0
10:23:28.529 -> PWM Pin25 DutyCycle:71
10:23:28.529 -> PWM Pin33 DutyCycle:71
10:23:28.529 -> PWM Pin17 DutyCycle:95
10:23:28.529 -> PWM Pin16 DutyCycle:71
10:23:28.529 -> PWM Pin18 DutyCycle:87
10:23:28.529 -> PWM Pin19 DutyCycle:87
10:23:48.561 -> PWM Pin27 DutyCycle:84
10:23:48.561 -> PWM Pin26 DutyCycle:23
10:23:48.561 -> PWM Pin25 DutyCycle:71
10:23:48.561 -> PWM Pin33 DutyCycle:71
10:23:48.561 -> PWM Pin17 DutyCycle:95
10:23:48.561 -> PWM Pin16 DutyCycle:71
10:23:48.561 -> PWM Pin19 DutyCycle:87
10:23:48.561 -> Value:26.50
10:23:48.561 -> PWM Pin18 DutyCycle:87
10:24:28.627 -> PWM Pin27 DutyCycle:84
10:24:28.627 -> PWM Pin26 DutyCycle:24
10:24:28.627 -> PWM Pin25 DutyCycle:72
10:24:28.627 -> PWM Pin33 DutyCycle:72
10:24:28.627 -> PWM Pin17 DutyCycle:96
10:24:28.627 -> PWM Pin16 DutyCycle:72
10:24:28.627 -> PWM Pin19 DutyCycle:87
10:24:28.627 -> PWM Pin18 DutyCycle:87
10:24:48.660 -> PWM Pin27 DutyCycle:85
10:24:48.660 -> PWM Pin26 DutyCycle:24
10:24:48.660 -> PWM Pin25 DutyCycle:72
10:24:48.660 -> PWM Pin33 DutyCycle:72
10:24:48.660 -> PWM Pin17 DutyCycle:96
10:24:48.660 -> PWM Pin16 DutyCycle:72
10:24:48.660 -> PWM Pin18 DutyCycle:87
10:24:48.660 -> Value:26.50
10:24:48.660 -> PWM Pin19 DutyCycle:87
10:25:28.725 -> PWM Pin27 DutyCycle:85
10:25:28.725 -> PWM Pin26 DutyCycle:25
10:25:28.725 -> PWM Pin25 DutyCycle:72
10:25:28.725 -> PWM Pin27 DutyCycle:0
10:25:28.725 -> PWM Pin17 DutyCycle:96
10:25:28.725 -> PWM Pin16 DutyCycle:72
10:25:28.725 -> PWM Pin19 DutyCycle:87
10:25:28.725 -> PWM Pin18 DutyCycle:87
10:25:48.758 -> PWM Pin27 DutyCycle:85
10:25:48.758 -> PWM Pin25 DutyCycle:72
10:25:48.758 -> PWM Pin26 DutyCycle:25
10:25:48.758 -> PWM Pin33 DutyCycle:72
10:25:48.758 -> PWM Pin17 DutyCycle:97
10:25:48.758 -> PWM Pin16 DutyCycle:72
10:25:48.758 -> Value:26.50
10:25:48.758 -> PWM Pin18 DutyCycle:88
10:25:48.758 -> PWM Pin19 DutyCycle:88
10:26:28.824 -> PWM Pin27 DutyCycle:85
10:26:28.824 -> PWM Pin26 DutyCycle:26
10:26:28.824 -> PWM Pin25 DutyCycle:73
10:26:28.824 -> PWM Pin33 DutyCycle:73
10:26:28.824 -> PWM Pin16 DutyCycle:73
10:26:28.824 -> PWM Pin17 DutyCycle:97
10:26:28.824 -> PWM Pin18 DutyCycle:88
10:26:28.824 -> PWM Pin19 DutyCycle:88
10:26:48.856 -> PWM Pin27 DutyCycle:86
10:26:48.856 -> PWM Pin26 DutyCycle:26
10:26:48.856 -> PWM Pin25 DutyCycle:73
10:26:48.856 -> PWM Pin33 DutyCycle:73
10:26:48.856 -> PWM Pin17 DutyCycle:98
10:26:48.856 -> PWM Pin16 DutyCycle:73
10:26:48.856 -> PWM Pin18 DutyCycle:88
10:26:48.856 -> Value:26.50
10:26:48.856 -> PWM Pin19 DutyCycle:88
10:27:19.377 -> PWM Pin27 DutyCycle:86
10:27:19.377 -> PWM Pin26 DutyCycle:27
10:27:19.377 -> PWM Pin25 DutyCycle:73
10:27:19.377 -> PWM Pin17 DutyCycle:98
10:27:19.377 -> PWM Pin33 DutyCycle:73
10:27:19.377 -> PWM Pin16 DutyCycle:73
10:27:19.377 -> PWM Pin19 DutyCycle:88
10:27:19.377 -> PWM Pin18 DutyCycle:88
10:27:42.813 -> PWM Pin27 DutyCycle:86
10:27:42.846 -> PWM Pin26 DutyCycle:27
10:27:42.846 -> PWM Pin25 DutyCycle:74
10:27:42.846 -> PWM Pin33 DutyCycle:74
10:27:42.846 -> PWM Pin17 DutyCycle:98
10:27:42.846 -> PWM Pin16 DutyCycle:74
10:27:42.880 -> PWM Pin18 DutyCycle:88
10:27:42.880 -> PWM Pin19 DutyCycle:88
10:27:43.563 -> Value:26.50
10:28:12.593 -> PWM Pin27 DutyCycle:86
10:28:12.929 -> PWM Pin26 DutyCycle:28
10:28:12.929 -> PWM Pin27 DutyCycle:0
10:28:12.929 -> PWM Pin25 DutyCycle:74
10:28:12.929 -> PWM Pin16 DutyCycle:74
10:28:12.963 -> PWM Pin17 DutyCycle:99
10:28:14.139 -> PWM Pin18 DutyCycle:88
10:28:14.139 -> PWM Pin19 DutyCycle:88
10:28:42.734 -> PWM Pin27 DutyCycle:87
10:28:43.039 -> PWM Pin26 DutyCycle:28
10:28:43.039 -> PWM Pin25 DutyCycle:74
10:28:43.039 -> PWM Pin33 DutyCycle:74
10:28:43.039 -> PWM Pin16 DutyCycle:74
10:28:43.075 -> PWM Pin17 DutyCycle:99
10:28:43.950 -> PWM Pin18 DutyCycle:0
10:28:43.950 -> PWM Pin19 DutyCycle:88
10:28:44.628 -> Value:26.56
10:29:12.533 -> PWM Pin27 DutyCycle:87
10:29:12.834 -> PWM Pin25 DutyCycle:74
10:29:12.834 -> PWM Pin26 DutyCycle:29
10:29:12.834 -> PWM Pin33 DutyCycle:74
10:29:12.834 -> PWM Pin17 DutyCycle:99
10:29:12.868 -> PWM Pin16 DutyCycle:74
10:29:12.868 -> PWM Pin18 DutyCycle:88
10:29:12.868 -> PWM Pin19 DutyCycle:88
10:29:42.641 -> PWM Pin27 DutyCycle:87
10:29:42.944 -> PWM Pin26 DutyCycle:29
10:29:42.944 -> PWM Pin25 DutyCycle:75
10:29:42.944 -> PWM Pin33 DutyCycle:75
10:29:42.944 -> PWM Pin17 DutyCycle:100
10:29:42.944 -> PWM Pin16 DutyCycle:75
10:29:44.157 -> PWM Pin18 DutyCycle:0
10:29:44.865 -> Value:26.56
10:29:44.865 -> PWM Pin19 DutyCycle:88
10:30:12.720 -> PWM Pin27 DutyCycle:88
10:30:13.058 -> PWM Pin26 DutyCycle:30
10:30:13.058 -> PWM Pin25 DutyCycle:75
10:30:13.058 -> PWM Pin17 DutyCycle:100
10:30:13.058 -> PWM Pin33 DutyCycle:75
10:30:13.058 -> PWM Pin16 DutyCycle:0
10:30:13.966 -> PWM Pin19 DutyCycle:88
10:30:13.966 -> PWM Pin18 DutyCycle:88
10:30:42.537 -> PWM Pin27 DutyCycle:88
10:30:42.839 -> PWM Pin26 DutyCycle:30
10:30:42.873 -> PWM Pin25 DutyCycle:75
10:30:42.873 -> PWM Pin33 DutyCycle:75
10:30:42.873 -> PWM Pin17 DutyCycle:100
10:30:42.873 -> PWM Pin16 DutyCycle:75
10:30:42.873 -> PWM Pin19 DutyCycle:88
 
Top Shelf Aquatics

Polyp polynomial: How many heads do you start with when buying zoas?

  • One head is enough to get started.

    Votes: 27 10.6%
  • 2 to 4 heads.

    Votes: 145 57.1%
  • 5 heads or more.

    Votes: 65 25.6%
  • Full colony.

    Votes: 10 3.9%
  • Other.

    Votes: 7 2.8%

New Posts

https://www.triton.de/en/
Back
Top