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



  • 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



  • @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.



  • @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).



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



  • @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'
    


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


Log in to reply
 

Suggested Topics

  • 1
  • 1
  • 5
  • 3
  • 5
  • 3

14
Online

11.4k
Users

11.1k
Topics

112.7k
Posts