Open algorytmix02 opened 2 years ago
What is the output when you start roomba.py? Please post the whole thing.
Also post your version of complicated.py
.
What is the output when you start roomba.py? Please post the whole thing.
Also post your version of
complicated.py
.
if I run python3 roomba.py
root@Adguard:~/Roomba980-Python/roomba# python3 roomba.py CV or numpy module not found, falling back to PIL PIL module not found, maps are disabled CV or numpy module not found, falling back to PIL PIL module not found, maps are disabled CV or numpy module not found, falling back to PIL PIL module not found, maps are disabled [2022-06-26 19:32:58,007] INFO [2022-06-26 19:32:58,008] INFO Program Started [2022-06-26 19:32:58,008] INFO [2022-06-26 19:32:58,008] INFO Roomba.py Version: 2.0i [2022-06-26 19:32:58,008] INFO Python Version: 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] [2022-06-26 19:32:58,009] INFO Paho MQTT Version: 1.6.1 [2022-06-26 19:32:58,009] INFO
to Exit [2022-06-26 19:32:58,009] INFO Roomba MQTT data Interface [2022-06-26 19:32:58,009] INFO Using Password version 2.1 [2022-06-26 19:32:58,010] INFO reading/writing info from config file ./config.ini [2022-06-26 19:32:58,011] INFO 1 Roombas Found [2022-06-26 19:32:58,011] INFO Creating Roomba object 192.168.0.75, Pedro [2022-06-26 19:32:58,012] INFO Using Password version 2.1 [2022-06-26 19:32:58,012] INFO Posting DECODED data [2022-06-26 19:32:58,013] INFO Connecting... [2022-06-26 19:32:58,014] INFO Setting TLS [2022-06-26 19:32:58,016] INFO Setting TLS - OK [2022-06-26 19:32:59,184] INFO Roomba Connected [2022-06-26 19:32:59,662] INFO Received Roomba Data: $aws/things/35
and my complicated.py
import asyncio
from roomba import Roomba
import paho.mqtt.client as mqtt
import time
import json
import logging
#Uncomment the following two lines to see logging output
logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
#put your own values here
broker = '192.168.0.103' #ip of mqtt broker
user = 'jeedom' #mqtt username
password = 'jeedom' #mqtt password
#broker = None if not using local mqtt broker
address = '192.168.0.75'
blid = "3552201771294B429900B57E990AEC02"
roombaPassword = ":1:1654789638:XCZyZCphbiv6aLf0"
loop = asyncio.get_event_loop()
#myroomba = Roomba(address) #minnimum required to connect on Linux Debian system, will read connection from config file
myroomba = Roomba(address, blid, roombaPassword, webport=8200) #setting things manually
#all these are optional, if you don't include them, the defaults will work just fine
#if you are using maps
myroomba.enable_map(enable=True, mapSize="(800,1650,-300,-50,2,0)", mapPath="./", iconPath="./res") #enable live maps, class default is no maps
if broker is not None:
myroomba.setup_mqtt_client(broker, 1883, user, password, '/roomba/feedback') #if you want to publish Roomba data to your own mqtt broker (default is not to) if you have more than one roomba, and assign a ro$
#finally connect to Roomba - (required!)
myroomba.connect()
print("<CMTRL C> to exit")
print("Subscribe to /roomba/feedback/# to see published data")
try:
loop.run_forever()
except (KeyboardInterrupt, SystemExit):
print("System exit Received - Exiting program")
myroomba.disconnect()
thank you for your reply
Ok, you are trying to use maps with no graphics modules loaded.
You need at least PIL
, and preferably OpenCV
installed for the maps.html web page to work.
Try pip3 install Pillow
to install PIL, and see if that helps.
See https://pillow.readthedocs.io/en/stable/installation.html for full instructions.
Better yet, install OpenCV, this can be quite complicated though.
hello I cant' acces to the Rest interface but I have modified Complicated.py and when I have start with
Phyton complicated.py
But if a go to the http://192.168.0.41:8200/map/map.html (my VM with the installation are in 192.168.0.41) didn't respond sorry for my bad english i'm french ;)