iRobot Roomba 980 integration
Moderator: leecollings
-
- Posts: 100
- Joined: Thursday 03 November 2016 10:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: iRobot Roomba 980 integration
It is in the procedure in the readme on GitHub
-
- Posts: 31
- Joined: Sunday 23 November 2014 16:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: France
- Contact:
Re: iRobot Roomba 980 integration
which part ?
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
-
- Posts: 100
- Joined: Thursday 03 November 2016 10:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: iRobot Roomba 980 integration
About the config.ini.
Extract of text:
run python3 ./roomba/getpassword.py -R ROOMBA_IP and follow the instructions. Shortly the vacuum cleaner must be docked and you need to HOLD the HOME button for some seconds until a sound is played (the WIFI indicator on the ROOMBA will flash).
If all went well, there should be a config.ini file in the folder /home/pi/domoticz/plugins/Roomba/. You can check the content with cat config.ini and will find the ROOMBA_IP, blid, password and some other data about the ROOMBA vaccum cleaner.
Extract of text:
run python3 ./roomba/getpassword.py -R ROOMBA_IP and follow the instructions. Shortly the vacuum cleaner must be docked and you need to HOLD the HOME button for some seconds until a sound is played (the WIFI indicator on the ROOMBA will flash).
If all went well, there should be a config.ini file in the folder /home/pi/domoticz/plugins/Roomba/. You can check the content with cat config.ini and will find the ROOMBA_IP, blid, password and some other data about the ROOMBA vaccum cleaner.
-
- Posts: 31
- Joined: Sunday 23 November 2014 16:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: France
- Contact:
Re: iRobot Roomba 980 integration
Yes, but it comes after the start of the service, which will fail because the config file does not exist yet.
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
-
- Posts: 100
- Joined: Thursday 03 November 2016 10:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: iRobot Roomba 980 integration
Hi,
Thanks for the information and you are totally right (of course). I change both steps in the procedure.
Filip
Thanks for the information and you are totally right (of course). I change both steps in the procedure.
Filip
-
- Posts: 31
- Joined: Sunday 23 November 2014 16:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: France
- Contact:
Re: iRobot Roomba 980 integration
No problem Filip. Just wanted to give you my return because I followed the procedure.
Anyway, that is a good job and the plugin is working well. Thanks for all.
Anyway, that is a good job and the plugin is working well. Thanks for all.
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
-
- Posts: 13
- Joined: Sunday 25 October 2020 14:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Helmond
- Contact:
Re: iRobot Roomba 980 integration
Hello Filip,Filip wrote: ↑Sunday 17 January 2021 11:21 I made a plugin for the ROOMBA i7... Don't know if it works with the Roomba 980 however would be interesting if somebody can give it a try and give feedback. The plugin is available on https://github.com/FilipDem/Domoticz-iR ... MBA-plugin.
I installed your Roomba Plugin. I think I did everything correct. But I get the following error in Domoticz, can you tell me what I'm doing wrong?:
2021-01-24 11:21:00.442 Error: EventSystem: in Staat Lydia: [string "commandArray = {}..."]:3: attempt to index a nil value (global 'devicechanged')
Thank you for your help in advance.
Greetz Sven
-
- Posts: 100
- Joined: Thursday 03 November 2016 10:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: iRobot Roomba 980 integration
Seems strange as the error seems to come from the LUA framework while I am not using this in the plugin.
What is Staat Lydia? This is a device I suppose... Did you rename the generated Roomba devices that we're created automatically? This could be the problem...
If necessity you need to activate the debug mode of the plugin and post the relevant traces.
What is Staat Lydia? This is a device I suppose... Did you rename the generated Roomba devices that we're created automatically? This could be the problem...
If necessity you need to activate the debug mode of the plugin and post the relevant traces.
-
- Posts: 13
- Joined: Sunday 25 October 2020 14:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Helmond
- Contact:
Re: iRobot Roomba 980 integration
Filip,Filip wrote: ↑Sunday 24 January 2021 15:20 Seems strange as the error seems to come from the LUA framework while I am not using this in the plugin.
What is Staat Lydia? This is a device I suppose... Did you rename the generated Roomba devices that we're created automatically? This could be the problem...
If necessity you need to activate the debug mode of the plugin and post the relevant traces.
Lydia is de name of my Roomba. Cloud it be that Domoticz is translating to Dutch in de log-file? State translated to Dutch is Staat. And no I didn't rename the device that had been created.
I activated the debug mode. see below for the result:
pi@raspberrypi:~/domoticz/plugins/Roomba $ python3 mqtt_Roomba.py -D 3
CV or numpy module not found, falling back to PIL
<CTRL C> to exit
Subscribe to /roomba/feedback/# to see published data
Broker Connected with result code 0
Broker Subscribed: 1 (0,)
Broker Subscribed: 2 (0,)
^CSystem exit Received - Exiting program
Broker disconnected
Can you make anything out of it. I'm going to install your plugin on my other Rpi. Maybe the other Raspberry is nog functioning correct. Keep me posted on what you think.
-
- Posts: 100
- Joined: Thursday 03 November 2016 10:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: iRobot Roomba 980 integration
Seems that this is indeed working well. I give some information that I posted to help somebody else on https://github.com/FilipDem/Domoticz-iR ... n/issues/2. Especially the test with mosquitto_sub is interesting to do.Svennie wrote: ↑Sunday 24 January 2021 19:34Filip,Filip wrote: ↑Sunday 24 January 2021 15:20 Seems strange as the error seems to come from the LUA framework while I am not using this in the plugin.
What is Staat Lydia? This is a device I suppose... Did you rename the generated Roomba devices that we're created automatically? This could be the problem...
If necessity you need to activate the debug mode of the plugin and post the relevant traces.
Lydia is de name of my Roomba. Cloud it be that Domoticz is translating to Dutch in de log-file? State translated to Dutch is Staat. And no I didn't rename the device that had been created.
I activated the debug mode. see below for the result:
pi@raspberrypi:~/domoticz/plugins/Roomba $ python3 mqtt_Roomba.py -D 3
CV or numpy module not found, falling back to PIL
<CTRL C> to exit
Subscribe to /roomba/feedback/# to see published data
Broker Connected with result code 0
Broker Subscribed: 1 (0,)
Broker Subscribed: 2 (0,)
^CSystem exit Received - Exiting program
Broker disconnected
Can you make anything out of it. I'm going to install your plugin on my other Rpi. Maybe the other Raspberry is nog functioning correct. Keep me posted on what you think.
mqtt_Roomba.py connects to the ROOMBA and publishes (MQTT PUB) ROOMBA data to the mosquitto (MQTT brooker). The domoticz plugin (plugin.py) is the MQTT client/subscriber.
Check if mosquitto is really running. All is based on 'localhost' so be sure it is running on the same machine as your domoticz. You can check it with sudo service mosquitto status. I suppose it will be the case seen the domoticz client can connect (otherwise I would have seen an error message in the log). I am rather sure it is between the ROOMBA and domoticz.
Be sure that mqtt_Roomba.py is also running. If you start it manually, be sure that at every reboot it is started. If you created a service (as indicated in the procedure, check if the service is running with sudo service roomba status.
You can test without domoticz by starting a MQTT subscriber manually. If you run mosquitto_sub -v -t /roomba/feedback/# (again on the same machine), you should receive the raw output that is sent regularly by ROOMBA. Output should be something like:
/roomba/feedback/netinfo_dhcp True
/roomba/feedback/netinfo_addr 3232261301
/roomba/feedback/netinfo_mask 4294967040
/roomba/feedback/netinfo_gw 3232261121
/roomba/feedback/netinfo_dns1 3232261121
/roomba/feedback/netinfo_dns2 0
/roomba/feedback/netinfo_bssid 6c:b0:ce:14:2f:cd
/roomba/feedback/netinfo_sec 4
/roomba/feedback/wifistat_wifi 1
/roomba/feedback/wifistat_uap False
/roomba/feedback/wifistat_cloud 1
/roomba/feedback/netinfo_dhcp True
... (deleted a part)
/roomba/feedback/bbsys_hr 517
/roomba/feedback/bbsys_min 57
/roomba/feedback/state Charging
/roomba/feedback/signal_rssi -35
/roomba/feedback/signal_snr 54
/roomba/feedback/state Charging
/roomba/feedback/signal_rssi -36
/roomba/feedback/signal_snr 53
/roomba/feedback/state Charging
If you don't have this, it will certainly not work in Domoticz.
Hope it helps. Success
-
- Posts: 13
- Joined: Sunday 25 October 2020 14:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Helmond
- Contact:
Re: iRobot Roomba 980 integration
Flilip,Filip wrote: ↑Monday 25 January 2021 8:45Seems that this is indeed working well. I give some information that I posted to help somebody else on https://github.com/FilipDem/Domoticz-iR ... n/issues/2. Especially the test with mosquitto_sub is interesting to do.Svennie wrote: ↑Sunday 24 January 2021 19:34Filip,Filip wrote: ↑Sunday 24 January 2021 15:20 Seems strange as the error seems to come from the LUA framework while I am not using this in the plugin.
What is Staat Lydia? This is a device I suppose... Did you rename the generated Roomba devices that we're created automatically? This could be the problem...
If necessity you need to activate the debug mode of the plugin and post the relevant traces.
Lydia is de name of my Roomba. Cloud it be that Domoticz is translating to Dutch in de log-file? State translated to Dutch is Staat. And no I didn't rename the device that had been created.
I activated the debug mode. see below for the result:
pi@raspberrypi:~/domoticz/plugins/Roomba $ python3 mqtt_Roomba.py -D 3
CV or numpy module not found, falling back to PIL
<CTRL C> to exit
Subscribe to /roomba/feedback/# to see published data
Broker Connected with result code 0
Broker Subscribed: 1 (0,)
Broker Subscribed: 2 (0,)
^CSystem exit Received - Exiting program
Broker disconnected
Can you make anything out of it. I'm going to install your plugin on my other Rpi. Maybe the other Raspberry is nog functioning correct. Keep me posted on what you think.
mqtt_Roomba.py connects to the ROOMBA and publishes (MQTT PUB) ROOMBA data to the mosquitto (MQTT brooker). The domoticz plugin (plugin.py) is the MQTT client/subscriber.
Check if mosquitto is really running. All is based on 'localhost' so be sure it is running on the same machine as your domoticz. You can check it with sudo service mosquitto status. I suppose it will be the case seen the domoticz client can connect (otherwise I would have seen an error message in the log). I am rather sure it is between the ROOMBA and domoticz.
Be sure that mqtt_Roomba.py is also running. If you start it manually, be sure that at every reboot it is started. If you created a service (as indicated in the procedure, check if the service is running with sudo service roomba status.
You can test without domoticz by starting a MQTT subscriber manually. If you run mosquitto_sub -v -t /roomba/feedback/# (again on the same machine), you should receive the raw output that is sent regularly by ROOMBA. Output should be something like:
/roomba/feedback/netinfo_dhcp True
/roomba/feedback/netinfo_addr 3232261301
/roomba/feedback/netinfo_mask 4294967040
/roomba/feedback/netinfo_gw 3232261121
/roomba/feedback/netinfo_dns1 3232261121
/roomba/feedback/netinfo_dns2 0
/roomba/feedback/netinfo_bssid 6c:b0:ce:14:2f:cd
/roomba/feedback/netinfo_sec 4
/roomba/feedback/wifistat_wifi 1
/roomba/feedback/wifistat_uap False
/roomba/feedback/wifistat_cloud 1
/roomba/feedback/netinfo_dhcp True
... (deleted a part)
/roomba/feedback/bbsys_hr 517
/roomba/feedback/bbsys_min 57
/roomba/feedback/state Charging
/roomba/feedback/signal_rssi -35
/roomba/feedback/signal_snr 54
/roomba/feedback/state Charging
/roomba/feedback/signal_rssi -36
/roomba/feedback/signal_snr 53
/roomba/feedback/state Charging
If you don't have this, it will certainly not work in Domoticz.
Hope it helps. Success
I did run de command you gave me. I didn't get any result on my Rpi4. So I try to install your plug-in on a RPi3 with Domoticz. It worked on that one. Thnx for you help. Eventually I wanna run Domoticz with your plugin on the Rpi4. So now I know what the do. It does do what I needed. Now I have the get some scripts running what turning on my lights so my Roomba can vacuum at night.
greetz Sven
-
- Posts: 100
- Joined: Thursday 03 November 2016 10:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: iRobot Roomba 980 integration
Happy with your feedback and glad it works!Svennie wrote: ↑Tuesday 26 January 2021 18:20Flilip,Filip wrote: ↑Monday 25 January 2021 8:45Seems that this is indeed working well. I give some information that I posted to help somebody else on https://github.com/FilipDem/Domoticz-iR ... n/issues/2. Especially the test with mosquitto_sub is interesting to do.Svennie wrote: ↑Sunday 24 January 2021 19:34
Filip,
Lydia is de name of my Roomba. Cloud it be that Domoticz is translating to Dutch in de log-file? State translated to Dutch is Staat. And no I didn't rename the device that had been created.
I activated the debug mode. see below for the result:
pi@raspberrypi:~/domoticz/plugins/Roomba $ python3 mqtt_Roomba.py -D 3
CV or numpy module not found, falling back to PIL
<CTRL C> to exit
Subscribe to /roomba/feedback/# to see published data
Broker Connected with result code 0
Broker Subscribed: 1 (0,)
Broker Subscribed: 2 (0,)
^CSystem exit Received - Exiting program
Broker disconnected
Can you make anything out of it. I'm going to install your plugin on my other Rpi. Maybe the other Raspberry is nog functioning correct. Keep me posted on what you think.
mqtt_Roomba.py connects to the ROOMBA and publishes (MQTT PUB) ROOMBA data to the mosquitto (MQTT brooker). The domoticz plugin (plugin.py) is the MQTT client/subscriber.
Check if mosquitto is really running. All is based on 'localhost' so be sure it is running on the same machine as your domoticz. You can check it with sudo service mosquitto status. I suppose it will be the case seen the domoticz client can connect (otherwise I would have seen an error message in the log). I am rather sure it is between the ROOMBA and domoticz.
Be sure that mqtt_Roomba.py is also running. If you start it manually, be sure that at every reboot it is started. If you created a service (as indicated in the procedure, check if the service is running with sudo service roomba status.
You can test without domoticz by starting a MQTT subscriber manually. If you run mosquitto_sub -v -t /roomba/feedback/# (again on the same machine), you should receive the raw output that is sent regularly by ROOMBA. Output should be something like:
/roomba/feedback/netinfo_dhcp True
/roomba/feedback/netinfo_addr 3232261301
/roomba/feedback/netinfo_mask 4294967040
/roomba/feedback/netinfo_gw 3232261121
/roomba/feedback/netinfo_dns1 3232261121
/roomba/feedback/netinfo_dns2 0
/roomba/feedback/netinfo_bssid 6c:b0:ce:14:2f:cd
/roomba/feedback/netinfo_sec 4
/roomba/feedback/wifistat_wifi 1
/roomba/feedback/wifistat_uap False
/roomba/feedback/wifistat_cloud 1
/roomba/feedback/netinfo_dhcp True
... (deleted a part)
/roomba/feedback/bbsys_hr 517
/roomba/feedback/bbsys_min 57
/roomba/feedback/state Charging
/roomba/feedback/signal_rssi -35
/roomba/feedback/signal_snr 54
/roomba/feedback/state Charging
/roomba/feedback/signal_rssi -36
/roomba/feedback/signal_snr 53
/roomba/feedback/state Charging
If you don't have this, it will certainly not work in Domoticz.
Hope it helps. Success
I did run de command you gave me. I didn't get any result on my Rpi4. So I try to install your plug-in on a RPi3 with Domoticz. It worked on that one. Thnx for you help. Eventually I wanna run Domoticz with your plugin on the Rpi4. So now I know what the do. It does do what I needed. Now I have the get some scripts running what turning on my lights so my Roomba can vacuum at night.
greetz Sven
-
- Posts: 13
- Joined: Sunday 25 October 2020 14:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Helmond
- Contact:
Re: iRobot Roomba 980 integration
Filip,
I encountered an issue. The Plugin works great. But... after 10, 30, 60 or 2 hours the plugin isn't updating the status of my Roomba S9.
Even do my Roomba is running.
When u run the command: sudo service roomba status, I get the following.
pi@raspberrypi:~ $ sudo service roomba status
● roomba.service - Roomba mqtt client
Loaded: loaded (/etc/systemd/system/roomba.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2021-01-27 18:11:53 CET; 31min ago
Main PID: 3233 (python3)
Tasks: 1 (limit: 2182)
CGroup: /system.slice/roomba.service
└─3233 /usr/bin/python3 /home/pi/domoticz/plugins/Roomba/mqtt_Roomba.py
So de service is running. But there is no change in Domoticz. But when I run "sudo service roomba stop" and then "Sudo service roomba start" or I run "Sudo service roomba restart" the status in Domoticz is updatet after a couple of seconds.
In a couple of post earlier you gave me a command to run to test the response of the Roomba. "mosquitto_sub -v -t /roomba/feedback/#" When my Roomba is running it gives a response. That stops when he is on his dock and charging.
Can I do anything to keep the roomba service sort of alive?
Thank you again for your help.
I encountered an issue. The Plugin works great. But... after 10, 30, 60 or 2 hours the plugin isn't updating the status of my Roomba S9.
Even do my Roomba is running.
When u run the command: sudo service roomba status, I get the following.
pi@raspberrypi:~ $ sudo service roomba status
● roomba.service - Roomba mqtt client
Loaded: loaded (/etc/systemd/system/roomba.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2021-01-27 18:11:53 CET; 31min ago
Main PID: 3233 (python3)
Tasks: 1 (limit: 2182)
CGroup: /system.slice/roomba.service
└─3233 /usr/bin/python3 /home/pi/domoticz/plugins/Roomba/mqtt_Roomba.py
So de service is running. But there is no change in Domoticz. But when I run "sudo service roomba stop" and then "Sudo service roomba start" or I run "Sudo service roomba restart" the status in Domoticz is updatet after a couple of seconds.
In a couple of post earlier you gave me a command to run to test the response of the Roomba. "mosquitto_sub -v -t /roomba/feedback/#" When my Roomba is running it gives a response. That stops when he is on his dock and charging.
Can I do anything to keep the roomba service sort of alive?
Thank you again for your help.
-
- Posts: 100
- Joined: Thursday 03 November 2016 10:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: iRobot Roomba 980 integration
If you look to one of the "issues" on the GitHub, you will see that somebody reported that update stopped after there was a connection interrupt (probably between ROOMBA and router). He detected this because he had a daily reboot and afterwards it did not work.Svennie wrote: ↑Wednesday 27 January 2021 21:34 Filip,
I encountered an issue. The Plugin works great. But... after 10, 30, 60 or 2 hours the plugin isn't updating the status of my Roomba S9.
Even do my Roomba is running.
When u run the command: sudo service roomba status, I get the following.
pi@raspberrypi:~ $ sudo service roomba status
● roomba.service - Roomba mqtt client
Loaded: loaded (/etc/systemd/system/roomba.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2021-01-27 18:11:53 CET; 31min ago
Main PID: 3233 (python3)
Tasks: 1 (limit: 2182)
CGroup: /system.slice/roomba.service
└─3233 /usr/bin/python3 /home/pi/domoticz/plugins/Roomba/mqtt_Roomba.py
So de service is running. But there is no change in Domoticz. But when I run "sudo service roomba stop" and then "Sudo service roomba start" or I run "Sudo service roomba restart" the status in Domoticz is updated after a couple of seconds.
In a couple of post earlier you gave me a command to run to test the response of the Roomba. "mosquitto_sub -v -t /roomba/feedback/#" When my Roomba is running it gives a response. That stops when he is on his dock and charging.
Can I do anything to keep the roomba service sort of alive?
Thank you again for your help.
So I would suggest you two things:
* check if there are network interrupts
* I propose you stop the service and start the python script manually (with debug information). It is indicated in the procedure on GitHub how to do. Of course you will need to keep your SSH session open...
"That stops when he is on his dock and charging." I don't know exactly anymore the behavior at my side. Will check once this weekend... Now. If mosquitto_sub does not receive updates, it is normal that the python script/service does not get it either. This makes me thinking about another possible topic... You should also check the status of the mosquitto service... As there is a dependency of the roobma service with mosquitto, it is possible after a restart of the roomba service, the mosquitto is restarted again... And perhaps the problem is at the mosquitto service. Thanks to supply your findings about this topic.
From my side (but this weekend probably) I will see to make the script more robust in case of network interrupt... However strange enough, I never detected such problem at my side... All is running since some months without any problem. I regularly check (since your message) if the updates are still in Domoticz and it is... However I know that I already had network interrupts...
-
- Posts: 13
- Joined: Sunday 25 October 2020 14:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Helmond
- Contact:
Re: iRobot Roomba 980 integration
Filip,Filip wrote: ↑Thursday 28 January 2021 21:46If you look to one of the "issues" on the GitHub, you will see that somebody reported that update stopped after there was a connection interrupt (probably between ROOMBA and router). He detected this because he had a daily reboot and afterwards it did not work.Svennie wrote: ↑Wednesday 27 January 2021 21:34 Filip,
I encountered an issue. The Plugin works great. But... after 10, 30, 60 or 2 hours the plugin isn't updating the status of my Roomba S9.
Even do my Roomba is running.
When u run the command: sudo service roomba status, I get the following.
pi@raspberrypi:~ $ sudo service roomba status
● roomba.service - Roomba mqtt client
Loaded: loaded (/etc/systemd/system/roomba.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2021-01-27 18:11:53 CET; 31min ago
Main PID: 3233 (python3)
Tasks: 1 (limit: 2182)
CGroup: /system.slice/roomba.service
└─3233 /usr/bin/python3 /home/pi/domoticz/plugins/Roomba/mqtt_Roomba.py
So de service is running. But there is no change in Domoticz. But when I run "sudo service roomba stop" and then "Sudo service roomba start" or I run "Sudo service roomba restart" the status in Domoticz is updated after a couple of seconds.
In a couple of post earlier you gave me a command to run to test the response of the Roomba. "mosquitto_sub -v -t /roomba/feedback/#" When my Roomba is running it gives a response. That stops when he is on his dock and charging.
Can I do anything to keep the roomba service sort of alive?
Thank you again for your help.
So I would suggest you two things:
* check if there are network interrupts
* I propose you stop the service and start the python script manually (with debug information). It is indicated in the procedure on GitHub how to do. Of course you will need to keep your SSH session open...
"That stops when he is on his dock and charging." I don't know exactly anymore the behavior at my side. Will check once this weekend... Now. If mosquitto_sub does not receive updates, it is normal that the python script/service does not get it either. This makes me thinking about another possible topic... You should also check the status of the mosquitto service... As there is a dependency of the roobma service with mosquitto, it is possible after a restart of the roomba service, the mosquitto is restarted again... And perhaps the problem is at the mosquitto service. Thanks to supply your findings about this topic.
From my side (but this weekend probably) I will see to make the script more robust in case of network interrupt... However strange enough, I never detected such problem at my side... All is running since some months without any problem. I regularly check (since your message) if the updates are still in Domoticz and it is... However I know that I already had network interrupts...
Today I have taken a closer look a the Domoticz log. This morning de service wasn't working correctly. So I stopped it. And start 'python3 mqtt_Roomba.py' And to test it's performance I manually started a job for the Roomba. The change in status came thru in Domoticz. So far so good. Then I stopped the job. That's where it all went wrong. See below for the output:
pi@raspberrypi:~/domoticz/plugins/Roomba $ python3 mqtt_Roomba.py
CV or numpy module not found, falling back to PIL
PIL module not found, maps are disabled
<CTRL C> to exit
Subscribe to /roomba/feedback/# to see published data
Broker Connected with result code 0
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3452, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1779, in loop_forever
rc = self.loop(timeout, max_packets)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1181, in loop
rc = self.loop_read(max_packets)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1572, in loop_read
rc = self._packet_read()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 2310, in _packet_read
rc = self._packet_handle()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 2936, in _packet_handle
return self._handle_publish()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3216, in _handle_publish
self._handle_on_message(message)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3444, in _handle_on_message
self.on_message(self, self._userdata, message)
File "/home/pi/domoticz/plugins/Roomba/roomba/roomba.py", line 459, in on_message
self.decode_topics(json_data)
File "/home/pi/domoticz/plugins/Roomba/roomba/roomba.py", line 713, in decode_topics
self.update_state_machine()
File "/home/pi/domoticz/plugins/Roomba/roomba/roomba.py", line 820, in update_state_machine
self.current_state = self.states[self.cleanMissionStatus_phase]
KeyError: 'evac'
After that there where no changes in Domoticz anymore. So I Rebooted my Pi and checked to see if the Roomba service was running and it was. After that I kept my my I eye on the Domoticz log after I switch to the debug mode for the plugin in Domoticz. In a constant pace de updates kept coming in. After a couple of hours I started a job and let it finished it. That to went well. Did another job shortly after that en that went oke to.
So I believe that stopping a job and canceling it, so that the Roomba go's back to the dock, is the problem somehow.
Hopefully you can do something with my comments.
greetz Sven
-
- Posts: 100
- Joined: Thursday 03 November 2016 10:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: iRobot Roomba 980 integration
Hey Sven,Svennie wrote: ↑Friday 29 January 2021 21:39Filip,Filip wrote: ↑Thursday 28 January 2021 21:46If you look to one of the "issues" on the GitHub, you will see that somebody reported that update stopped after there was a connection interrupt (probably between ROOMBA and router). He detected this because he had a daily reboot and afterwards it did not work.Svennie wrote: ↑Wednesday 27 January 2021 21:34 Filip,
I encountered an issue. The Plugin works great. But... after 10, 30, 60 or 2 hours the plugin isn't updating the status of my Roomba S9.
Even do my Roomba is running.
When u run the command: sudo service roomba status, I get the following.
pi@raspberrypi:~ $ sudo service roomba status
● roomba.service - Roomba mqtt client
Loaded: loaded (/etc/systemd/system/roomba.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2021-01-27 18:11:53 CET; 31min ago
Main PID: 3233 (python3)
Tasks: 1 (limit: 2182)
CGroup: /system.slice/roomba.service
└─3233 /usr/bin/python3 /home/pi/domoticz/plugins/Roomba/mqtt_Roomba.py
So de service is running. But there is no change in Domoticz. But when I run "sudo service roomba stop" and then "Sudo service roomba start" or I run "Sudo service roomba restart" the status in Domoticz is updated after a couple of seconds.
In a couple of post earlier you gave me a command to run to test the response of the Roomba. "mosquitto_sub -v -t /roomba/feedback/#" When my Roomba is running it gives a response. That stops when he is on his dock and charging.
Can I do anything to keep the roomba service sort of alive?
Thank you again for your help.
So I would suggest you two things:
* check if there are network interrupts
* I propose you stop the service and start the python script manually (with debug information). It is indicated in the procedure on GitHub how to do. Of course you will need to keep your SSH session open...
"That stops when he is on his dock and charging." I don't know exactly anymore the behavior at my side. Will check once this weekend... Now. If mosquitto_sub does not receive updates, it is normal that the python script/service does not get it either. This makes me thinking about another possible topic... You should also check the status of the mosquitto service... As there is a dependency of the roobma service with mosquitto, it is possible after a restart of the roomba service, the mosquitto is restarted again... And perhaps the problem is at the mosquitto service. Thanks to supply your findings about this topic.
From my side (but this weekend probably) I will see to make the script more robust in case of network interrupt... However strange enough, I never detected such problem at my side... All is running since some months without any problem. I regularly check (since your message) if the updates are still in Domoticz and it is... However I know that I already had network interrupts...
Today I have taken a closer look a the Domoticz log. This morning de service wasn't working correctly. So I stopped it. And start 'python3 mqtt_Roomba.py' And to test it's performance I manually started a job for the Roomba. The change in status came thru in Domoticz. So far so good. Then I stopped the job. That's where it all went wrong. See below for the output:
pi@raspberrypi:~/domoticz/plugins/Roomba $ python3 mqtt_Roomba.py
CV or numpy module not found, falling back to PIL
PIL module not found, maps are disabled
<CTRL C> to exit
Subscribe to /roomba/feedback/# to see published data
Broker Connected with result code 0
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3452, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1779, in loop_forever
rc = self.loop(timeout, max_packets)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1181, in loop
rc = self.loop_read(max_packets)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1572, in loop_read
rc = self._packet_read()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 2310, in _packet_read
rc = self._packet_handle()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 2936, in _packet_handle
return self._handle_publish()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3216, in _handle_publish
self._handle_on_message(message)
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3444, in _handle_on_message
self.on_message(self, self._userdata, message)
File "/home/pi/domoticz/plugins/Roomba/roomba/roomba.py", line 459, in on_message
self.decode_topics(json_data)
File "/home/pi/domoticz/plugins/Roomba/roomba/roomba.py", line 713, in decode_topics
self.update_state_machine()
File "/home/pi/domoticz/plugins/Roomba/roomba/roomba.py", line 820, in update_state_machine
self.current_state = self.states[self.cleanMissionStatus_phase]
KeyError: 'evac'
After that there where no changes in Domoticz anymore. So I Rebooted my Pi and checked to see if the Roomba service was running and it was. After that I kept my my I eye on the Domoticz log after I switch to the debug mode for the plugin in Domoticz. In a constant pace de updates kept coming in. After a couple of hours I started a job and let it finished it. That to went well. Did another job shortly after that en that went oke to.
So I believe that stopping a job and canceling it, so that the Roomba go's back to the dock, is the problem somehow.
Hopefully you can do something with my comments.
greetz Sven
This is normal... When interrupting/quitting by CTR-C you get indeed a stack trace and this depends what the program was busy at that moment...
So this is not any problem. And it is also normal that when this program is stopped, Domoticz doesn't receive anything.
What you should do is starting indeed the program manual by using "python3 mqtt_Roomba.py -D 3" (the -D 3 gives debug output). Don't forget to stop the service "sudo service roomba stop" before.
And if something goes wrong, the output is what I need. And also check then the status of mosquitto with "sudo service mosquitto status".
You don't need to restart the whole RPI afterwards. You can simply restart the service by "sudo service roomba start".
-
- Posts: 13
- Joined: Sunday 25 October 2020 14:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Helmond
- Contact:
Re: iRobot Roomba 980 integration
Hi Filip.
I got the time today to install your plugin on my other Pi. I saw that you change the install. I have the old version of your plugin semi working on my Rpi 3. It works with mij Roomba S9 after hij restart the Roomba Service. Now I try to install it on my Rpi 4. When I try to check if there is a connection between my S9 en the Pi with the command: python3 roomba --topic /roomba/feedback/# --broker localhost --brokerFeedback /roomba/feedback --mapPath '' --mapSize '' --log '' from the folder /home/pi/domoticz/plugins/Roomba I get the next output.
pi@raspberrypi:~/domoticz/plugins/Roomba $ python3 roomba --topic /roomba/feedback/# --broker localhost --brokerFeedback /roomba/feedback --mapPath '' --mapSize '' --log ''
CV or numpy module not found, falling back to PIL
CV or numpy module not found, falling back to PIL
[I 2021-02-13 21:42:38,493] *******************
[I 2021-02-13 21:42:38,493] * Program Started *
[I 2021-02-13 21:42:38,494] *******************
[I 2021-02-13 21:42:38,494] Roomba.py Version: 1.2.9
[I 2021-02-13 21:42:38,494] Python Version: 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
[I 2021-02-13 21:42:38,494] Paho MQTT Version: 1.5.1
[I 2021-02-13 21:42:38,494] PIL Version: 5.4.1
[I 2021-02-13 21:42:38,494] <CNTRL C> to Exit
[I 2021-02-13 21:42:38,494] Roomba 980 MQTT data Interface
[I 2021-02-13 21:42:38,496] reading info from config file ./config.ini
[I 2021-02-13 21:42:38,497] connecting to broker
[I 2021-02-13 21:42:38,503] Creating Roomba object 192.168.1.62
[I 2021-02-13 21:42:38,503] connecting Roomba 192.168.1.62
This is the output I get. Until I push CNTRL C en then it stops. I believe it cannot connect to my Roomba.
When I run the commend: 'python3 roomba --topic /roomba/feedback/# --broker localhost --brokerFeedback /roomba/feedback --mapPath '' --mapSize '' --log '' --debug' This is the output.
CV or numpy module not found, falling back to PIL
CV or numpy module not found, falling back to PIL
[I 2021-02-13 21:54:50,548] *******************
[I 2021-02-13 21:54:50,548] * Program Started *
[I 2021-02-13 21:54:50,549] *******************
[I 2021-02-13 21:54:50,549] Roomba.py Version: 1.2.9
[I 2021-02-13 21:54:50,549] Python Version: 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
[I 2021-02-13 21:54:50,549] Paho MQTT Version: 1.5.1
[I 2021-02-13 21:54:50,549] PIL Version: 5.4.1
[D 2021-02-13 21:54:50,549] -- DEBUG Mode ON -
[I 2021-02-13 21:54:50,549] <CNTRL C> to Exit
[I 2021-02-13 21:54:50,549] Roomba 980 MQTT data Interface
[I 2021-02-13 21:54:50,551] reading info from config file ./config.ini
[I 2021-02-13 21:54:50,553] connecting to broker
[I 2021-02-13 21:54:50,558] Creating Roomba object 192.168.1.62
[I 2021-02-13 21:54:50,559] connecting Roomba 192.168.1.62
Error: [Errno 111] Connection refused
Attempting new Connection to Roomba (#1)
Error: [Errno 111] Connection refused
Attempting new Connection to Roomba (#2)
Error: [Errno 111] Connection refused
Attempting new Connection to Roomba (#3)
Error: [Errno 111] Connection refused
Unable to connect to Roomba Lydia
[D 2021-02-13 21:54:53,959] Broker disconnected
What can I do to fix this?
I got the time today to install your plugin on my other Pi. I saw that you change the install. I have the old version of your plugin semi working on my Rpi 3. It works with mij Roomba S9 after hij restart the Roomba Service. Now I try to install it on my Rpi 4. When I try to check if there is a connection between my S9 en the Pi with the command: python3 roomba --topic /roomba/feedback/# --broker localhost --brokerFeedback /roomba/feedback --mapPath '' --mapSize '' --log '' from the folder /home/pi/domoticz/plugins/Roomba I get the next output.
pi@raspberrypi:~/domoticz/plugins/Roomba $ python3 roomba --topic /roomba/feedback/# --broker localhost --brokerFeedback /roomba/feedback --mapPath '' --mapSize '' --log ''
CV or numpy module not found, falling back to PIL
CV or numpy module not found, falling back to PIL
[I 2021-02-13 21:42:38,493] *******************
[I 2021-02-13 21:42:38,493] * Program Started *
[I 2021-02-13 21:42:38,494] *******************
[I 2021-02-13 21:42:38,494] Roomba.py Version: 1.2.9
[I 2021-02-13 21:42:38,494] Python Version: 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
[I 2021-02-13 21:42:38,494] Paho MQTT Version: 1.5.1
[I 2021-02-13 21:42:38,494] PIL Version: 5.4.1
[I 2021-02-13 21:42:38,494] <CNTRL C> to Exit
[I 2021-02-13 21:42:38,494] Roomba 980 MQTT data Interface
[I 2021-02-13 21:42:38,496] reading info from config file ./config.ini
[I 2021-02-13 21:42:38,497] connecting to broker
[I 2021-02-13 21:42:38,503] Creating Roomba object 192.168.1.62
[I 2021-02-13 21:42:38,503] connecting Roomba 192.168.1.62
This is the output I get. Until I push CNTRL C en then it stops. I believe it cannot connect to my Roomba.
When I run the commend: 'python3 roomba --topic /roomba/feedback/# --broker localhost --brokerFeedback /roomba/feedback --mapPath '' --mapSize '' --log '' --debug' This is the output.
CV or numpy module not found, falling back to PIL
CV or numpy module not found, falling back to PIL
[I 2021-02-13 21:54:50,548] *******************
[I 2021-02-13 21:54:50,548] * Program Started *
[I 2021-02-13 21:54:50,549] *******************
[I 2021-02-13 21:54:50,549] Roomba.py Version: 1.2.9
[I 2021-02-13 21:54:50,549] Python Version: 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
[I 2021-02-13 21:54:50,549] Paho MQTT Version: 1.5.1
[I 2021-02-13 21:54:50,549] PIL Version: 5.4.1
[D 2021-02-13 21:54:50,549] -- DEBUG Mode ON -
[I 2021-02-13 21:54:50,549] <CNTRL C> to Exit
[I 2021-02-13 21:54:50,549] Roomba 980 MQTT data Interface
[I 2021-02-13 21:54:50,551] reading info from config file ./config.ini
[I 2021-02-13 21:54:50,553] connecting to broker
[I 2021-02-13 21:54:50,558] Creating Roomba object 192.168.1.62
[I 2021-02-13 21:54:50,559] connecting Roomba 192.168.1.62
Error: [Errno 111] Connection refused
Attempting new Connection to Roomba (#1)
Error: [Errno 111] Connection refused
Attempting new Connection to Roomba (#2)
Error: [Errno 111] Connection refused
Attempting new Connection to Roomba (#3)
Error: [Errno 111] Connection refused
Unable to connect to Roomba Lydia
[D 2021-02-13 21:54:53,959] Broker disconnected
What can I do to fix this?
-
- Posts: 100
- Joined: Thursday 03 November 2016 10:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: iRobot Roomba 980 integration
Hi Sven,Svennie wrote: ↑Saturday 13 February 2021 21:52 Hi Filip.
I got the time today to install your plugin on my other Pi. I saw that you change the install. I have the old version of your plugin semi working on my Rpi 3. It works with mij Roomba S9 after hij restart the Roomba Service. Now I try to install it on my Rpi 4. When I try to check if there is a connection between my S9 en the Pi with the command: python3 roomba --topic /roomba/feedback/# --broker localhost --brokerFeedback /roomba/feedback --mapPath '' --mapSize '' --log '' from the folder /home/pi/domoticz/plugins/Roomba I get the next output.
pi@raspberrypi:~/domoticz/plugins/Roomba $ python3 roomba --topic /roomba/feedback/# --broker localhost --brokerFeedback /roomba/feedback --mapPath '' --mapSize '' --log ''
CV or numpy module not found, falling back to PIL
CV or numpy module not found, falling back to PIL
[I 2021-02-13 21:42:38,493] *******************
[I 2021-02-13 21:42:38,493] * Program Started *
[I 2021-02-13 21:42:38,494] *******************
[I 2021-02-13 21:42:38,494] Roomba.py Version: 1.2.9
[I 2021-02-13 21:42:38,494] Python Version: 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
[I 2021-02-13 21:42:38,494] Paho MQTT Version: 1.5.1
[I 2021-02-13 21:42:38,494] PIL Version: 5.4.1
[I 2021-02-13 21:42:38,494] <CNTRL C> to Exit
[I 2021-02-13 21:42:38,494] Roomba 980 MQTT data Interface
[I 2021-02-13 21:42:38,496] reading info from config file ./config.ini
[I 2021-02-13 21:42:38,497] connecting to broker
[I 2021-02-13 21:42:38,503] Creating Roomba object 192.168.1.62
[I 2021-02-13 21:42:38,503] connecting Roomba 192.168.1.62
This is the output I get. Until I push CNTRL C en then it stops. I believe it cannot connect to my Roomba.
When I run the commend: 'python3 roomba --topic /roomba/feedback/# --broker localhost --brokerFeedback /roomba/feedback --mapPath '' --mapSize '' --log '' --debug' This is the output.
CV or numpy module not found, falling back to PIL
CV or numpy module not found, falling back to PIL
[I 2021-02-13 21:54:50,548] *******************
[I 2021-02-13 21:54:50,548] * Program Started *
[I 2021-02-13 21:54:50,549] *******************
[I 2021-02-13 21:54:50,549] Roomba.py Version: 1.2.9
[I 2021-02-13 21:54:50,549] Python Version: 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
[I 2021-02-13 21:54:50,549] Paho MQTT Version: 1.5.1
[I 2021-02-13 21:54:50,549] PIL Version: 5.4.1
[D 2021-02-13 21:54:50,549] -- DEBUG Mode ON -
[I 2021-02-13 21:54:50,549] <CNTRL C> to Exit
[I 2021-02-13 21:54:50,549] Roomba 980 MQTT data Interface
[I 2021-02-13 21:54:50,551] reading info from config file ./config.ini
[I 2021-02-13 21:54:50,553] connecting to broker
[I 2021-02-13 21:54:50,558] Creating Roomba object 192.168.1.62
[I 2021-02-13 21:54:50,559] connecting Roomba 192.168.1.62
Error: [Errno 111] Connection refused
Attempting new Connection to Roomba (#1)
Error: [Errno 111] Connection refused
Attempting new Connection to Roomba (#2)
Error: [Errno 111] Connection refused
Attempting new Connection to Roomba (#3)
Error: [Errno 111] Connection refused
Unable to connect to Roomba Lydia
[D 2021-02-13 21:54:53,959] Broker disconnected
What can I do to fix this?
I really don't understand what is happening at your side. It is working as a charm with Roomba i9. The only topic that I need to followup is that the service exceptionally stops (I had it after an automatic OS updated and before reboot) to find the solution.
I start thinking that you are having an S9 and that this one is not compatible with the i9 (should work also with the 980).
So perhaps to wait a bit until others have the same problem (and perhaps solution).
Kr (and really sorry).
Filip
-
- Posts: 141
- Joined: Tuesday 31 January 2017 20:34
- Target OS: -
- Domoticz version:
- Contact:
Re: iRobot Roomba 980 integration
hi all im trying to install this plugin but cant get my broker to work.
something goes wrong with the conf file.
can someone help me out with this.. absolute non linux knowledge.
i now have the following text in the conf file:
when i do this nothing helps.. only errors..
oh so i lost the original conf file too because i edited it....
my problem is that my broker just doesnt work when using
it gives me
need some help here because i just dont know what i am doing and making more problems than fixing it when google it..
greets marco
something goes wrong with the conf file.
can someone help me out with this.. absolute non linux knowledge.
i now have the following text in the conf file:
i have edit the conf file in the /etc/mosquitto folder and i believe it has to be copied into the conf.d folder?# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.gz
pid_file /run/mosquitto/mosquitto.pid
persistence false
persistence_location /var/lib/mosquitto/
log_dest none
include_dir /etc/mosquitto/conf.d
when i do this nothing helps.. only errors..
oh so i lost the original conf file too because i edited it....
my problem is that my broker just doesnt work when using
Code: Select all
mosquitto_sub -v -t /roomba/feedback/#
Code: Select all
-bash: mosquitto_sub: opdracht niet gevonden
need some help here because i just dont know what i am doing and making more problems than fixing it when google it..
greets marco
-
- Posts: 3
- Joined: Tuesday 17 June 2014 13:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: iRobot Roomba 980 integration
Hi,
I got started on the great script bewo posted. But I didn't like all of the German . So I have translated it to English, and made some corrections.
Just sharing back.
I got started on the great script bewo posted. But I didn't like all of the German . So I have translated it to English, and made some corrections.
Just sharing back.
- Spoiler: show
Who is online
Users browsing this forum: No registered users and 1 guest