Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. English
  3. ioBroker general
  4. Simple API Use SOLVED

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    22
    1
    1.2k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.2k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    14
    1
    2.4k

Simple API Use SOLVED

Scheduled Pinned Locked Moved ioBroker general
apisimple api
22 Posts 5 Posters 5.0k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M MCU

    @tehmilcho sagte in Simple API Use SOLVED:

    :23: attempt to call a nil value (field 'escape')

    Try this

    url = url:gsub("([^A-Za-z0-9_])", function(c) return string.format("%%%02X", string.byte(c)) end)
    
    T Offline
    T Offline
    tehMilcho
    wrote on last edited by
    #21

    @mcu said in Simple API Use SOLVED:

    url = url:gsub("([^A-Za-z0-9_])", function(c) return string.format("%%%02X", string.byte(c)) end)

    then it seems to get stuck, no error but will not finsh and also the state in iobroker is not changed, when you Output the new string you will get:

    http%3A%2F%2F192%2E168%2E178%2E37%3A8087%2Fset%2F0_userdata%2E0%2EVirtualDevices%2Ehc3lite%2EFlurPIR%2D1%3Fvalue%3Dtrue%26prettyPrint

    T 1 Reply Last reply
    0
    • T tehMilcho

      @mcu said in Simple API Use SOLVED:

      url = url:gsub("([^A-Za-z0-9_])", function(c) return string.format("%%%02X", string.byte(c)) end)

      then it seems to get stuck, no error but will not finsh and also the state in iobroker is not changed, when you Output the new string you will get:

      http%3A%2F%2F192%2E168%2E178%2E37%3A8087%2Fset%2F0_userdata%2E0%2EVirtualDevices%2Ehc3lite%2EFlurPIR%2D1%3Fvalue%3Dtrue%26prettyPrint

      T Offline
      T Offline
      tehMilcho
      wrote on last edited by
      #22

      @MCU but this brings me on track, i now swap the "?" with "%3F" now it works .. damn @MCU you are f****** smart :) Thanks a lot. spend already hours on this :)

      1 Reply Last reply
      1
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      Support us

      ioBroker
      Community Adapters
      Donate

      736

      Online

      32.5k

      Users

      81.7k

      Topics

      1.3m

      Posts
      Community
      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
      ioBroker Community 2014-2025
      logo
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Home
      • Recent
      • Tags
      • Unread 0
      • Categories
      • Unreplied
      • Popular
      • GitHub
      • Docu
      • Hilfe