Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Redguy
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by Redguy

    • RE: MODBUS master sensor node

      Hi Gohan..

      I hooked up my schneider PM9C power monitoring device through modbus to a mysensors node..

      Should be doable once you get the initial bus connection running..

      Although the familiar RS485 modules on aliexpress etc seem to function just fine when talking to each other, i noticed that it is a pain in the <censored> to get them to talk to a proper device. Especially the direction control screws everything up most of the time..

      things cleared up as soon as i started using a RS232 <-> RS485 converter with auto direction control.. Communicating with a single device is one thing, talking to a bus system connecting multiple devices is a whole different ballgame where propper bus termination etc. becomes important.

      Biggest problem is that you have to get the hardware for the connection right AND figure out the use of the lib etc.. The other part is having to figure out how your modbus devices present their data..

      Search for a good manual for your devices, specifying the various registers to read and write to, including their format etc. It's not that hard, but most devices wont respond at al unlessyou format things exactly right.

      So my advice is to split the steps to make sure each part functions on its own before trying to talk end to end.

      Use a program like modbuspoll or something and see if you can get the communication going using simple queries to a single HVAC unit using a simple usb converter (i used a little moxa converter). If that works, expand to talking to multiple on the full bus.

      Try reading single registers and setting simple things.

      if that all works well with the manual queries from modbuspoll or other software, transition to using your mysensors node and libs..

      Can you provide some more information about the device types you are using ?

      I

      posted in Hardware
      Redguy
      Redguy
    • RE: Schneider Electric WISERJLPM200

      I implemented this with a schneider PM9C using modbus which works fine

      Zigbee is just transport, shouldnt be to hard to translate.. You need the manual to see what data it provides, which i couldnt find online. The model you specified has been of the market for some years.

      posted in My Project
      Redguy
      Redguy
    • RE: Serial gateway using Arduino Mega, how to set what serial to use ?

      Tried ir, but no change.. Serial0 was still used while serial1was defined

      posted in Hardware
      Redguy
      Redguy
    • #define MY_RS485_HWSERIAL Serial2 doesnt work, softserial still used

      I amusing an Arduino mega as serial <-> RS485 gateway node..

      I first tested using the default softserial solutionfrom the examples,and this works fine..

      Then i added :
      #define MY_RS485_HWSERIAL Serial2

      So i could use serial2 as hardware serial for RS485. Which did not work. There was no activity on the tx of serial 2at all.

      After some switching between hard and softserial during testing it worked all of a sudden.. I thought.. Turned out i left the max485 to the softserial pins.

      So even when the hwserial is defined, the softserial is still used!?!?

      Is this something anybody else noticed as well?

      posted in Bug Reports
      Redguy
      Redguy
    • RE: rs485 on nano

      Also keepin mind that those cheap rs485 adapters have a 120ohm load resistor and pull up and pulldown resistors installed for the rs485 bus..

      Those should only ve installed on the ends of the data bus.. So remove them from the rest of the adapters if you use more than 2.

      posted in General Discussion
      Redguy
      Redguy
    • RE: rs485 on nano

      No, connecting ground is not mandatory.. In fact, i would not recommend it at all, especialy not on longer bus lengts.. Just use A&B

      If you have shielded cables.. Connect the shielding to gnd on 1 side only and leave the other side unconnected..

      This will provide shielding but prevent ground loop issues.

      posted in General Discussion
      Redguy
      Redguy
    • RE: Serial gateway using Arduino Mega, how to set what serial to use ?

      Ah that My_Serialdevice setting is something i completely missed..will test that this weekend..

      i am fine with the debug going to the usb port.. it's just that i can leave the usb to my pc for programming and debugging while another serial is connected to the raspberry pi running domoticz for the mysensors gateway part.

      posted in Hardware
      Redguy
      Redguy
    • RE: 💬 2 channel in wall dimmer

      Looks great !

      Have you measured what the minimum load is for the dimmer to function correctly ? I currently use X10 in wall modules but run in to trouble when switching to LED lights. The load is too small.

      posted in OpenHardware.io
      Redguy
      Redguy
    • RE: Requesting a garage door sensor type.

      Old topic but still..

      A variable to specify the position of a door would be handy in my opinion. The V_TRIPPED variable of a door sensor just states Closed or Not Closed. But for bigger and mechanical doors like garage doors there is quite a big step between fully open and closed..

      posted in Feature Requests
      Redguy
      Redguy
    • Add variable for door position to S_DOOR

      The current S_DOOR sensor type for door/windows sensors only has variables to indicate is the door sensor is tripped and to see if it is armed or not.

      Please add a variable to indicate the door position (aka, how far a garage door is opened in % of distance)
      The V_LEVEL and V_DISTANCE variables are already defined.

      posted in Feature Requests
      Redguy
      Redguy
    • Add V_PRESSURE variable for Pressure to S_WATER type.

      The S_WATER sensor type only defines V_FLOW and V_VOLUME to measure water usage.

      Please add the existing V_PRESSURE variable (only used for S_BARO) so water pressure measurements are included for the S_WATER type.

      posted in Feature Requests
      Redguy
      Redguy
    • Add variables for voltage, current, frequency, power factor sector and support for 3-phase systems to S-POWER Type

      I an currently implementing a My Sensors imlementation that reads measurements from a Schneider PM9C Energy monitoring device through Modbus and feeds those measurements into the MySensors network.. This is quite a nice device to use but a lot of measurement have not been implemented in the sensor types provided in the MySensors library.

      The S-POWER type (type 13), meant to be used for this kind of devices only supports the V_WATT, V_KWH, V_VAR, V_VA, V_POWER_FACTOR variables. I can add the measured Voltages and Currents by using the S_MULTIMETER type, but still. I think many power meters out there support a lot more then just the pure power readings.

      The PM9C for instance provides me with :

      • Current measurements for each Phase and the Neutral line
      • Voltage measurement between the 3 Phases and for each Phase against Neutral
      • Frequency
      • Total and per Phase Active power
      • Total and per Phase Reactive power
      • Total Apparent power
      • Power factor
      • Power factor sector
      • Power demand
      • Maximum power demand
      • Operating time counter
      • Active and Reactive total energy counter

      Sure i can use custom values for this, but it would mean defining 3 devices types for this one powermeter.

      I suggest adding the existing V_VOLTAGE, V_CURRENT variables to the S-POWERMETER type, and add new variable types for V_FREQUENCY, V_POWER_FACTOR_SECTOR, V_POWER_DEMAND

      posted in Feature Requests
      Redguy
      Redguy
    • RE: Error : request for member 'set' in 'Phase1_Voltage', which is of non-class type 'float'

      Thanks Yveaux,

      This led to a whole new range over errors : call of overloaded 'set(float)' is ambiguous

      I resolved the issue by changing the send command from :

       send(Phase1_Current.set(m_Phase1_Current));
      

      to

        send(Phase2_Current.set((float)m_Phase2_Current,1));
      

      Which is working fine now.

      posted in Troubleshooting
      Redguy
      Redguy
    • Error : request for member 'set' in 'Phase1_Voltage', which is of non-class type 'float'

      I am building a MySensors serial <->RS485 node, which also has to read out a modbus enable energy monitoring device (Schneider PM9C).
      The modbus part is working great, so now i am trying to send the measured values as MySensors data so i can pick them up with Domoticz.

      My code at the moment :

      #define MY_GATEWAY_SERIAL               // Enable serial gateway mode
      #define MY_RS485                         // Enable RS485 transport layer
      #define MY_RS485_HWSERIAL Serial2       // Set serial interface to use for RS-485
      #define MY_RS485_BAUD_RATE 9600         // Set RS485 baud rate to use
      #define MY_RS485_DE_PIN 2               // Define this to enables DE-pin management on defined pin
      
      #include <MySensors.h>
      #include <ModbusMaster.h>
      
      #define CHILD_ID_Phase1_Current         11
      #define CHILD_ID_Phase2_Current         12
      #define CHILD_ID_Phase3_Current         13
      #define CHILD_ID_Neutral_Current        14
      #define CHILD_ID_Phase12_Voltage        21
      #define CHILD_ID_Phase23_Voltage        22
      #define CHILD_ID_Phase31_Voltage        23
      #define CHILD_ID_Phase1_Voltage         24
      #define CHILD_ID_Phase2_Voltage         25
      #define CHILD_ID_Phase3_Voltage         26
      #define CHILD_ID_Frequency              30
      #define CHILD_ID_Total_Active_Power     41
      #define CHILD_ID_Total_Reactive_Power   42
      #define CHILD_ID_Total_Apparant_Power   43
      #define CHILD_ID_Total_Power_Factor     44
      #define CHILD_ID_Power_Factor_Sector    45
      #define CHILD_ID_Power_Demand           50
      #define CHILD_ID_Max_Power_Demand       51
      #define CHILD_ID_Phase1_Active_Power    60
      #define CHILD_ID_Phase1_Reactive_Power  61
      #define CHILD_ID_Phase2_Active_Power    62
      #define CHILD_ID_Phase2_Reactive_Power  63
      #define CHILD_ID_Phase3_Active_Power    64
      #define CHILD_ID_Phase3_Reactive_Power  65
      
      ModbusMaster node;                         // Initiate ModbusMaster object
      
      MyMessage Phase1_Current        (CHILD_ID_Phase1_Current,V_CURRENT);
      MyMessage Phase2_Current        (CHILD_ID_Phase2_Current, V_CURRENT);
      MyMessage Phase3_Current        (CHILD_ID_Phase3_Current, V_CURRENT);
      MyMessage Neutral_Current       (CHILD_ID_Neutral_Current, V_CURRENT);
      MyMessage Phase12_Voltage       (CHILD_ID_Phase12_Voltage, V_VOLTAGE);
      MyMessage Phase23_Voltage       (CHILD_ID_Phase23_Voltage, V_VOLTAGE);
      MyMessage Phase31_Voltage       (CHILD_ID_Phase31_Voltage, V_VOLTAGE);
      MyMessage Phase1_Voltage        (CHILD_ID_Phase1_Voltage, V_VOLTAGE);
      MyMessage Phase2_Voltage        (CHILD_ID_Phase2_Voltage, V_VOLTAGE);
      MyMessage Phase3_Voltage        (CHILD_ID_Phase3_Voltage, V_VOLTAGE);
      MyMessage Total_Active_Power    (CHILD_ID_Total_Active_Power, V_WATT);
      MyMessage Total_Reactive_Power  (CHILD_ID_Total_Reactive_Power, V_VAR);
      MyMessage Total_Apparant_Power  (CHILD_ID_Total_Apparant_Power, V_VA);
      MyMessage Total_Power_Factor    (CHILD_ID_Total_Power_Factor, V_POWER_FACTOR);
      MyMessage Phase1_Active_Power   (CHILD_ID_Phase1_Reactive_Power, V_WATT);
      MyMessage Phase1_Reactive_Power (CHILD_ID_Phase1_Reactive_Power, V_VAR);
      MyMessage Phase2_Active_Power   (CHILD_ID_Phase1_Reactive_Power, V_WATT);
      MyMessage Phase2_Reactive_Power (CHILD_ID_Phase1_Reactive_Power, V_VAR);
      MyMessage Phase3_Active_Power   (CHILD_ID_Phase1_Reactive_Power, V_WATT);
      MyMessage Phase3_Reactive_Power (CHILD_ID_Phase1_Reactive_Power, V_VAR);
      
      // Functions to restore measured values after modbus tranfer (The PM9C sends it's 32-bit signed and unsigned measurements as 2 16-bit words, the divider is to scale to the corrent unit)
      
      float UnsignedValue (int reg, int divider) {
        unsigned long msb = node.getResponseBuffer(reg);
        msb = msb << 16;
        unsigned int  lsb = node.getResponseBuffer(reg + 1);
        unsigned long total = msb | lsb;
        float result = float (total) / divider;
        return result;
      }
      
      float SignedValue (int reg, int divider) {
        signed long msb = node.getResponseBuffer(reg);
        msb = msb << 16;
        unsigned int  lsb = node.getResponseBuffer(reg + 1);
        signed long total = msb | lsb;
        float result = float (total) / divider;
        return result;
      }
      
      
      void setup()
      {
        Serial3.begin (19200, SERIAL_8N1);       // Use Serial 3 for Modbus RTU @ 19200 8N1 using Moxa RS232<->RS485 converter (Auto direction control)
        node.begin(1, Serial3);                  // Communicate with Modbus slave ID 1
      }
      
      
      void presentation()
      {
        sendSketchInfo("RS485 gateway with Modbus", "0.1");
      
        present(CHILD_ID_Phase1_Current, S_MULTIMETER);
        present(CHILD_ID_Phase2_Current, S_MULTIMETER);
        present(CHILD_ID_Phase3_Current, S_MULTIMETER);
        present(CHILD_ID_Neutral_Current, S_MULTIMETER);
        present(CHILD_ID_Phase12_Voltage, S_MULTIMETER);
        present(CHILD_ID_Phase23_Voltage, S_MULTIMETER);
        present(CHILD_ID_Phase31_Voltage, S_MULTIMETER);
        present(CHILD_ID_Phase1_Voltage, S_MULTIMETER);
        present(CHILD_ID_Phase2_Voltage, S_MULTIMETER);
        present(CHILD_ID_Phase3_Voltage, S_MULTIMETER);
        present(CHILD_ID_Total_Active_Power, S_POWER);
        present(CHILD_ID_Total_Reactive_Power, S_POWER);
        present(CHILD_ID_Total_Apparant_Power, S_POWER);
        present(CHILD_ID_Total_Power_Factor, S_POWER);
        present(CHILD_ID_Phase1_Active_Power, S_POWER);
        present(CHILD_ID_Phase1_Reactive_Power, S_POWER);
        present(CHILD_ID_Phase2_Active_Power, S_POWER);
        present(CHILD_ID_Phase2_Reactive_Power, S_POWER);
        present(CHILD_ID_Phase3_Active_Power, S_POWER);
        present(CHILD_ID_Phase3_Reactive_Power, S_POWER);
      }
      
      void loop()
      {
          node.readHoldingRegisters(0x3E8, 56);
      
          float Phase1_Current        = UnsignedValue (0, 1000);
          float Phase2_Current        = UnsignedValue (2, 1000);
          float Phase3_Current        = UnsignedValue (4, 1000);
          float Neutral_Current       = UnsignedValue (6, 1000);
          float Phase12_Voltage       = UnsignedValue (8, 1000);
          float Phase23_Voltage       = UnsignedValue (10, 1000);
          float Phase31_Voltage       = UnsignedValue (12, 1000);
          float Phase1_Voltage        = UnsignedValue (14, 1000);
          float Phase2_Voltage        = UnsignedValue (16, 1000);
          float Phase3_Voltage        = UnsignedValue (18, 1000);
          float Total_Active_Power    = UnsignedValue (22, 100);
          float Total_Reactive_Power  =   SignedValue (24, 100);
          float Total_Apparant_Power  = UnsignedValue (26, 100);
          float Total_Power_Factor    =   SignedValue (28, 100);
          float Phase1_Active_Power   =   SignedValue (44, 100);
          float Phase2_Active_Power   =   SignedValue (46, 100);
          float Phase3_Active_Power   =   SignedValue (48, 100);
          float Phase1_Reactive_Power =   SignedValue (50, 100);
          float Phase2_Reactive_Power =   SignedValue (52, 100);
          float Phase3_Reactive_Power =   SignedValue (54, 100);
        
          send(Phase1_Current.set(Phase1_Current));
          send(Phase2_Current.set(Phase1_Current));
          send(Phase3_Current.set(Phase1_Current));
          send(Neutral_Current.set(Phase1_Current));
          send(Phase1_Voltage.set(Phase1_Voltage));
          send(Phase2_Voltage.set(Phase1_Voltage));
          send(Phase3_Voltage.set(Phase1_Voltage));
          send(Total_Active_Power.set(Total_Active_Power));
      }
      
      

      I am only trying to send out a small subset of the available data, and i have not set up things like timing etc for the measurements yet, but i am stuck at the "send" part. The values created by the PM9C come in through modbus as 2 16-bit words. These are combined into 32-bit signed or unsigned longs which give the measured values, then converted to a float to be divided by a scaling factor to correct the measurements unit. The currents are given in mA, voltages in mV etc. These are brought back to A, V, kW etc.

      So my measurements are all float values. (some signed, most of them unsigned)

      Since the S_POWER type does not include voltage, currents etc, i have divided my data over both S_POWER and S_MULTIMETER types.
      But this won't fly.. If i compile the code to check for errors, it produces numerous issues :

      Arduino: 1.8.0 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
      
      Gateway-RS485andModBus.ino: In function 'void loop()':
      
      Gateway-RS485andModBus:157: error: request for member 'set' in 'Phase1_Current', which is of non-class type 'float'
         send(Phase1_Current.set(Phase1_Current));
                             ^
      
      Gateway-RS485andModBus:158: error: request for member 'set' in 'Phase2_Current', which is of non-class type 'float'
         send(Phase2_Current.set(Phase1_Current));
                             ^
      
      Gateway-RS485andModBus:159: error: request for member 'set' in 'Phase3_Current', which is of non-class type 'float'
         send(Phase3_Current.set(Phase1_Current));
                             ^
      
      Gateway-RS485andModBus:160: error: request for member 'set' in 'Neutral_Current', which is of non-class type 'float'
         send(Neutral_Current.set(Phase1_Current));
                              ^
      
      Gateway-RS485andModBus:161: error: request for member 'set' in 'Phase12_Voltage', which is of non-class type 'float'
         send(Phase12_Voltage.set(Phase12_Voltage));
                              ^
      
      Gateway-RS485andModBus:162: error: request for member 'set' in 'Phase23_Voltage', which is of non-class type 'float'
         send(Phase23_Voltage.set(Phase23_Voltage));
                              ^
      
      Gateway-RS485andModBus:163: error: request for member 'set' in 'Phase31_Voltage', which is of non-class type 'float'
         send(Phase31_Voltage.set(Phase31_Voltage));
                              ^
      
      Gateway-RS485andModBus:164: error: request for member 'set' in 'Phase1_Voltage', which is of non-class type 'float'
         send(Phase1_Voltage.set(Phase1_Voltage));
                             ^
      
      Gateway-RS485andModBus:165: error: request for member 'set' in 'Phase2_Voltage', which is of non-class type 'float'
         send(Phase2_Voltage.set(Phase1_Voltage));
                             ^
      
      Gateway-RS485andModBus:166: error: request for member 'set' in 'Phase3_Voltage', which is of non-class type 'float'
         send(Phase3_Voltage.set(Phase1_Voltage));
                             ^
      
      Gateway-RS485andModBus:167: error: request for member 'set' in 'Total_Active_Power', which is of non-class type 'float'
         send(Total_Active_Power.set(Total_Active_Power));
                                 ^
      

      What am i doing wrong here ? Is the mysensors lib unable to handle floats as data ? did i forget something ? made a major f<censored>up ?

      posted in Troubleshooting
      Redguy
      Redguy
    • OTA Programming over wire ? :-) (RS-485)

      Just started with MySensors and am reading up while playing about.. The OTA programming feature looks great ! But, most of my nodes will be connected over an RS485 bus since that is already in place.

      Can you use the OTA feature while using RS485 between gateway en nodes ?

      posted in Development
      Redguy
      Redguy
    • RE: Multiple gateways : Node ID unique per gateway or overall ?

      Thanks guys !

      Since i am using Domoticz, i'll stick to unique ID's overall.. That would mean that you cannot use the "auto" setting for ID's if you are using multiple mysensors gateways with Domoticz at all..

      posted in General Discussion
      Redguy
      Redguy
    • RE: Vibration measurement sensor for mysensors node

      Thanx guys !

      I ordered a ADXL345 digital three-axis acceleration of gravity tilt module on ali to see what this will do with such small measurements.

      stumbled upon this via one of Wallyllama's links :

      https://tc1seismometer.wordpress.com/2012/06/18/tc1-vertical-seismometer-plans/

      Seems easy enough to have some fun with as well.

      posted in Hardware
      Redguy
      Redguy
    • Multiple gateways : Node ID unique per gateway or overall ?

      I am building a mysensors setup in which I plan to use multiple gateways (1 for RF, 1 for RS485)..

      How doe Mysensors handle node ID's ? Should these by unique per gateway or overall ?

      My guess would be per gateway since these are pretty much stand alone on the my sensors level, but wont this cause issues to the controller software running above it ? (I am using Domoticz)

      posted in General Discussion
      Redguy
      Redguy
    • Vibration measurement sensor for mysensors node

      I am looking for a way to monitor shocks and vibrations using a mysensors node.

      There are plenty of vibration sensors et, but they just signal that a certain threshhold was reached or not.

      what i want to do is monitor shocks and trembling throughout my apartment building caused by either external causes (passing train, earth shocks) or through the building itself (weather, other tenants, the elevators, thermal expansion of the concrete)

      but i am not sure what type of sensor i should use.. any thoughts ?

      posted in Hardware
      Redguy
      Redguy
    • RE: Multiple gateways on RPI3

      So first i pull the mysensors code from github to my raspberry pi.

      For running a mysensors gateway node on my raspberry pi using RS485 for transport i would then set it up with 👍
      ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySGW1 --my-transport=rs485 --my-rs485-serial-port=/dev/ttySC0 --my-rs485-baudrate=19200 --my-rs485-de-pin=23

      Then make and make install that gateway and voila..

      I can do the same for an RF based gateway running on the raspberry pi itself using a directly connected NRF module, which would recreate the mysensors files and install those. Which means i have either the RS485 or the RF gateway. Not both at the same time.

      My point is, how to set this up properly so i can compile 2 mysensors gateway instances on the same raspberry pi and run them at the same time. 1 for RF and one using RS485 ???

      posted in Hardware
      Redguy
      Redguy
    • RE: Multiple gateways on RPI3

      I understood that so far.. my problem is how to set this up to run on the raspi itself..

      i can configure a gateway to work with the nrf and compile that.. but how to setup the second one ? copy the mysensors code to a separate directory and compile it to a new name ?

      posted in Hardware
      Redguy
      Redguy
    • RE: Serial gateway using Arduino Mega, how to set what serial to use ?

      Realy ? nobody ?

      posted in Hardware
      Redguy
      Redguy
    • Serial gateway using Arduino Mega, how to set what serial to use ?

      I am trying to build a serial <-> RS485 gateway using an Arduino Mega 2560 R3.

      I would like to use the Mega's 4 hardware serial interfaces as follows :

      Serial0 -> debug output (and programming) - This is the USB serial
      Serial1 -> Serial interface of the gateway to the Domoticz Controller
      Serial2 -> RS485 MySensors bus interface to the sensors nodes (using a MAX485 with direction connected to D2)

      Digging through the various library files and examples, I have found settings to configure the hardware serial to use for the RS485 interface : #define MY_RS485_HWSERIAL Serial2

      The setting does not turn green in the arduini IDE like the other defines, but it seems to be accepted if I try to compile the sketch.

      Until however, I have not bee able to find how I can setup the use of hardware serial 0 for debug output and hardware serial 1 as RS232 side of the serial gateway.

      Is this even possible ?

      Current settings so far :

      
      #define MY_GATEWAY_SERIAL                 // Enable serial gateway
      #define MY_BAUD_RATE 115200               // Set RS232 baud rate to Controller
      
      #define MY_DEBUG                                     // Enable debug prints to serial monitor
      
      #define MY_RS485                                            // Enable RS485 transport layer
      #define MY_RS485_HWSERIAL Serial2         // Use hardware serial port 2 for RS485
      #define MY_RS485_DE_PIN 2                         // Use D2 as DE-pin for RS485 
      #define MY_RS485_BAUD_RATE 9600         // Set RS485 baud rate to use
      
      
      #define MY_LEDS_BLINKING_FEATURE          // Flash leds on rx/tx/err
      #define MY_DEFAULT_LED_BLINK_PERIOD 300   // Set blinking period
      #define MY_DEFAULT_RX_LED_PIN  4  // Receive led pin
      #define MY_DEFAULT_TX_LED_PIN  5  // the PCB, on board LED
      #define MY_DEFAULT_ERR_LED_PIN 6  // Error led pin
      
      #include <MySensors.h>  
      
      
      posted in Hardware
      Redguy
      Redguy
    • RE: Arduino + RS-485 + Ethernet + Radio

      I have just started using mysensors myself but the shared D10 pin you mention is an issue for sure..

      Both the ethernet module and the RFM radio use an SPI connection to communicate. The SPI bus can be shared between multiple devices is you want (MOSI,MISO, SCK), and do so based on a separate signal "Chip Select" Each device sharing the SPI bus need to have their own dedicated CS signal to know if it is their turn to use their shared SPI bus.

      In you proposal however, software based SPI is used ,so both of your devices have their own data pins.. But they still need their own dedicated CS signal. Which is the signal you intend to share.. that wont work,.

      Also, I have been asking around if you can create a combined gateway node for both wireless (NRF/RFM based) and wired (RS485 based) communication.. From what I gather, it is not possible to combine these functions. 2 separate gateway nodes are needed.

      posted in Hardware
      Redguy
      Redguy
    • Multiple gateways on RPI3

      I want to setup a mysensors network to use with domoticz. I run domoticz on a Rpi3.

      My old sensor network runs on i2c and 1-wire, which i wish to convert to a MySensors network using RS485 between the nodes. New nodes will be connected by RF using NRF modules.

      I have read the wiki which specifies how to connect the nrf module directly to the raspberry pi and how to compile the MySensors gateway code for this. For RS485 however, the wiki only talks about using a serial gateway node with an arduino.

      My questions are :

      • Can i create a RS485 gateway on the RPI3 using it's serial port + a RS485 transceiver like the max485 ?

      • How do i compile and run the Mysensors gateway software on the raspberry to enable both the RS485 and NRF gateway functions ?

      • Will domoticz accept this setup ?

      posted in Hardware
      Redguy
      Redguy
    • RS485 bus voltage ?? Can you mix nodes using 3/3v and 5v transceivers ?

      I am working on setting up a my sensors network consisting of both wired (using RS485) and wireless (NRF or ESP) nodes..

      I just added a sc16is752 to my RPI3 for some much needed additional serial interfaces and am now looking at using those interfaces for RS485. 1 for the RS485 my sensors bus and the other as a modbus interace to mu power monitoring device.

      I grabbed a max485, realized it's a 5v device.. and then it hit me..

      I can either use a level converter or look for a 3.3v rs485 transceiver.. no issue there, that's only local.. But the rs485 bus is meant for many devices..

      What about the rs485 bus voltage ? it has no pull-ups, only the 120ohm terminators on both sides.. but what voltage does it use ?

      Can you run a rs485 bus between devices equiped with rs485 transceiver using a mixed supply voltage of 3.3v and 5v ?

      posted in General Discussion
      Redguy
      Redguy
    • Arduino Micro suitable for use as MySensors node ?

      I have a few unused Arduino Micro (small leonardo version) in my parts bin. After reading up on it i found out that these use the ATmega32U4 proc which seems to be a bit more powerful that the 328, but the specs also mention that the CPU has a direct USB Uart that it uses for programming, connection to the pc etc as well a a "regular" hardware uart that can be used for other things..

      To me that sounded like a great solution. These boards are very small, hardly bigger than a Pro Mini, but could do without the need for a software uart for RS485 etc. The usb uart can handle the programming and debugging output while the regular uart is available for the RS485 comms to the sensor network etc.

      Can i use the Micro as a MySensors node or gateway ? Are they compatible ? including the USB uart ?

      posted in Hardware
      Redguy
      Redguy
    • Mysensors node to poll Modbus device ?

      I have a Schneider power monitoring devices providing me with lots of data through a MODBUS RTU interface.

      Domoticz has no support for Modbus, so my option would be to try to get the data out of the power monitor using some modbus library on the pi and insert that into domoticz through scripts. Which i have not been able to get working yet 😞

      Since i am planning to switch from using 1-wire and i2c devices connected directly to my raspi through OWFS and scripting towards using MySensors, this got me thinking about the Modbus option as well.. The pi is low on serial connections, and the modbus libs are a pain in the <censored>. I have been able to extract all the wanted data using an arduino however !

      Would it be possible to create a mysensors node (or even better : add it to my gateway node since it's 10cm's away from the power monitor thing) that polls the power monitor through modbus, converts it to the desired data format and outputs it onto the mysensors network to be used in domoticz ?

      has anyone ever tried this ? or has any experience with this ?

      posted in Hardware
      Redguy
      Redguy
    • Serial gateway with NRF wireless + RS485 ??

      My "old" setup uses a wired sensor system with i2c and 1-Wire so most of my house is wired for sensors.

      My plan is to rebuild the sensor net using Mysensors nodes to read out the existing 1-Wire and i2c sensors and connect these nodes to my gateway/controller using the RS485 option since the wiring is already there.

      In addition to that, i would like to start adding new nodes and features using wireless nodes with the NRF radio on it.

      Can i create a gateway node that supports both of these options at the same time or do i have to setup separate gateways for that ?

      (i run domoticz)

      posted in Hardware
      Redguy
      Redguy