• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. zdabbas
    3. Posts

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 21
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by zdabbas

    • RE: Slow Response from BACNet Devices

      Dear Joel

      since my last post I did some experimenting and I discovered that the delay is actually from Mango.

      what I did was I have a DGBox that I had before, I disconnected Mango from the Bacnet MS/TP network and connected the DGBox, I also Disconnected the Johnson controller. the DGBox discovred the devices quickly, I added the devices and the speed was amazing, as soon as you turn on a datapoint it happens instantly.

      any thoughts on that.

      posted in Mango Automation general Discussion
      zdabbasZ
      zdabbas
    • RE: Mango connet with BACnet ms/tp device through PC RS-232 port

      Jack
      At this point the Johnson is doing the timing and helping with the discovery of the Backnet ms/tp units. my problem is that when I remove the Johnson controller from the network Mango is unable to control or send commands to them through bacnet ms/tp. my suspesion is that Mango MS/tp protocol is not able to give the right timing and speed of the serial to the units. but when the johnson put back in the network every runs fine.

      now I have a small delay in response time from the bacnet units the delay is between 4-9 sec and I'm suspecting the Johnson controller is causing it. since I have Bacnet TCP running with no problems I thought I would install a bacnet ms/tp to bacnet tcp converter and have the mango on the TCP side to see if the delay problem can be resolved.

      posted in Mango General
      zdabbasZ
      zdabbas
    • RE: Mango connet with BACnet ms/tp device through PC RS-232 port

      Hi

      I did have problems with Bacnet MS/TP, the only way I could do discovery or proper polling is through a Johnson controller or .
      But I have an idea that may work and will let you know soon, I'm going to get a Bacnet TCP to Bacnet MS/tp and try it that way.

      posted in Mango General
      zdabbasZ
      zdabbas
    • RE: ZWave

      I would be very interested in implementing Z-Wave on mango, any one can help?

      posted in Mango Automation general Discussion
      zdabbasZ
      zdabbas
    • RE: Slow Response from BACNet Devices

      Joel

      OK since my last post this is what I did.

      I checked all the devices for termination and made sure that all of them have no termination except the first and the last.

      I changed the USB->RS485 dongle and placed it on a different USB port that doesn't have any devices connected to it.

      the result is that the delay has dropped to 4-9 secs for response. (Still a bit long)
      the pooling error has Stopped
      the problem with the devices being seen by mango but not responding has stooped.

      discovery is still an issue. ( I really need help with that since I need to put a $1000 controller to see the devices)

      I need help with the delay.

      posted in Mango Automation general Discussion
      zdabbasZ
      zdabbas
    • RE: Slow Response from BACNet Devices

      this is what I got

      0_1469535326362_upload-09a8b9c7-16ae-4009-90fb-6fb9131a4bd6

      as for the other problem, it was suppose to fixed with the Bacnet module upgrade. but it wasn't>.

      posted in Mango Automation general Discussion
      zdabbasZ
      zdabbas
    • RE: Slow Response from BACNet Devices

      I have no idea where to find this matrix..

      having said that I increased the timeout on the Bacnet serial configuration and it seems to have solved it. I did find a mis-configuration on the devices and I solved it the delays are still there but a little lower now. I'm getting between 5 - 10 seconds delay between action and physical reaction.

      I still think that you should go into the server and see if I made any mistakes that is causing this problem.

      also the problem of device discovery still exists, the only way I can do discover is to put a Johnson controller on the serial network. I think it's a problem with devices they need to get the serial configuration from Mango, and Mango is not giving them that.

      posted in Mango Automation general Discussion
      zdabbasZ
      zdabbas
    • RE: Slow Response from BACNet Devices

      OK here is something new, I'm getting this error alot:

      Lights_Fire': Data source with xid: DS_Lights_FireCom3 and name: Lights_Fire, aborted 12 polls.

      and the number keeps increasing...

      any thoughts?

      posted in Mango Automation general Discussion
      zdabbasZ
      zdabbas
    • RE: Slow Response from BACNet Devices

      Hi Joel

      No errors when the devices stop responding. As I said Mango seems to think that the devices are responding I did however noticed that when you turn on / off relay a couple of times it sort of starts turning on and off erratically after a long delay.
      As for the thread pool I got the error a while back and I increased it to 1000.
      I have 12 devices each with 21 data points and all the data points are in the same data source.
      The pooling period is 1 second.

      posted in Mango Automation general Discussion
      zdabbasZ
      zdabbas
    • Slow Response from BACNet Devices

      Hi

      I have a Mango system that is growing with the specs are as follows:-

      • Xeon E3 1.6GHz Server with 20 GB RAM
      • Linux Centos 6.7 64 bit
      • Mango Enterprise
      • 6x USB to RS485 Dongles
      • 2x 1Gb Ethernet

      I'm using the following protocols:-

      • ModBus I/P
      • ModBus RTU Serial
      • BacNet I/P
      • BacNet MS/TP Serial

      as I built the system I was only using ModBus, then I introduced BacNet Devices to it, at first BacNet I/P then BacNet MS/TP, when I started using BacNet MS/TP problems started:-

      • first the BacNet device where not being discovered, I added a Johnson controller which solved the problem temporarily then an Upgrade for BacNet MS/TP was done by Mango but the problem still persists to this day, if I remove the Johnson Controller the devices stop working. when the upgrade was done I could do manual discovery but now I can't.
      • as I added more BacNet devices a delay started occurring, for example:- I have a device with Digital Input and Digital Output, I use a sensor connected to the DI for On/Off when it is On then DO is turned on by Mango when it is Off mango turns off DO. at first the delay was about 2-5 seconds which was acceptable at the beginning there were about 8 devices connected to the RS485 with less than 60 meters of cable (I used CAT6A shielded), as I added more devices the delay started to increase between sensing and turning on, now with 12 devices connected the delay is about 20-30 seconds.
      • another problem occurred when I added more devices to the system (14), every about 5 hours a strange thing happens, the devices are seen by Mango and I can control them through DGLux and Mango, but physically nothing happens. I can turn a relay on and off but the light stays either on or off depending on it's last state. the way to solve this is to turn off the Data source and then turn it on again, then things run again, but after 5 hours the same thing happens. the only way to fix it is to remove the 2 new devices.
        so I though OK I can add another RS485 and split the devices then it occurred to me that I cannot discover the devices unless I have a BacNet controller with them, which I don't have. and if I remove the Johnson controller and put it on the other network then I lose control on the first.

      I really need help with this issue, I can grant access to it so you can check things out.

      BR

      posted in Mango Automation general Discussion
      zdabbasZ
      zdabbas
    • RE: COnnecting mango to ext. DB for Verification

      Let me explain what the BACnet device is:-

      the BACnet device is a Beagle Bone Black with BACnet stack running on it, the card reader is a serial device connected to the BBB and the relays are on a cap on the BBB.

      the BBB is connected to Mango through TCP/IP each BBB is installed on one door and each one has an IP address.

      when configuring it on Mango it is configured as a Data Source using BACnet TCP/IP and the card reader, relays are data points on that data source.

      when I configure the BBB on Mango I give it a name (D001) and enter the IP Address and so on.

      Now the Oracle Database doesn't have the IP address of the unit. it only has the door number in this case D001. so when I want to see the authorization I present to the database the Card number and the door number (which is D001).

      to achieve this I need to present to the DB the name of the unit (that is found on the name of the Data source) and the card number that was read from it.

      I hope this explains things a bit more clearly,.

      posted in User help
      zdabbasZ
      zdabbas
    • RE: COnnecting mango to ext. DB for Verification

      Thank phil I will try this,

      as for the door number. on the BACnet unit the IP address is the door number, but in the Database the door number is in the format D001 (Dxxx), so I would need to convert the IP to a door number to present it to the database with the RFID number.

      is there an easy way of doing this?

      I was thinking that I can have a MySQL database with the IP address against the door numbers and have a script that generates a variable that will give the SSH data source the door number when it communicates with the database.

      or each unit will have it's name as the door number and we can take that into the SSH command is that a more viable solution, if so how can I add that to the SSH command?
      what do you think?

      posted in User help
      zdabbasZ
      zdabbas
    • RE: COnnecting mango to ext. DB for Verification

      Thank you Phil for the solution.

      But I have a few queries

      • I need to connect to an external Oracle DB not MySQL. where do I change these statements.
      • where do I read from the database (SQL Query) so I can see if the RFID key is Authorized or not.
      • I can't see anywhere the password for SSH where is that entered.(or is it the authorized key?
      • do I need the JDBC Driver?

      variables and Commands:-

      • Oracle DB server : 192.0.0.15

      • Command to enter SQL:: sqlplus <username>/<password>

      • Command for query: : select dac_door('<Card Number>','<Door Number>') from dual

      • <Card Number> is the RFID Number read by the BACnet unit

      • <Door Number> is a variable defined in Mango which changes the IP address of the BACNet unit to a Door Number e.g 172.50.0.20 = D201

      The query returns a Y or N on the SSH command line., (SQLplus prompt). based on this relay mango then activates or NOT the relay on the BACnet unit, and after five seconds it returns it to normal.

      I appreciate your help in advance.

      posted in User help
      zdabbasZ
      zdabbas
    • COnnecting mango to ext. DB for Verification

      Hello

      I have a situation I need your help with.

      I have several devices defined as data sources with data points defined as 2x RFID readers, a digital input and 2x digital output (relays). These are working no problem.

      What I need to do is as follows:

      • when someone swipes the RFID card Mango needs to access an Oracle DB (using JDBC or any other tool) verify that the RFID card number is authorized to access and then close one of the relays.
        I did do some reading on it and it seems to be done using the SQL data source. But how do I make sure that JDBC is installed and how do I read the data from the DB rather than only write it.

      The trigger for verifying the card number would be the change of value on the RFID data point I assume.

      So Basically I need Mango to verifying an incoming data point's value (the RFID card number) against a database, then performing a control action as a function of that.

      I'm in a bit of a dilemma need some help I'm totally lost with this.

      I really appreciate your help

      posted in User help
      zdabbasZ
      zdabbas
    • RE: Script for event timer deactivation in certain cond.

      Phil

      That last script worked like a charm.

      thank you for all your help my friend.

      posted in Scripting general Discussion
      zdabbasZ
      zdabbas
    • RE: Script for event timer deactivation in certain cond.

      OK if I put 0 then the script objects. if I put one or zero then I get and error.

      what to do?

      QQ is !sensor.value mean 0 or 1 ?

      the script ran and I got this error:

      'Garage Door Sensor':
      at line: 4, column: -1


      is this script ok

      var hour = (new Date()).getHours();
      var t = 1;
      var f = 0;
      if( hour == 7 && sensor.value == f )
      control.set( true );
      else if( hour == 22 && sensor.value == t )
      control.set( true );

      posted in Scripting general Discussion
      zdabbasZ
      zdabbas
    • RE: Script for event timer deactivation in certain cond.

      I did the === because the script objected to it. I fixed it now as follows, the words 'zero and one' are configured in the datapoint itself.:-

      var hour = (new Date()).getHours();
      if( hour == 7 && sensor.value == zero )
      control.set( true );
      else if( hour == 22 && sensor.value == one )
      control.set( true );

      now I did the time as you suggested. will test it and see how it goes..

      FYI although I did a log level of info, I'm not getting any log entries at all for the script.

      posted in Scripting general Discussion
      zdabbasZ
      zdabbas
    • RE: Script for event timer deactivation in certain cond.

      OK I did and tested, the script is not being triggered on either time, I took out the leading zero but cron gave me an error., here is a screenshot of the script.Door Sensor.jpg

      Any suggestions?

      posted in Scripting general Discussion
      zdabbasZ
      zdabbas
    • RE: Script for event timer deactivation in certain cond.

      Thanks for the reply. But I have a question the cron time I use is as follows:-

      to close door active = 0 00 22 ? * SUN-THU
      to open door active = 0 00 07 ? * SUN-THU

      Friday and Saturday door is on Manual operation only.

      how can I implement this in the script.

      and also !sensor.value is this a variable? the Variable for the Relay Data point "Board 2 - Relay 8" where does that go in the script?

      ok I tried to wrap my head around it. your script is treating the relay as on off when in fact it's a toggle because I have another script running that keep checking the relay, if it is true then it returns it to false.

      so :

      • if sensor value is 0 (zero) at 0700 then the script should turn the relay to true, but if it is 1 (one) then it will not send any commands to the relay, because the door is open,
      • if sensor value is 1 (one) at 2200 then the script should turn the relay to true, but if it is 0 (zero) then it will not send any commands to the relay because the door is close.

      I set in the data source the following:-

      Cron pattern = 0 00 07,22 ? * SUN-THU
      Variable control = Board 2 - Relay 8
      Variable sensor = tM-P3R3 - Garage Door Sensor

      var hour = (new Date()).getHours();
      if( hour == 7 && !sensor.value ) <-- Where do you get the sensor value (0 or 1) is the "!" trigger???
      control.set( true );
      else if( hour == 22 && sensor.value )
      control.set( true );

      I hope this is logical?

      forgive me, I'm a total noob with scripts.

      posted in Scripting general Discussion
      zdabbasZ
      zdabbas