About ready to dive into learning how to do basic coding with Python and Raspberry Pi for the world of whole house automation, any suggestions on the best route to learn python and the intricacies of the almighty Pi?
If you have some basic coding background just ask ChatGPT to generate some code for you. It probably will not work right off the bat but the syntax will be correct and you will just have to debug a bit.
If you have some basic coding background just ask ChatGPT to generate some code for you. It probably will not work right off the bat but the syntax will be correct and you will just have to debug a bit.
My coding background is severely dated and minuscule, introductory MS DOS is about my extent. Seem Raspberry pi themselves have some pretty decent intro courses I am thumbing through at the moment. Have yet to jump on the Chatgpt bandwagon but it seems it is inevitable at this stage in the game.
My coding background is severely dated and minuscule, introductory MS DOS is about my extent. Seem Raspberry pi themselves have some pretty decent intro courses I am thumbing through at the moment. Have yet to jump on the Chatgpt bandwagon but it seems it is inevitable at this stage in the game.
Thats what I am trying to get around, I wont be able to use any retrofit smart home products, will be all low voltage from the source so nobody makes anything from scratch, we live in the stone age here in the US
Like Westy said, chatgpt or whatever is the way to go. You'll spend less time banging your head off the wall because of a misplaced quote or missing semi colon and more time getting results.
But, it will REALLY help if you can tell it exactly what to do. Like encourage it to use a certain function or method, rather than letting it decide that (though sometimes thats fun too).
I do this with powershell now. I can write working scripts in a fraction of the time, compared to writing them out by hand. But I've learned you have to break it down into sections, it won't be able to do anything very complicated - it just confused and will say that output works, whether that is reality or not. So similar to writing it all out yourself, its good to know what the end result is and have a general idea of how to get there.
I'd sign up for a class that goes through the basics of python (and code in general) and then one that has labs that helps speed things up, so you aren't wasting time on trying to get stuff to work on random hardware - just start writing code.
Like Westy said, chatgpt or whatever is the way to go. You'll spend less time banging your head off the wall because of a misplaced quote or missing semi colon and more time getting results.
But, it will REALLY help if you can tell it exactly what to do. Like encourage it to use a certain function or method, rather than letting it decide that (though sometimes thats fun too).
I do this with powershell now. I can write working scripts in a fraction of the time, compared to writing them out by hand. But I've learned you have to break it down into sections, it won't be able to do anything very complicated - it just confused and will say that output works, whether that is reality or not. So similar to writing it all out yourself, its good to know what the end result is and have a general idea of how to get there.
I'd sign up for a class that goes through the basics of python (and code in general) and then one that has labs that helps speed things up, so you aren't wasting time on trying to get stuff to work on random hardware - just start writing code.
But on the same hand I feel like I can benefit from at least the basics before asking skynet to do it for me so I can at least troubleshoot or modify some crowdsourced lines of code to bend it to my will.
Most of the stuff I will be doing is pretty light in terms of an actual code writer and will be revolving around Dali protocols and a broad lasso to grab the native strings that the current smart home UI is running from such as Alexa/google home, siri, home assistant, Hue and zwave.
I found some good groups on Facebook and in the Raspberry pi groups that has gotten me on the right path and even some very helpful strings that are copy and paste for my needs.
This is about the extent that I will be using it all for
#!/usr/bin/python2.7
# send DALI Level from Console
import time
import serial
import sys
ser = serial.Serial(
port ='/dev/ttyS0',
baudrate = 19200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=1,
)
text = raw_input(" What level : ")
if text == "q":
exit()
if text == "":
input = input+1
print('set level : %d'%input)
else:
input = int(text,10)
ser.write('h%02X%02X\n'%(address,input))
The other more intricate stuff will be leaning pretty heavy on chat GPT for, since it will be very specific for items such as well pumps, hydronic controls and even other automations such as leak detectors to automatic valve shut offs
Another thing to keep in mind is having some redundancy or fail safes, for anything that might cost you $$$ or something if one of your components fails (floods, water damage etc).
Things like getting a notification if something fails or stops responding can be key. Think up the chain too; if your pump stops working because the power is out, is your raspberry pi the thing sending a notification? Will it have power to do so? Will the interwebs work if the power is out? What if aliens land and probe your network?
And package updates in linux could break your stuff at any given moment, so tread with caution and test.
Another thing to keep in mind is having some redundancy or fail safes, for anything that might cost you $$$ or something if one of your components fails (floods, water damage etc).
Things like getting a notification if something fails or stops responding can be key. Think up the chain too; if your pump stops working because the power is out, is your raspberry pi the thing sending a notification? Will it have power to do so? Will the interwebs work if the power is out? What if aliens land and probe your network?
And package updates in linux could break your stuff at any given moment, so tread with caution and test.
The redundancy will be disgustingly overboard. Being off grid with solar and battery the LAN and starlink will always be available with a cellular backup if storm blockage occurs. The Raspberry pi's will effectively be a standalone monitoring and controlling device for specific "parts" or areas of interest of the property.
Being able to stack Pi's in a server rack and have stand alone boards for each specific task such as one for low voltage, one for plumbing, one for solar etc will give me a bound set and still be stand alone for each system as well as have some overlap. with the advent of LAN operated solenoid valves, wifi breakers and even smart relays I will be able to have complete control via my phone if I am in another state working on another project.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.