Getting started - a few specific questions



  • Sorry my first post is a collection of disparate questions, although I'm very inspired that MySensors.org is the exact place to come to tie all of my ideas together so here goes:

    I'm about to renovate my home. We are gutting the interior - blank slate, CAT6 can go anywhere and everywhere.

    So I'm trying to decide whether to hook up my nodes using the NRF24L01+ OR whether to go CAT6 on the basis that ... I can. And I think it will always be more secure / reliable. (Even though I don't doubt the security and reliability of RF...)

    I've speculatively purchased ethernet shields, nanos, a tonne of NRF24L01+ and a whole load of sensors.

    1/ First question. What are the considerations when choosing whether to go RF between a node and a gateway, or CAT6 between a node and an automation server? Will MySensor code available here work with both? Is it that generic / adaptable? Can the nodes themselves speak MQTT directly if I hook them up directly to the network? Or does this require a gateway?

    Or perhaps I should still go with the node-gateway architecture using MySensor code to make use of the adaptive nature of node detection, but still use CAT6 to connect nodes to the gateway? Is that a 'supported' scenario? (Sorry, the word "supported" is silly, but I just mean has anyone else done it!)

    2/ I'm in love with OpenHAB. Absolutely love it. It ties together so many other areas for me, because of the sheer amount of bindings that have been written.

    If I use RF between nodes and the Arduino gateway (as suggested on this site), can this gateway communicate over the network (using a network shield) with my OpenHAB server using MQTT? Does code exist to do this? I don't mind hacking existing code but I'm a bit nervous jumping straight in and trying to code MQTT to OpenHAB myself!

    3/ I guess most people here want to retro-fit their wireless sensors, therefore are happy working with battery powered Arduinos which sit directly next to sensors like the DHT22.

    I want to flush-mount ALL of my sensors, and never change a battery in a node. But I still want my nodes in an accessible place in case they malfunction. This means I want permanent installation of sensors into ceilings, but accessible nodes (e.g. wired into a cupboard in every room).

    What's the maximum length of cable I should use to connect the sensors to the nodes? I'm thinking CAT6 cable for e.g. 3 sensors in a ceiling back to a nano. Then another CAT6 to another sensor in a different place back to the same nano. Approximate distances of a given run would be 5-10m.

    I know it depends on the sensor, but does anyone have experience of situating the nodes away from the sensors like this?

    4/ I want to make a room audio control unit, using an Arduino subscriber of MQTT from to a publisher with binding on the OpenHAB server which is connected to Squeezebox. It will have a read-out of the current song on a display, and have a few buttons to trigger play, pause, next, and a rotary encoded for volume.

    Anyone done anything like that? Does there exist any code to do such things, perhaps again with a little hacking to get it working for my scenario?

    Sorry about the stupidly fragmented thread but hope to hear some answers here 🙂


  • Admin

    For the ethernet nodes you could run a mqtt client directly on the Arduino which talks publishes mqtt data to your OpenHAB installation. No need to mix MySensors radio library in that setup.

    http://knolleary.net/arduino-client-for-mqtt/


  • Hero Member

    @hazymat said:

    I'm about to renovate my home. We are gutting the interior - blank slate, CAT6 can go anywhere and everywhere.

    What an opportunity!

    So I'm trying to decide whether to hook up my nodes using the NRF24L01+ OR whether to go CAT6 on the basis that ... I can. And I think it will always be more secure / reliable. (Even though I don't doubt the security and reliability of RF...)

    The CAT6 sounds attractive. However, you have to anticipate all future needs if you use only CAT6 to fixed locations. It could turn out that you later want to supplement the wired network with some wireless nodes when you decide you'd like a sensor or actuator in a location you didn't anticipate or wire for.

    So it also depends on how easily you will be able to run additional wiring later. Some houses are easy, some are not.

    (I always thought that if I were redoing a house so thorougly, I'd try to build some kind of wiring channels behind a removable baseboard, but I never got close enough to investigate whether that would violate some codes).

    By the way, when you say CAT6, do you have in mind a specific network? Like some RS-422 based network stack that's supported by home automation software? Or are you thinking to use ethernet to every node?

    Or perhaps I should still go with the node-gateway architecture using MySensor code to make use of the adaptive nature of node detection, but still use CAT6 to connect nodes to the gateway? Is that a 'supported' scenario? (Sorry, the word "supported" is silly, but I just mean has anyone else done it!)

    I am not the one to say if somebody's done it, being fairly new here. I'm guessing not yet tho. But it sounds feasible in principle. A RS-422 bus could be treated much like the airwaves. You'd need some software layer which replaced the nRF library but had a similar interface, and which did the packetizing, addressing, CRC checking, ACKing and Resending. You could have comparable speeds.

    3/ I guess most people here want to retro-fit their wireless sensors, therefore are happy working with battery powered Arduinos which sit directly next to sensors like the DHT22.

    I want to flush-mount ALL of my sensors, and never change a battery in a node. But I still want my nodes in an accessible place in case they malfunction. This means I want permanent installation of sensors into ceilings, but accessible nodes (e.g. wired into a cupboard in every room).

    What's the maximum length of cable I should use to connect the sensors to the nodes?

    As you already know, it depends on the sensor. I seem to recall that the DHT-22 can use a pretty long cable (part of why it's so slow to read). And one wire sensors are good at this. An LDR light sensor should be OK with shielded wire (it's just resistance). But anything which used SPI or I2c or other clocked interfaces at higher speeds might be problematic. Why not ask about the specific sensors you are considering?


  • Hero Member

    @hazymat said:

    2/ I'm in love with OpenHAB. Absolutely love it. It ties together so many other areas for me, because of the sheer amount of bindings that have been written.

    If I use RF between nodes and the Arduino gateway (as suggested on this site), can this gateway communicate over the network (using a network shield) with my OpenHAB server using MQTT? Does code exist to do this? I don't mind hacking existing code but I'm a bit nervous jumping straight in and trying to code MQTT to OpenHAB myself!

    I am also in love with OpenHAB and use it for my home automation project. Like you I am just getting into this, but I have already decided to go the Wireless route. I am also planning to interface the sensors to openHAB using MQTT.

    I think there exists a MQTT client implementation for arduino, but I plan not to use it. Instead of buying an expensive ethernet shield for my Arduino I am planning to simply plug it into my server and connect to the virtual serial port. I will write a simple Python server that reads and writes serial messages to the Arduino to act as a gateway between this and my MQTT broker. If I can I will use the mysensors library (but replacing the radio library) but I might have to roll my own.

    By the way, do you have any clear ideas on how to create a switch with a MQTT binding in OpenHAB? I find the documentation a bit unclear, especially when it comes to transformations.



  • @hazymat said:

    What's the maximum length of cable I should use to connect the sensors to the nodes? I'm thinking CAT6 cable for e.g. 3 sensors in a ceiling back to a nano. Then another CAT6 to another sensor in a different place back to the same nano. Approximate distances of a given run would be 5-10m.

    At this moment i have DHT22 connected by about 12m long wires from ethernet cable, and it's work ok, but before this i tried to connect ds18b20 by 1-wire protocol directly to Raspberry Pi, and Domoticz, and it didn't work.


Log in to reply
 

Suggested Topics

  • 4
  • 17
  • 2
  • 8
  • 15
  • 4

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts