-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enviro grow takes readings only after manually running main.py #195
Comments
No, it should wake up and take readings automatically according to the |
I tried again and again, unfortunately same result, When I ran the main.py , I could import the data and see it,but removing USB and reset the board,then it does not transfer the data to the database. I checked config.py file.I set even 1 for both parameters. |
Are you pressing the front poke button to wake it up and trigger a reading after pressing reset? Do you get any LED activity when you press the poke button? |
This is the log file when I connected with USB,and ran the main.py,it worked well but after unplug usb and trying to get data automatically ,it does not send any data to InfluxDB. I just recognized two things, This is my http://192.168.1.21:8086, IP Address for InfluxDB.and when I ran But I see this Datapoint in Grafana and also System Time as below is different than below timestamp data, Real Time is 05:35:06 but in the Log file it is 03:35:06.
2023-08-12 03:34:56 [debug / 123kB] > performing startup |
I tried one more time to test my findings you may edit this file by hand but if you enter provisioning mode provisioned = True enter a nickname for this board network access details how often to wake up and take a reading (in minutes) where to upload to ("http", "mqtt", "adafruit_io", "influxdb") how often to upload data (number of cached readings) web hook settings mqtt broker settings adafruit ui settings influxdb settings grow specific settings logfile.txt
2023-08-12 04:12:45 [debug / 119kB] > performing startup AFTER----------------------------------------------------------Screenshot |
Hi @VGONUL First, it probably didn't show in your editor, but the config file copy paste has taken the comments to be headings in github markdown. If you encase the config file and any other code in three backticks (```) top and bottom (```) and check the preview tab that will make the post much clearer to read. The IP address you are seeing in the log (192.168.1.25) is the IP address allocated to your enviro from the router DHCP server, so you know what IP address to look out for on the network. Given this and your data point in the Grafana screenshot, I suspect the configuration is correct and it is likely that the data point in the screenshot means the other data is there from that upload. I assume you can see the other data points by examining the raw data in Influx and adjusting the grafana query accordingly as your issue headline is that no data is received at all once on battery. If that assumption is correct, can you run the board on battery for 10 minutes to ensure we get a 5 minute reading and upload and then post the logs stored on the board after reconnecting. There will likely be some USB power log entries from plugging in, but if you paste the whole file there should be entries showing the attempted influx upload on battery. |
hi @sjefferson99 thanks for your remarks, I especially left enviro grow without touching it for last 3 days in order to see if there is a data flow or not but unfortunately I didnt receive any data. |
@VGONUL can you post the new log file from the Grow device please? that's were any errors will show up. |
Hi @MrDrem "' "' |
OK, so it's defaulting to a GMT time server, not to a Polish one, This would need to be tweaked in the code. looking at your log file: upload at 12:41:09
It's on USB power, so doesn't sleep, you poked the button at 12:41:15 on the front to get another reading
at 12:41:25 it uploads that reading too
the board then looks like it does a hard reset for some reason, you can tell this from the time stamp dipping back to 0
then it kicks off another reading and upload
If you look in your influxdb instance, you should be able to see the 3 uploads at 12:41:09, 12:41:29 & 13:01:05, I suspect that they may be timestamped slightly earlier, as the json file gets the actual reading time into it, not the upload time, which influx can deal with. I might try the following in your config.py: Change your reading frequency to 2, and your upload to 5. This should give you readings every 2 minutes that are uploaded every 10. I've made the changes below for you.
it's clearly connecting correctly to your influx instance correctly. do be aware that Grafana will aggregate readings if you don't match the reading frequency to the data reading frequency. At this point you should be looking at the data in your InfluxDB instance, not in Grafana. |
@VGONUL As per @MrDrem above, when it is connecting at the times in the logs above it is confirming successful send to influx so it's definitely worth confirming they have arrived as a start. I concur, moving directly to influxdb web UI and querying the results in the data explorer function is the easiest way to confirm this. In the top right of the data explorer, set the time from local to UTC, that will make it easier to select an appropriate time filter, but also trying going back 24 hours to find the data to zoom into. The enviro will submit time in UTC and certainly weather stations and sites like weather underground expect the time to be in UTC and the expectation is that you would adjust to a local time zone in your reporting software. Although it would be possible to add timezone adjustment in, it gets complicated quickly if you have to compensate for DST. I have some PRs here that hack at that for the UK, but I highly recommend working in UTC, certainly at first. Once we have confirmed that the data is being stored correctly on send, it's worth checking what is going on in terms of upload frequency. The attached log has some oddities as per @MrDrem 's analysis and at one point it enters provisioning mode which means either the flag was unset or the whole config file was missing on boot, but then normal provisioned behaviour continued within 2 minutes of the last operation, which is quick if you did reprovision it. It might be worth flash nuking the board and redownloading the latest firmware and restoring your config file (or reprovisioning as you prefer). But either way setting the suggested frequencies and leaving it for at least 20 minutes and uploading those logs will help, if we are not seeing consistent wake ups and sends in the logs every 2 and 10 minutes we have a different issue to influx upload. Also in one of your early comments you suggest that you have unplugged it to run, but all logs suggest it is still on USB power. Are you running battery power and this is further weirdness or did I misunderstand that all testing is occurring on battery. Either battery or USB should work, but it might be worth seeing if you get different behaviour on battery power via the JST connector. Finally, is the board behaving properly where the white light pulses for a few seconds each wake up period and then turns off (will pulse longer for the upload wake up as it finds and connects to wifi). A flashing or solid red light would indicate an issue (I don't think you will have this as not in the log), but if the white light stays on and stops pulsing, then I have seen that on the board and it will need a reset to clear. The fix is some new code to better manage the wifi disconnect, but only worth trying to mess with that if the board is not shutting down properly (white light fully goes of and poking the button causes it to wake up and take a reading fine). |
I have set up InfluxDB and Grana Dashboard, but everytime Do I need to "reset the board" to get data ? or Am I missing something ?
The text was updated successfully, but these errors were encountered: