ReefRhythm - Advance Stepper Motor Controller with OpenSource

OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
I would also like to suggest some innovations... :)

It would be nice to develop a dashboard on the main page and display the main parameters of the pumps, for example:
  • Total dosing volume per day (ml)
  • Reagent remaining/ container volume (display a picture)
...

To also be able to instantly switch to the pump from the dashboard...;)
Dashboards are possible, but
mostly for DIY, the best way is to use Home Assistant.


I'm more focused on hardware features and integration with already-existing controllers and infrastructure.

Like "Poor Man Edition" with DC pump support and standard stepper drivers TM2209.
 

butch708

New Member
View Badges
Joined
May 15, 2024
Messages
17
Reaction score
4
Location
Germany
Rating - 0%
0   0   0
Hello,
my hardware for this project is arived today. i have a problem, after connecting the esp to the wifi the theme is not loaded and i am not able to change.
Its only the esp without any hardware connected.
Firmware is: Release v1.1.13-master-20240525
Tested on edge and chrome

1716628598932.png
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
Hello,
my hardware for this project is arived today. i have a problem, after connecting the esp to the wifi the theme is not loaded and i am not able to change.
Its only the esp without any hardware connected.
Firmware is: Release v1.1.13-master-20240525
Tested on edge and chrome
Hi! I just checked twice; the firmware looks OK.

But I think the browser failing to download files with styles and Java scripts from the controller
Mostly, it can be related to a poor Wi-Fi connection.

If you restart the web page, is it loading fast in 1-3 seconds?

With this dev board, you should keep wires at maximum distance from the esp32 antenna because they can interfere.
Please try to fix the wires on distance; maybe reset the controller and try again.
 

Danchik

Community Member
View Badges
Joined
Jul 17, 2018
Messages
54
Reaction score
2
Location
UA
Rating - 0%
0   0   0
Dashboards are possible, but
mostly for DIY, the best way is to use Home Assistant.
I think it would be more logical to improve the device, and then, if possible, if there is an HA system, add it:)

But, unfortunately, it does not have the ability to use HA
 

Danchik

Community Member
View Badges
Joined
Jul 17, 2018
Messages
54
Reaction score
2
Location
UA
Rating - 0%
0   0   0
Is it still possible to add the option to stop the pump?:)
To avoid deleting the dosing program.
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
Is it still possible to add the option to stop the pump?:)
To avoid deleting the dosing program.
Yes, it is feature "maintenance mode" that I was talking about. When mode enabled all automatic dosing is stopped.
I'm going to add it. Both with software and hardware (switch connected to GPIO) buttons.
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
Yes it does, via MQTT.
Actually, also via the REST API.
But MQTT is the least complicated.
I like Home Assistant for flexibility, things can be made different ways.

I was planning to create a "custom component" for HA; it's not difficult, but the process of publishing it in the main repository is, can takes year and process not clear. I think that's the main reason why HACS exists...
But looking forward to this, it can reduce the complexity of starting to use a home assistant.

Not a lot of folks are ready to dig in to yaml configs and base programming to setup devices.
 

butch708

New Member
View Badges
Joined
May 15, 2024
Messages
17
Reaction score
4
Location
Germany
Rating - 0%
0   0   0
Hi! I just checked twice; the firmware looks OK.

But I think the browser failing to download files with styles and Java scripts from the controller
Mostly, it can be related to a poor Wi-Fi connection.

If you restart the web page, is it loading fast in 1-3 seconds?

With this dev board, you should keep wires at maximum distance from the esp32 antenna because they can interfere.
Please try to fix the wires on distance; maybe reset the controller and try again.
Hello, today i installed firefox on windows. On this browser it works for me.
On my pixel 6 with chrome the theming works too.

My wifi signal is good and it was nothing connected to the esp.

A other question/ thing with timezone settings. In germany we have gmt+1, but we have summertime and wintertime too. Summertime is gmt+2, wintertime is gmt+1.

From: TimeAndDate
When Does DST Start and End in Germany? All of Germany uses Daylight Saving Time (DST) during part of the year. The DST period starts on the last Sunday of March and ends on the last Sunday of October, together with most other European countries.

So for now it displays the wrong time for germany.
 

butch708

New Member
View Badges
Joined
May 15, 2024
Messages
17
Reaction score
4
Location
Germany
Rating - 0%
0   0   0
Here is a log from Google Chrome

Code:
settings:603 Cookie update event
settings:579 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at loadCdnCSS (http://192.168.178.78/settings:579:27)
    at HTMLDocument.<anonymous> (http://192.168.178.78/settings:609:9)
loadCdnCSS @ settings:579
(anonymous) @ settings:609
settings:443 SSE connection to server opened.
settings:456 got sse data:  {time: '19:42:54'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:42:59'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:43:04'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:43:09'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:43:14'}
settings:458 time format: 0
settings:450 SSE Error occurred:  Event {isTrusted: true, type: 'error', target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
settings:443 SSE connection to server opened.
settings:456 got sse data:  {time: '19:43:23'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:43:28'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:43:33'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:43:38'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:43:43'}
settings:458 time format: 0
settings:450 SSE Error occurred:  Event {isTrusted: true, type: 'error', target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
settings:443 SSE connection to server opened.
settings:456 got sse data:  {time: '19:43:51'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:43:56'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:44:01'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:44:06'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:44:11'}
settings:458 time format: 0
settings:450 SSE Error occurred:  Event {isTrusted: true, type: 'error', target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
settings:443 SSE connection to server opened.
settings:456 got sse data:  {time: '19:44:20'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:44:25'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:44:30'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:44:35'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:44:40'}
settings:458 time format: 0
settings:450 SSE Error occurred:  Event {isTrusted: true, type: 'error', target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
settings:443 SSE connection to server opened.
settings:456 got sse data:  {time: '19:44:48'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:44:53'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:44:58'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:45:03'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:45:08'}
settings:458 time format: 0
settings:450 SSE Error occurred:  Event {isTrusted: true, type: 'error', target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
settings:443 SSE connection to server opened.
settings:456 got sse data:  {time: '19:45:17'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:45:22'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:45:27'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:45:32'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:45:37'}
settings:458 time format: 0
settings:450 SSE Error occurred:  Event {isTrusted: true, type: 'error', target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
settings:443 SSE connection to server opened.
settings:456 got sse data:  {time: '19:45:45'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:45:50'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:45:55'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:46:00'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:46:05'}
settings:458 time format: 0
settings:450 SSE Error occurred:  Event {isTrusted: true, type: 'error', target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
settings:443 SSE connection to server opened.
settings:456 got sse data:  {time: '19:46:14'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:46:19'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:46:24'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:46:29'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:46:34'}
settings:458 time format: 0
settings:450 SSE Error occurred:  Event {isTrusted: true, type: 'error', target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
settings:443 SSE connection to server opened.
settings:456 got sse data:  {time: '19:46:42'}
settings:458 time format: 0
settings:456 got sse data:  {time: '19:46:47'}
settings:458 time format: 0
 got sse data:  {time: '19:46:52'}
 time format: 0
 got sse data:  {time: '19:46:58'}
 time format: 0
 got sse data:  {time: '19:47:03'}
 time format: 0
 SSE Error occurred:  Event {isTrusted: true, type: 'error', target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
 SSE connection to server opened.
 got sse data:  {time: '19:47:11'}
 time format: 0
 got sse data:  {time: '19:47:16'}
 time format: 0
 got sse data:  {time: '19:47:21'}
 time format: 0
 got sse data:  {time: '19:47:26'}
 time format: 0
 got sse data:  {time: '19:47:31'}
 time format: 0
 SSE Error occurred:  Event {isTrusted: true, type: 'error', target: EventSource, currentTarget: EventSource, eventPhase: 2, …}
 SSE connection to server opened.
 got sse data:  {time: '19:47:40'}
 time format: 0

the sse error occurs on firefox too
 
Last edited:
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
So for now it displays the wrong time for Germany.
Daytime Saving Time (DST) is not supported yet, so it is working according to the to the chosen timezone.
I will work on these features; they are just not so simple because I need to think about reloading schedules after a time change too. And how to write automatic test to this, its 13 different(maybe more) DST zones in world.

But this is not rocket science, so the feature will be supported. I'm also going to move to the EU soon, so I will test it too ^^.
We have some time before last Sunday of October to relese it:)
 
Last edited:
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
Here is a log from Google Chrome

Code:
settings:603 Cookie update event
settings:579 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at loadCdnCSS (http://192.168.178.78/settings:579:27)
    at HTMLDocument.<anonymous> (http://192.168.178.78/settings:609:9)
loadCdnCSS @ settings:579
(anonymous) @ settings:609

the sse error occurs on firefox too
The SSE error is fine; it's just a re-connection. Normal behavior.


But "Uncaught DOMException" is, and so far I am not sure how it can happen, but I'll check this part of the code and maybe rewrite it so it will be more fail-safe.

So can you please clarify the status of this issue on your devices?
1) Pixel 6: All browsers fail to show pages with styles (all white and not properly formatted)?
2) Windows Firefox works ok?
 

butch708

New Member
View Badges
Joined
May 15, 2024
Messages
17
Reaction score
4
Location
Germany
Rating - 0%
0   0   0
The SSE error is fine; it's just a re-connection. Normal behavior.


But "Uncaught DOMException" is, and so far I am not sure how it can happen, but I'll check this part of the code and maybe rewrite it so it will be more fail-safe.

So can you please clarify the status of this issue on your devices?
1) Pixel 6: All browsers fail to show pages with styles (all white and not properly formatted)?
2) Windows Firefox works ok?
1 pixel 6 pro with chrome (Version 125.0.6422.112 (Offizieller Build) (64-Bit)) browser, works fine. Theme is loading
2 my laptop with win11 and chrome (Version 125.0.6422.112 (Offizieller Build) (64-Bit)) or edge (Version 125.0.2535.67 (Offizielles Build) (64-Bit)) browser, the theming is not working and occurs the DOMExeption
3 my laptop with win11 and firefox, works fine, Theme is loading.
 
Last edited:

butch708

New Member
View Badges
Joined
May 15, 2024
Messages
17
Reaction score
4
Location
Germany
Rating - 0%
0   0   0
Actually, also via the REST API.
But MQTT is the least complicated.
I like Home Assistant for flexibility, things can be made different ways.

I was planning to create a "custom component" for HA; it's not difficult, but the process of publishing it in the main repository is, can takes year and process not clear. I think that's the main reason why HACS exists...
But looking forward to this, it can reduce the complexity of starting to use a home assistant.

Not a lot of folks are ready to dig in to yaml configs and base programming to setup devices.
hello,
Take a look at esphome. There is a integration in HA, so you can easy compile und update firmware from HA.

https://esphome.io/
External Components
ESPHome custom component design tutorial
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
hello,
Take a look at esphome. There is a integration in HA, so you can easy compile und update firmware from HA.

https://esphome.io/
External Components
ESPHome custom component design tutorial
I'm not ready to dig in to espHome because of the luck of Mathlib, like Numpy or SciPy.
Its good for some simple projects.

And it is not solving any problems with the UI. Yes, it has integration. But it's not automating adding nice-looking UI cards to your dashboard...
 
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
1 pixel 6 pro with chrome (Version 125.0.6422.112 (Offizieller Build) (64-Bit)) browser, works fine. Theme is loading
2 my laptop with win11 and chrome (Version 125.0.6422.112 (Offizieller Build) (64-Bit)) or edge (Version 125.0.2535.67 (Offizielles Build) (64-Bit)) browser, the theming is not working and occurs the DOMExeption
3 my laptop with win11 and firefox, works fine, Theme is loading.

Release v1.1.15 - some patches for Styles load​

 

butch708

New Member
View Badges
Joined
May 15, 2024
Messages
17
Reaction score
4
Location
Germany
Rating - 0%
0   0   0
Thank you,
that was quick.
i test it.

Edit:

Now it works. :) :)

Edit two:

after i changed settings to two pumps over webgui and the esp rebooted and the error is represent again
Screenshot 2024-05-29 145512.png
 
Last edited:
OP
OP
yury88

yury88

Active Member
View Badges
Joined
Oct 21, 2023
Messages
209
Reaction score
160
Location
indo-pacific
Rating - 0%
0   0   0
Thank you,
that was quick.
i test it.

Edit:

Now it works. :) :)

Edit two:

after i changed settings to two pumps over webgui and the esp rebooted and the error is represent again
Did you press "Cancel rollback" after checking firmware?

If not, the controller will automatically rollback to the previous firmware.
Its protection from bricking devices In this project, the user has the final decision to upgrade or rollback.
 

butch708

New Member
View Badges
Joined
May 15, 2024
Messages
17
Reaction score
4
Location
Germany
Rating - 0%
0   0   0
Did you press "Cancel rollback" after checking firmware?

If not, the controller will automatically rollback to the previous firmware.
Its protection from bricking devices In this project, the user has the final decision to upgrade or rollback.
sorry, my bad.
its rolled back.
 

butch708

New Member
View Badges
Joined
May 15, 2024
Messages
17
Reaction score
4
Location
Germany
Rating - 0%
0   0   0
I'm too stupid to set up mqtt. Maybe it would be a good idea to test the connection to mqtt server in the webgui.?

home-assistant.log
Code:
2024-05-30 19:03:49.658 ERROR (MainThread) [homeassistant.components.automation.start_dosing_pump] Start Dosing Pump: Error executing script. Error for call_service at point of sale 1: Error rendering data template: ValueError: Template error: float got invalid input 'unknown' when rendering template '{
  "id": 1,
  "direction": {% if is_state('input_boolean.dosing_pump_direction', 'on') %}1{% else %}0{% endif %},
  "amount": {{ states('input_number.dosing_pump_amount') | float }},
  "duration": {{ states('input_number.dosing_pump_duration') | float }}
}' but no default was specified
2024-05-30 19:03:49.658 ERROR (MainThread) [homeassistant.components.automation.start_dosing_pump] Error while executing automation automation.start_dosing_pump: Error rendering data template: ValueError: Template error: float got invalid input 'unknown' when rendering template '{
  "id": 1,
  "direction": {% if is_state('input_boolean.dosing_pump_direction', 'on') %}1{% else %}0{% endif %},
  "amount": {{ states('input_number.dosing_pump_amount') | float }},
  "duration": {{ states('input_number.dosing_pump_duration') | float }}
}' but no default was specified
2024-05-30 19:03:51.190 ERROR (MainThread) [homeassistant.components.automation.start_dosing_pump] Start Dosing Pump: Error executing script. Error for call_service at point of sale 1: Error rendering data template: ValueError: Template error: float got invalid input 'unknown' when rendering template '{
  "id": 1,
  "direction": {% if is_state('input_boolean.dosing_pump_direction', 'on') %}1{% else %}0{% endif %},
  "amount": {{ states('input_number.dosing_pump_amount') | float }},
  "duration": {{ states('input_number.dosing_pump_duration') | float }}
}' but no default was specified
2024-05-30 19:03:51.191 ERROR (MainThread) [homeassistant.components.automation.start_dosing_pump] Error while executing automation automation.start_dosing_pump: Error rendering data template: ValueError: Template error: float got invalid input 'unknown' when rendering template '{
  "id": 1,
  "direction": {% if is_state('input_boolean.dosing_pump_direction', 'on') %}1{% else %}0{% endif %},
  "amount": {{ states('input_number.dosing_pump_amount') | float }},
  "duration": {{ states('input_number.dosing_pump_duration') | float }}
}' but no default was specified

automations.yaml

Code:
- id: Start Dosing Pump
  alias: "Start Dosing Pump"
  trigger:
    - platform: event
      event_type: state_changed
      event_data:
        entity_id: input_button.start_dosing_pump
  action:
    - service: mqtt.publish
      data_template:
        topic: "/ReefRhythm/24587cda78dc/dose"
        payload: >
          {
            "id": 1,
            "direction": {% if is_state('input_boolean.dosing_pump_direction', 'on') %}1{% else %}0{% endif %},
            "amount": {{ states('input_number.dosing_pump_amount') | float }},
            "duration": {{ states('input_number.dosing_pump_duration') | float }}
          }
  mode: single

- id: Stop Dosing Pump
  alias: "Stop Dosing Pump"
  trigger:
    - platform: event
      event_type: state_changed
      event_data:
        entity_id: input_button.stop_dosing_pump
  action:
    - service: mqtt.publish
      data_template:
        topic: "/ReefRhythm/24587cda78dc/stop"
        payload: >
          {"id": 1}
  mode: single

If I start one of the pumps in the reefrhythm webgui, it should be displayed in mqtt explorer, right? Unfortunately it won't for me.

I somehow have the feeling that the reff rhythm can't connect with the mqtt brocker. I'm probably making a mistake somewhere.
 

Attachments

  • Screenshot 2024-05-30 192536.png
    Screenshot 2024-05-30 192536.png
    80.6 KB · Views: 31
  • Screenshot 2024-05-30 191700.png
    Screenshot 2024-05-30 191700.png
    112.5 KB · Views: 27
  • Screenshot 2024-05-30 191631.png
    Screenshot 2024-05-30 191631.png
    30 KB · Views: 29
  • Screenshot 2024-05-30 191604.png
    Screenshot 2024-05-30 191604.png
    41.5 KB · Views: 30

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top