Would be highly interested as well.
Yeah it’s just the Neato itself. The app says its offline after about a day.
I thought the phone always connects to the Neato “Cloud”, not directly with the robot?
I sent you a mail …
I sent you a mail
Sorry, @fatman42285.
I meant the post about the map for neato (see quote above)
Anyway, thanks for your quick response
All,
I am struggling with the transformation of the NeatoAction.
My item is:
String NeatoAction "Aktion [MAP(neato.map):%s]" (G_jdbc) {channel="neato:vacuumcleaner:neato:action"}
and my neato.map looks like this:
// Current action of the vacuum cleaner
HOUSE CLEANING=Haus-Reinigung
SPOT CLEANING=Spot-Reinigung
MANUAL CLEANING=Manuelle Reinigung
DOCKING=zum Trockendock
USER MENU ACTIVE=Nutzer Menu aktiv
SUSPENDED CLEANING=Pausiert
UPDATING=Updating
COPYING LOGS=Speichert Logs
RECOVERING LOCATION=Orientierung
IEC TEST=Iechn. Test
=inaktiv
This works for all states (even “”= inaktiv), but it’s complaining about “HOUSE CLEANING”:
Could not transform 'HOUSE CLEANING' with the file 'neato.map' : Target value not found in map for 'HOUSE CLEANING'
even if I copy the phrase out of the log it’s not recognized.
No idea why…
Anyone?
EDIT:
The space was the root cause.
So never mind.
Found this one:
Hi Bernd,
thanks a lot for sending me the jar-file,
I installed the binding successfully and can now control my Vorwerk Kobolt VR200. (Start, Pause, Dock)
Great job!
I have configured the items in a item-file, which took me a little bit of time.
I’m thinking about to post a little step-by-step-tutorial including my item-file, so other beginners (like me) can benefit and don’t have to do the same work again. (I would have been happy about such a tutorial.)
What do you think about it?
Tutorials are always a good idea.
I have a neato botvac connected, but I would like to see your approach.
I guess the differences between both robots in terms of dock, clean, pause and such should be minor differences only.
Hi anfaenger (funny name!)
that is a good idea.
I build the binding from https://github.com/scurb/NeatoBinding and I’m using a python library to get the last cleaning map.
wow, that’s included in the last jar you’ve sent?
I thought your file was about the VR200 integration.
Thanks a lot - I will give it a try.
Hi,
could you please provide more information about how to get the map and display it?
So you run a python script to store the map-file locally (which format?)
(-> could you please share the script).
After that I guess you display it in a frame / webview?
Thanks in advance.
Hi NCO,
here a short description …
Requirement/preparation
1.install pybotvac python library from https://github.com/stianaske/pybotvac
2. register your neato with a mobile app, remember mail and password
3. get serial from your neato
Create/modify openhab2 config files
items: demo.items
Switch neatoSwitchGetLastMap "Letzte Reinigungskarte ..."
String neatoGetLastMapRunning "Download ... [%s]"
sitemaps: demo.sitemap (extract)
Frame {
Text item=neatoGetLastMapRunning visibility=[neatoGetLastMapRunning != "-"]
Switch item=neatoSwitchGetLastMap mappings=[ON="Laden"] visibility=[neatoGetLastMapRunning == "-"]
// Webview url="/static/neato-botvac/botvac-last-map.html"
Image url="http://localhost:8080/static/neato-botvac/botvac-last-map.png" refresh=2000
}
rules: neato-botvac.rules
val String filename = "neato-botvac.rules"
rule "system start: initialize Switch neatoSwitchGetLastMap"
when
System started
then
createTimer(now.plusSeconds(60)) [|
if (neatoSwitchGetLastMap.state == NULL) neatoSwitchGetLastMap.postUpdate(OFF)
if (neatoGetLastMapRunning.state == NULL) neatoGetLastMapRunning.postUpdate("-")
]
end
rule "Getting last map for neato botvac connected"
when
Item neatoSwitchGetLastMap received command ON
then
neatoGetLastMapRunning.postUpdate("Download ...")
executeCommandLine("/etc/openhab2/scripts/neato-botvac-getlastmap.py")
neatoGetLastMapRunning.postUpdate("-")
neatoSwitchGetLastMap.postUpdate(OFF)
end
scripts: neato-botvac-getlastmap.py
#!/usr/bin/python
from pybotvac import Account
from os import system
email = 'your mail'
password = 'your password'
serial = 'your neato serial'
path_tmp = '/etc/openhab2/html/tmp/'
path_dst = '/etc/openhab2/html/neato-botvac/'
map_file = 'botvac-last-map.png'
account = Account(email, password)
link = account.maps[serial]['maps'][0]['url']
account.get_map_image(link, path_tmp)
system('mv ' + path_tmp + '*-user-map.png ' + path_dst + map_file)
system: create some folder (as openhab user or member of openhab group)
mkdir /etc/openhab2/html/neato-botvac
mkdir /etc/openhab2/html/tmp
html page: botvac-last-map.html in /etc/openhab2/html/neato-botvac/
<!DOCTYPE html>
<html>
<head>
<title>Neato Botvac Connected - last map</title>
<style type="text/css" media="screen">
img {
background: white;
border: 1px solid black;
width: 500px;
height: 500px;
}
</style>
<script type="text/javascript" src="/extensions/Selfhtml/js/jquery/jquery-1.11.1.min.js"></script>
<script type="text/javascript">
//<![CDATA[
//]]>
</script>
</head>
<body>
<main>
<img src="botvac-last-map.png" alt="Uups! Bitte letzte Reinigungskarte laden...">
</main>
</body>
</html>
Hi @fatman42285,
thanks a lot for the detailed description. That should work for me
I will implement it into my habpanel though.
If I am not mistaken, this should work without your recently sent jar (because it’s actually running through the pybotvac, not the binding?), so your decsription should also work with the lastest jar by @scurb?
Sorry, I still struggle a little:
When I execute the script I get:
[09:11:43] pi@Homer:/usr/local/bin/pybotvac/cert$ su pi /etc/openhab2/scripts/neato-botvac-getlastmap.py
Passwort:
from: can't read /var/mail/pybotvac
from: can't read /var/mail/os
/etc/openhab2/scripts/neato-botvac-getlastmap.py: Zeile 4: $'\r': Kommando nicht gefunden.
/etc/openhab2/scripts/neato-botvac-getlastmap.py: Zeile 5: email: Kommando nicht gefunden.
/etc/openhab2/scripts/neato-botvac-getlastmap.py: Zeile 6: password: Kommando nicht gefunden.
/etc/openhab2/scripts/neato-botvac-getlastmap.py: Zeile 7: serial: Kommando nicht gefunden.
/etc/openhab2/scripts/neato-botvac-getlastmap.py: Zeile 8: path_tmp: Kommando nicht gefunden.
/etc/openhab2/scripts/neato-botvac-getlastmap.py: Zeile 9: path_dst: Kommando nicht gefunden.
/etc/openhab2/scripts/neato-botvac-getlastmap.py: Zeile 10: map_file: Kommando nicht gefunden.
/etc/openhab2/scripts/neato-botvac-getlastmap.py: Zeile 11: $'\r': Kommando nicht gefunden.
/etc/openhab2/scripts/neato-botvac-getlastmap.py: Zeile 12: Syntaxfehler beim unerwarteten Wort `('
'etc/openhab2/scripts/neato-botvac-getlastmap.py: Zeile 12: `account = Account(email, password)
[09:11:49] pi@Homer:/usr/local/bin/pybotvac/cert$
the script looks like:
#!/usr/bin/python
from pybotvac import Account
from os import system
email = 'xxx@hallo.welt'
password = 'passwort'
serial = 'OPS1111-sonstwas'
path_tmp = '/etc/openhab2/html/tmp/'
path_dst = '/etc/openhab2/html/neato-botvac/'
map_file = 'botvac-last-map.png'
account = Account(email, password)
link = account.maps[serial]['maps'][0]['url']
account.get_map_image(link, path_tmp)
system('mv ' + path_tmp + '*-user-map.png ' + path_dst + map_file)
I copied the pybotvac folder into /usr/local/bin/
and added this folder into
/etc/profile
Hi NCO
did you a ‚python setup.py install‘ in the extracted pybotvap-master folder?
Hi NCO,
… yes!
Yes, I did.
I removed the folder above (/usr/local/bin/pybotvac) and installed pybotvac again.
Still the same issue.
Should I find any pybotvac somewhere else then (e.g. in /usr/bin/ or such?).
Is the (manual) adjustment of etc/profiles needed at all (rolled this back already).
What about /var/mail/
I don’t get the point of mail beeing involved somehow.
In the log I find:
Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program “/etc/openhab2/scripts/neato-botvac-getlastmap.py” (in directory “.”): error=2, Datei oder Verzeichnis nicht gefunden).
When I try to execute it in the console I usually try:
su pi /etc/openhab2/scripts/neato-botvac-getlastmap.py
and get the errors mentioned in my previous post
GOT IT:
In the rule I needed “python” in the executeCommand line:
executeCommandLine("python /etc/openhab2/scripts/neato-botvac-getlastmap.py", 5000)
Hi NCO,
did you run the sample.py?
no, maybe I have missed something?
but now that it’s working I am fine with it.
Obviously bash interpreted the py script as it’s own. That’s why I tried
executeCommandLine("python /etc/openhab2/scripts/neato-botvac-getlastmap.py", 5000)
Anyway, thanks for your patience and help, Bernd.
Hi NCO,
am I right? You got a cleaning map working with the Vorwerk Kobold VR200?
Maybe, you’ve realized that I created a little tutorial? Connecting Vorwerk Kobold VR200 to openHAB2
I integrate your map-file into this, if it’s ok for your.