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. Home Assistant
  4. Manual adjust the persistence file instead of adjust the node's

Manual adjust the persistence file instead of adjust the node's

Scheduled Pinned Locked Moved Home Assistant
6 Posts 3 Posters 118 Views 3 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.
  • dzjrD Offline
    dzjrD Offline
    dzjr
    wrote on last edited by
    #1

    Hello MySensors friends

    I'm moving from Domoticz to H-A, mainly because I have quite a few crashes, even now that I have domoticz running on a NUC ...

    I already have HA for almost everything, even more than with Domoticz.

    Now the most important step; Adding the MySensors sensors, I currently have 14 node's running and I was wondering if there is a possibility to add these node's to HA without having to adjust the node's, for example by adjusting the mysensors .json persistence file.

    If it doesn't work, there is nothing else to adjust the nodes of course.

    thank you in advance

    monteM 1 Reply Last reply
    0
    • dzjrD dzjr

      Hello MySensors friends

      I'm moving from Domoticz to H-A, mainly because I have quite a few crashes, even now that I have domoticz running on a NUC ...

      I already have HA for almost everything, even more than with Domoticz.

      Now the most important step; Adding the MySensors sensors, I currently have 14 node's running and I was wondering if there is a possibility to add these node's to HA without having to adjust the node's, for example by adjusting the mysensors .json persistence file.

      If it doesn't work, there is nothing else to adjust the nodes of course.

      thank you in advance

      monteM Offline
      monteM Offline
      monte
      wrote on last edited by monte
      #2

      @dzjr I would say no, but I don't remember if I tried this. It would be nice of you to try and report here if it works.

      dzjrD 1 Reply Last reply
      0
      • monteM monte

        @dzjr I would say no, but I don't remember if I tried this. It would be nice of you to try and report here if it works.

        dzjrD Offline
        dzjrD Offline
        dzjr
        wrote on last edited by dzjr
        #3

        @monte

        Thank you for your response,

        I just tried it and it seems to work!

        The only thing left is to find the correct value, but I can at least control one of the relays!

            "101": {
                "sensor_id": 101,
                "children": {
                    "21": {
                        "id": 21,
                        "type": 6,
                        "description": "Temp in put node",
                        "values": {}
                    },
                    "1": {
                        "id": 1,
                        "type": 3,
                        "description": "Put Klep-1",
                        "values": {
        					"2": "0"
        				}
                    },
                    "11": {
                        "id": 11,
                        "type": 35,
                        "description": "Put Grondvocht-1",
                        "values": {
                            "37": "153"
                        }
                    },
           
                "type": 17,
                "sketch_name": "PutSensor Node",
                "sketch_version": "2.0",
                "battery_level": 0,
                "protocol_version": "2.3.1",
                "heartbeat": 0
            },
        

        The way of working:

        -disable the MySensors intergration in configuration.yaml
        -restart HA
        -edit the MySensors.json file (in used Notepad ++)
        -Write the file in the config folder
        -enable the MySensors integration again in configuration.yaml
        -restart HA

        • look into the development tools -> states

        if all is well you will see the sensors in between, and in the User Interface you can add them and switch them there too.

        You just have to adjust the names separately.

        So it saves a lot of work by modifying the MySensors.json file instead of modifying the nodes, although I am going to create new ones as they should with HA.

        Is there perhaps an overview with which value belongs to which V_TYPE?

        It saved me some time, of course I only have to adjust the values for the T_TYPE that do not send a value (periodically).

        1 Reply Last reply
        1
        • M Offline
          M Offline
          Michał Szura
          wrote on last edited by
          #4

          Hi
          What is your persistence path in configuration?
          I have sometimes errors in logs about path

          dzjrD 1 Reply Last reply
          0
          • M Michał Szura

            Hi
            What is your persistence path in configuration?
            I have sometimes errors in logs about path

            dzjrD Offline
            dzjrD Offline
            dzjr
            wrote on last edited by
            #5

            @Michał-Szura

            my config is:

            mysensors:
              gateways:
              - device: '192.168.0.147'
                persistence_file: 'mysensors147.json'
                tcp_port: 5003
              - device: '192.168.0.146'
                persistence_file: 'mysensors146.json'
                tcp_port: 5003    
              optimistic: true
              persistence: true
              retain: true
              version: '2.3'
            

            i also have some errors in the log, but i still have to look where the problem is.

            2020-02-16 17:21:14 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up mysensors platform for sensor
            Traceback (most recent call last):
              File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 159, in _async_setup_platform
                await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
              File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
                return fut.result()
              File "/usr/src/homeassistant/homeassistant/components/mysensors/sensor.py", line 53, in async_setup_platform
                async_add_entities=async_add_entities,
              File "/usr/src/homeassistant/homeassistant/components/mysensors/__init__.py", line 178, in setup_mysensors_platform
                devices[dev_id] = device_class_copy(*args_copy)
              File "/usr/src/homeassistant/homeassistant/components/mysensors/device.py", line 39, in __init__
                child = gateway.sensors[node_id].children[child_id]
            KeyError: '31'
            
            1 Reply Last reply
            0
            • M Offline
              M Offline
              Michał Szura
              wrote on last edited by
              #6

              I recently read that if you use multiple USB gateway then you can't have duplicate of child is. Maybe this is a clue

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


              19

              Online

              11.7k

              Users

              11.2k

              Topics

              113.1k

              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