stën

    • Login
    • Search
    • Back to Blog
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. exile
    3. Posts
    E
    • Profile
    • Following 0
    • Followers 0
    • Topics 12
    • Posts 17
    • Best 0
    • Controversial 0
    • Groups 1

    Posts made by exile

    • pylon

      Pylon dependency tree for maintainers

      For @pylonide scoped packages:

      graph LR pylon --> architect-build pylon --> dryice pylon --> jsdav pylon --> smith pylon --> treehugger pylon --> v8debug pylon --> vfs-architect pylon --> vfs-nodefs-adapter
      erDiagram pylon ||--|| architect-build : depends pylon ||--|| dryice : depends pylon ||--|| jsdav : depends pylon ||--|| smith : depends pylon ||--|| treehugger : depends pylon ||--|| v8debug : depends pylon ||--|| vfs-architect : depends pylon ||--|| vfs-nodefs-adapter : depends vfs-architect ||--|| vfs-local : depends vfs-architect ||--|| vfs-http-adapter : depends pylon { dependabot yes publish yes } architect-build { dependabot yes publish yes } dryice { dependabot yes publish yes } jsdav { dependabot yes publish yes } smith { dependabot yes publish yes } treehugger { dependabot yes publish yes } v8debug { dependabot yes publish yes } vfs-architect { dependabot yes publish yes } vfs-nodefs-adapter { dependabot yes publish yes } vfs-local { dependabot yes publish yes } vfs-http-adapter { dependabot yes publish yes }
      posted in Projects
      E
      exile
    • RE: pxbee-trigger

      Moving from Eagle to Fusion 360

      Migration video: https://www.youtube.com/watch?v=tClWJg8zxZc

      Benefits of the Fusion 360

      • F allows one schematic to reference multiple board layouts! e.g. TH vs SMD?
      posted in Projects
      E
      exile
    • zwave

      Should look into z-wave:

      https://www.mouser.ee/ProductDetail/Silicon-Labs/ACC-UZB3-E-STA

      Pros and cons

      posted in Projects
      E
      exile
    • RE: pxbee-trigger

      Apparently the 24VAC to DC circuit does not work correctly because the DC/DC conversion to 3.3V doesn't seem to properly work. Is the full bridge rectifier with wrong specs? https://rayshobby.net/wordpress/24vac-to-5vdc-conversion/

      Ok, some clarity is beginning to form around where I went wrong... ouch.

      Simulators

      • http://lushprojects.com/circuitjs/circuitjs.html
      • http://www.spectrum-soft.com/download/download.shtm

      Signal strength

      RSSI - Receiver Signal Strength Indication
      LQI - Link Quality Index

      EDGE interrupt for HIGH and LOW (gpio.c):

      #ifdef KBI1PE_KBIPE3_XPIN
      #ifdef KBI1PE_KBIPE3_XPIN /* XPIN_19 */
      		if (irqcandidate & 0x08) {
      			if (kbimod1_reg & 0x08) {
      				KBI1ES_KBEDG3 = !KBI1ES_KBEDG3;
      				if (~(kbi1_val ^ kbiedg1_reg) & 0x08)
      				if (~(kbi1_val ^ kbiedg1_reg) & 0x08) {
      					/* Edge irq on active slope */
      					puts("IRQ EDGE: Active slope");
      					gpio_irq_handler_KBI1PE_KBIPE3_XPIN();
      				}
      				else {
      				  puts("IRQ EDGE: Inactive slope");
      				}
      			} else {
      				gpio_irq_handler_KBI1PE_KBIPE3_XPIN();		/* Level irq */
      			}
      		}
      #endif
      
      posted in Projects
      E
      exile
    • RE: pxbee-trigger

      Useful Eagle commands:

      • grid mm
      • grid mil
      • run length
      • via 'gnd'
      • ratsnest
      • ripup @; - Changes routed wires back to airwires for all polygons (Usually GND plane)
      posted in Projects
      E
      exile
    • RE: pxbee-trigger

      4 channel relay circuit driven by pxbee-trigger

      BOM

      Component Manufacturer Quantity SKU / Part nr. Specification Option
      Programmable XBee (with RPSMA) Digi 1 XBP24CZ7SITB003 PDF
      Bridge Rectifier DF005M ON Semiconductor 1 Mouser No: 512-DF005M PDF
      DC/DC Isolated Converter Cosel MGFS1R5243R3 Cosel 1 Mouser No: 436-MGFS1R5243R3 PDF
      Bipolar Transistor BC548BTA ON Semiconductor 4 Mouser No: 512-BC548BTA PDF
      Diode 1N4004 ON Semiconductor 4 Mouser No: 863-1N4004RLG PDF
      General Purpose Relay (APAN3103) Panasonic 4 Mouser No: 769-APAN3103 PDF
      Resistor RN55D1801FB14 Vishay 4 Mouser No: 71-RN55D1801FB14 PDF
      10 pin header for XBee Harwin 2 Mouser No: 855-M22-7131042 PDF
      2 pin Terminal Block (PCB) Molex 1 Mouser No: 538-39501-1002 PDF A
      2 pin Terminal Plug Molex 1 Mouser No: 538-39500-0002 PDF A
      9 pin Terminal Block (PCB) Molex 1 Mouser No: 538-39501-1009 PDF A
      9 pin Terminal Plug Molex 1 Mouser No: 651-1908101 PDF A
      2 pin Fixed Terminal Block (PCB) Molex 1 Mouser No: 538-39357-0002 PDF B
      9 pin Fixed Terminal Block (PCB) Molex 1 Mouser No: 538-39357-0009 PDF B
      Antenna with RP-SMA Connector Linx Technologies 1 Mouser No: 712-ANT-2.4-CW-RAH PDF

      Standard 3.5 width headers are used. Option A) uses pluggable termination; 😎 Fixed screw termination; Components can be easily switched with other termination blocks or use direct wire soldering.

      Power consumption / characteristics

      • Relay 110mW
      • XBee ~ 400mW +14mA ~= 450mW
      • DI / DO 4mA with total of 40mA
      • Output 13mW @ 3.3V

      Switching transistor circuit

      The digital output pin power of XBee will be insufficient to drive the general purpose relay. A switching transistor circuit will be used to drive the relay.\(\raisebox{0.25em}{1}\)

      • \(V_s =\) Load Supply Voltage
      • \(R_L =\) Load Resistance (APAN03 Coil resistance)
      • \(I_c =\) Load Current \(= V_s / R_L\)
      • \(I_{IC} =\) Maximum Output current from Integrated Circuit - 4mA

      Due to the fact that the switched load consists a coil, a protection diode is required in the circuit.

      Transistor properties

      • Transistor's maximum collector current \(I_{c_{max}}\) must be greater than Load current:
      I_{c_{max}} > \frac{\text{Supply Voltage } V_s}{\text{Load Resistance } R_L}\Longrightarrow 100mA > \frac{3.3V}{82\Omega} \approxeq 40.24mA \Longrightarrow 100mA > 40.24mA \Longrightarrow \textcolor{#228B22}{OK!}
      
      • Transistor's minimum current gain \(h_{FE{min}}\) must be at least 5 times the load current \(I_c\) divided by the maximum output urrent from the Integrated Circuit:
      h_{FE{min}} > 5 \cdot \frac{I_c}{I_{IC}} \Longrightarrow 110 > 5 \cdot \frac{0.040243902}{0.004} \Longrightarrow 110 > 50.3048775 \Longrightarrow \textcolor{#228B22}{OK!}
      

      Resistor properties

      The transistor switch circuit relies on a single resistor which is sized as follows.

      R_B = 0.2 \cdot R_L \cdot h_{FE} \Longrightarrow0.2 \cdot 82 \cdot 110 = 1804 \Omega \Longrightarrow \textcolor{#228B22}{1k8}
      

      User interfaces - Door opener

      Altough the trigger hardware is generic to drive different use-cases, the userland should have more precise functionality. As main use case, the trigger will be used to drive swing and sliding gates.

      BFT Thalia P controller

      AUX 2 (Pins 24 & 25) - Free Contact; NO; Gate open light as default.

      Assumption is here, that when gate is closed, the contact remains open and closes when the gate is opened.

      For our project, it means that the STATUS GPIO acts as:

      • Closed state = GPIO pin = 1
      • Opened state = GPIO pin = 0

      SmartThings

      General reference

      Icon library reference: http://scripts.3dgo.net/smartthings/icons/

      Door opener DH

      SmartThings does not work nicely with different endpoints. A custom Device Handler (DH) must be written to have proper functioning tiles but operate as a single device:

      1. Main toggle switch (endpoint 0xEA, 0x0006)
      2. Open gate (endpoint 0xEB, cluster 0x0006)
      3. Close gate (endpoint 0xEC, cluster 0x0006)
      4. Open pedestrian (endpoint 0xED, cluster 0x0006)
      Binary Input Cluster (0x000F)

      On endpoints 0xEA and 0EB, a status indicator can be queried (XBee in 18 and Pin 19), default state is OPEN

      On state change send the: 0x0055 (Present value attribute), bool
      Report Attributes (0x0A) command to target cluster 0x0001

      Pin layout

      PIN Assignment Notes
      1 GND Common for Input pins
      2 STATUS_1 Input
      3 STATUS_2 Input
      4 COMMON 1 Relays 1 & 2
      5 ACT 1 Relay 1
      6 ACT 2 Relay 2
      7 COMMON 2 Relays 3 & 4
      8 ACT 3 Relay 3
      9 ACT 4 Relay 4

      References

      1: Transistor Circuits - https://electronicsclub.info/transistorcircuits.htm
      2: SmartThings Classic - ZigBee Reference - https://docs.smartthings.com/en/latest/ref-docs/zigbee-ref.html#zigbee-ref
      3: Undocumented SmartThings Classic ZigBee Reference - https://community.smartthings.com/t/zigbee-something-commands-reference/110615/5

      posted in Projects
      E
      exile
    • Goodbye Confluence

      Click here to see the full blog post

      posted in Announcements
      E
      exile
    • My 10+ years with a Mac

      Click here to see the full blog post

      posted in Announcements
      E
      exile
    • Welcome to Ghost

      Click here to see the full blog post

      posted in Announcements
      E
      exile
    • Programmable XBee in Linux/MacOS/*BSD

      Click here to see the full blog post

      posted in Announcements
      E
      exile
    • RE: Programmable XBee in Linux/MacOS/*BSD

      Hi @Hrithu-O.A !
      I've reached out to you via e-mail but also will cover some of your questions here in short form:

      I am working on a rather small project and setting up a programming module seems really intimidating.

      Yes, the Programmable XBee modules can be intimidating but they are merely a standard XBee radios with included HCS08 CPUs that can be programmed for different smaller tasks. Digi does expect you to buy a separate Dev-kit and only supports Windows as the development OS. My blog post is about showcasing that you don't really need that for smaller projects and that you can successfully interface with the module outside the Windows operating system.

      Can I add a programmable module to a network of unprogrammable modules? Will it be compatible?

      Yes, and yes. The radios are fully compatible. The programmable XBees only have the extra application logic that you can have on the HCS08 CPU. The radio module runs exactly the same firmware as the non-programmable variants of the modules and have the exact same configuration options. You do need to have a XBee shield with a reset button to be able to access the bootloader of the module to successfully configure the XBee radio settings using XCTU.

      posted in Announcements
      E
      exile
    • pxbee-trigger

      Github Project

      The project uses Programmable XBee connected to a relay. When appropriate signal is received, the relay is operated for 125ms signaling the connected device to operate. To control this device through iPhone "Home" app the following full setup is used:

      graph LR iPhone --> Apple[Apple Servers] Apple --> Home[Home Router] Home --> AppleTV AppleTV -->RaspberryPi RaspberryPi --> XBee[XBee Coordinator] XBee --> XBee-Trigger

      Potentially with SmartThings:

      graph LR iPhone --> STServers[SmartThings Servers] STServers --> Home[Home Router] Home --> SmartThings SmartThings --> XBee-Trigger

      For the latter flow to work, the XBee-Trigger would need to operate as a standard ZigBee HA device so that it would successfully pair with SmartThings Hub. Some additional discovery work is needed to understand what is needed to make this work.

      posted in Projects
      E
      exile
    • xmodem

      Xmodem

      In order to upgrade XBee programmable modules over the air with node.js based tooling there is need for an Xmodem protocol implementation.

      Project home: https://github.com/exsilium/xmodem.js

      Protocol sequence for uploading

      • Sender == uploader
      • Receiver == downloader
      • Transfers are receiver driven!
      • All errors are retried 10 times.
      • The receiver has a 10-second timeout.
      • Variable length checksum depending on the transfer mode:
        • normal/classic/original: 1 byte
        • crc mode: 2 bytes

      WORK IN PROGRESS

      %% Xmodem normal transfer sequenceDiagram participant Sender participant Receiver loop every 3 sec Receiver-xSender: <NAK> end Sender->>Receiver: <SOH> 01 FE -data- <xx> Receiver->>Sender: <ACK> Sender->>Receiver: <SOH> 02 FD -data- <xx> Note right of Receiver: Data gets corrupted in transfer Receiver->>Sender: <NAK> Sender->>Receiver: <SOH> 02 FD -data- <xx> Receiver->>Sender: <ACK> Sender->>Receiver: <SOH> 03 FC -data- <xx> Receiver->>Sender: <ACK> Note left of Sender: <ACK> gets garbaged Sender->>Receiver: <SOH> 03 FC -data- <xx> Receiver->>Sender: <ACK> Sender->>Receiver: <EOT> Receiver->>Sender: <ACK>

      Questions

      • What is the frequency that the receiver sends out the NCG byte to start the transfer? - 3 seconds?

      Testing

      • The suite will have Mocha tests built in, some good documentation is available
      • https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Locally-in-a-Docker-Image
      posted in Projects
      E
      exile
    • nodebb-plugin-mermaid

      NodeBB-plugin-mermaid

      Project home: https://github.com/exsilium/nodebb-plugin-mermaid
      NodeBB community post: https://community.nodebb.org/topic/10568/nodebb-mermaid-parser-nodebb-plugin-mermaid

      Test samples

      Testing the samples from Mermaid demo page:

      graph TD;
          A-->B;
          A-->C;
          B-->D;
          C-->D;
      
      graph TD; A-->B; A-->C; B-->D; C-->D;
      %% Example diagram
      graph LR
          A[Square Rect] -- Link text --> B((Circle))
          A --> C(Round Rect)
          B --> D{Rhombus}
          C --> D
      
      %% Example diagram graph LR A[Square Rect] -- Link text --> B((Circle)) A --> C(Round Rect) B --> D{Rhombus} C --> D
      %% Sequence diagram code
      sequenceDiagram
          Alice ->> Bob: Hello Bob, how are you?
          Bob-->>John: How about you John?
          Bob--x Alice: I am good thanks!
          Bob-x John: I am good thanks!
          Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
      
          Bob-->Alice: Checking with John...
          Alice->John: Yes... John, how are you?
      
      %% Sequence diagram code sequenceDiagram Alice ->> Bob: Hello Bob, how are you? Bob-->>John: How about you John? Bob--x Alice: I am good thanks! Bob-x John: I am good thanks! Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row. Bob-->Alice: Checking with John... Alice->John: Yes... John, how are you?
      %% Sequence diagram code
      sequenceDiagram
          loop Daily query
              Alice->>Bob: Hello Bob, how are you?
              alt is sick
                  Bob->>Alice: Not so good :(
              else is well
                  Bob->>Alice: Feeling fresh like a daisy
              end
      
              opt Extra response
                  Bob->>Alice: Thanks for asking
              end
          end
      
      %% Sequence diagram code sequenceDiagram loop Daily query Alice->>Bob: Hello Bob, how are you? alt is sick Bob->>Alice: Not so good :( else is well Bob->>Alice: Feeling fresh like a daisy end opt Extra response Bob->>Alice: Thanks for asking end end
      %% Sequence diagram code
      sequenceDiagram
          participant Alice
          participant Bob
          Alice->>John: Hello John, how are you?
          loop Healthcheck
              John->>John: Fight against hypochondria
          end
          Note right of John: Rational thoughts<br/>prevail...
          John-->>Alice: Great!
          John->>Bob: How about you?
          Bob-->>John: Jolly good!
      
      %% Sequence diagram code sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? loop Healthcheck John->>John: Fight against hypochondria end Note right of John: Rational thoughts<br/>prevail... John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good!
      gantt
              dateFormat  YYYY-MM-DD
              title Adding GANTT diagram functionality to mermaid
              section A section
              Completed task            :done,    des1, 2014-01-06,2014-01-08
              Active task               :active,  des2, 2014-01-09, 3d
              Future task               :         des3, after des2, 5d
              Future task2               :         des4, after des3, 5d
              section Critical tasks
              Completed task in the critical line :crit, done, 2014-01-06,24h
              Implement parser and jison          :crit, done, after des1, 2d
              Create tests for parser             :crit, active, 3d
              Future task in critical line        :crit, 5d
              Create tests for renderer           :2d
              Add to mermaid                      :1d
      
      gantt dateFormat YYYY-MM-DD title Adding GANTT diagram functionality to mermaid section A section Completed task :done, des1, 2014-01-06,2014-01-08 Active task :active, des2, 2014-01-09, 3d Future task : des3, after des2, 5d Future task2 : des4, after des3, 5d section Critical tasks Completed task in the critical line :crit, done, 2014-01-06,24h Implement parser and jison :crit, done, after des1, 2d Create tests for parser :crit, active, 3d Future task in critical line :crit, 5d Create tests for renderer :2d Add to mermaid :1d
      posted in Projects
      E
      exile
    • MEGA in CLI mode

      Problem

      MEGAsync app is a GUI based solution for keeping local and remote storage in sync. There is a package called "megatools" that is available via default Ubuntu 16.04 LTS repo that provides command line utitilies to interact with MEGA. Among the tools is a command called megacopy, that can be used to move files to and from MEGA. Still, this utility does not provide two-way synchronization capability.

      The best solution at the moment is to use MEGAcmd which is built on top of the MEGA SDK.

      Installing MEGAcmd

      wget https://mega.nz/linux/MEGAsync/xUbuntu_16.04/amd64/megacmd-xUbuntu_16.04_amd64.deb
      sudo dpkg -i megacmd-xUbuntu_16.04_amd64.deb
      

      The output will be, most probably, about the missing dependencies - install them by running:

      sudo apt-get -f install
      

      Command from megacmd package: mega-cmd, run it to get into interactive MEGA shell. Then:

      login <e-mail> <password>
      sync localdir remotedir
      

      List current sync status:

      sync
      
      posted in Projects
      E
      exile
    • docker-unifi-video

      Unifi-Video

      Docker Build Status
      Docker Automated build
      Docker Pulls
      Docker Stars

      Instructions for use

      Getting docker

      • Download Docker from here; Install by dragging app to /Applications
      • (Optional) Right click on the whale in the top menu bar and select “Open Kitematic”, follow the download link and install the app to /Applications

      Unifi-Video installation

      Because /usr/local is reserved for Docker, the example demonstrates installation of Unifi Video in a manner where the Host Data Volume directories are located in ~/Applications/unifi-video. You can change this to your liking.

      NB! If you receive permission errors when executing commands, precede them with sudo

      • Create the ~/Applications/unifi-video directory
      • Run in Terminal: docker pull exsilium/unifi-video:v3.7.0
      `$ docker images
      REPOSITORY             TAG                 IMAGE ID            CREATED             SIZE
      exsilium/unifi-video   v3.7.0              1cbeb1e369da        44 minutes ago      869.9 MB
      
      • (Optional) Download\Save run.sh from here
      • Create the following host data directories under ~/Applications/unifi-video
        • mkdir mongodb
        • mkdir unifi-video
        • mkdir log
      • Review and edit run.sh to make sure the BASEDIR and IP are reflecting your setup. The default 0.0.0.0 binds the ports to all interfaces.
      • Execute ./run.sh to run the container or execute docker run with the appropriate parameters.
      `Checking for Host data volumes: MongoDB-OK | Unifi-Video-OK | Log-OK
      16eeb080627ac648804fd0f9e64dd4569680137989d46c388ea74afb59480440
      
      • You should be able to open the Unifi Video setup wizard using Chrome on https://<yourIP>:7443

      Camera provisioning

      By default, Docker provides network isolation and due to that the automatic discovery will not work. Directly access your camera IP and enter the host IP of your server where the unifi-video docker image is running.

      Upgrade from 3.x.x to 3.7.0

      NB! Always create a backup before trying to upgrade!
      NB! Upgrade scenarios over multiple versions have not been tested!

      • Stop the running container
      • Backup your Host Data Volumes (~/Applications/unifi-video)
      • Pull the latest image docker pull exsilium/unifi-video:v3.7.0
      • Rename the old container to something else than unifi-video. Refer to docker rename command
      • Update the run.sh to reflect the new version (v3.7.0)
      • Start the new image against the same Host Data Volumes by using run.sh or manually calling docker run with appropriate arguments.

      Need help?

      If you have questions, comments, concerns. Did you find something not working or if you just need help, please file a Github Issue and I'll do my best to help you.

      Please don't use Docker Hub comments section for reaching out!

      posted in Projects
      E
      exile
    • Welcome to your NodeBB!

      Welcome to your brand new NodeBB forum!

      This is what a topic and post looks like. As an administrator, you can edit the post's title and content.
      To customise your forum, go to the Administrator Control Panel. You can modify all aspects of your forum there, including installation of third-party plugins.

      Additional Resources

      • NodeBB Documentation
      • Community Support Forum
      • Project repository
      posted in General Discussion
      E
      exile