-
Notifications
You must be signed in to change notification settings - Fork 50
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
Refactor SHT40 and Add SHT3x #325
Conversation
@tyeth Do you have these sensors to test with, or should I? |
I've tested the SHT30 with address 44 and 45 (have initialised as 44 and code replacing SHT40 as SHT3X_ALT - address x45), then Add SHT40 and after i2c scan (address 44) and selecting frequency, but before choosing update component you swap the i2c address pin from GND to VCC and get it to address 45. I don't have any SHT40's on hand, nor the adafruit SHT31-D, so if you or anyone else could test that would be most appreciated |
I have an SHT40 on my desk, and just ordered an SHT31-D from Adafruit to test. I will get to this by next week. |
@@ -315,6 +315,17 @@ bool WipperSnapper_Component_I2C::initI2CDevice( | |||
_sht4x->configureDriver(msgDeviceInitReq); | |||
drivers.push_back(_sht4x); | |||
WS_DEBUG_PRINTLN("SHT4X Initialized Successfully!"); | |||
} else if (strcmp("SHT3X", msgDeviceInitReq->i2c_device_name) == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use lcase names here? The definition will need to reflect that, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah definitely, should I migrate the SHT40 too, as that's what suggested to me to go uppercase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding this, I wonder if doing a git mv
in the components repo will cause problems, I had to move to some intermediary name to get it to work in windows (expected unless you make the parent folder case aware) so I've committed it like that and done the 40 at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah definitely, should I migrate the SHT40 too, as that's what suggested to me to go uppercase?
Sure, and I'm not sure. I think it will just refresh the components once pulled in.
@lorennorman Will renaming an already-available component to from ucase to lcase cause issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, such a rename will cause issues. please let me know when you're ready to import that component name change, and i will take the necessary actions in the database.
we should tighten this up in the validators as well. all board and component names and directories need to be always lowercase (in my opinion.) easy to check and flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ready when you are, or wait for @brentru next week to get his hardware, but I've soldered up my SHT30's 31's and 35's, so as long as 'we' (Brent) retest the sht40 which he already has in his possession then it'll have full coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tyeth This passes my test with SHT40. I'll merge this when the changes are made on the component repo's end, and OK with @lorennorman.
@tyeth Let me know via pinging me here when this is ready for re-review. |
@brentru I think it's ready. I accidentally marked all conversations resolved, but as I mentioned I'm a bit of a newbie in cpp so please do mention the obvious / assumed... |
@tyeth Yeah, I added this to the list for next week's tasks. Should be ready to test on hardware by then. |
Made a whoopsie and removed the SCD4x driver thinking it was SHT4x, was breaking builds on CI, restored. |
Build failure due to release 2.0.5 today, not the PR's fault. |
Cool, thanks for latest info regarding spurious failure + sht40 testing. The component change is also there under adafruit/Wippersnapper_Components#77 |
@brentru The component change has gone through and seems to be working fine for me, added a comment in that pull request. |
Merged #329, rebuilding on affected platform. |
@brentru I've just been struggling to put the firmware (v50) on the nearest QTPY S2. It compiles and uploads fine with a cloned repo and the Arduino IDE, but using the official v50 release UF2 file for qtpy ESP32-s2 copies and then gets stuck with solid purple light forever on each boot. Like the uf2 file is broken... I tried the file from github and via Wippersnapper update page |
Any news on the update I am using in my drying room and am fully in the dark now. I feel like such a fool for updating it when it was working great. Any eta on time. Or an idea on how to maybe use arduino to get an old version running I really need it. I know it's silly to put my livelyhood on one arduino controller but I did. So I'm freaking out all day |
In your original ticket 4hours ago 😀 Should come up in the normal wippersnapper update pages, or under the releases section of the github repo |
Am I posting in the wrong place sorry I just tried the new update from
10’hours ago now I get this message
20:50:46.024 -> Fets Jul 29 2019 12:21:46
20:50:46.024 ->
20:50:46.024 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
20:50:46.024 -> configsip: 271414342, SPIWP:0xee
20:50:46.024 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,
wp_drv:0x00
20:50:46.024 -> mode:DIO, clock div:1
20:50:46.024 -> load:0x3fff0030,len:1184
20:50:46.024 -> load:0x40078000,len:13160
20:50:46.024 -> load:0x40080400,len:3036
20:50:46.024 -> entry 0x400805e4
20:50:46.633 -> ./components/esp_littlefs/src/littlefs/lfs.c:1229:error:
Corrupted dir pair at {0x0, 0x1}
20:50:46.633 -> E (236) esp_littlefs: mount failed, (-84)
20:50:46.633 -> E (236) esp_littlefs: Failed to initialize LittleFS
…On Thu, Sep 22, 2022 at 8:51 PM Tyeth Gundry ***@***.***> wrote:
Any news on the update I am using in my drying room and am fully in the
dark now. I feel like such a fool for updating it when it was working
great. Any eta on time. Or an idea on how to maybe use arduino to get an
old version running I really need it. I know it's silly to put my
livelyhood on one arduino controller but I did. So I'm freaking out all day
In your original ticket 4hours ago 😀 Should come up in the normal
wippersnapper update pages, or under the releases section of the github repo
—
Reply to this email directly, view it on GitHub
<#325 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXPQAUNWD35NCHD5CQJJHLDV7T5JPANCNFSM6AAAAAAQMZIYMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Oooh no idea on that one. I have noticed my secrets.json gets messed up sometimes usually when going between versions but sometimes disconnecting while writing, so I'm guessing it might be worth me erasing the flash once I get in a corrupted state. I dont, instead I just save a fresh copy of secrets.json and reboot the board, normally fixes everything, if not then reapply firmware again. If it still fails then apply 49 and should be okay. If that fails then go back to 44 also somewhere on the releases page 🤞 |
i dont know how to do that without the web flasher i always get an error in
arduino
…On Thu, Sep 22, 2022 at 8:55 PM Tyeth Gundry ***@***.***> wrote:
Oooh no idea on that one. I have noticed my secrets.json gets messed up
sometimes, so I'm guessing it might be worth me erasing the flash once I
get in a corrupted state. I dont, instead I just save a fresh copy of
secrets.json and reboot the board, normally fixes everything, if not then
reapply firmware again. If it still fails then apply 49 and should be okay.
—
Reply to this email directly, view it on GitHub
<#325 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXPQAUKU4E2MT5YR727VS6LV7T5YBANCNFSM6AAAAAAQMZIYMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I put in a new ticket and tried the credentials only.
Also tried to get an older version that worked before v44 and flashing it
through esp web flasher. But I get the same issue.
I have a Mac also but when I plug it in it does not come up as massstorage
so I don’t know how to get the uf2 file on there. Only bins with web
flasher
…On Thu, Sep 22, 2022 at 9:39 PM Tyeth Gundry ***@***.***> wrote:
This is worth sticking in a new bug ticket. Looks like your file system is
corrupted after the update, like my secrets.json file is now after using
latest release. I guess the storage memory location moved a bit and without
using Erase Flash and setting up secrets again we just cross our fingers
each time and hope for no corruption.
You could try just writing the Credentials file again and that may sort it
[image: image]
<https://user-images.githubusercontent.com/6692083/191877885-bc3e50a0-19fe-4da2-8b6d-630506b30243.png>
—
Reply to this email directly, view it on GitHub
<#325 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXPQAUIRGIN2SHWNXD4VI4TV7UC4XANCNFSM6AAAAAAQMZIYMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
It’s like a bad joke I got every old firmware running with webflasher tool
and connected. But when I try to add the sht40 it says firmware outdated
even though I was using version 44 yesterday and it worked great. I went
one by one up to 50 and and 50 I get a solid red light and it does not work
🤦🏼♂️
On Thu, Sep 22, 2022 at 9:55 PM THE GODMOTHER ***@***.***>
wrote:
… I put in a new ticket and tried the credentials only.
Also tried to get an older version that worked before v44 and flashing it
through esp web flasher. But I get the same issue.
I have a Mac also but when I plug it in it does not come up as massstorage
so I don’t know how to get the uf2 file on there. Only bins with web
flasher
On Thu, Sep 22, 2022 at 9:39 PM Tyeth Gundry ***@***.***>
wrote:
> This is worth sticking in a new bug ticket. Looks like your file system
> is corrupted after the update, like my secrets.json file is now after using
> latest release. I guess the storage memory location moved a bit and without
> using Erase Flash and setting up secrets again we just cross our fingers
> each time and hope for no corruption.
>
> You could try just writing the Credentials file again and that may sort it
> [image: image]
> <https://user-images.githubusercontent.com/6692083/191877885-bc3e50a0-19fe-4da2-8b6d-630506b30243.png>
>
> —
> Reply to this email directly, view it on GitHub
> <#325 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AXPQAUIRGIN2SHWNXD4VI4TV7UC4XANCNFSM6AAAAAAQMZIYMQ>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
Ah, that is my fault, sort of. I added the SHT35/31/30, and while doing so was told to lowercase it, and the SHT40 too which was previously uppercase. The older firmware versions wont know about lowercase naming of the sht40 sensor. You will have to do a new bug/issue mentioning the v50 issue. They'll(@brentru) want to sort it quickly for the feather ESP32 v2 anyway... |
i tried to do the Arduino but keep getting a compiling error after i put in my credentials |
Since this is a new bug (not related to what was solved yesterday), we're looking into this today with no ETA. Something between the Web Firmware Uploader and the new Arduino board support package is causing an issue. We haven't had to handle tests around the uploader specifically and haven't seen this type of bug before. This bug gives us an opportunity to add tests and increase stability so it doesn't happen again. Adafruit IO WipperSnapper is in beta and is actively being developed to add functionality, new hardware, and fix bugs. We do not want to break your project, and we are sorry given the situation you are in. We encourage you to try out WipperSnapper firmware with the understanding that _it is not the final release software yet (beta). |
Not your fault at all and I super appreciate you !
Having this is way more accurate then the 500$ Units on the market. I know
because I did testing with my visala(same probe on mars rover)
unfortunately it’s only hand held.
It was working fine with the old firmware and now it works on all old
firmwares just the sensor I need it to work with just keeps saying firmware
is outdated even 49. Other sensors with aht20 for example.
Thank you again for all your hard work
…On Fri, Sep 23, 2022 at 11:30 AM Brent Rubell ***@***.***> wrote:
Since this is a new bug (not related to what was solved yesterday), we're
looking into this today with no ETA. Something between the Web Firmware
Uploader and the new Arduino board support package is causing an issue. We
haven't had to handle tests around the uploader specifically. This issue
gives us an opportunity to add tests so it doesn't happen again.
Adafruit IO WipperSnapper is in beta and is actively being developed to
add functionality, new hardware, and fix bugs. We do not want to break your
projects, and we are sorry given the situation you are in. We encourage you
to try out WipperSnapper firmware with the understanding that *it is not
final release software yet (beta)*, and is currently still in active
development.
—
Reply to this email directly, view it on GitHub
<#325 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXPQAUJGVEGK6S4V573ZSZTV7XEJNANCNFSM6AAAAAAQMZIYMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
You could very quickly chuck circuitpython (micropython alternatively) on it, add wifi secrets, include the scd40 circuit python library with example code and publish to the same feed (mqtt adafruit io example). You'll be pleasantly surprised how easy it comes together. I only moved to wippersnapper due to the number of devices and sensors (setting up feeds is painful if you add descriptions and sensible names). Check out the circuitpython web workflow, basically you get a file manager and serial terminal in the browser (via ip or http://circuitpython.local) This is overkill (wanted to try calling sensor callbacks) and using different sensors, but I wanted to publish two SHT35's and two ADS1015 4channel ADC's to adafruit io, and they all error occasionally. I wanted to re-read the old values too initially, and there is code in there to jump around networks if the main one isn't there (I have 3networks to cover front of house to back greenhouse). You will have an easier time just using the scd40 example and adafruit io example, but this may help/interest you: The feedname I used to retrieve the scd40 co2 that wippersnapper is publishing, is |
They fixed it with an update thank you though 🙏 and to everyone working on
the project
…On Sat, Sep 24, 2022 at 5:34 AM Tyeth Gundry ***@***.***> wrote:
You could very quickly chuck circuitpython (micropython alternatively) on
it, add wifi secrets, include the scd40 circuit python library with example
code and publish to the same feed (mqtt adafruit io example). You'll be
pleasantly surprised how easy it comes together. I only moved to
wippersnapper due to the number of devices and sensors.
This is overkill (wanted to try calling sensor callbacks) and using
different sensors, but I wanted to publish two SHT35's and two ADS1015
4channel ADC's to adafruit io, and they all error occasionally. I wanted to
re-read the old values too initially, and there is code in there to jump
around networks if the main one isn't there (I have 3networks to cover
front of house to back greenhouse). You will have an easier time just using
the scd40 example and adafruit io example, but this may help/interest you:
https://github.com/tyeth/circuitpython-micropython-quicktest-qtpy-esp32-s2/main/qtpys2_io_adc_sht3x/
—
Reply to this email directly, view it on GitHub
<#325 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXPQAUMNPOVRYI7PX44MBRTV73DLHANCNFSM6AAAAAAQMZIYMQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This refactors the SHT40 / SHT41 to use the Sensirion library arduino-sht which brings support for SHT3x SHTCx SHTWx.
Also added driver entry for SHT3x.