Automower (G2) über Homematic / WLAN steuern

Problemlösungen und Hinweise von allgemeinem Interesse zur Haussteuerung mit HomeMatic

Moderator: Co-Administratoren

klassisch
Beiträge: 3974
Registriert: 24.03.2011, 04:32
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 110 Mal
Danksagung erhalten: 70 Mal

Re: Automower (G2) über Homematic / WLAN steuern

Beitrag von klassisch » 12.01.2017, 06:55

Thanks, @antst, for your info!
Which automower types are you referring?
Btw: in this forum we also have a huge thread regarding the WeMos http://homematic-forum.de/forum/viewtop ... 31&t=29321. So any WeMos solutions are welcome :D

antst
Beiträge: 3
Registriert: 11.01.2017, 22:31

Re: Automower (G2) über Homematic / WLAN steuern

Beitrag von antst » 12.01.2017, 09:33

I have 220 AC. But this must be is the same for all G2 automowers.

chercheur
Beiträge: 38
Registriert: 13.10.2015, 17:50
Hat sich bedankt: 1 Mal

Re: Automower (G2) über Homematic / WLAN steuern

Beitrag von chercheur » 12.01.2017, 15:49

antst hat geschrieben:By the way, if you don't want to deal with WIFi or want to have longer range communication, there is an alternative solution: pair of HC-12 433MHz serial-radio modules (look on aliexpress for "433Mhz HC-12 SI4463" they cost about 3 EUR). They provide serial-radio bridge. Up to 1KM. One module connects directly to Automover (I use internal white connector on the board, pins: 1,2,7,9) and another one via any USB-UART module (like CP2102, you can find one on aliexpress for about 1 EUR) can be plugged directly to PC.
Great proposal ! The HC-12 connected to the PC must emulate a COM port I guess ?
antst hat geschrieben:Or, you can have fancier solution, like I did. One HC-12 is on Automower.
Another is HC-12 is connected with ESP8266, which provides bridge to my sensors wifi network. In my case WLAN range wasn't reliable enough.To the most distant corner of the lawn, and having simpler solution on Automower (nothing is simpler than UART-radio module) seems more preferable to me. "Put and forget" solution.

But using ESP8266 directly on Automower also works. If you need simple uart-wifi bridge, then you can use this firmware https://github.com/beckdac/ESP8266-transparent-bridge , and for simplicity (to avoid soldering all pull-up resistors) you can order from aliexpress "wemos D1 mini" module, which has already everything which ESP8266 needs, it will cost about 3 EUR. Dirt cheap!

Just in case, Automower has 3.3V logical levels on UART interface, and both ESP8266 and HC-12 are also made for 3.3V levels, so no level shifter is necessary. in both cases you can also use 3.3V supply directly from white connector on Automower mainboard.
I don't really get the design here.
You still keep 1 HC-12 in the AM and....where do you use the combination HC-12/ESP8266 ? And which kind of sketch are you using ?

I'm trying to achieve 2 different things remotely :
1) get access to the basic HEX commands. For this a simple serial UART (transparent) can do the job
2) develop other measurements. I upgraded my battery to a Li-ION project and I would like to monitor the voltage per cell block (5 different voltages) and the temperature (independently from the build in measurement).

Therefore I'm working (trying to...as I'm a real newbie with Arduino) with an Arduino pro mini:
- 5 different voltage monitoring : sketch is simple
- temperature : sketch is easy
- keep a way to use the basic HEX commands through a kind of transparent UART : I've no idea
- include those 3 functions in 1 sketch : I don't know yet

I would then connect to WIFI through an ESP8266 (I could in fact only use an ESP8266 for all but it has only 1 analog entry....impossible to measure the 5 different voltages).

I would be quite happy to discuss this (offline?) with you as I'm searching for some help to combine those 3 functions + WIFI support.

antst
Beiträge: 3
Registriert: 11.01.2017, 22:31

Re: Automower (G2) über Homematic / WLAN steuern

Beitrag von antst » 13.01.2017, 14:52

chercheur hat geschrieben:Great proposal ! The HC-12 connected to the PC must emulate a COM port I guess ?
HC-12 has 3.3V logic serial interface. So, to connect to USB you can use any UART-USB modules, like CP2102, FTDI, CH340G. (easiest is to get CP2102 from china for couple of EURos). This will give you COM port on PC, yes.
chercheur hat geschrieben: I don't really get the design here.
You still keep 1 HC-12 in the AM and....where do you use the combination HC-12/ESP8266 ? And which kind of sketch are you using ?
I just didn't want to have wired connection with my controller (raspberry pi), as it has only 4 USB ports. So, in AM I have HC-12.
And then I have additional device, where HC-12 is connected to ESP8266, and ESP8266 is configured as transparent serial-bridge and connected to my "service" wifi network. This provides me with bridge between HC-12 radio bridge and wi-fi network.
So i can open tcp connection to ESP to access my AM serial. (I don't need emulation of COM-port on controller host, will go directly with TCP access to serial).
chercheur hat geschrieben: Therefore I'm working (trying to...as I'm a real newbie with Arduino) with an Arduino pro mini:
- 5 different voltage monitoring : sketch is simple
- temperature : sketch is easy
- keep a way to use the basic HEX commands through a kind of transparent UART : I've no idea
- include those 3 functions in 1 sketch : I don't know yet

I would then connect to WIFI through an ESP8266 (I could in fact only use an ESP8266 for all but it has only 1 analog entry....impossible to measure the 5 different voltages).
In your case you can have arduino pro mini 3.3V, with sketch , which implements software serial (plus hardware serial you already have on pro mini). One serial is connected either to ESP8266 (which is connected to your wifi) or to HC-12 (with another HC-12 connected to your USB on PC) and another serial connected to AM. Then you can introduce some command prefix (to distinguish commands which goes directly to AM trough arduino with commands arduino has to process, like measuring cells voltages). Then commands to AM you just pass by (write to serial connected to AM and read reply and write to serial which leads outside) and "extended commands" you process directly on arduino.

chercheur
Beiträge: 38
Registriert: 13.10.2015, 17:50
Hat sich bedankt: 1 Mal

Re: Automower (G2) über Homematic / WLAN steuern

Beitrag von chercheur » 22.02.2017, 16:07

chercheur hat geschrieben:HLK-RM04 on aliexpress
I finally (temporarily) dropped my Arduino control project (not enough time and knowledge to develop before the summer).

The proposed module works perfectly. It connects directly to the internal white connector (PIN 1 & 2) for RX & TX.
The proposed script to control the Automower through Homematic works like a charm. Tx mule !!!

Now, 2 questions :
- I'm mostly interested in monitoring Temperature and Voltage (due to my Li-Ion project). I can do it through Homematic by "running" a program each time and reading the variable. Would it be a way to integrate those 2 in a automatically updated variable for each ?
- drawing graphs with "Thingspeak" would be great too. Did anyone try to connect to it via Homematic ?

Tx again for this great dev !!!

Vampy
Beiträge: 6
Registriert: 06.10.2008, 19:49

Re: Automower (G2) über Homematic / WLAN steuern

Beitrag von Vampy » 03.03.2017, 23:21

Grüßt euch,

eine kurze Frage, wird es mal ein kompatibles Installationpaket für die Unterstüzung eines Raspberrymatic geben?

viewtopic.php?f=65&t=34497

Wollte nämlich gerne umsteigen aber jetzt scheitert es weil ich eben dieses Addon aktiv nutze.

lobocobra
Beiträge: 5
Registriert: 25.05.2017, 13:45

Re: Automower (G2) über Homematic / WLAN steuern

Beitrag von lobocobra » 25.05.2017, 14:11

Hallo zusammen, ich wollte nur eine Erfolgsmeldung mit neuer HW machen, da das hier beschriebene W-Lan Modul nicht mehr lieferbar ist.
Mit einem USR232-T http://www.usriot.com/p/wireless-wifi-modules/, funktioniert es auch.

Ansonsten kann man das Projekt 1:1 umsetzen und es läuft. Den Kondensator braucht es bei der Lösung übrigens nicht, da es keine Probleme mit dem Einschalten gibt. Einzig die Reichweite ist noch problematisch, doch da werde ich eine andere Antenne suchen.

Software Einstellungen auf dem Webinterface
Wichtig is einfach den TCP Delay auf 600ms hochzuschrauben. Es gab immer einen Socket Error mit den Standard 300ms.

Es hat zudem auf der USR Webseite hervorragende Tools drauf, um die HW zu testen. Das Modul kostet 11$ und wird von China innerhalb von 5 Tagen geschickt. Was mir stark geholfen hat waren folgende HEX Befehle (auf einer anderen Seite gefunden), um zu prüfen, ob die Verbindung auch wirklich funktioniert:
0F805F000E (dieser Befehl schaltet zwischen AUTO/Man um). Denkt daran dass jeder Befehl mit 0F anfängt und die letzten 4 Bytes der Antwort vertauscht sind (2/2).
Man kann auch über WLAN die DEV Speicherbereiche auslesen z.B Dec 177 (Ampere der Batterie).

Ich war übrigens kurz davor eine neue SW zu schreiben, da ich Socket Error bekam und das Fast & Dirty Tool lief. Aber der Punk mit dem TCP Delay, war das einzige Problem. Die CCU2 braucht wohl relativ "lange" um die Daten zu verarbeiten und darum entstand das Problem.

Vielleicht gibt es ja noch Nachzügler wie mich, welche auch noch diesen Umbau machen.
Zuletzt geändert von lobocobra am 25.05.2017, 14:54, insgesamt 1-mal geändert.

lobocobra
Beiträge: 5
Registriert: 25.05.2017, 13:45

Re: Automower (G2) über Homematic / WLAN steuern

Beitrag von lobocobra » 25.05.2017, 14:51

chercheur hat geschrieben:
chercheur hat geschrieben:HLK-RM04 on aliexpress
I finally (temporarily) dropped my Arduino control project (not enough time and knowledge to develop before the summer).

The proposed module works perfectly. It connects directly to the internal white connector (PIN 1 & 2) for RX & TX.
The proposed script to control the Automower through Homematic works like a charm. Tx mule !!!

Now, 2 questions :
- I'm mostly interested in monitoring Temperature and Voltage (due to my Li-Ion project). I can do it through Homematic by "running" a program each time and reading the variable. Would it be a way to integrate those 2 in a automatically updated variable for each ?
- drawing graphs with "Thingspeak" would be great too. Did anyone try to connect to it via Homematic ?

Tx again for this great dev !!!
Hi
First of all...
I won't do the coding for you, but my info below will help you.
A man should never question another man's hobby/ project, but here are anyway my 2 cents... Personally I see little sense in using LIPO for a Mower. I just replaced my 2200mAH battery with a 3000mAH and changed the memory value, so that the battery is now charged correctly. The mover is now working >2h and I do not care how many time it goes to charge itself. IF this is not enough, use 2 of them... 6000mh will do. BTW... did you ever see explode a LIPO during loading? I did and was so happy that I was near it. I have like 30 of them for my hobby... but I never would load any LIPO unattended since.

Second...
The info below here you will need to complete your project and you do not needy any Arduino for it. Just adapt the automower.tcl that it reads the memory addresses you need.
Following memory address you will need to access on the automower...
DEC Description
491 Current [mA]
492 Charging time [min]
495 Charging battery amount [mAh]
496 Charging amount left when starting search [mAh]
563 Battery temp. [°C]
564 Time since charging [min]
565 Latest temp. (when charging) [°C]
566 Time to next temp. measure [Sec]
569 Charging number [1-10]
12000 Used battery amount [mAh]
12020 Battery voltage [mV]
12030 Battery voltage current compensated [mV]

Now how you use those memory addresses.... its easy....
Generate Request
1) Start the command => F0
2) Calculate for example the DEC value for Battery voltage (Dec 12020) into Hex => 2EF4 (a shorter example like B1 must be 00B1)
3) add => 0000
=> 0F2EF40000
Evaluate answer
=> 0F2EF42300
=> 00 23 => 35°

Now create a new variable on the CCU and either adapt automover.tcl OR copy it and make a new one in parallel. I assume the work to be like 6h max.

Have fun

lobocobra
Beiträge: 5
Registriert: 25.05.2017, 13:45

Re: Automower (G2) über Homematic / WLAN steuern

Beitrag von lobocobra » 26.05.2017, 14:18

Achja.... nachdem ich weiter in den Code vordringe.... all die Variabeln sind bereits definiert im Daemon Code vom automower.tcl.
=> da hat jemand eine sehr feine Sache gemacht in dem Code... ich wollte den soeben erweitern, habe aber nur wenige neue Einträge machen können.

Wenn jemand nun andere Befehle übermitteln will, kann er aus diesen unten hier aussuchen und einfach die Werteliste von "Automover Steuerung" entsprechend anpassen, wie er es braucht. Hier ist die Liste....
"R_SEKUNDE" {set hexin "0F36B10000"}
"R_MINUTE" {set hexin "0F36B30000"}
"R_STUNDE" {set hexin "0F36B50000"}
"R_TAG" {set hexin "0F36B70000"}
"R_MONAT" {set hexin "0F36B90000"}
"R_JAHR" {set hexin "0F36BD0000"}
"R_TIMERSTATUS" {set hexin "0F4A4E0000"}
"R_WOCHEN-TIMER1-START-STD" {set hexin "0F4A380000"}
"R_WOCHEN-TIMER1-START-MIN" {set hexin "0F4A390000"}
"R_WOCHEN-TIMER1-STOP-STD" {set hexin "0F4A3A0000"}
"R_WOCHEN-TIMER1-STOP-MIN" {set hexin "0F4A3B0000"}
"R_WOCHENEND-TIMER1-START-STD" {set hexin "0F4A3C0000"}
"R_WOCHENEND-TIMER1-START-MIN" {set hexin "0F4A3D0000"}
"R_WOCHENEND-TIMER1-STOP-STD" {set hexin "0F4A3E0000"}
"R_WOCHENEND-TIMER1-STOP-MIN" {set hexin "0F4A3F0000"}
"R_WOCHEN-TIMER2-START-STD" {set hexin "0F4A400000"}
"R_WOCHEN-TIMER2-START-MIN" {set hexin "0F4A410000"}
"R_WOCHEN-TIMER2-STOP-STD" {set hexin "0F4A420000"}
"R_WOCHEN-TIMER2-STOP-MIN" {set hexin "0F4A430000"}
"R_WOCHENEND-TIMER2-START-STD" {set hexin "0F4A440000"}
"R_WOCHENEND-TIMER2-START-MIN" {set hexin "0F4A450000"}
"R_WOCHENEND-TIMER2-STOP-STD" {set hexin "0F4A460000"}
"R_WOCHENEND-TIMER2-STOP-MIN" {set hexin "0F4A470000"}
"R_TIMER-TAGE" {set hexin "0F4A500000"}
"R_MAEHZEIT" {set hexin "0F00380000"}
"R_VIERECKMODUS-STATUS" {set hexin "0F01380000"}
"R_VIERECKMODUS-PROZENT" {set hexin "0F01340000"}
"R_VIERECKMODUS-REFERENZ" {set hexin "0F01370000"}
"R_AKKU-LADEZEIT_MIN" {set hexin "0F01EC0000"}
"R_AKKU-KAPAZITAET_MA" {set hexin "0F01EB0000"}
"R_AKKU-KAPAZITAET_MAH" {set hexin "0F01EF0000"}
"R_AKKU-KAPAZITAET-SUCHSTART_MAH" {set hexin "0F01F00000"}
"R_AKKU-KAPAZITAET-GENUTZT_MAH" {set hexin "0F2EE00000"}
"R_AKKU-SPANNUNG_MV" {set hexin "0F2EF40000"}
"R_AKKU-TEMPERATUR-AKTUELL" {set hexin "0F02330000"}
"R_AKKU-TEMPERATUR-LADEN" {set hexin "0F02350000"}
"R_AKKU-LETZTER-LADEVORGANG_MIN" {set hexin "0F02340000"}
"R_AKKU-NAECHSTE_TEMPERATURMESSUNG_SEK" {set hexin "0F02360000"}
"R_GESCHWINDIGKEIT-MESSERMOTOR" {set hexin "0F2EEA0000"}
"R_GESCHWINDIGKEIT-RECHTS" {set hexin "0F24BF0000"}
"R_GESCHWINDIGKEIT-LINKS" {set hexin "0F24C00000"}
"R_FIRMWARE-VERSION" {set hexin "0F33900000"}
"R_SPRACHDATEI-VERSION" {set hexin "0F3AC00000"}
"W_TIMERAKTIV" {set hexin "0FCA4E0000"}
"W_TIMERINAKTIV" {set hexin "0FCA4E0001"}
"W_MODE_HOME" {set hexin "0F812C0003"}
"W_MODE_MAN" {set hexin "0F812C0000"}
"W_MODE_AUTO" {set hexin "0F812C0001"}
"W_MODE_DEMO" {set hexin "0F812C0004"}
"W_KEY_0" {set hexin "0F805F0000"}
"W_KEY_1" {set hexin "0F805F0001"}
"W_KEY_2" {set hexin "0F805F0002"}
"W_KEY_3" {set hexin "0F805F0003"}
"W_KEY_4" {set hexin "0F805F0004"}
"W_KEY_5" {set hexin "0F805F0005"}
"W_KEY_6" {set hexin "0F805F0006"}
"W_KEY_7" {set hexin "0F805F0007"}
"W_KEY_8" {set hexin "0F805F0008"}
"W_KEY_9" {set hexin "0F805F0009"}
"W_PRG_A" {set hexin "0F805F000A"}
"W_PRG_B" {set hexin "0F805F000B"}
"W_PRG_C" {set hexin "0F805F000C"}
"W_KEY_HOME" {set hexin "0F805F000D"}
"W_KEY_MANAUTO" {set hexin "0F805F000E"}
"W_KEY_C" {set hexin "0F805F000F"}
"W_KEY_UP" {set hexin "0F805F0010"}
"W_KEY_DOWN" {set hexin "0F805F0011"}
"W_KEY_YES" {set hexin "0F805F0012"}
=> einfach die CODES wie zB W_KEY_YES als Werteliste setzen, dann könnt Ihr darauf zugreifen. Der 1. Wert muss halt einfach "Keine Aktivität" heissen, sonst kann man die Reihenfolge ändern.

PS.... wieso die Variable in Homematic "Automower Steuerung" heisst und nicht "AUTOMOWER_STEUERUNG" entzieht sich meinem Verständnis. Das werde ich aber noch korrigieren, da es aus Zugriffssicht nur Probleme verursacht. Im Code ist das übrigens alles super sauber geschrieben. Da wusste jemand wirklich was er macht. Das passt irgendwie aber nicht zusammen mit der Erstellung der Homematic Variablen. Ev. haben da ja verschiedene Leute daran gearbeitet.

bernd.skorpil
Beiträge: 9
Registriert: 04.11.2014, 00:37
Kontaktdaten:

Re: Automower (G2) über Homematic / WLAN steuern

Beitrag von bernd.skorpil » 26.05.2017, 17:07

Ich denke, das hat mule programmiert.

Antworten

Zurück zu „HomeMatic Tipps & Tricks - keine Fragen!“