Cette page fournit une simple interface de navigation pour trouver des entités décrites par une propriété et une valeur nommée. D’autres interfaces de recherche disponibles comprennent la page recherche de propriété, et le constructeur de requêtes ask.
Username is casaos, and the password is also same.CasaOS fully supports Raspberry Pi. Also, more computers and development boards and fully compatible with Ubuntu, Debian, Raspberry Pi OS, and CentOS with one-liner installation.spberry Pi OS, and CentOS with one-liner installation.)
import machine
import time
import urequests
import network
# Wi-Fi credentials
ssid = 'wifi_name' #input your own wifi name
password = 'password' #input your own password
# IFTTT webhook key
api_key = 'your_own_key' #input your own key
# Connect to Wi-Fi
station = network.WLAN(network.STA_IF)
station.active(True)
station.connect(ssid, password)
while station.isconnected() == False:
pass
print('Connection successful')
print(station.ifconfig())
# Set up ultrasonic sensor
trigger = machine.Pin(4, machine.Pin.OUT)
echo = machine.Pin(5, machine.Pin.IN)
def main():
while True:
# Send trigger pulse
trigger.value(0)
time.sleep_us(5)
trigger.value(1)
time.sleep_us(10)
trigger.value(0)
# Measure duration of echo pulse
while echo.value() == 0:
start = time.ticks_us()
while echo.value() == 1:
end = time.ticks_us()
duration = time.ticks_diff(end, start)
# Calculate distance
distance = duration * 0.034 / 2
# Send data to IFTTT
data = {'value1': distance}
submitData("ultrasonic_distance", data)
# Delay before next measurement
time.sleep(5)
def submitData(event, data):
try:
print('Sending data to IFTTT:', data)
request_headers = {'Content-Type': 'application/json'}
request = urequests.post(
'https://maker.ifttt.com/trigger/'+ event + '/with/key/' + api_key,
json=data,headers=request_headers)
print(request.text)
request.close()
except OSError as e:
print('Failed to send data to IFTTT.', e)
if __name__ == '__main__':
main()pip install pyserial psutil)
'''Arduino IDE'''
* Latest Arduino IDE or VS Code with PlatformIO
* ESP32 board support installed (Espressif package)
* Libraries: '''Arduino_JSON''' (install via Library Manager)
'''Network'''
* Local Wi‑Fi network credentials (SSID and password) for the ESP32 to host the webserver
(SSID and password) for the ESP32 to host the webserver
)[EXAMPLE] When a '''user1''' publishes an image on social media, then only the '''user2''' subscribed to '''user1''' can view/receive the image. Here, the '''user1''' is the '''PUBLISHER''', '''user2''' is the '''SUBSCRIBER''', and the '''user1's account''' is the '''BROKER'''.* According to the above analogy, the image that is published is the data, that was '''transferred from user1 to user2''' 📤. And that is the exact scenario in an MQTT Pub/Sub model. * We have a more secure layer 🔒 to make sure the data is shared t'''hrough a specific path, we call th'''at 'topic', When use'''r1''' publishes data on topic, the subscriber automatically receives if already connected to the broker. Hence, t'''he''' LOW latency.connected to the broker. Hence, t'''he''' LOW latency.)
Examples:
Turn on the lights when the sun sets.
Receive an alert if you accidentally leave the garage door open.'''Extendable with Add-Ons''': Home Assistant isn’t limited to its core functionality. You can easily install additional applications (add-ons) to enhance your setup.
Examples:
Run AdGuard for DNS-based ad blocking.
Use NodeRed for third-party automation.
Turn Home Assistant into a Spotify Connect target.'''Local Data Privacy''': Unlike cloud-based solutions, Home Assistant keeps your data local. It communicates directly with your devices without relying on external servers. Your privacy is preserved, and no data is stored in the cloud. '''Companion Mobile Apps''': Control your devices and receive notifications using the official Home Assistant apps. These apps also enable presence detection, allowing you to trigger automation based on your location. Rest assured, your data is sent directly to your home, with no third-party access. '''Installation Options:''' '''Home Assistant OS''': A ready-to-use image for devices like Raspberry Pi, Odroid, or Intel NUC. '''Home Assistant Supervised''': Install Home Assistant on a generic Linux system using Docker. '''Home Assistant Container''': Run Home Assistant in a Docker container. '''Home Assistant Core''': For advanced users who prefer manual installation on Python environments. By setting it up in a virtual machine, you can experiment with Home Assistant without affecting your primary Windows environment. === Prerequisites: === * '''Windows 11''': Ensure you’re running Windows 11 on your host machine. * '''VirtualBox''': Download and install VirtualBox if you haven’t already.re you’re running Windows 11 on your host machine. * '''VirtualBox''': Download and install VirtualBox if you haven’t already.)
Indian 4G Band Details''' '''"LTE-FDD:B1/B3/B7/B20 LTE-TDD: B40/B41"'''
Without hesitation, I procured the [https://www.seeedstudio.com/SenseCAP-Multi-Platform-LoRaWAN-Indoor-Gateway-SX1302-4G-EU868-p-5599.html SenseCAP Multi-Platform LoRaWAN Indoor Gateway(SX1302-4G) - EU868] at $149, including $30 shipping and $90 Indian customs fees.U868] at $149, including $30 shipping and $90 Indian customs fees.) 1 #include
2 #include
3
4 // WiFi
5 const char *ssid = "xxxxx"; // Enter your Wi-Fi name
6 const char *password = "xxxxx"; // Enter Wi-Fi password
7
8 // MQTT Broker
9 const char *mqtt_broker = "broker.emqx.io";
10 const char *topic = "emqx/esp32";
11 const char *mqtt_username = "emqx";
12 const char *mqtt_password = "public";
13 const int mqtt_port = 1883;
14
15 WiFiClient espClient;
16 PubSubClient client(espClient);
17
18 void setup() {
19 // Set software serial baud to 115200;
20 Serial.begin(115200);
21 // Connecting to a WiFi network
22 WiFi.begin(ssid, password);
23 while (WiFi.status() != WL_CONNECTED) {
24 delay(500);
25 Serial.println("Connecting to WiFi..");
26 }
27 Serial.println("Connected to the Wi-Fi network");
28 //connecting to a mqtt broker
29 client.setServer(mqtt_broker, mqtt_port);
30 client.setCallback(callback);
31 while (!client.connected()) {
32 String client_id = "esp32-client-";
33 client_id += String(WiFi.macAddress());
34 Serial.printf("The client %s connects to the public MQTT broker\n", client_id.c_str());
35 if (client.connect(client_id.c_str(), mqtt_username, mqtt_password)) {
36 Serial.println("Public EMQX MQTT broker connected");
37 } else {
38 Serial.print("failed with state ");
39 Serial.print(client.state());
40 delay(2000);
41 }
42 }
43 // Publish and subscribe
44 client.publish(topic, "Hi, I'm ESP32 ^^");
45 client.subscribe(topic);
46 }
47
48 void callback(char *topic, byte *payload, unsigned int length) {
49 Serial.print("Message arrived in topic: ");
50 Serial.println(topic);
51 Serial.print("Message:");
52 for (int i = 0; i < length; i++) {
53 Serial.print((char) payload[i]);
54 }
55 Serial.println();
56 Serial.println("-----------------------");
57 }
58
59 void loop() {
60 client.loop();
61 }
Vous avez entré un nom de page invalide, avec un ou plusieurs caractères suivants :
< > @ ~ : * € £ ` + = / \ | [ ] { } ; ? #