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
H

hausinger

@hausinger
About
Posts
27
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Mysensors Gateway on OrangePi (Zero) (opi)
    H hausinger

    Hi all

    I want to give feedback here.

    Today i tried to build a orange pi gateway with a connected usb - rs485 converter on it. And what should I say - It worked without problems. Many thanks to you all :)
    Great

    Development

  • RS485 Gateway with Nano and ENC28J60
    H hausinger

    @tboha said in RS485 Gateway with Nano and ENC28J60:

    @hausinger
    Yes, there is somebody - me.
    Just like magic - I switched back from my W5100 GW to ENC28J60 GW for testing purposes --- and it is working :grinning: .
    Maybe because the node entries in the database were populated by the W5100 GW? I don't know.
    I have not changed anything within the GW software or hardware.
    So I still think it's a MysController setup issue. Maybe you will succeed using a serial GW for a short time to "initiate" MysController database and then switch to ENC28J60 GW ?? (I haven't tested adding new nodes...)

    hi @tboha
    thank you for your testing and your answers here.
    I tried it with a serial gateway (it work in myscontroller). Then i tried it with the nano and enc28j60, but still "connection refused".
    Than i tried to build a orange pi gatway and i can connect it with myscontroller. so there is a problem on the nano + enc28j60 + rs485 (maybe altsoftserial??)

    I also tried the enc28j60 module with a simple hello world scetch to make sure that it is working fine. And yes, it worked. So the module is ok.

    I don't know, how to solve this problem

    Development

  • RS485 Gateway with Nano and ENC28J60
    H hausinger

    @tboha
    Thank you for your fast answer. I tried do dowgngrade to board version v1.6.11, now i didn't have reboots on the gateway => Great :)

    But i still have a problem.

    I can't connect the MYSController with the gateway.

    My gateway fully start and write me the ip adress. If i connect a node through rs485 with it, i can see the messages in the serial monitor of the gateway. But if i want to connect the MYSController (on my windows pc) with the correct ip, i get this after some seconds (without output) : "Error on connect: connection refused"

    Development

  • RS485 Gateway with Nano and ENC28J60
    H hausinger

    Hello community.

    I wanted to build a Gateway with a Nano, a Max485 module and a ENC28J60 network module.
    I tried the ENC28J60 Gateway sketch with the changes to the rs485 transport, but there is a problem
    If i start the gateway it looks ok, if i start a node (connected through rs485 to my controller) it seems, that the nano reboots everytime if a message is received. I can't connect to the gateway with the "mysController".

    I think there is a problem with UIPEthernet and altsoftserial. Maybe someone have a idea to solve that?
    UIPEthernet uses pin 10. Altsoftserial uses the same timer for this pin (so pwm is not possible on pin 10). Maybe this is the problem?

    Hope you can help me.

    Thank you

    Best regards

    Development

  • Mysensors Gateway on OrangePi (Zero) (opi)
    H hausinger

    @marceloaqno said:

    @hausinger That shouldn't happen (gateway quitting itself). Could you submit the debug log with MY_DEBUG_VERBOSE_RF24 enabled?

    Yes i can check that, but how?
    I tried it to enable it in "example_linux" => mysgw.cpp (added the line "#define MY_DEBUG_VERBOSE_RF24")
    I also tried it in the file: "MyConfig.h" (also added the line "#define MY_DEBUG_VERBOSE_RF24")

    But my output is still the same in the console.

    Development

  • Mysensors Gateway on OrangePi (Zero) (opi)
    H hausinger

    @jirm said:

    @hausinger

    Of course you dont need any SPI bus.
    And so sorry but before I checked so badly the error you posted.

    Not seems any related working error for mysgw. I think you have mysgw working fine, seems only they can not connect/work with sensor node.

    You seems only need check node communication and adjust node configuration to have your mysgw working.

    I don't see you found so much trouble to make working from usb-rs485 adapter if you can do it with usb/serial node, it's only matter that the driver of adapter can work with mysgw without so much issues.

    Regards

    Thank you for your fast answer.
    I try to answer it as best as I can.

    I tried it once again:
    connected the arduino to the USB port on my OPI
    DMESG says it is port ttyUSB0

    If i start the Gateway with:
    sudo ./bin/mysgw -d

    I got the same result as posted before. My CPU Usage is at 100% on one core.

    if I kill the process of mysgw and start openhab2 (my used controller) it can connect direct to the Arduino (connected as USB as before) and it worked fine.

    So my configuration of my nodes (currently only 1 for testing) is working fine through rs485.

    Summary:
    Connection node -> Arduino Gateway = OK
    Connetion from openhab2 to Arduino Gateway = OK (openhab2 on same OPI as Arduino)
    OPI as a Ethernet - Serial Gateway = NOT OK, Problem is shown on my screenshot.

    USB-RS485:
    I also tried this, but after my configuration:
    ./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600
    I can do the "make" command.
    After that I start it with:
    sudo ./bin/mysgw -d
    I only get this:
    0_1483635312443_GatewayRS485.JPG
    I can now type a new command in the console (Gateway quit itself)

    Development

  • Mysensors Gateway on OrangePi (Zero) (opi)
    H hausinger

    @jirm said:

    @hausinger

    Hi again to all OPI users.

    I like see that are great movements here.

    I think main goal here is achieve that OPI board can run mysensors for herself connected radio boards.
    Of course that can work OPI (or any board) if we attach over some port the radio board, because use of any "conventional" port (means usb, serial, eth) is the same for any hardware from the software view.

    Said this, I would simplificate (and reduce all hardware to minimum) all things I can and with a powerful board I can concentrate much of the roles needed.
    Attach directly (means through GPIO) all hardware the board can manage without issues is my goal, and I think other much people.

    I think the error posted @hausinger for run mysgw seems derived from de main problem we see when try compile mysensors on OPI, and is that the need (maybe although not always necessary) that SPIDEV driver are up and working properly and mysensors software can not detect SPI bus (then fail SPIDEV) on OPI while is not being adapted all software stuff from some mysensor coder.

    I hope some mysensors coder hear our call and soon can help here.

    Regards

    In my case, why should it be necessary to have a working spi bus? I wanted to connect a working arduino with the mysensors gw scetch on it throug USB to the OPI and use this as a ethernet gateway.

    My last goal is to use a USB to RS485 converter on my OPI (works as a Gateway) without a connected arduino, because my whole mysensors communication should be over RS485.

    Development

  • Mysensors Gateway on OrangePi (Zero) (opi)
    H hausinger

    @pansen said:

    @hausinger: try to change

    ./configure --my-gateway=serial --my-serial-port=/dev/USB0 --my-serial-baudrate=115200
    to
    ./configure --my-gateway=serial --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200

    Be aware that USB devices are enumerated in the order they have been plugged in, so you cannot rely 100% on the arduino being "0".

    @mihai-aldea: haha I didn't even consider this. are there any disadvantages except for the increased power consumption? (and slightly higher cost)

    ooh sorry. Sure, i wrote "ttyUSB0". It was a typing mistake here on the forum. In my configuration I already typed ttyUSB0
    I edited my last post.

    But the issue is still the same.

    Development

  • Mysensors Gateway on OrangePi (Zero) (opi)
    H hausinger

    I'm using a orangepi one and with your help I can compile it.
    I tried it with a serial gateway. I connected a arduino nano with the gateway serial scath on it through USB to my orangepi one. DMESG say to me, that it is attached to ttyUSB0
    So i tried to build the gateway with:
    ./configure --my-gateway=serial --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200

    make has no errors

    after that, i tried to start it with:
    sudo ./bin/mysgw -d

    Is started but i get this problem:
    (0_1483630831348_Gateway_problem.JPG

    Do you know whats wrong with it?

    Development

  • 💬 Building a Raspberry Pi Gateway
    H hausinger

    @aand said:

    @hausinger -- are you running armbian on your orange pi one?

    Yes, I'm running on armbian on my orange pi one

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    H hausinger

    Hello.

    I'm also using a orangepi one and wanted to build the gateway on it. But i didn't want to use the nrf24 but a usb to rs485 converter. But if i want to compile it, i get also the same error with the nrf24 and that it is not supporting platform. Why?

    Also if i want to build a serial gateway with a connected arduino on usb port, i got the same error with the nrf24

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    H hausinger

    @marceloaqno said:

    @hausinger After the command:

    sudo ./bin/mysgw -d
    

    It wasn't supposed to go back to bash, the gateway would wait for new messages.
    I'm not sure what's going on with your setup because I tested your configuration options here and it worked.

    Thank you for your answer. What can I do now? Can I check, that this port is unused? And how can I check this?
    Or is there another problem?

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    H hausinger

    @hausinger said:

    @marceloaqno said:

    @hausinger You forgot "--" for my-rs485-baudrate=57600 in your configuration.
    It should be:

    ./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600
    

    Hi @marceloaqno
    Thank you for your answers. Yes, i saw this, but I did the "--", i forgot it in the last post, because I can't use copy & paste on my raspberry (remote Desktop).

    Did this configuration work on your System?
    Are you sure, that my configuration is ok? (with the "--")
    Whats the normal behavior when i start the mysGateway with debug (mysGateway -d)? If i type the starting command in the terminal, the Gateway gives me the Messages (from my last post) and thats it (not more). I can now type a new command

    I'm now not at home (Business trip), if I get home, i will try your "Screen" command

    So I'm at home today and make some Test.
    The screen comand gives me some strange characters, thats ok I think.

    But if i start the Gateway, I only get the same messages as shown in my other post.

    Here are 2 Pics that show you, how it look like.

    I also tried to make the gw with a baudrate of 9600, but still the same issues.!0_1480068509863_mysGateway.JPG 0_1480068518084_screen.JPG

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    H hausinger

    @marceloaqno said:

    @hausinger You forgot "--" for my-rs485-baudrate=57600 in your configuration.
    It should be:

    ./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 --my-rs485-baudrate=57600
    

    Hi @marceloaqno
    Thank you for your answers. Yes, i saw this, but I did the "--", i forgot it in the last post, because I can't use copy & paste on my raspberry (remote Desktop).

    Did this configuration work on your System?
    Are you sure, that my configuration is ok? (with the "--")
    Whats the normal behavior when i start the mysGateway with debug (mysGateway -d)? If i type the starting command in the terminal, the Gateway gives me the Messages (from my last post) and thats it (not more). I can now type a new command

    I'm now not at home (Business trip), if I get home, i will try your "Screen" command

    Announcements

  • CAN bus transport implementation for MYS
    H hausinger

    @napo7

    @napo7 said:

    @hausinger said:

    My idea besides of that is, that nodes can work without the bus. For examble the push button Switch can Switch the light, even when the bus is down. With mysensors this is not possible, because nodes have to register to the Gateway. Mysensors should be a "add on" for the nodes in my home, to control all on one place - openhab.

    The only way to handle this kind of problem, is to make device with INPUT and OUTPUT at the same time !
    You would then have to think of an intelligent way of handling what happens when the INPUT see events :
    Do you have to transmit it to the gateway, wait for a reply, and then fall back to a "fail" mode if the gateway doesn't reply after a delay ?
    Do you prefer handling the event simply by turning ON/OFF the output, and just inform the gateway of what happening ? this way, even if the bus is down, your device will continue to work... but you're loosing the benefits of having an intelligent controller/gateway that can make decisions...

    Hi @napo7
    Yes, i would prefer handling it direct on the nodes. Not only ON/OFF, also dimmer (1 short press on the push button - Light on (last value) + turn on power supply of the lamps (Relais=1), 1 short press on the push button - light off + turn power supply off of the lamps (Relais=0), 1 Long press on the bush putton - dimming). The Gateway (and Controller) should be able to do the same Thing, if the bus is ok. But if it fials, i could use it localy and so i'm not in a dark room.

    My Project

  • 💬 Building a Raspberry Pi Gateway
    H hausinger

    @marceloaqno said:

    @hausinger Have you checked if /dev/ttyUSB0 is receiving any data?

    Thank you for your answer. I don't know, how to check that? The wiring to my nodes is correct, the serial port is correct (dmesg says that).
    Could you confirm, that my configuration from my last post is correct?

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    H hausinger

    I wanted to use the mysGateway with a USB/RS485 converter.

    Here is my config: ./configure --my-gateway=ethernet --my-port=5003 --my-transport=rs485 --my-rs485-serial-port=/dev/ttyUSB0 my-rs485-baudrate=57600

    make does it's job, but after i start the gateway it says:
    mysGateway: Starting gateway....
    mysGateway: Protocol version - 2.0.1-beta
    mysGateway: MCO:BGN:INIT GW,CP=RSNG---,VER=2.0.1-beta
    mysGateway: TSM:INIT
    mysGateway: TSM:INIT:TSP OK
    mysGateway: TSM:INIT: GW Mode
    mysGateway: TSM:READY

    after that it stopped to work.

    Whats wrong in my configuration?

    Announcements

  • CAN bus transport implementation for MYS
    H hausinger

    @kimot
    thank you for your answers in this case.

    You think, the SN65HVD230 is better than the max485? Can I use the SN65HVD230 with mysensors and Transport class rs485 without changes in the code? If yes, how do I do with the "DE-Pin" ?

    I don't know, why you are using 3 Bus Systems at your home? Why not 1 Stable Bus?

    I want a stable bus for several things in my new home. PIR, Standard button Switch, Contacts (Window, Smoke), Dimmers, RGB Dimmers, Temperaturesensors, Relays should be my nodes. The Problem in this case is, that I want to use my nodes even when the bus have Errors.
    So if you seperate the communication from sensors to Gateway (with your self made library, as you wrote here) and the Gateway communication with the Controller with the mysensors libs, that would be excactly what I'm locking for.

    My idea besides of that is, that nodes can work without the bus. For examble the push button Switch can Switch the light, even when the bus is down. With mysensors this is not possible, because nodes have to register to the Gateway. Mysensors should be a "add on" for the nodes in my home, to control all on one place - openhab.

    I also want to have a stable bus, because it would be very bad, when i press a push button and nothing happens (=is dark in the room), because the bus is busy. Sure it doesn't matter if a temp sensor can't transmit it's value to the Controller. But for Switch / PIR it is very important.

    My Project

  • CAN bus transport implementation for MYS
    H hausinger

    And this is, what I'm wrote there:

    I'm very interested in your development.
    What kind of can bus module are you using? I found 2 different modules for very less money. The very small module is called SN65HVD230 (controlled by serial rx, tx) and cost approximately 1,75$ from China. The other module with bigger size is called MCP2515 (controlled by spi) and cost approximately 1,26 $ from China. Both are very cheap.
    What is you currently status in this case?
    I'm planning to use it for my new house in some month.

    Thank you

    My Project

  • 💬 Building a Raspberry Pi Gateway
    H hausinger

    @b0rmann
    Do you still using the rs485 usb "dongle" to connect the rs485 nodes to the rpi? Do you attached some more nodes to your rs485 rpi Gateway?
    Is it stable?
    How do you do the configuration for it?

    Announcements
  • Login

  • Don't have an account? Register

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