Help with esp32 sketch

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
Glad to hear that my posts are helping :)

Can you share a picture of your circuit and screenshots of the settings in the Arduino code, the driver in ReefPi and the Connections in ReefPi ?
1000003326.jpg
1000003325.jpg
1000003324.jpg
1000003323.jpg
1000003327.jpg

1000003326.jpg
1000003325.jpg
1000003324.jpg
1000003323.jpg
1000003327.jpg


As for circuit wiring I have a tired a 10k resistor jumped pin3 to 3v and jumper pin3 to ground. I have tried just jumping pin3 to ground. As have tried same setups on pin 1,14,36. While pin1 using 0 on the pi and so on I get 0=1, 2=3,14=3,36=4 if I'm correct?

Thanks again for all your help. I noticed pin1 is TX so if I remove pin 1 and change pi to only see 3 inlets will serial monitor help trouble shoot this?
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
Sral,
So I tired changing the inlets and the Serial com works so I can see the outputs being fired but on inputs I see nothing? I did order new ESP32 same ones you have in the guide you made so hopefully tomorrow I'll have time to try them. I also seen in your guide you had capacitors installed on the inlets I order those as well to see if that would help any other thoughts on something to try?
Thanks in advance
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
Sral,
So I tired changing the inlets and the Serial com works so I can see the outputs being fired but on inputs I see nothing? I did order new ESP32 same ones you have in the guide you made so hopefully tomorrow I'll have time to try them. I also seen in your guide you had capacitors installed on the inlets I order those as well to see if that would help any other thoughts on something to try?
Thanks in advance
The serial only fires messages when your ReefPi system requests data or updates outgoing signals.

Not writing any Inlet messages sounds like your ReefPi system is not measuring the inputs. In the pictures above your ATO 5 is turned „off“. Is that still the case ?
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
The serial only fires messages when your ReefPi system requests data or updates outgoing signals.

Not writing any Inlet messages sounds like your ReefPi system is not measuring the inputs. In the pictures above your ATO 5 is turned „off“. Is that still the case ?
It may have been off when I did the serial tests ill try again I know it was on before when I tested it. Thanks for your help I'll be back with an updated this afternoon
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
Ok so I got my new ESP32 in and it works fine same setup. Must be something wrong with the other one?

Thanks again
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
Sral I spoke too soon it does change the Inlet value from 0 to 1 but Reef-pi does not respond to it? I have a led on pin 5 I can turn it on and off just fine but when I make an ATO Inlet on pin 22 serial port shows it changing from 0 to 1 but it will not affect the output? Any thoughts?
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
Sral I spoke too soon it does change the Inlet value from 0 to 1 but Reef-pi does not respond to it? I have a led on pin 5 I can turn it on and off just fine but when I make an ATO Inlet on pin 22 serial port shows it changing from 0 to 1 but it will not affect the output? Any thoughts?
I'm sorry I didn't quite get want you wanted to achieve here.

You want that, when the inlet changes value, an Outlet get's triggered, which will be connected to your fan, is that right ?

Which pin is that and do you see the Message for the Outlet changing value in the Serial Monitor ?
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
I'm sorry I didn't quite get want you wanted to achieve here.

You want that, when the inlet changes value, an Outlet get's triggered, which will be connected to your fan, is that right ?

Which pin is that and do you see the Message for the Outlet changing value in the Serial Monitor ?
That is correct I would like the Inlet to trigger the outlet. I can manually trigger the outlet in ReefPi equipment tab on the esp32 serial monitor I see it manually triggered. When I switch the Inlet I see the serial monitor change the Inlet state from 0 to 1 but the output in not triggered. My guess is that it's an issue in reef-pi because the serial monitor is seeing the Inlet and I can manually trigger the outlet. I have it setup as an ATO reef-pi
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
That is correct I would like the Inlet to trigger the outlet. I can manually trigger the outlet in ReefPi equipment tab on the esp32 serial monitor I see it manually triggered. When I switch the Inlet I see the serial monitor change the Inlet state from 0 to 1 but the output in not triggered. My guess is that it's an issue in reef-pi because the serial monitor is seeing the Inlet and I can manually trigger the outlet. I have it setup as an ATO reef-pi
Strange. Did you enter a maximum runtime ?
Idealy, just send screenshots from all the settings of that ATO and the associated Eqipment, just for the record.
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
I do not have a max runtime set
1000003339.jpg

1000003344.jpg
 

Attachments

  • 1000003345.jpg
    1000003345.jpg
    205.9 KB · Views: 27
  • 1000003346.jpg
    1000003346.jpg
    213.5 KB · Views: 25
  • 1000003343.jpg
    1000003343.jpg
    62.4 KB · Views: 27

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
1000003347.jpg
Missed this one showing the equipment page I can turn it on and off just fine frome the switch on this page so the outlet works fine and its seeing the Inlet by changing from 0 to 1 but it just doesn't do anything?
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
1000003347.jpg
Missed this one showing the equipment page I can turn it on and off just fine frome the switch on this page so the outlet works fine and its seeing the Inlet by changing from 0 to 1 but it just doesn't do anything?
Hm, which pin is the fan test ? Is that pin 5 on the ESP ? Because looks like it is already on, when you switch the inlet signal.
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
Hm, which pin is the fan test ? Is that pin 5 on the ESP ? Because looks like it is already on, when you switch the inlet signal.
Yes it is pin5 it's always on no matter the state of the Inlet that should be controlling it. I can turn it off in the equipment tab and it will turn back on after the next time it reads that Inlet unless I turn the ATO off it will stay off. This is how my switch is wired except of course I'm on inlet 22
1000003348.jpg
 
Last edited:

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
Yes it is pin5 it's always on no matter the state of the Inlet that should be controlling it. I can turn it off in the equipment tab and it will turn back on after the next time it reads that Inlet unless I turn the ATO off it will stay off. This is how my switch is wired except of course I'm on inlet 22
1000003348.jpg
So the ATO correctly turns on the associated Outlet on the ESP, but it afterwards it never shuts off, irrespective of the state of the inlet ?

Or is it even the case that the Outlet turns on even if the inlet state is 0 ?

I’m thinking that maybe the signal is the wrong way around and the ATO is expecting to stay on during zeros. Try inverting the signal of the inlet in the connectors tab and see how it behaves.
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
So the ATO correctly turns on the associated Outlet on the ESP, but it afterwards it never shuts off, irrespective of the state of the inlet ?

Or is it even the case that the Outlet turns on even if the inlet state is 0 ?

I’m thinking that maybe the signal is the wrong way around and the ATO is expecting to stay on during zeros. Try inverting the signal of the inlet in the connectors tab and see how it behaves.
The outlet turns on as soon as you setup and turn on the ATO irrespective of the inlet state and never shuts off until you disable the ATO.

I tired reversing the state of the inlet and it then keeps the outlet off irrespective of the inlet state

I think its something on Reef-pi not tell the ATO it's seen the inlet change state. I tried a ATO hooked right to the Pi and it will change the outlet on the ESP32 when I flip the float.
Thanks again I appreciate your help
 
Last edited:

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
The outlet turns on as soon as you setup and turn on the ATO irrespective of the inlet state and never shuts off until you disable the ATO.

I tired reversing the state of the inlet and it then keeps the outlet off irrespective of the inlet state

I think its something on Reef-pi not tell the ATO it's seen the inlet change state. I tried a ATO hooked right to the Pi and it will change the outlet on the ESP32 when I flip the float.
Thanks again I appreciate your help
Hm, that’s very weird.

Did you look at the data graph for both Inlet running on the Pi and the ESP ?
Did both display the inlet state correctly ?
They do after all only update after every period, not directly on signal change.
 

Dave's Reef

Active Member
View Badges
Joined
Nov 4, 2018
Messages
102
Reaction score
150
Rating - 0%
0   0   0
Hm, that’s very weird.

Did you look at the data graph for both Inlet running on the Pi and the ESP ?
Did both display the inlet state correctly ?
They do after all only update after every period, not directly on signal change.
The Pi says it's always running or "1" never changes its like the Pi is not seeing the inlet not sure how to verify if the Pi can even see it?
 

Attachments

  • 1000003354.jpg
    1000003354.jpg
    45.5 KB · Views: 26

firechild

Active Member
View Badges
Joined
Nov 23, 2020
Messages
214
Reaction score
311
Location
Sydney
Rating - 0%
0   0   0
I'm trying to load this onto an ESP32 but am getting the following error, is anyone able to help please?

Compilation error: no matching function for call to 'UrlTokenBindings::UrlTokenBindings(TokenIterator&, TokenIterator&)'
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
I'm trying to load this onto an ESP32 but am getting the following error, is anyone able to help please?

Compilation error: no matching function for call to 'UrlTokenBindings::UrlTokenBindings(TokenIterator&, TokenIterator&)'
Sounds like you did not include the PathItterator library
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 42 15.9%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 16 6.1%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 1 0.4%
  • I wear reef gear primarily to relax where I live.

    Votes: 32 12.1%
  • I don’t wear gear from reef brands.

    Votes: 154 58.3%
  • Other.

    Votes: 19 7.2%
Back
Top