Skip to content
  • 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
BartB

Bart

@Bart
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store
About
Posts
36
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Sensor naming problem
    BartB Bart

    @nick-willis I have the same problem.

    Up till now I was doing a simple hack that changed the naming of the sensors to the description field. Would be good to have an option to use just the description for sensors that have them meaningful and usable. I guess that would be a good topic for HA forum of this extension...

    Home Assistant

  • Enable serial debugs from the RS485 GW in the log
    BartB Bart

    @martinhjelmare thanks. I am still not really good at git kung-fu to do it quickly. will try to do the PR when I have some spare time :)

    Home Assistant

  • Enable serial debugs from the RS485 GW in the log
    BartB Bart

    Just a FYI if anyone else will stuck trying to enable this. There's no debug print out for the serial connection in pymysensors as it appears. You need to add the debugs in the code on your own.

    Here's the diff:

    --- mysensors/mysensors.py.orig	2016-11-19 17:51:39.000000000 +0100
    +++ mysensors/mysensors.py	2016-11-19 18:27:43.705631204 +0100
    @@ -483,6 +483,7 @@
                         'Error decoding message from gateway, '
                         'probably received bad byte.')
                     continue
    +            _LOGGER.debug('Received %s', string.rstrip())
                 self.fill_queue(self.logic, (string,))
             self.disconnect()  # Disconnect after stop event is set
     
    @@ -492,6 +493,7 @@
                 return
             # Lock to make sure only one thread writes at a time to serial port.
             with self.lock:
    +            _LOGGER.debug('Sending %s', message.rstrip())
                 self.serial.write(message.encode())
     
     
    
    Home Assistant

  • 💬 MYSController
    BartB Bart

    Is it possible to use this app when using RS485 transport? I have one of these usb (ftdi based) adapters connected with 2 Arduino MEGA on a RS485 bus:

    http://www.banggood.com/USB-To-RS485-TTL-Serial-Converter-Adapter-FTDI-Interface-FT232RL-75176-p-961537.html

    Tried it but I don't see any messages. Connecting serial monitor does show a traffic.

    Announcements

  • RS485/RS232/Serial transport class for mysensors.org
    BartB Bart

    @hek ok. all good now - the ping pong example working. I forgot about the gateway flag.

    BTW, checked to see if the GW has any issues without PR 599 but it seems it is still working OK. I have not changed the HW connections so must be some other change.

    Development rs485 serial rs485

  • RS485/RS232/Serial transport class for mysensors.org
    BartB Bart

    I am wondering if a node-2-node communication should be working. I have compiled the ping/pong example for RS485 but it appears the nodes are not communicating.

    Development rs485 serial rs485

  • RS485/RS232/Serial transport class for mysensors.org
    BartB Bart

    @hek I will try to check if this change did it.

    Development rs485 serial rs485

  • RS485/RS232/Serial transport class for mysensors.org
    BartB Bart

    @hek Looks like something has been fixed in regards to altSoftSerial. Today I've pulled latest development and everything works fine. The gateway has no problem finding nodes and all messages reach their destinations.

    Development rs485 serial rs485

  • RS485/RS232/Serial transport class for mysensors.org
    BartB Bart

    @karlheinz2000 Are any of your boards using AltSoftSerial instead of HW serial? I was not able to get a reliable connection with software serial library....

    Development rs485 serial rs485

  • RS485/RS232/Serial transport class for mysensors.org
    BartB Bart

    @karlheinz2000
    Yes. Got it working with this patch. Although not reliably when other board was using the altsoftserial.

    Development rs485 serial rs485

  • Enable serial debugs from the RS485 GW in the log
    BartB Bart

    There's no difference between Serial GW and Serial GW with RS485 transport. It is just a matter of not using RF transport. So on the serial console side the communication is the same.

    Home Assistant

  • Enable serial debugs from the RS485 GW in the log
    BartB Bart

    @martinhjelmare So unfortunately haven't had much time to spend on getting these logs yet. But one thing is sure. The domoticz mysensors connection works flawlessly. I am able to see all the sensors, all of them are correctly updated in the domoticz on sketch start up, no events are lost (did same test doing quickly switch toggling from the GUI and from the sketch, same tests on HA were often missing the events). So there's got to be some problem with HA module.

    So the bottom line - logs are needed :)

    So do I understand correctly that with the above logs setting I should be able to see the serial transmissions in the HA log? I will try to obtain the serial port data with something like this: http://unix.stackexchange.com/questions/12359/how-can-i-monitor-serial-port-traffic but it would be ideal to figure out why these debugs are not there in the first place. Can I make some changes to the module and force the debug (in the python source file)?

    Home Assistant

  • No lights shown in GUI
    BartB Bart

    @martinhjelmare But then can I have HA do the same stuff it is doing on other lights? https://home-assistant.io/components/light/ ?

    Home Assistant

  • No lights shown in GUI
    BartB Bart

    @martinhjelmare said:

    The device will show in the HA GUI as soon as all required values comes in, but you should send an initial value for each V_TYPE that you want to use, otherwise some functions will probably not work. Check each platform doc for required types, S_TYPE and V_TYPE.

    OK, after sending the V_PERCENTAGE it is visible. I have not understood correctly the table presented in the manual. Seems to be obvious now :)

    However I am wondering how to get rid of the dimmer functionality on HA side. It could be done by sending e.g. V_PERCENTAGE == -1. That would tell the HA side the light is not a dimmer and we could get rid of such option for the lights in the front-end.

    Home Assistant

  • No lights shown in GUI
    BartB Bart

    @martinhjelmare OK thanks. Will make sure to collect these logs next time. Hopefully I will get the console logs shown. Still not sure why I am not seeing them...

    Home Assistant

  • No lights shown in GUI
    BartB Bart

    @martinhjelmare So do I need to send all 3 values to HA? As shown in the example sketch?

      gw.send(lightMsg.set(currentLevel > 0 ? 1 : 0));
      gw.send(dimmerMsg.set(currentLevel));
      gw.send(rgbMsg.set(rgb));
    

    Or will it be enough to send the lightMsg (that is V_STATUS)? And just as a sidenote - I have briefly checked the sketch in domoticz. It worked and I was able to turn on/off the lights and see the initial status.

    Home Assistant

  • Enable serial debugs from the RS485 GW in the log
    BartB Bart

    @martinhjelmare Thanks for the suggestions.

    Home Assistant

  • Enable serial debugs from the RS485 GW in the log
    BartB Bart

    @martinhjelmare Yes. It actually works for the switches. I have some issues with getting the lights being shown correctly (although sending the initial values, but that's off topic :) ).

    EDIT: to be sure I've copy/pasted these sections from your post. I see mysensors.mysensors debugs and the component debugs. Just no console print outs.

    EDIT2: I need to double check it - not sure IF I am seeing any mysensors.mysensors debugs. Will do that in the evening today.

    Home Assistant

  • Enable serial debugs from the RS485 GW in the log
    BartB Bart

    @martinhjelmare yup it is set to true.

    Home Assistant

  • No lights shown in GUI
    BartB Bart

    Hi

    I wanted to try out the lights via mysensors.

    So from a switch sketch I've made a conversion to light sketch. The only change I've made is in present function have used S_DIMMER instead of S_BINARY. Other than that I am using the V_STATUS type to send the updates to HA.

    So I can see that the persistence file has been populated with the sensors:

    {"0": {"children": {}, "battery_level": 0, "protocol_version": "2.0.1-beta", "sketch_name": "SerialGateway", "sketch_version": "0.1", "sensor_id": 0, "type": 18}, "1": {"children": {"22": {"values": {}, "description": "IB_SALON_M_1", "id": 22, "type": 4}, "23": {"values": {}, "description": "IB_SALON_M_2", "id": 23, "type": 4}, "24": {"values": {}, "description": "IB_SALON_M_3", "id": 24, "type": 4}, "25": {"values": {}, "description": "IB_SALON_M_4", "id": 25, "type": 4}, "26": {"values": {"2": "0"}, "description": "IB_SALON_BL_1", "id": 26, "type": 4}, (...) }, "battery_level": 0, "protocol_version": "2.0.1-beta", "sketch_name": "InputBinary1", "sketch_version": null, "sensor_id": 1, "type": 17}}
    

    but I am not getting anything shown in the GUI. Also I can see that the state requests (getting state from the HA when sketch initializes) are timing out.

    So how do I get these lights properly populated? Maybe I am not aware of some obvious fact about light component.

    on the side note, I have not seen any higher level explanation of the HA design. Is there something that explains its architecture?

    Home Assistant
  • Login

  • Don't have an account? Register

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