• Home
  • Robotics
  • 3D Printing
  • Web
  • Microcontrollers
  • Frameworks
  • Protocols
  • Other
  • Explore knowledge
  • Loading graph.
    Depth
    …
    … visible
  • Home
  • Robotics
  • 3D Printing
  • Web
  • Microcontrollers
  • Frameworks
  • Protocols
  • Other
Tools
    Pages
    • Robotics
      • Room View Bot
        • motors-control-board
        • power-manager
      • Roborock Valetudo
      • Rover Balance
    Pages
    • Robotics
      • Room View Bot
        • motors-control-board
        • power-manager
      • Roborock Valetudo
      • Rover Balance
    Home/Robotics/roborock
    Metadata
    description
    Vacume Cleaner robot with local webapp and Telegram chat
    date
    2021-03-07
    tags
    hover, lidar, mapping
    features
    ["modified firmware","custom webapp","telegram chat"]

    Roborock s55

    image-roborock.png
    ×

    Valetudo

    install

    Home menu

    image-valetudo_home.png
    ×

    Map

    image-valetudo_map.png
    ×

    Telegram app

    Roborock chat

    image-hover_chat.png
    ×
    • the valetudo install section will provide the valetudo server

    Hypefr server repo
    • this app is using node.js telegraf

    telegraf dependency
    • the node.js app in the raspi repository

    hover_poll.js
    • The complete node.js service main file

    hover_poll.js
    Javascript
    const fs = require('fs');
    const Telegraf = require('telegraf')
    const {logger} = require('./logger.js')
    const mqtt = require('./mqtt.js')
    const Markup = require('telegraf/markup')
    
    const secret = JSON.parse(fs.readFileSync(__dirname+'\\secret.json'))
    const token = secret.bots.smart_hover_bot.token
    const bot = new Telegraf(token)
    
    function start(ctx){
      logger.info({from:ctx.from})
      logger.info({chat:ctx.chat})
      if(secret.users.includes(ctx.from.id)){
            ctx.reply(`Hello! ${ctx.message.from.first_name}`)
            logger.debug({message:ctx.message})
        }else{
            ctx.reply(`I don't know you yet, ${ctx.message.from.first_name}`)
            logger.warn({unauthorised_user:ctx.from})
        }
    }
    
    function bot_init(){
      bot.start(start)
      bot.command('goto_clean_zone', ({ reply }) =>reply('Going to clean zone'))
      bot.command('clean_livingroom', ({ reply }) =>reply('Starting the livingroom cleaning'))
      bot.command('clean_kitchen', ({ reply }) =>reply('The kitchen is already clean 🍽️'))
      bot.command('clean_bedroom', ({ reply }) =>reply('The bedroom is already clean 🛏️'))
      
      bot.hears('clean', (ctx) =>
        ctx.reply('Which room would you like to clean ❓', Markup
          .keyboard(['/clean_livingroom', '/clean_kitchen', '/clean_bedroom'])
          .oneTime()
          .resize()
          .extra()
        )
      )
      
      bot.help((ctx) => ctx.reply('How can I help you ❓'))
      bot.hears('hi', (ctx) => ctx.reply('Hey there 👋'))
      mqtt.Emitter.on('mqtt',(data)=>{
        if(data.msg.hasOwnProperty("click")){
          logger.verbose(`bot> ${data.topic} : click = ${data.msg.click}`)
          bot.telegram.sendMessage(secret.bots.smart_hover_bot.chatId,`button clicked ${data.msg.click}`)
        }
      })
    }
    
    //------------------ main ------------------
    logger.info('smart_hover_bot started')
    mqtt.start()
    bot_init()
    bot.launch()

    FAQ - Discussion

    If you need support, want to ask a question or suggest an idea, you can join the discussion on the forum
    Home Smart Mesh - Discussions
    • see also
      Valetudo FAQ Page
    Can I install Valetudo on a new robot ?

    No, only Gen1 and Gen2 of Roborock are supported.

    ← PreviousRoom View Bot
    On this page
    • Roborock s55
    • Valetudo
      • Home menu
      • Map
    • Telegram app
      • Roborock chat
    • FAQ - Discussion
    Open page ×