OpenHAB

103 views
Skip to first unread message

Guillermo Schimmel

unread,
Nov 22, 2018, 4:15:51 PM11/22/18
to sucks-users
Hi there. Recently discovered suck and I'm trying to integrate it wirh OpenHAB.

As I don't know very much python, I'm probably going to ask some newbie questions here.

I'm using the demo code:

mport sucks
import configparser
from sucks.cli import *

config = read_config()

api = EcoVacsAPI(config['device_id'], config['email'], config['password_hash'],
config['country'], config['continent'])
my_vac = api.devices()[0]
vacbot = VacBot(api.uid, api.REALM, api.resource, api.user_access_token, my_vac, config['continent'])
vacbot.connect_and_wait_until_ready()

print("Connected")

#vacbot.run(Clean()) # start cleaning
#time.sleep(9) # clean for 15 minutes
#vacbot.run(Charge()) # return to the charger

vacbot.run(GetBatteryState())
#print(vacbot.run(GetBatteryState()))
print(GetBatteryState())
print(GetChargeState())
GetBatteryState()

but only getting this output:

openhab:~/openhab-sucks/scripts # python3 ecovacs-status.py WARNING:sleekxmpp.basexmpp:fulljid property deprecated. Use boundjid.resource WARNING:sleekxmpp.xmlstream.cert:Could not find pyasn1 and pyasn1_modules. SSL certificate COULD NOT BE VERIFIED. WARNING:sleekxmpp.xmlstream.cert:Could not find pyasn1 and pyasn1_modules. SSL certificate expiration COULD NOT BE VERIFIED. Connected getbatterystate command getchargestate command

How can I get the actual battery state and value?

Thanks!

If anyone else is interested in OpenHAB integration, take a look at this:


and by all means, push whatever pleases you

Regards

Guillermo



Guillermo Schimmel

unread,
Nov 22, 2018, 5:50:08 PM11/22/18
to sucks-users
Self answering, for posterity

Reading a little more the sources I finally activated monitoring on the VacBot object:

vacbot = VacBot(api.uid, api.REALM, api.resource, api.user_access_token, my_vac, config['continent'], monitor=True)

And now this:

print(vacbot.battery_status)
print(vacbot.charge_status)
print(vacbot.clean_status)

Shows:

1.0
charging
stop


Great library!

Stay tuned for OpenHAB integration.

Guillermo Schimmel

unread,
Nov 23, 2018, 9:21:30 AM11/23/18
to sucks-users
hi guys. 

I already have a very simple sucks+openhab integration, via MQTT.

You are welcome to try it and by all means send comments or bugs.
2018-11-23_11-00-57.png

William Pietri

unread,
Nov 23, 2018, 1:15:49 PM11/23/18
to sucks-users
On 11/23/18 6:21 AM, Guillermo Schimmel wrote:
Great library!

Stay tuned for OpenHAB integration.


I'm delighted to see you charging ahead like this. And I should say that Greg Laabs deserves the great bulk of the credit for the library's excellence. His many contributions making it work for his HomeAssistant integration should make an OpenHAB integration much easier.

William

Guillermo Schimmel

unread,
Nov 23, 2018, 1:34:29 PM11/23/18
to wil...@scissor.com, sucks...@googlegroups.com
It is indeed very easy to work with

All the problems so far were because my ignorance regarding python, but I'm using this oportunity to learn something new.

thanks!



--
You received this message because you are subscribed to the Google Groups "sucks-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sucks-users...@googlegroups.com.
To post to this group, send email to sucks...@googlegroups.com.
Visit this group at https://groups.google.com/group/sucks-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/sucks-users/3f954140-4ff9-4e18-e28c-5cb83c84656a%40scissor.com.
For more options, visit https://groups.google.com/d/optout.

Guillermo Schimmel

unread,
Nov 26, 2018, 3:07:48 PM11/26/18
to sucks-users
First beta!

Hi guys, the first beta of my sucks to mqtt gateway it's already online at https://github.com/guillebot/openhab-sucks.

The name reffers to openhab but it's actualy controller agnostic. It just translates status and commands between sucks and mqtt.

There aren't many OpenHAB'ers here, but eventually will be :)

Feel free to take a look and correct all my python atrocities.



On Friday, November 23, 2018 at 3:34:29 PM UTC-3, Guillermo Schimmel wrote:
It is indeed very easy to work with

All the problems so far were because my ignorance regarding python, but I'm using this oportunity to learn something new.

thanks!



On Fri, Nov 23, 2018 at 3:15 PM William Pietri <wil...@scissor.com> wrote:
On 11/23/18 6:21 AM, Guillermo Schimmel wrote:
Great library!

Stay tuned for OpenHAB integration.


I'm delighted to see you charging ahead like this. And I should say that Greg Laabs deserves the great bulk of the credit for the library's excellence. His many contributions making it work for his HomeAssistant integration should make an OpenHAB integration much easier.

William

--
You received this message because you are subscribed to the Google Groups "sucks-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sucks-users+unsubscribe@googlegroups.com.

Jonathan Woodall

unread,
Feb 19, 2019, 10:20:32 PM2/19/19
to sucks-users
Hi Guillermo,

I'm loading this up this week and will let you know how it goes! Thanks for the hard work!

Jon


On Monday, November 26, 2018 at 3:07:48 PM UTC-5, Guillermo Schimmel wrote:
First beta!

Hi guys, the first beta of my sucks to mqtt gateway it's already online at https://github.com/guillebot/openhab-sucks.

The name reffers to openhab but it's actualy controller agnostic. It just translates status and commands between sucks and mqtt.

There aren't many OpenHAB'ers here, but eventually will be :)

Feel free to take a look and correct all my python atrocities.



On Friday, November 23, 2018 at 3:34:29 PM UTC-3, Guillermo Schimmel wrote:
It is indeed very easy to work with

All the problems so far were because my ignorance regarding python, but I'm using this oportunity to learn something new.

thanks!



On Fri, Nov 23, 2018 at 3:15 PM William Pietri <wil...@scissor.com> wrote:
On 11/23/18 6:21 AM, Guillermo Schimmel wrote:
Great library!

Stay tuned for OpenHAB integration.


I'm delighted to see you charging ahead like this. And I should say that Greg Laabs deserves the great bulk of the credit for the library's excellence. His many contributions making it work for his HomeAssistant integration should make an OpenHAB integration much easier.

William

--
You received this message because you are subscribed to the Google Groups "sucks-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sucks-users...@googlegroups.com.

Guillermo Schimmel

unread,
Feb 20, 2019, 10:14:44 AM2/20/19
to Jonathan Woodall, sucks-users
Good luck with that! 

Let me know if it works. Mine is doing fine since nov/2018 so it seems to be stable.


Reply all
Reply to author
Forward
0 new messages