Questions tagged [python]

Python is a widely used interpreted, high-level, general-purpose programming language with many excellent libraries to extend its core functionality.

Filter by
Sorted by
Tagged with
1 vote
0 answers
82 views

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....
tim11g's user avatar
  • 111
2 votes
1 answer
26 views

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 ...
hvnova's user avatar
  • 21
1 vote
1 answer
140 views

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 ...
Mukesh Vamsi's user avatar
0 votes
0 answers
48 views

How to make a POST to Alexa to make her speak/announce?

I'm a web developer. I use HTTP POST request all the time. I'm wondering if there is a way for me to make a POST to alexa. Example, I want to sent this payload to my Alexa {"text":"I ...
code-8's user avatar
  • 111
0 votes
1 answer
127 views

How to initiate connection to a GPRS enabled tracking device

I am trying to work with a few GPS-enabled tracking devices one of them being a TK-303 GPS tracker that uses SIM-powered GPRS to access the internet. currently, I can receive messages on my python TCP ...
Adebari Olalekan's user avatar
1 vote
0 answers
253 views

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. ...
Michael Molter's user avatar
2 votes
1 answer
26 views

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 ...
EbitdaMonster's user avatar
1 vote
0 answers
128 views

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 ...
Pavol Bujna's user avatar
0 votes
0 answers
692 views

Circuit Playground Express not showing CIRCUITPY drive

I got a Circuit Playground Express to serve as an anti-slumper device. Several mini-USB cables were power-only, and I tested them with the Arduino IDE and C code until one worked. I reset the board to ...
miguelmorin's user avatar
1 vote
1 answer
1k views

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 = ...
sstavridis's user avatar
2 votes
2 answers
230 views

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 ...
Sean McCarthy's user avatar
2 votes
1 answer
84 views

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 ...
Rakesh Choukse's user avatar
1 vote
0 answers
927 views

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 ...
CookieMonster's user avatar
0 votes
1 answer
199 views

Python Paho MQTT doesn't work via LTE

I'm using Raspberry Pi 3 B+ with a SIM7600X 4G HAT for SMS and mobile internet connection. I want to use Paho MQTT library (it works fine), but it only works via Ethernet or Wifi. How can I use the ...
CookieMonster's user avatar
3 votes
1 answer
4k views

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(...
John's user avatar
  • 327
0 votes
0 answers
31 views

Can someone guide me in the right direction of a logging stack for a Linux IoT device?

Let's say I have a Linux IoT device running full Ubuntu Server 18.04, and that the "firmware" is written in python. What are my options for building a logging stack, i.e. writing logs from the ...
John Allard's user avatar
1 vote
0 answers
207 views

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 ...
NealCaffery's user avatar
0 votes
1 answer
144 views

Can I compile Python on my PC, load it to an ESP32 and run it?

As a follow-up from Can I retrieve a Python program from an ESP32?, I would like to make things a little more difficult for those who would steal my code (I do realize that I cannot prevent it). Can ...
Mawg says reinstate Monica's user avatar
0 votes
1 answer
192 views

Can I retrieve a Python program from an ESP32?

As per the title. If I have an ESP32 with some Python loaded, and have lost the source, can I retrieve it from the ESP32?
Mawg says reinstate Monica's user avatar
1 vote
0 answers
188 views

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 ...
Mawg says reinstate Monica's user avatar