Python is a widely used interpreted, high-level, general-purpose programming language with many excellent libraries to extend its core functionality.
Questions tagged [python]
22 questions
4
votes
1 answer
Wheel skid detection
I am working on a project which sensed four speed by using hall sensor attached to wheel by using raspberry pi.
I have wrote program for that only issue with that it gives fairly good results when wrote program for one sensor, and when using all…
Rakesh Choukse
- 41
- 1
3
votes
1 answer
Unable to publish MQTT server in an infinite while loop in Python script
I'm curious to know what the performance of an MQTT server is like. So I created this Python script:
import time
import paho.mqtt.client as mqtt
from multiprocessing import Pool
def on_connect(client, userdata, flags, rc):
print("Connected…
learningtech
- 357
- 1
- 3
- 12
2
votes
0 answers
Paho MQTT Client - on_message callback never happens
I have a Mosquitto MQTT broker (mosquitto version 2.0.11) running on a Raspberry Pi.
It is publishing regular messages on a specific topic, which can be seen by running
$ mosquitto_sub -h 192.168.27.177 -d -t HouseMon -t notification
from another…
tim11g
- 121
- 1
2
votes
1 answer
Circuit python express loads boot mode but doesn't flash .uf2
I'm having some trouble flashing CircuitPython to my Circuit Python Express. I successfully enter boot mode (LEDs are all green and red D13 light slowly blinking) but I can't flash anything. When I drag and drop a .uf2 file, there's no response even…
hvnova
- 21
- 1
2
votes
1 answer
How to setup a one-writer, one-reader system between a python script updating data from my home computer and an RPI reading the data?
This is my first project involving IOT, or even very much internet protocol for that matter.
THE SHORT:
I have a few programs on my home computer that search for live stock price data continuously. I have also designed a stock ticker from an RPI…
EbitdaMonster
- 21
- 1
2
votes
2 answers
Python Paho MQTT 2.5 KB messages not sending for days, while 0.1 KB messages send fine
I've got powerful dual-core IoT gateways in the field with high-speed cellular modems and good internet connections, but they fail to send 2.5 KB MQTT messages to my AWS IoT message broker. My program sends messages of various sizes, and the 0.1 KB…
Sean McCarthy
- 123
- 5
1
vote
0 answers
Is it possible to have more than one client connecting to python BLE server at once?
I've been testing the bless-library for BLE. This is the server code I've copied:
import sys
import logging
import asyncio
import threading
from typing import Any, Union
from bless import ( # type: ignore
…
Jabu-Jabu
- 11
- 2
1
vote
1 answer
How to control the state of GPIO pins on ESP32 Camera from an external python script?
I am currently working on a project that detects specific objects in a video stream. If a particular object is detected, an alarm of some sort will be rung. An HTML page will display the object detection output and the name of the object detected. I…
Mukesh Vamsi
- 13
- 3
1
vote
0 answers
How to choose variable type when setting Home Assistant states from AppDaemon?
I have a calculated result from a Python/AppDaemon script running on Home Assistant. I want to display that calculated result on my HA/LoveLace dashboard, so I created a sensor from AppDaemon. Unfortunately, I don't seem to be able select what…
Michael Molter
- 111
- 2
1
vote
0 answers
ESP32-S2 CircuitPython 5x OLED displays (I2C)
I want to use the ESP32-S2 with CircuitPython and 5x 0.96inch OLED I2C displays.
It's working fine, but only with 2 displays.
When I assign "i2c3" or more, I'm getting an error. When I keep only "i2c1 and i2c2" or "i2c4 and i2c5" for example, it's…
Pavol Bujna
- 11
- 1
1
vote
1 answer
Connect to Mqtt over websockets
I'm trying to connect on a broker with the following script
#!/user/bin/env python
import paho.mqtt.client as mqtt
import random
import requests
import warnings
import LoggingManager
logger = LoggingManager.log_setup()
logger.info("Start…
sstavridis
- 13
- 5
1
vote
0 answers
How to reconnect to MQTT server after CONNECTIONLOST?
I'm using a Raspberry Pi 3B+ with SIM7600X 4G HAT for communication with Python.
I want to connect to MQTT server to receive messages via writing MQTT commands directly to the serial port of the SIM7600 (based on the manual examples).
It works fine…
CookieMonster
- 113
- 4
1
vote
0 answers
Receiving Data from MacBAT 5 in python
I need to be able to communicate with a PLUM-EVC, MacBat 5 from a remote server using Python. I have been given parameters, IP and Port which are required to get the data from EVC.
I am completely new to this field. Can anyone please give some…
NealCaffery
- 111
- 3
1
vote
0 answers
Debugging Python on the BBC micro:bit with Pycharm
I am following this guide which seems to be excllent, except for one litte problem:
When I debug, a breakpoint which I set on the first line is nor reached and the script seems to hang.
The debugger tabs shows that we are connected:
as does the…
Mawg
- 3,147
- 1
- 13
- 35
0
votes
1 answer
How to turn on my TV and video projector using an IR adapter through a Python interface on my PC?
I have a couple of LG TVs, model 65UR8750PSA and Benq projectors model MW560 but I want to turn these devices on and off via an IR adapter using a Python interface on my PC. I have researched some IR adapters such as FLIRC USB but I am not sure if…
ORLsno345
- 9
- 2