Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
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
Brand Logo
  1. Home
  2. Controllers
  3. Node-RED
  4. [Solved] problems trying to save on two measurements

[Solved] problems trying to save on two measurements

Scheduled Pinned Locked Moved Node-RED
2 Posts 1 Posters 820 Views 1 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.
  • Sergio RiusS Offline
    Sergio RiusS Offline
    Sergio Rius
    wrote on last edited by Sergio Rius
    #1

    I'm trying to save the sensor data received from mqtt into two different measurements, if they are internal network messages, I want them in "internal" and all the sensor values into "values"
    For that I tried using a switch module checking the "sensor" attribute being 255, but I can't make it save on the internal "table"

    0_1565787978997_flow.jpg
    0_1565788119103_switch.jpg

    To my confussion, the switch seems to work, as I put debug nodes on the output (1, 2) and it keeps printing 1 or 2 correctly depending on the message.
    But from the two DB/measurement connections that hangs on it only executes the second one. Nothing is written into "internal", although the debug is hit and also the measurement has received the series :scream: :

    key
    ---
    internal,node=0,sensor=255,subType=I_HEARTBEAT_RESPONSE
    internal,node=1,sensor=255,subType=I_DISCOVER_RESPONSE
    values,node=1,sensor=1,subType=V_KWH
    values,node=1,sensor=1,subType=V_VAR1
    values,node=1,sensor=1,subType=V_WATT
    values,node=1,sensor=2,subType=V_WATT
    values,node=1,sensor=3,subType=V_WATT
    values,node=1,sensor=4,subType=V_WATT
    

    Can someone give me a clue of what is happening? I'm newb with node-red and influxdb.

    1 Reply Last reply
    0
    • Sergio RiusS Offline
      Sergio RiusS Offline
      Sergio Rius
      wrote on last edited by Sergio Rius
      #2

      Seems that the problem was that influxdb always configures the field type the first time a series is accessed.
      I thought that the value was something like a "variant" and would eat anything I throw at it. So when I altered the data types in the flow, the db refused to save.
      A drop and re create solved the problem.

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      18

      Online

      12.0k

      Users

      11.2k

      Topics

      113.4k

      Posts


      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular