Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Temp Sensor Custom Rule Issue
#1
Hello,

I just received the controller and setup has been pretty straight forward using available controller documentation. I have to say it's pretty cool! The only issue I'm experiencing is my attempt to create a custom rule to turn on my tank fan via an AC port when the temperature sensor exceeds a certain threshold. When I navigate to the custom rules page and select Temp Sensor, nothing appears on the page. I do see that I can set up a rule for the pH probe, just not the temp sensor for some reason. Is there something I haven't considered through the setup process? Any guidance would be much appreciated.

My setup is  Robo Tank app 6.5 on a Raspberry Pi 3 running Bullseye.

I've attached a couple images to show what I'm seeing through the process.

   

   
[-] The following 1 user Likes Andrew's post:
  • Rob F
Reply to top
#2
Hi Andrew, thanks for giving this a test and reporting the issue. The other day someone had the same problem, no temp sensors showed up. I don't think I've ever seen this and based on your first picture I'm wondering if it's a web browser compatibility issue. What browser are you using? I've tested with Chrome, Firefox and Edge. The dropdown box is round which I've never seen, should be almost square.

Three types of sensors should show up on the dropdown, water sensors, temperature sensors and pH probes, those 3 headers should be there even if you have no sensors setup, looks like water sensors is missing as that should be first.

Another thing you could try is going to "settings", "configure ports" and then click on the sensor extension and enable on of the ports. Maybe temp sensors aren't showing up because there's no sensor ports enabled, could be a bug although I just tested and it always shows my 3 temp sensors.
Reply to top
#3
I just set mine to have one temp sensor and one pH, this is what the drop down should look like. Notice how it's square and smaller which makes me think browser issue.

[Image: custom%20rule%20dropdown.PNG]
Reply to top
#4
(01-21-2023, 08:33 PM)Rob F Wrote: I just set mine to have one temp sensor and one pH, this is what the drop down should look like. Notice how it's square and smaller which makes me think browser issue.

[Image: custom%20rule%20dropdown.PNG]

Hi Rob,

Thanks for the response. The image you provided is what I get as well for the drop down. It's when I select the temp sensor option is when I get nothing to configure. So essentially, my image is one step after the drop down you show. I'm currently using the latest Chrome Version 109.0.5414.75 (Official Build) (64-bit). As a note, I get the exact same result using Safari on my Apple devices as I do with Chrome on my windows laptop. It's odd. Both my temp sensor and pH probe are functionally working as intended. It's when I select the temp sensor in the custom rules, nothing appears even though I can select it. The pH probe selection rule setup works for me. 

I currently have the temp sensor connected to the temp 1 port on the aquarium controller. Thus it is automatically showing temperature at this time. You mention using the sensor module to enable a port. I'm a little confused by this. Does the temp sensor require connection via the sensor module to use setup a custom rule for it?

Considering the bug is consistent across multiple devices and different browsers, I do wonder if the source of the issue is coming from the controller such as a result of an updated package on the raspberry pi. This may explain why your dropdown is squared and mine is not. However, I have no way to confirm the thought and probably reaching a bit. 

more images attached.

   
   
[-] The following 1 user Likes Andrew's post:
  • Rob F
Reply to top
#5
Thanks, it's something else causing it so forget enabling a sensor port, I've been playing around but it always works, wondering if it's with the ds18b20 sensor ID.

Can you run the following two commands in the Pi SSH terminal. The first downloads the file I just changed and second command copies it to the correct location.

    wget -c https://www.robo-tank.ca/app/customRules.js

    sudo cp customRules.js /var/www/html/js/customRules.js

Then in your web browser, right click on the page and click "View page source".

A panel inside the browser should have opened. Now go refresh the page but hold the button and a drop down should appear. Do the 3rd option "Empty cache and hard reload".

Now in the panel that opened you should see some sub tabs near the top. One should be "Console", click it and you'll see debug info when you interact with app.

Now go to create a custom rule and when you select the temp sensor let me know what it prints to the "Console" panel.
Reply to top
#6
(01-21-2023, 09:56 PM)Rob F Wrote: Thanks, it's something else causing it so forget enabling a sensor port, I've been playing around but it always works, wondering if it's with the ds18b20 sensor ID.

Can you run the following two commands in the Pi SSH terminal. The first downloads the file I just changed and second command copies it to the correct location.

    wget -c https://www.robo-tank.ca/app/customRules.js

    sudo cp customRules.js /var/www/html/js/customRules.js

Then in your web browser, right click on the page and click "View page source".

A panel inside the browser should have opened. Now go refresh the page but hold the button and a drop down should appear. Do the 3rd option "Empty cache and hard reload".

Now in the panel that opened you should see some sub tabs near the top. One should be "Console", click it and you'll see debug info when you interact with app.

Now go to create a custom rule and when you select the temp sensor let me know what it prints to the "Console" panel.


I completed the following -
  • Copied the custom rules per the command line script
  • Opened the Chrome dev tools console and performed the empty cache/hard reload
  • Attempted to create a custom rule for the temp sensor. New console entries with the sensor ID below -
customRules.js:217 addCustomRuleMenu --------------
customRules.js:509
customRules.js:510 addSensorRuleStep2 --------------
customRules.js:512 sensorID = 030e97942064
customRules.js:730 sensorID 2 = 030e97942064

The entire log is attached


.txt   1674363920223.txt (Size: 8.34 KB / Downloads: 48)
[-] The following 1 user Likes Andrew's post:
  • Rob F
Reply to top
#7
Thanks for the info, much appreciated. You helped me find a bug I may never have come across. On the javascript end I'm using a built in function isThisANumber() to see what the sensor ID is from and for some reason that fails when the ds18b20 sensor ID has only one letter in it. All my sensor ID's have 2 or more letters. When I add a 2nd letter anywhere in your ID it work so I know exactly what's wrong. I was hoping to post a fix tonight but got stuck on the phone so I'll figure out a different method to handle this and post it tomorrow.
Reply to top
#8
I think I got it fixed, run these two commands again and then refresh the page using the 3rd option in dropdown "Empty cache and hard reload".

    wget -c https://www.robo-tank.ca/app/customRules.js

    sudo cp customRules.js /var/www/html/js/customRules.js

Also be sure to verify it's doing what it should.
Reply to top
#9
(01-22-2023, 02:24 AM)Rob F Wrote: I think I got it fixed, run these two commands again and then refresh the page using the 3rd option in dropdown "Empty cache and hard reload".

    wget -c https://www.robo-tank.ca/app/customRules.js

    sudo cp customRules.js /var/www/html/js/customRules.js

Also be sure to verify it's doing what it should.

Hi Rob,

I ran the two commands and performed the "Empty cache and hard reload". I'm getting an issue where the rules button doesn't work. Here is are some errors within the console logs with the full logs attached -

customRules.js:2292 Uncaught SyntaxError: Unexpected token '}' (at customRules.js:2292:1)

layout.js:175 Uncaught ReferenceError: customRulesList is not defined

    at menuButtonClick (layout.js:175:28)
    at HTMLDivElement.onclick (dashboard.php:1:1)



.txt   1674397122868.txt (Size: 8.82 KB / Downloads: 49)
[-] The following 1 user Likes Andrew's post:
  • Rob F
Reply to top
#10
Hi Andrew, I'm really sorry about that, I forgot I made changes to 2 files. I thought that function I was using was built in javascript but when looking I realized it was one I made which I changed so yeah we need to update that file as well.

Run these 2 commands and do the page refresh with clear cache and hard reload.

    wget -c https://www.robo-tank.ca/app/system.js

    sudo cp customRules.js /var/www/html/js/system.js
Reply to top
#11
(01-22-2023, 07:45 PM)Rob F Wrote: Hi Andrew, I'm really sorry about that, I forgot I made changes to 2 files. I thought that function I was using was built in javascript but when looking I realized it was one I made which I changed so yeah we need to update that file as well.

Run these 2 commands and do the page refresh with clear cache and hard reload.

    wget -c https://www.robo-tank.ca/app/system.js

    sudo cp customRules.js /var/www/html/js/system.js


No worries Rob, we'll get this working! So I ran the commands and cleared cache/hard reload. However, the dashboard page is now blank. Logs are attached


.txt   674440106071.txt (Size: 986 bytes / Downloads: 45)
[-] The following 1 user Likes Andrew's post:
  • Rob F
Reply to top
#12
Very odd and thanks for helping. This error would seem to indicate there's a closing tag missing but it's not. It says line 2292 from customRules.js but the last line with the } is on line 2291 so it seems to be a different file. I just downloaded what you are and it looks ok and only goes to line 2291.

Maybe try running these commands again.

wget -c https://www.robo-tank.ca/app/customRules.js

sudo cp customRules.js /var/www/html/js/customRules.js
Reply to top
#13
Sorry try those 4 commands again so we can copy both files over. This time I edited v6.5 files, until now I've been posting the most recent versions of those files and maybe I changed something as I'm working on an update which is causing this. Any time you do this you have to hard refresh the page otherwise it won't use the file you just copied.
Reply to top
#14
(01-22-2023, 08:44 PM)Rob F Wrote: Very odd and thanks for helping. This error would seem to indicate there's a closing tag missing but it's not. It says line 2292 from customRules.js but the last line with the } is on line 2291 so it seems to be a different file. I just downloaded what you are and it looks ok and only goes to line 2291.

Maybe try running these commands again.

    wget -c https://www.robo-tank.ca/app/customRules.js

    sudo cp customRules.js /var/www/html/js/customRules.js


Yep very odd. Still the same result.
[-] The following 1 user Likes Andrew's post:
  • Rob F
Reply to top
#15
Sorry again, I think I know the problem. I just ran those commands and when you download the file it's not overwriting it. Run these six commands instead, this time I'm feeling good about it.

sudo rm customRules.js

wget -c https://www.robo-tank.ca/app/customRules.js

sudo cp customRules.js /var/www/html/js/customRules.js

sudo rm system.js

wget -c https://www.robo-tank.ca/app/system.js

sudo cp customRules.js /var/www/html/js/system.js
Reply to top
#16
(01-22-2023, 09:05 PM)Rob F Wrote: Sorry again, I think I know the problem. I just ran those commands and when you download the file it's not overwriting it. Run these six commands instead, this time I'm feeling good about it.

sudo rm customRules.js

wget -c https://www.robo-tank.ca/app/customRules.js

sudo cp customRules.js /var/www/html/js/customRules.js

sudo rm system.js

    wget -c https://www.robo-tank.ca/app/system.js

    sudo cp customRules.js /var/www/html/js/system.js


I completed the commands and still the same issue.

Afterwards, I performed a reboot. Deleted the two files from the default directory as well as the js folder. Then downloaded and copied to the js folder and assigned back to an executable (chmod +x).  Same result as before. Log below -


DevTools failed to load source map: Could not load content for http://robotank/libraries/dygraph.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
bootstrap-slider.min.js:5 bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead.
(anonymous) @ bootstrap-slider.min.js:5
(anonymous) @ bootstrap-slider.min.js:5
(anonymous) @ bootstrap-slider.min.js:4
(anonymous) @ bootstrap-slider.min.js:4
firstRun.js:2 startup running
firstRun.js:4 Uncaught ReferenceError: sendToBackend is not defined
    at firstRun.js:4:1
(anonymous) @ firstRun.js:4
DevTools failed to load source map: Could not load content for http://robotank/libraries/bootstrap-slider.min.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
[-] The following 1 user Likes Andrew's post:
  • Rob F
Reply to top
#17
Oh man, I keep screwing up. The last command has reference to both files instead of just system.js. Try them again.

sudo rm customRules.js

wget -c https://www.robo-tank.ca/app/customRules.js

sudo cp customRules.js /var/www/html/js/customRules.js

sudo rm system.js

wget -c https://www.robo-tank.ca/app/system.js

sudo cp system.js /var/www/html/js/system.js
Reply to top
#18
(01-22-2023, 10:23 PM)Rob F Wrote: Oh man, I keep screwing up. The last command has reference to both files instead of just system.js. Try them again.

sudo rm customRules.js

wget -c https://www.robo-tank.ca/app/customRules.js

sudo cp customRules.js /var/www/html/js/customRules.js

sudo rm system.js

wget -c https://www.robo-tank.ca/app/system.js

sudo cp system.js /var/www/html/js/system.js


It worked! Thanks!

   
[-] The following 1 user Likes Andrew's post:
  • Rob F
Reply to top
#19
Finally, 10th times the charm. Thanks for all your patience.

As you set things up verify it's doing what it should, the log on the dashboard dock can help verify things.
[-] The following 1 user Likes Rob F's post:
  • Andrew
Reply to top
#20
(01-23-2023, 12:25 AM)Rob F Wrote: Finally, 10th times the charm. Thanks for all your patience.

As you set things up verify it's doing what it should, the log on the dashboard dock can help verify things.


Sounds good, thanks again for the help
[-] The following 1 user Likes Andrew's post:
  • Rob F
Reply to top


Possibly Related Threads…
Thread Author Replies Views Last Post
  Temp probes gone john@sjkproducts.com 9 4,918 03-18-2023, 05:54 PM
Last Post: Rob F
  Temp heater issues Weilerda 3 1,914 01-17-2022, 10:37 AM
Last Post: Rob F
  Temp sensor Brooks 1 1,493 07-12-2021, 07:22 PM
Last Post: Rob F
  Select Temp probe blank ksmax 2 2,138 02-08-2021, 07:27 AM
Last Post: ksmax

Forum Jump:

Current time: 04-19-2024, 01:02 AM