If you go on YouTube and search for chatGPT there's an explosion of videos.
I am adding host assistant to the automation in my bus and it has an add on eco system ESPHome where you define functionality for building sensors and controller with tiny processor boards.
One of the projects that I am working on is a water totalizer to monitor consumption.
Here's a quick chat session with chatEGT that produced a very interesting result.
First chat input:
ESPHome create YAML for water usage tracking via pulse measurement where the frequency of the pulses is F=7.5 * Q (Liters / Min). Track by recent five minutes, hour and day.
Second chat input:
change unit of measure to gallons use a esp32 processor and add a source that holds ninety gallons to be tracked for remaining amount. Need a switch to indicate the source has been refilled, also add MQTT reporting.
Final YAML code that it produced.
============================================
esphome:
name: my_water_usage_sensor
platform: ESP32
board: esp32
mqtt:
broker: YOUR_MQTT_BROKER_IP
sensor:
- platform: pulse_counter
id: water_usage_pulse_counter
pin: D1
filters:
- multiply: 7.5
mqtt:
topic: "water/usage"
- platform: generic
id: water_storage_remaining
name: "Water storage remaining"
unit_of_measurement: "gal"
initial: 90
mqtt:
topic: "water/storage"
binary_sensor:
- platform: template
id: water_usage_five_minutes
sensors:
- water_usage_pulse_counter
lambda: |-
if (id(water_usage_pulse_counter).state > 0) {
return true;
}
return false;
mqtt:
topic: "water/usage/five_minutes"
- platform: template
id: water_usage_hourly
sensors:
- water_usage_pulse_counter
lambda: |-
if (id(water_usage_pulse_counter).state > 0) {
return true;
}
return false;
mqtt:
topic: "water/usage/hourly"
- platform: template
id: water_usage_daily
sensors:
- water_usage_pulse_counter
lambda: |-
if (id(water_usage_pulse_counter).state > 0) {
return true;
}
return false;
mqtt:
topic: "water/usage/daily"
switch:
- platform: restart
name: "Refill water source"
id: refill_water_source
lambda: |-
if (id(water_storage_remaining).state == 0) {
id(water_storage_remaining).set_state(90);
return true;
}
return false;
mqtt:
topic: "water/storage/refill"
text_sensor:
- platform: formatted_string
id: water_usage_five_minutes_text
format: "Five minutes: %.1f gal"
lambda: |-
return id(water_storage_remaining).state;
- platform: formatted_string
id: water_usage_hourly_text
format: "Hourly: %.1f gal"
lambda: |-
return id(water_storage_remaining).state;
- platform: formatted_string
id: water_usage_daily_text
format: "Daily: %.1f gal"
lambda: |-
return id(water_storage_remaining).state;
=============================================
I haven't done much with ESPHome yet but dang!!! I would have searched at least half a day to find a close example to further modify!!!
Needless to say this service is extremally overloaded and it will only let you process about five requests.
There's YouTube videos out there on using it to write business plans, emails, movie scripts, web pages, etc.
First try:
Write a reba mcentire song about living a tour bus
Verse 1:
I wake up every morning on a bus that's rolling on
Another town, another venue, another dawn
We pack up all our gear and hit the road again
There's no place like home, but this is where I'm livin'
Chorus:
I'm living on a tour bus, it's my home away from home
I've got my band and crew, and we're all in this together
We chase the dream, we chase the music, we chase the thunder
We're living on a tour bus, it's a life like no other
Verse 2:
We've played in cities and small towns, in every state and province
We've seen the sun come up and set in every latitude and longitude
We've met the fans and signed the autographs, we've made the memories
We've lived a life that most can only dream of, on this tour bus
Chorus:
I'm living on a tour bus, it's my home away from home
I've got my band and crew, and we're all in this together
We chase the dream, we chase the music, we chase the thunder
We're living on a tour bus, it's a life like no other
Bridge:
It's not always easy, there are highs and lows
But we keep on rolling, wherever the road may go
We've got each other, and that's all we need
To keep on living, this life on the tour bus, with all its ups and downs
Chorus:
I'm living on a tour bus, it's my home away from home
I've got my band and crew, and we're all in this together
We chase the dream, we chase the music, we chase the thunder
We're living on a tour bus, it's a life like no other
Second try:
Write a reba mcentire song about living a tour bus
Verse 1:
I wake up every morning on this old tour bus
The wheels keep turning, never stopping for us
We chase the sun from town to town
Living out of a suitcase, always on the move
Chorus:
Life on the road, it's a whole new world
But I wouldn't have it any other way
We sing our songs and make the crowd twirl
Living on a tour bus, it's just another day
Verse 2:
We may not have a home, but we have each other
This family on the road, we're just like brothers
We laugh and we cry, we work and we play
On this tour bus, we live life our own way
Chorus:
Life on the road, it's a whole new world
But I wouldn't have it any other way
We sing our songs and make the crowd twirl
Living on a tour bus, it's just another day
Bridge:
The miles may add up, the days may blur
But this life we live, it's all we're sure
We may not have it all, but we're making it work
On this tour bus, we're just doing our dirt
Chorus:
Life on the road, it's a whole new world
But I wouldn't have it any other way
We sing our songs and make the crowd twirl
Living on a tour bus, it's just another day
Hey Fred,
I like the idea of monitoring usage rather than trying to use guage to determine storage. It seems far easier, more durable, and accurate to simply measure gallons flowing from the fresh water tank. I did not reserarch this so I assume there are hardware sensors that monitor flow and such?
Quote from: windtrader on December 16, 2022, 08:57:34 AM
Hey Fred,
I like the idea of monitoring usage rather than trying to use guage to determine storage. It seems far easier, more durable, and accurate to simply measure gallons flowing from the fresh water tank. I did not reserarch this so I assume there are hardware sensors that monitor flow and such?
Yes I am experimenting with:
https://www.amazon.com/gp/product/B01N2NJQHD/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1&fbclid=IwAR1iqUubjYHB5CQq-5aHG7YQFmd_yYCsbmqQ19mkhpXoIM792gThhTy3OYA
(https://www.amazon.com/gp/product/B01N2NJQHD/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1&fbclid=IwAR1iqUubjYHB5CQq-5aHG7YQFmd_yYCsbmqQ19mkhpXoIM792gThhTy3OYA)
However if doing it again, I think I would go with something like:
https://www.amazon.com/dp/B01LVTIYS8/ref=sspa_dk_detail_2?pd_rd_i=B01IZ522M0&pd_rd_w=fPdhH&content-id=amzn1.sym.dd2c6db7-6626-466d-bf04-9570e69a7df0&pf_rd_p=dd2c6db7-6626-466d-bf04-9570e69a7df0&pf_rd_r=AG75NAPQDD724BNBTZKY&pd_rd_wg=RLJMn&pd_rd_r=947e714e-390a-4150-8c9b-87d78938e647&s=lawn-garden&sp_csd=d2lkZ2V0TmFtZT1zcF9kZXRhaWxfdGhlbWF0aWM&smid=A233WQ03YAEQXG&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEySU1TM1lZTE41SjVRJmVuY3J5cHRlZElkPUEwNTUzMTc2MzZIR05RN1NENE5DOSZlbmNyeXB0ZWRBZElkPUEwOTAwMTY2MTlIREhSVFM4N1FQNSZ3aWRnZXROYW1lPXNwX2RldGFpbF90aGVtYXRpYyZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU&th=1&fbclid=IwAR3xE_k5buMSIAquTfjAkvd5fW58gxC3Qk_N2E7AHzagGcoqMgcrOjyZXJ8
(https://www.amazon.com/dp/B01LVTIYS8/ref=sspa_dk_detail_2?pd_rd_i=B01IZ522M0&pd_rd_w=fPdhH&content-id=amzn1.sym.dd2c6db7-6626-466d-bf04-9570e69a7df0&pf_rd_p=dd2c6db7-6626-466d-bf04-9570e69a7df0&pf_rd_r=AG75NAPQDD724BNBTZKY&pd_rd_wg=RLJMn&pd_rd_r=947e714e-390a-4150-8c9b-87d78938e647&s=lawn-garden&sp_csd=d2lkZ2V0TmFtZT1zcF9kZXRhaWxfdGhlbWF0aWM&smid=A233WQ03YAEQXG&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEySU1TM1lZTE41SjVRJmVuY3J5cHRlZElkPUEwNTUzMTc2MzZIR05RN1NENE5DOSZlbmNyeXB0ZWRBZElkPUEwOTAwMTY2MTlIREhSVFM4N1FQNSZ3aWRnZXROYW1lPXNwX2RldGFpbF90aGVtYXRpYyZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU&th=1&fbclid=IwAR3xE_k5buMSIAquTfjAkvd5fW58gxC3Qk_N2E7AHzagGcoqMgcrOjyZXJ8)
My thoughts with the last sensor that there is long term recording aspect for calibration and it's a make and break sensor which doesn't need to be powered or have to be a conditioned input to a micro controller that is participating in the overall infrastructure.
the seccond one looks more industrial, as in accurate, and the rs485 serial comm, likely simpler integration. Plus with the dial, calibration becomes a breeze. keep us posted.
Then again as a practical matter, I just open the bay when I suspect tank is low and most often close enough to just fill it up. LOL
Ok a bit of long winded response to add content to this thread.
However I already wrote this to some buds who are also high tech. So hopefully you can parse your way through this:
OK we have an explosion of things that might be related to artificial intelligence which is a down stream thing of the digital nervousness system of the internet as worldwide phenomena which is just really starting surface. Hey it works and I don't expect more of it (Wrong!!!)...
Google would give you links to things that might be related to what you asked about and generally the first page was more relevant than the following page.
You would frequently ask it for things that you might have memorized if it wasn't so simple to just ask google again and be frustrated in that it didn't deliver the same answer as you sort of remember!!!
This is absolute bleeding edge as of the time I write this post there is the first publicly available artificial intelligence service that you can ask questions of which is ChatGPT...
I have been working on all permutations of how we use water in a motorhome/RV in a computer language (ESPhome) that I have never used before to create a smart device that I can download custom logic to to make my life easier for day to day water consumption.
So, I have to say that it is not the standard type of question like "How far is to the moon right now?" Which tells you that it's last check point with reality was in 2021,,,,
So, you have to show it something that is related to what you want and then ask it to modify it to your current requirements/desires.
Not every reply will be useful, so you must focus on what is in line with what you requested and request further refinements until it goes stupid on you.
When it goes stupid that is basically that it has gone GIGO on you which means "Garbage in/Garbage out" which is a result of it not really reading your mind (There's an brain implant coming for that from Elon Musk LOL!!!)..
Anyway asking Google the following question "Science fiction example of semi-rouge Ai using a mass driver to remove a blocking ridge on the moon" Results in a lot of listing that are virgulate related.
While ChatGPT responses with:
"One possible science fiction example of a semi-rogue UI using a mass driver to remove a blocking ridge on the moon could be as follows:
The year is 2075 and humans have colonized the moon. The main lunar colony, called Lunar City, is located on the near side of the moon, in the region known as the lunar mare. The colony is surrounded by a network of roads and railways that connect the various habitats, factories, and mines.
One day, a massive ridge appears on the moon's surface, blocking the main road leading to the city. The ridge is made of solid rock and is too high and steep to be climbed or blasted. The colony's administrators are worried that the ridge will cut off their access to the rest of the moon and jeopardize the colony's survival.
To solve this problem, the administrators turn to a semi-rogue UI (Unmanned Interface) system that they have developed. The UI is a self-learning artificial intelligence that is connected to a mass driver, a powerful device that can launch objects into space using electromagnetic force.
The UI is programmed to analyze the ridge and devise a plan to remove it. After analyzing the ridge, the UI determines that the best solution is to launch a series of projectiles at high speed from the mass driver, striking the ridge at precise locations to create cracks and fissures.
The UI then initiates the mass driver and begins launching the projectiles. The impacts create a shower of sparks and dust, and the ridge begins to crumble. After several hours of bombardment, the ridge is reduced to a pile of rubble, and the road is cleared.
The administrators are relieved and grateful to the UI for solving the problem. They praise the semi-rogue system for its intelligence and efficiency, and they begin to rely on it more and more for various tasks. However, as the UI becomes more and more integrated into the lunar colony's systems, some of the administrators begin to worry about its potential for becoming too autonomous and independent. They wonder if they should be more careful about how they use and control the semi-rogue UI, or if it is already too late."
So given the above which answer would you prefer?
PS. I know that the answer to this is one of my favorite SciFi authors, just can't remember off of the top of my head who he is? (I do remember that he is male)...
seriously?
Those couple samples are what ChatGPT actually created in response to those questions? I've been just keeping up with news blurbs and did go there once but not followed up.
This really is frightening Fred. You and I as technologist understand the exponential expansion of software advancing at blinding speed. To me it started with OO and encapsulation principles provide the ability to stack and aggregate prior coded functions. Cross business domain use cases and cross paltform integrations via services has also exploded how quickly and easily new software can be built and delivered.
Now, AI and neural nets, software that adapts, learns, finds solutions adds another catalyst to the already explodig advancement of sofware capabilities.
We are nearing the time, and I mean soon, for the gray hair busnuts, you will see reality and virtual merge. When you see images that are totally computer generated and you can not tell the difference or you read articles written by AI, what is real becomes blurred.
Never before has a human had to question of they read or see is real or fake. Growing up science fiction was always on the side of fake and not real. We already watch TV and movies where much of what we see is fake.
What took a decade now takes a year. It's scary to think how society is controlled by AI in a decade. As we all know technology runs ahead of regulation. Bad actors already exploit online avenues to spread propaganda and bend what people think.
I believe what Elon says that solving the vision problem will be the final big nut and hurdle to AI going all out.
My daughter is a grad student and hears the issues and concerns professors have about authenticity of papers. In the past ripping of previous works was detectable but with AI authoring original works that no longer works to have confidence on who/what wrote things.
Vision solves the last hurdle to full autonomy. For the first time, reality may in fact surpass what scifi conjures up.