# Unsure About Enviro Weather Board Operation

**URL:** https://forums.pimoroni.com/t/unsure-about-enviro-weather-board-operation/21341
**Category:** Support
**Created:** [January 25, 2023, 12:34pm UTC](https://forums.pimoroni.com/t/unsure-about-enviro-weather-board-operation/21341 "2023-01-25T12:34:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jmg](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@jmg](https://forums.pimoroni.com/u/jmg)
#### Post date: [January 25, 2023, 12:34pm UTC](https://forums.pimoroni.com/t/unsure-about-enviro-weather-board-operation/21341/1 "2023-01-25T12:34:10Z")

</div>

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:

1. 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.

2. The ‘warning’ (red) LED flashes for some 50 seconds in between taking the two readings which are uploaded together.

3. 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.

4. 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?

Thank you for your help.

---

<div class="post-metadata">

### Author: ![dave1979](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@dave1979](https://forums.pimoroni.com/u/dave1979)
#### Post date: [January 28, 2023, 5:19pm UTC](https://forums.pimoroni.com/t/unsure-about-enviro-weather-board-operation/21341/2 "2023-01-28T17:19:41Z")

</div>

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.

> <https://github.com/pimoroni/enviro/issues/119>
>
> @ZodiusInfuser have tried 0.0.9 on the Urban today (also on 2 x enviro indoors w…hich dont seem to have any issues so far). On the Urban it worked for about 4hrs then stopped. Looking at the logs an error occured while uploading vi mqtt which then tried to go back to sleep but looks like it failed (last entry at 15:20) as the red LED was flashing probably for about two hours and this was at about 17:00. When I bought it in took a picture before disconnecting the battery as also seems the white LED is partially on. 
> 
> Log Files
> 
> \`\`\`
> 2022-11-26 15:05:16 \[info / 118kB\] \> uploading cached readings to MQTT broker: atmos.local
> 2022-11-26 15:05:16 \[info / 110kB\] - uploaded 2022-11-26T14\_55\_09Z.json
> 2022-11-26 15:05:17 \[info / 103kB\] - uploaded 2022-11-26T15\_00\_09Z.json
> 2022-11-26 15:05:17 \[info / 97kB\] - uploaded 2022-11-26T15\_05\_09Z.json
> 2022-11-26 15:05:17 \[info / 95kB\] \> going to sleep
> 2022-11-26 15:05:17 \[debug / 93kB\] - clearing and disabling previous alarm
> 2022-11-26 15:05:17 \[info / 90kB\] - setting alarm to wake at 15:10pm
> 2022-11-26 15:05:17 \[info / 88kB\] - shutting down
> 2022-11-26 15:10:03 \[debug / 115kB\] \> performing startup
> 2022-11-26 15:10:03 \[info / 123kB\] - wake reason: rtc\_alarm
> 2022-11-26 15:10:03 \[debug / 121kB\] - turn on activity led
> 2022-11-26 15:10:03 \[debug / 119kB\] \> 102 blocks free out of 212
> 2022-11-26 15:10:03 \[debug / 116kB\] \> taking new reading
> 2022-11-26 15:10:03 \[info / 112kB\] - seconds since last reading: 300
> 2022-11-26 15:10:03 \[debug / 109kB\] - starting sensor
> 2022-11-26 15:10:03 \[debug / 107kB\] - wait 5 seconds for airflow
> 2022-11-26 15:10:08 \[debug / 88kB\] - taking pms5003i reading
> 2022-11-26 15:10:08 \[debug / 121kB\] - taking microphone reading
> 2022-11-26 15:10:09 \[debug / 122kB\] \> caching reading for upload
> 2022-11-26 15:10:09 \[info / 117kB\] \> 1 cache file(s) not being uploaded. Waiting until there are 3 file(s)
> 2022-11-26 15:10:09 \[info / 115kB\] \> going to sleep
> 2022-11-26 15:10:09 \[debug / 112kB\] - clearing and disabling previous alarm
> 2022-11-26 15:10:09 \[info / 110kB\] - setting alarm to wake at 15:15pm
> 2022-11-26 15:10:10 \[info / 94kB\] - shutting down
> 2022-11-26 15:15:03 \[debug / 115kB\] \> performing startup
> 2022-11-26 15:15:03 \[info / 123kB\] - wake reason: rtc\_alarm
> 2022-11-26 15:15:03 \[debug / 121kB\] - turn on activity led
> 2022-11-26 15:15:03 \[debug / 119kB\] \> 103 blocks free out of 212
> 2022-11-26 15:15:03 \[debug / 116kB\] \> taking new reading
> 2022-11-26 15:15:03 \[info / 112kB\] - seconds since last reading: 300
> 2022-11-26 15:15:03 \[debug / 109kB\] - starting sensor
> 2022-11-26 15:15:03 \[debug / 107kB\] - wait 5 seconds for airflow
> 2022-11-26 15:15:09 \[debug / 88kB\] - taking pms5003i reading
> 2022-11-26 15:15:09 \[debug / 121kB\] - taking microphone reading
> 2022-11-26 15:15:09 \[debug / 120kB\] \> caching reading for upload
> 2022-11-26 15:15:09 \[info / 115kB\] \> 2 cache file(s) not being uploaded. Waiting until there are 3 file(s)
> 2022-11-26 15:15:09 \[info / 113kB\] \> going to sleep
> 2022-11-26 15:15:09 \[debug / 111kB\] - clearing and disabling previous alarm
> 2022-11-26 15:15:10 \[info / 109kB\] - setting alarm to wake at 15:20pm
> 2022-11-26 15:15:10 \[info / 107kB\] - shutting down
> 2022-11-26 15:20:03 \[debug / 115kB\] \> performing startup
> 2022-11-26 15:20:03 \[info / 123kB\] - wake reason: rtc\_alarm
> 2022-11-26 15:20:03 \[debug / 121kB\] - turn on activity led
> 2022-11-26 15:20:03 \[debug / 119kB\] \> 102 blocks free out of 212
> 2022-11-26 15:20:03 \[debug / 116kB\] \> taking new reading
> 2022-11-26 15:20:03 \[info / 112kB\] - seconds since last reading: 300
> 2022-11-26 15:20:03 \[debug / 109kB\] - starting sensor
> 2022-11-26 15:20:03 \[debug / 107kB\] - wait 5 seconds for airflow
> 2022-11-26 15:20:08 \[debug / 88kB\] - taking pms5003i reading
> 2022-11-26 15:20:08 \[debug / 121kB\] - taking microphone reading
> 2022-11-26 15:20:09 \[debug / 121kB\] \> caching reading for upload
> 2022-11-26 15:20:09 \[info / 116kB\] \> 3 cache file(s) need uploading
> 2022-11-26 15:20:09 \[info / 113kB\] \> connecting to wifi network 'VM2878914'
> 2022-11-26 15:20:15 \[info / 91kB\] - ip address: 192.168.0.73
> 2022-11-26 15:20:16 \[info / 118kB\] \> uploading cached readings to MQTT broker: atmos.local
> 2022-11-26 15:20:23 \[debug / 88kB\] - an exception occurred when uploading
> 2022-11-26 15:20:23 \[error / 86kB\] ! failed to upload '2022-11-26T15\_10\_09Z.json' to mqtt
> 2022-11-26 15:20:23 \[error / 84kB\] ! reading upload failed
> 2022-11-26 15:20:23 \[info / 121kB\] \> going to sleep
> 2000-01-01 00:00:04 \[debug / 115kB\] \> performing startup
> 2000-01-01 00:00:04 \[info / 123kB\] - wake reason: usb\_powered
> 2000-01-01 00:00:04 \[debug / 121kB\] - turn on activity led
> 2000-01-01 00:00:04 \[info / 119kB\] \> clock not set, synchronise from ntp server
> \`\`\`
>  
> Photo of board LEDs when I bought it in (red LED was flashing and white LED was part lit).
> 
> !\[IMG\_3167\](https://user-images.githubusercontent.com/17012929/204101551-ac18ce9a-f2f6-4368-a6f3-aa94e9b5aacb.jpg)

---

<div class="post-metadata">

### Author: ![jmg](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@jmg](https://forums.pimoroni.com/u/jmg)
#### Post date: [January 29, 2023, 10:00pm UTC](https://forums.pimoroni.com/t/unsure-about-enviro-weather-board-operation/21341/3 "2023-01-29T22:00:29Z")

</div>

Thanks dave1979,

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
