Just unboxed an envirogrow and following the setup fails after progressing to the Logging stage.
I’m following enviro/getting-started.md at main · pimoroni/enviro · GitHub.
After scanning my WIFI, entering the password (it’s all correct) I click “Logging ->” to progress to next stage but it never reaches what I assume is where I’ll set up MQTT etc. My Mac shows up “a problem occurred” and repeating setup via a iphone running through the same procedure again seems to timeout.
I can see in the config.py file that the wireless details were saved. In log.txt the last entries are:
[info.... > POST /provision-twp-2-wifi (301 Moved Permanently)
[error.... need more than 0 values to unpack
I’ve looked at the config file and set it to True rather than False to see if that’ll get it out of provisioning mode or at least see if it’ll connect to WIFI as I’d assume that will mean it’s up and working but no joy.
If I press reset the activity LED turns on for a second then goes off. Using the Poke button does nothing and the whole thing sits there dormant.
Needless to say I’ve deleted config.py as per the troubleshooting and ran the provisioning again but without success. It still times out after trying to move on to logging. Should it attempt to connect to the WIFI at that stage? I can get the Enviro on my wifi using a basic py script so it can connect but something in the setup just isn’t working right.
Any assistance welcome :)
If i connect to the Pico while setup is running I see this when it hangs/fails after entering the WIFI information and trying to continue:
Task exception wasn’t retrieved
future: coro= <generator object ‘_handle_request’ at 20015990>
Traceback (most recent call last):
File “uasyncio/core.py”, line 1, in run_until_complete
File “phew/phew/server.py”, line 254, in _handle_request
File “phew/phew/server.py”, line 142, in call_handler
File “enviro/provisioning.py”, line 71, in provision_step_3_logging
File “enviro/helpers.py”, line 182, in get_config
File “enviro/helpers.py”, line 169, in get_values_from_file
File “”, line 1
SyntaxError: invalid syntax
Well… the wifi password cannot have an equals sign in it. Support ticket raised.
Oh dear, well done for sussing that out - our wifi passwords clearly aren’t exciting/secure enough! :)
If you have the time, please could you pop the details in a github issue? Issues · pimoroni/enviro · GitHub
Done! In fact, I’ll swap you if you add in the code examples to trigger the water pumps in the Grow+accessory bundle I bought and publish the new schematics :D
Only realised there was nothing firing it off after seeing it’s using the basic monitoring code only :/
Cool, ta :)
Yep, I think a pump example is on the way (though we’re a little short handed this week). I’m looking forward to that too, wanting to get stuck into a nice auto-watering tutorial!
Schematics for the new things will also be along soon, but if you want to attempt hacking in some pump control in the meantime, I can see from our production schem that they’re connected to GP10, GP11 and GP12. Your code should avoid triggering them at the same time to avoid voltage/current spikes (I seem to remember this was an issue with the OG HAT version of Grow…)
Perfect thank you! I’ll go find some code examples to add that handover from one pin for the sensor to the pin for the pump and watering separately too.
Yeah, DC motors will draw more current when spinning up from a dead stop. Once running though it levels off to a reasonable amount.
I presume that I can connect the GPIO pins for the pumps to relays, so that I’m able to run the pumps from a separate 12V AC adapter?
Something like this, IMHO, would be a good “safe” solution.
1 Channel Solid State Relay Module - Pimoroni
No back emf pulse when the relay deenergizes. Nice isolation from the relay voltage.