Navigation

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

    pansen

    @pansen

    Electrical engineer & coder

    19
    Reputation
    105
    Posts
    896
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    pansen Follow

    Best posts made by pansen

    • RE: ๐Ÿ’ฌ Building a Orange Pi Gateway

      @marceloaqno: ok so here are my conclusions:
      After going through the schematics of the OPi Plus2e I realized that the H3 has dedicated pins for NAND/eMMC, which is probably not the case for the H2+ in the OPi zero. They used the pins of SPI1 for a status LED and a "MUTE" net, which is not connected anywhere so at first I was like "wtf?"...
      So, the SPI0 is free for usage out of the box and the .fex does not need to be modified. Summed up:

      If the OPi to be used has "SPI0" in the GPIO header, no .fex modifications are necessary. CE and CN/CS/CSN pin can be chosen freely (?), I picked it like this:
      ce - gray - pa13 - PHYSICAL pin8 - LOGICAL pin13 (1-1)*32 + 13
      cn - blue - pa14 - PHYSICAL pin10 - LOGICAL pin14 (1-1)*32 + 14
      If another pin is chosen, the pin number can be calculated with that formula: (position of letter in alphabet - 1) * 32 + pin number (from: https://linux-sunxi.org/GPIO)
      The pinout of the connector can be found here: https://linux-sunxi.org/Xunlong_Orange_Pi_Plus_2E#Expansion_Port (SPI0 pins are PC0-PC2 or 19,21,23)
      After connecting the physical pins 8,10,19,21 and 23 to the nrf24 (and pin 1 for 3.3v), following command was sufficient to set up mysgw and get the nrf24 to respond:
      ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=13 --my-rf24-cs-pin=14

      posted in Announcements
      pansen
      pansen
    • RE: Can't link rfid node item

      The ID shouldn't matter..

      What is the lock item? Showing the status of the lock?

      Interesting that those get added to your files, for me the items that I add through Paper UI are not reflected in the folder structure, which is quite annoying...

      Checking https://www.mysensors.org/controller and https://www.mysensors.org/download/serial_api_20 it looks like the lock stuff should be fully supported by OH, weird. Did you ask in their forums? It's superactive actually...

      posted in OpenHAB
      pansen
      pansen
    • RE: ๐Ÿ’ฌ Building a Orange Pi Gateway

      @marceloaqno: I'm in the process of enabling SPI1 (and nrf24 subsequently) on the OPI Plus2e and it seems there are some hardware modifications necessary...I'd like to document on the way and when I am finished submit it somehow so it can be included here. Any suggestions for that?

      posted in Announcements
      pansen
      pansen
    • RE: Paying peanuts

      Good to know and good to hear. Have fun with your projects!

      posted in Hardware
      pansen
      pansen
    • RE: NRF24L01+ wie an ATtiny167 (Digisparc Pro) anschlieรŸen

      @mfalkvidd He's asking how to connect a nrf24 to an ATtiny167 and, if needed, what to tell MySensors to make it work.

      @Oskar-Dรผnnebeil Compare the pinouts, here's the ATtiny. Then connect it 1:1 if possible. I know of the options MY_CE_PIN and MY_CS_PIN, maybe there are more. Check the guides for that.

      posted in Troubleshooting
      pansen
      pansen
    • RE: ๐Ÿ’ฌ Building a Orange Pi Gateway

      @lecintre: I just installed domoticz and I could enable my gateway by clicking on "please setup your Hardware" in the start screen, then selecting "mysensors gateway with lan interface" with the lan ip of my orange pi (but i guess 127.0.0.1 would also work) and port 5003.
      this should appear then:
      mysensors_lan_gw Yes MySensors Gateway with LAN interface
      Version: 2.2.0-beta Setup 0.0.0.0 5003 Disabled

      clicking on "Setup" then leads to a menu where i see my first test node:

      NodeID
      Name
      Sketch Name
      Version
      Children
      Last Seen
      0 Unknown Unknown 1.0 1 2017-01-29 20:27:28
      1 Unknown nrf24LEDtest 1.0 2 2017-01-29 20:28:27

      let me know if that works out for you

      posted in Announcements
      pansen
      pansen
    • RE: MySensors Gatway dimmers & Home assistant

      I'm confused, your arduino node is connected to something via serial?

      posted in Hardware
      pansen
      pansen
    • RE: JULA motion LED hack

      Ohh haha ok now I get it.

      Nice!

      posted in My Project
      pansen
      pansen
    • RE: Is my project possible with MySensors?

      Hi,

      I think it is possible. However, in your special case I would rather implement something from the scratch since you do not really need MySensors here (except maybe for signing messages and the WebGUI but you said no controller so..).

      There are nrf24 libraries floating around in the web, probably also some signing functionality I would suppose.

      For sending messages to your network, I'd just put another arduino to the RPi and use the serial port.

      So answering your questions:

      • Implement yourself, for MySensors I don't know
      • See above. MySensors has some signing capabilties afaik
      • Datasheet p24 describes the "received power detector (RPD)" which in the end is a register that can be read out.

      Hope that helps

      posted in Development
      pansen
      pansen

    Latest posts made by pansen

    • Howto use myscontroller from node-red-contrib-mysensors?

      Hi,

      @tbowmo maybe you can help with this:

      I would like to use the myscontroller node from node-red-contrib-mysensors to assign and track my node IDs, but I am struggling with the details.

      myscontroller seems to read the incoming msg, but when double clicking on it, id is "undefined".

      Here are the relevant nodes:

      [{"id":"8aa619bf.bcddb8","type":"myscontroller","z":"a8b8ec2f.f6e17","database":"839402cc.e6ba6","name":"node_controller","handleid":true,"timeresponse":true,"timezone":"UTC","measurementsystem":"M","mqttroot":"mysensors-in","x":740,"y":660,"wires":[["ca58e694.77646","da1a60bf.fddd1"]]},{"id":"d1caae4a.7e6d08","type":"mqtt in","z":"a8b8ec2f.f6e17","name":"","topic":"mysensors-out/#","qos":"2","broker":"708db7ae.68d95","x":300,"y":660,"wires":[["4abb49a2.3b382"]]},{"id":"4abb49a2.3b382","type":"mysdecode","z":"a8b8ec2f.f6e17","database":"","name":"","mqtt":true,"enrich":false,"x":530,"y":660,"wires":[["8aa619bf.bcddb8"]]},{"id":"da1a60bf.fddd1","type":"mqtt out","z":"a8b8ec2f.f6e17","name":"","topic":"","qos":"","retain":"","broker":"708db7ae.68d95","x":1020,"y":660,"wires":[]},{"id":"839402cc.e6ba6","type":"mysensorsdb","z":"","name":"test_db_1","file":"/home/blub/test_db_1.sqlite"},{"id":"708db7ae.68d95","type":"mqtt-broker","z":"","name":"mosquitto-betty","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
      

      And the relevant sketch code:

      #define MY_DEBUG
      #define MY_RADIO_NRF24
      #include <MySensors.h>
      #define CHILD_ID 1
      //#define MY_PARENT_NODE_ID 0
      //#define MY_PARENT_NODE_IS_STATIC
      #define SN "Worktable RGBW"
      #define SV "1.6"
      [...]
      
      void presentation(){
      	sendSketchInfo(SN, SV);
      	present(CHILD_ID, S_RGBW_LIGHT );
      }
      
      

      When I restart the node, it actually gets node id 1, no matter what I do with myscontroller.

      My configure is:

      /configure --spi-spidev-device=/dev/spidev0.0 --my-transport=rf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=13 --my-rf24-irq-pin=21 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mysensors --my-mqtt-password=blub --my-port=1883 --my-mqtt-user=mysensors
      

      I think I am just using the wrong topics, setting and combination of nodes.

      When I set the topic in myscontroller to the publish topic, the following message spams my broker:

      mysensors-out/1/255/3/0/6 : msg : Object
      object
      topic: "mysensors-out/1/255/3/0/6"
      payload: "M"
      qos: 0
      retain: false
      _topic: "mysensors-out/1/255/3/0/6"
      _msgid: "f5d62d35.d8df2"
      topicRoot: "mysensors-out"
      nodeId: 1
      childSensorId: 255
      messageType: 3
      ack: 0
      subType: 6
      origin: 2
      messageTypeStr: "C_INTERNAL"
      subTypeStr: "I_CONFIG"
      
      posted in Node-RED
      pansen
      pansen
    • RE: ๐Ÿ’ฌ Building a Orange Pi Gateway

      Hi,

      for anyone creating a gateway on an Orange Pi PC using armbian mainline (4.x Kernel): The fex modifications are not necessary any more. As noted before by @Roman, the device tree needs to be modified.

      If you use the exact same pins as in this guide for the Orange Pi PC, SPI0 needs to be activated instead of SPI1. (Pi Zero and PC are kind of pin compatible, but Zero only has SPI1 routed to the header, whereas the same pins on the PC have SPI0. On top, the Orange Pi PC also has SPI1 but on other pins):

      verbosity=1
      logo=disabled
      console=both
      disp_mode=1920x1080p60
      overlay_prefix=sun8i-h3
      overlays=w1-gpio uart1 spi-spidev spi-add-cs1
      param_spidev_spi_bus=0
      param_spidev_spi_cs=0
      rootdev=<removed>
      rootfstype=ext4
      usbstoragequirks=<removed>
      

      Attention: Header pin 26 is different between Pi PC and Pi Zero. On the zero it is PA10 but on the PC it is PA21. I connected the interrupt pin of the nrf24 like in the guide (header pin 26) and changed the configure command accordingly.

      So the full command to use SPI0 and the interrupt connected to header pin 26 of the Orange Pi PC is:

      ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=rf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=13 --my-rf24-irq-pin=21 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mysensors
      

      The rest of the guide is still valid, except that the transport is now called "rf24" instead of "nrf24". @mfalkvidd can you correct this maybe? Also, the -d switch seems to be not existing any more.

      posted in Announcements
      pansen
      pansen
    • RE: ๐Ÿ’ฌ Building a Orange Pi Gateway

      @pii

      • Does /sys/class/gpio/gpio24/direction exists?
      • Does /sys/class/gpio/gpio24 exists?
      • Can you write to them using echo?
      posted in Announcements
      pansen
      pansen
    • RE: ๐Ÿ’ฌ Building a Orange Pi Gateway

      i'm sorry, i do not have experience with encryption. essentially it depends on the code you want to write, since on the pi you are kind of limited to scripting, whereas microcontroller code is closer to hardware. also, if you need things like an adc or spi you're better of with a microcontroller. if it's just about some LEDs lighting up..

      posted in Announcements
      pansen
      pansen
    • RE: ๐Ÿ’ฌ Building a Orange Pi Gateway

      If your conditions are

      • 3 LEDs: yes through GPIO
      • Ethernet: yes (d'uh)
      • beefy enough for software encryption: I guess? For an IoT-low data rate scenario for sure

      I'm running armbian on my Orange Pi and setting up mosquitto is a breeze. But you don't need a broker right? Don't forget you need an SD card on top and more power.

      posted in Announcements
      pansen
      pansen
    • RE: ๐Ÿ’ฌ Building a Orange Pi Gateway

      @awilner I am in a hurry right now so I cannot go through what you wrote in detail, but maybe my post about pin numbering can help you: https://forum.mysensors.org/post/58309 It is related to an OPi Plus2e using nrf24 but the numbering formulas should still be valid.

      Good luck!

      posted in Announcements
      pansen
      pansen
    • RE: Browser-based firmware generator

      Incredible, good job!

      What do you mean bu that though

      @rakeshpai said in Browser-based firmware generator:

      It doesn't work.

      From my perspective it does work ๐Ÿ˜‰

      posted in Development
      pansen
      pansen
    • RE: ๐Ÿ’ฌ LoRa Ra-01 ATmega328P Node

      @NeverDie

      I understand but tend to disagree ๐Ÿ˜‰

      posted in OpenHardware.io
      pansen
      pansen
    • RE: ๐Ÿ’ฌ LoRa Ra-01 ATmega328P Node

      Out of curiousity: Why did you use a through-hole AVR and not a SMD one?

      posted in OpenHardware.io
      pansen
      pansen