An old Aercus weather station had been ‘dead’ for quite some time. Looking for a way to breathe new life back into it, I came across a Pimoroni Enviro Weather, which appeared to fit the bill, so I bought one.
Being a complete ‘newbie’ I went through countless attempts at ‘provisioning’, editing the ‘config.py’ file and even flashing with the latest release v0.0.9 firmware. All to no avail. The unit refused to take more than a couple of readings each time it was connected to a USB port on my Mac.
At some point, I was surprised to notice that, when powered from a mains USB adapter, instead of a Mac USB port, the unit continued taking readings for as long it was powered ON. Despite being unable to find that limitation documented anywhere, I concluded that my Enviro Weather unit does NOT like being powered from my computers USB ports.
Is that right, or is my unit not working properly?
Leaving that limitation to one side, I then proceeded to set up my unit to connect to an MQTT broker and through that broker to Domoticz (both the MQTT broker and Domoticz running on a Raspberry Pi). I was even able to connect the Enviro Weather board to the old Aercus weather station. None of this was easy, but eventually Domoticz started receiving readings from the old Aercus.
Forward to now and the Enviro Weather seems to be working in some way. It takes readings and uploads them periodically and for the most part reliably to Domoticz. However, a number of issues are still unresolved/ unclear:
For testing purposes, the unit is setup to take a reading every minute and upload every reading (‘config.py’ file settings: reading_frequency = 1 and upload_frequency = 1). The unit takes a reading every minute, as expected. However it does NOT upload each reading separately, it always uploads two readings together.
The ‘warning’ (red) LED flashes for some 50 seconds in between taking the two readings which are uploaded together.
In addition to wind ‘direction’ and ‘speed’, Domoticz expects a wind ‘gust’ value. At present, the unit does NOT appear to be sending that value.
Occasionally, the unit stops sending readings. Pressing the hardware ‘reset’ button appears to be the only way to get it back to life. That is a reasonably easy task while the unit is being tested in the garage. Is there some kind of soft reset facility available for when the unit is 10-20 feet on top of a pole?
There at are still a few issues with the 0.0.9 version. Have you checked the log file to see the errors you are getting when you get the red led or why it only uploads every 2 readings?
Also there has been some progress on adding a PIO based watchdog to reset the device if it fails after a set period of time but still has some bugs.
Errors in the log file (extract below) appear to point to failure to connect to WiFi. For some reason, the only WiFi connection attempts which succeed are the ones after second reading has been taken. At that point, the two readings are uploaded. All WiFi connection attempts after the first reading appear to fail. Not sure why that would be.
2023-01-28 22:05:11 [debug / 96kB] - on usb power (so can’t shutdown). Halt and wait for alarm or user reset instead
2023-01-28 22:06:00 [debug / 118kB] - reset
2023-01-28 22:06:03 [debug / 115kB] > performing startup
2023-01-28 22:06:03 [info / 119kB] - wake reason: rtc_alarm
2023-01-28 22:06:03 [debug / 117kB] - turn on activity led
2023-01-28 22:06:03 [debug / 115kB] > 100 blocks free out of 212
2023-01-28 22:06:03 [debug / 113kB] > taking new reading
2023-01-28 22:06:03 [info / 108kB] - seconds since last reading: 60
2023-01-28 22:06:04 [debug / 99kB] > caching reading for upload
2023-01-28 22:06:05 [info / 95kB] > 1 cache file(s) need uploading
2023-01-28 22:06:05 [info / 120kB] > connecting to wifi network ‘EE-Hub-8wKE’
2023-01-28 22:06:09 [error / 102kB] ! failed to connect to wireless network EE-Hub-8wKE
2023-01-28 22:06:09 [error / 100kB] - cannot upload readings, wifi connection failed
2023-01-28 22:06:09 [error / 98kB] ! reading upload failed
2023-01-28 22:06:09 [info / 96kB] > going to sleep
2023-01-28 22:06:10 [debug / 93kB] - clearing and disabling previous alarm
2023-01-28 22:06:10 [info / 91kB] - setting alarm to wake at 22:07pm
2023-01-28 22:06:10 [info / 89kB] - shutting down
2023-01-28 22:06:10 [debug / 87kB] - on usb power (so can’t shutdown). Halt and wait for alarm or user reset instead
2023-01-28 22:07:00 [debug / 122kB] - reset
2023-01-28 22:07:03 [debug / 115kB] > performing startup
2023-01-28 22:07:03 [info / 119kB] - wake reason: rtc_alarm
2023-01-28 22:07:03 [debug / 117kB] - turn on activity led
2023-01-28 22:07:03 [debug / 115kB] > 100 blocks free out of 212
2023-01-28 22:07:03 [debug / 113kB] > taking new reading
2023-01-28 22:07:03 [info / 108kB] - seconds since last reading: 60
2023-01-28 22:07:05 [debug / 99kB] > caching reading for upload
2023-01-28 22:07:05 [info / 94kB] > 2 cache file(s) need uploading
2023-01-28 22:07:05 [info / 119kB] > connecting to wifi network ‘EE-Hub-8wKE’
2023-01-28 22:07:10 [info / 102kB] - ip address: 192.168.1.83
2023-01-28 22:07:10 [info / 91kB] > uploading cached readings to MQTT broker: 192.168.1.206
2023-01-28 22:07:10 [info / 114kB] - uploaded 2023-01-28T22_06_04Z.json
2023-01-28 22:07:11 [info / 107kB] - uploaded 2023-01-28T22_07_05Z.json
2023-01-28 22:07:11 [info / 105kB] > going to sleep
2023-01-28 22:07:11 [debug / 103kB] - clearing and disabling previous alarm
2023-01-28 22:07:11 [info / 100kB] - setting alarm to wake at 22:08pm
2023-01-28 22:07:11 [info / 98kB] - shutting down
2023-01-28 22:07:12 [debug / 81kB] - on usb power (so can’t shutdown). Halt and wait for alarm or user reset instead