Navimow i105E ioBroker Script – Anleitung
Ich habe zusammen mit ChatGPT ein Script erstellt, das automatisch alle benötigten Objekte für den Navimow i105E in ioBroker erstellt und diese direkt für Google Home und Alexa verfügbar macht. Dadurch kann der Roboter über VIS, Google und Alexa gesteuert werden und der Status wird korrekt angezeigt.
Voraussetzungen
• ioBroker JavaScript Adapter installiert
• ioBroker IoT Adapter installiert
• Navimow in Google Home eingebunden
• optional: WLAN-Steckdose zur Ladeerkennung
WICHTIG:
JavaScript Adapter → Einstellungen → Expertenmodus →
"Haken bei setObject erlauben"
Automatisch erstellte Objekte
Ordner:
0_userdata.0.Navimow_i105E
Steuerung:
• I105E Start Stop → starten / stoppen
• I105E Pause Resume → pausieren / fortsetzen
Status:
• I105E Betriebszustand → 0=gestoppt, 50=pausiert, 100=mäht
• I105E Ladezustand → 0=normal, 50=niedrig, 100=sehr niedrig
• I105E Angedockt → true / false
Statistik (nur VIS):
• MovingTimeToday
• MovingTimeTotal
• HistoryJSON
WLAN-Steckdose (optional, empfohlen)
Im Script Steckdosen-Power-State eintragen, z. B.:
tuya.0.xxx.power
Logik:
Power > 30W → lädt / angedockt
Power < 30W → nicht angedockt
Ohne Steckdose funktioniert alles, aber mit Steckdose ist der Status genauer.
Google Automationen – Steuerung (ioBroker → Roboter)
Start
I105E Start Stop = EIN → Navimow starten
Stop
I105E Start Stop = AUS → Navimow nach Hause fahren
Pause
I105E Pause Resume = EIN → Navimow pausieren
Fortsetzen
I105E Pause Resume = AUS → Navimow fortsetzen
Google Automationen – Status Rückmeldung (Roboter → ioBroker)
Mäht
Navimow Status = mäht → I105E Betriebszustand = 100
Pausiert
Navimow Status = pausiert → I105E Betriebszustand = 50
Gestoppt
Navimow Status = gestoppt → I105E Betriebszustand = 0
Angedockt
Navimow angedockt → I105E Angedockt = EIN
Nicht angedockt
Navimow nicht angedockt → I105E Angedockt = AUS
Batterie normal
Navimow Batterie normal → I105E Ladezustand = 0
Batterie niedrig
Navimow Batterie niedrig → I105E Ladezustand = 50
Batterie sehr niedrig
Navimow Batterie sehr niedrig → I105E Ladezustand = 100
Alexa
Automatisch verfügbar:
• I105E Start Stop
• I105E Pause Resume
In Alexa einfach umbenennen z. B. "Rasenmäher"
Optional Routine für Pause / Resume erstellen.
VIS Verwendung
Betriebszustand:
0 → Gestoppt
50 → Pausiert
100 → Mäht
Ladezustand:
0 → Normal
50 → Niedrig
100 → Sehr niedrig
Angedockt:
true → angedockt
false → nicht angedockt
Ergebnis
✔ Steuerung über VIS, Google und Alexa
✔ korrekter Status in ioBroker
✔ automatische Objekterstellung
✔ automatische Google / Alexa Integration
✔ Ladeerkennung optional über WLAN-Steckdose
Ich kann es leider noch nicht testen da mein Robbi noch im Winterschlaf ist.
mfg denjo
/************************************************************
Navimow i105E – FINAL WORKING VERSION
vollständig Google Home + Alexa kompatibel
************************************************************/
const BASE = '0_userdata.0.Navimow_i105E';
const POWER_STATE = 'tuya.0.xxxxxx';
const CHARGING_THRESHOLD = 30;
// Betriebszustand
const STATUS_STOPPED = 0;
const STATUS_PAUSED = 50;
const STATUS_RUNNING = 100;
// Ladezustand
const BATTERY_NORMAL = 0;
const BATTERY_LOW = 50;
const BATTERY_VERYLOW = 100;
// Runtime
let mowTimer = null;
let mowStartTime = null;
let history = [];
////////////////////////////////////////////////////////
// STATE CREATION
////////////////////////////////////////////////////////
function ensureState(id, common)
{
if (!existsObject(id))
{
createState(id, common.def, common);
}
}
////////////////////////////////////////////////////////
// CREATE STATES
////////////////////////////////////////////////////////
// START / STOP
ensureState(BASE+'.StartStop',{
name:'I105E Start Stop',
type:'boolean',
role:'switch',
read:true,
write:true,
def:false,
smartName:{
"de":"I105E Start Stop",
"ghType":"action.devices.types.LIGHT",
"ghTraits":["action.devices.traits.OnOff"],
"ghAttributes":"{\"commandOnlyOnOff\":false}"
}
});
// PAUSE / RESUME
ensureState(BASE+'.PauseResume',{
name:'I105E Pause Resume',
type:'boolean',
role:'switch',
read:true,
write:true,
def:false,
smartName:{
"de":"I105E Pause Resume",
"ghType":"action.devices.types.LIGHT",
"ghTraits":["action.devices.traits.OnOff"],
"ghAttributes":"{\"commandOnlyOnOff\":false}"
}
});
// BETRIEBSZUSTAND
ensureState(BASE+'.Betriebszustand',{
name:'I105E Betriebszustand',
type:'number',
role:'level.dimmer',
read:true,
write:true,
def:0,
unit:'%',
min:0,
max:100,
smartName:{
"de":"I105E Betriebszustand",
"ghType":"action.devices.types.LIGHT",
"ghTraits":["action.devices.traits.OnOff","action.devices.traits.Brightness"],
"ghAttributes":"{\"commandOnlyOnOff\":false}"
}
});
// LADEZUSTAND
ensureState(BASE+'.Ladezustand',{
name:'I105E Ladezustand',
type:'number',
role:'level.dimmer',
read:true,
write:true,
def:0,
unit:'%',
min:0,
max:100,
smartName:{
"de":"I105E Ladezustand",
"ghType":"action.devices.types.LIGHT",
"ghTraits":["action.devices.traits.OnOff","action.devices.traits.Brightness"],
"ghAttributes":"{\"commandOnlyOnOff\":false}"
}
});
// ANGEDOCKT ← jetzt korrekt für Google
ensureState(BASE+'.Angedockt',{
name:'I105E Angedockt',
type:'boolean',
role:'switch',
read:true,
write:true,
def:false,
smartName:{
"de":"I105E Angedockt",
"ghType":"action.devices.types.LIGHT",
"ghTraits":["action.devices.traits.OnOff"],
"ghAttributes":"{\"commandOnlyOnOff\":false}"
}
});
// STATISTIK
ensureState(BASE+'.MovingTimeToday',{
name:'Mähzeit heute',
type:'number',
role:'value.interval',
read:true,
write:true,
def:0,
unit:'min'
});
ensureState(BASE+'.MovingTimeTotal',{
name:'Mähzeit gesamt',
type:'number',
role:'value.interval',
read:true,
write:true,
def:0,
unit:'min'
});
ensureState(BASE+'.HistoryJSON',{
name:'History JSON',
type:'string',
role:'json',
read:true,
write:true,
def:'[]'
});
////////////////////////////////////////////////////////
// CHARGING DETECTION (DEINE STECKDOSE)
////////////////////////////////////////////////////////
function updateCharging(power)
{
power = Number(power);
if (power > CHARGING_THRESHOLD)
{
setState(BASE+'.Angedockt', true, true);
if (power > 100)
setState(BASE+'.Ladezustand', BATTERY_NORMAL, true);
else if (power > 50)
setState(BASE+'.Ladezustand', BATTERY_LOW, true);
else
setState(BASE+'.Ladezustand', BATTERY_VERYLOW, true);
}
else
{
setState(BASE+'.Angedockt', false, true);
}
}
if (existsState(POWER_STATE))
{
on({id:POWER_STATE,change:'ne'}, obj =>
{
updateCharging(obj.state.val);
});
}
////////////////////////////////////////////////////////
// MOW TIMER
////////////////////////////////////////////////////////
function startTimer()
{
if (mowTimer) return;
mowStartTime = Date.now();
mowTimer = setInterval(()=>{
let today = getState(BASE+'.MovingTimeToday').val || 0;
let total = getState(BASE+'.MovingTimeTotal').val || 0;
setState(BASE+'.MovingTimeToday', today+1, true);
setState(BASE+'.MovingTimeTotal', total+1, true);
},60000);
}
function stopTimer()
{
if (!mowTimer) return;
clearInterval(mowTimer);
mowTimer = null;
let duration = Math.round((Date.now()-mowStartTime)/60000);
history.unshift({
date:new Date().toLocaleString(),
duration:duration
});
if (history.length > 10)
history.pop();
setState(BASE+'.HistoryJSON', JSON.stringify(history), true);
}
////////////////////////////////////////////////////////
// CONTROL LOGIC
////////////////////////////////////////////////////////
on({id:BASE+'.StartStop',change:'ne'}, obj =>
{
if (obj.state.val)
{
setState(BASE+'.Betriebszustand', STATUS_RUNNING, true);
startTimer();
}
else
{
setState(BASE+'.Betriebszustand', STATUS_STOPPED, true);
stopTimer();
}
});
on({id:BASE+'.PauseResume',change:'ne'}, obj =>
{
if (obj.state.val)
{
setState(BASE+'.Betriebszustand', STATUS_PAUSED, true);
stopTimer();
}
else
{
setState(BASE+'.Betriebszustand', STATUS_RUNNING, true);
startTimer();
}
});
////////////////////////////////////////////////////////
// INIT
////////////////////////////////////////////////////////
setTimeout(()=>{
if (existsState(POWER_STATE))
updateCharging(getState(POWER_STATE).val);
},3000);
log('Navimow i105E FINAL SCRIPT läuft korrekt');