Navigation

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

    Topics created by OldSurferDude

    • OldSurferDude

      Imitating a LoRaWAN(R) with ESP8266/ESP32 and MySensors
      Development • • OldSurferDude  

      3
      0
      Votes
      3
      Posts
      19
      Views

      OldSurferDude

      @mfalkvidd Yes, I understand that 253 is the software limit. I was wondering about the hardware limit. For example, my Asus router has a software limit of 253 devices. But when I get 20-25 WiFi devices trying to connect, the network goes haywire. (pun intended ) I am quite convinced that this is a hardware limitation of the router because the router has to carry some information about each connection. If the gateway is dumb, that is, carries no information about any connection, then it could truly have 253 connections. After a bit of contemplation, I realize that the name, gateway, implies this. If that is the case, it is good news for the DiY'er in that this very inexpensive and cheap hardware could stand in for a LoRaWAN, again, with a number of compromises.
    • OldSurferDude

      Soil Moisture Sensor Powered by solar charged battery
      My Project • battery home assistant low power eeprom solar calibration • • OldSurferDude  

      5
      1
      Votes
      5
      Posts
      39
      Views

      CrankyCoder

      @OldSurferDude I use this. https://www.homedepot.com/p/Orbit-Solenoid-for-Battery-Operated-Timer-57861/203151515 Instead of having to hold the valve open, i can just pulse it. I use a simple motor controller to pulse it and when i need to close it, pulse it in "reverse". That way I could use a battery and if it only opens once or twice a day it's only a half a second or so of draw off the battery.
    • OldSurferDude

      Interface-board-for-remote-control
      My Project • • OldSurferDude  

      2
      1
      Votes
      2
      Posts
      25
      Views

      TheoL

      That is a well documented project. Much appreciated
    • OldSurferDude

      Home Assistant/MySensors quirks
      Development • • OldSurferDude  

      1
      0
      Votes
      1
      Posts
      8
      Views

      No one has replied

    • OldSurferDude

      Gateway without a radio
      Development • • OldSurferDude  

      3
      0
      Votes
      3
      Posts
      28
      Views

      mfalkvidd

      @OldSurferDude yes, just run the configure command with --my-transport=none
    • OldSurferDude

      Water Meter or "How to get Home Assistant to send saved data to an Arduino"
      My Project • • OldSurferDude  

      1
      0
      Votes
      1
      Posts
      16
      Views

      No one has replied

    • OldSurferDude

      How I delete a node from HA and start over.
      Home Assistant • • OldSurferDude  

      1
      0
      Votes
      1
      Posts
      16
      Views

      No one has replied

    • OldSurferDude

      Gateways
      Development • esp8266 raspberry pi serial gateway nano rpi tcp gateway mqtt gateway • • OldSurferDude  

      2
      0
      Votes
      2
      Posts
      32
      Views

      eiten

      @OldSurferDude well, the ESP8266 is limited to 4 TCP clients in arduino IDE. This can't be really increased. I did som experiments and you can set it up to 15, but after the 5th client on my web server, I got a freeze. Maybe you got something wrong. #define MY_GATEWAY_MAX_CLIENTS 2 defines how many controllers (eg Home Assistant) can connect to the gateway, not how many sensors/MySensors devices. And yes, you can have multiple TCP gateways in HomeAssistant. I got an NRF24, an RFM95 long range and a RFM95 short range gateway (all based on ESP32) on the same Home Assistant. Regards, Edi
    • OldSurferDude

      Serial Gateway woes
      Development • • OldSurferDude  

      1
      0
      Votes
      1
      Posts
      10
      Views

      No one has replied

    • OldSurferDude

      Saving last known good state, but not in EEPROM
      Development • • OldSurferDude  

      6
      0
      Votes
      6
      Posts
      33
      Views

      Sasquatch

      @OldSurferDude jus request counter states from controller on each reset, worked fine with Domoticz... or save in eeprom but increase location every write, on power up/reset search eeprom for largest value stored and carry on from that location, one long integer will fit 256 times in atmega328(p) eeprom, is that long enough for you ?
    • OldSurferDude

      A low cost energy meter
      My Project • • OldSurferDude  

      7
      1
      Votes
      7
      Posts
      49
      Views

      fsgraz

      @OldSurferDude yes, you are correct. this sensor is capable of 50A continuous, which safely I would make it working at 40A max., but for such an important load as in your case I would go for a beefier one, like the ACS75x, 77x, but at this point I would also change the node's form factor for space and insulation reasons. On my application on the RV I have a max. curr. of 13A running on a AWG14-16 cable (European rules for RVs), so I did not ask myself too many questions beside, of course, safety. About the signal, it will be a sinusoidal signal swinging around Vcc/2. Vcc can be easily measured internally on the ATmega328. On all my DC sensors I measure Vcc at every loop, just before measuring the ADCs. Honestly, when the space is not an issue like in my RV, I would rather use a ring core current transformer, and I would get rid of noise, response time, power dissipation, but over all no need to cut any cable. Long story short, it has been a nice experiment and I used it for 6 months, and then I switched back to my RF-NANO based RS485-Modbus - Mysensors bridge connected to an off-the shelf power analyzer. Just for fun I attach a pic of my 12Vdc sensors installed on my RV. Forgive me for the spaghetti wiring on the right side, but this is an area that needs improvement.
    • OldSurferDude

      Does MySensors require Arduino Timer 2?
      Hardware • mysensors interrupt nano interrupts esp • • OldSurferDude  

      2
      0
      Votes
      2
      Posts
      24
      Views

      OldSurferDude

      I have success! (oops, that's suppose to be Timer1) I only sample for 1/60 of a second. What I did was to back up all the timer registered I used and then resorted them after I was done sampling. (As opposed to initializing the registers in setup and then starting the timer when needed.) Now I have a Nano sampling the data and sending it to a MySensors Gateway on an RPi3B+ which then sends it to an MQTT broker runing on an old laptop. Also running on the laptop is Home Assistant running inside of VirtualBox. If MySensors does use Timer1, it appears that restoring the registers allows it to be shared. //------------------------------------------------------ISR ISR(TIMER1_OVF_vect){ // interrupt service routine for overflow TCNT1 = TimerPreloadValue; // must be first line! starts the timer counting again digitalWrite(TRIGGER_START_SAMPLE_PIN,HIGH); samplesVolts[--sample]=analogRead(VOLTS_IN_PIN); // decrement before capturing samplesCurrent[sample]=analogRead(CURRENT_IN_PIN); digitalWrite(TRIGGER_START_SAMPLE_PIN,LOW); if (!sample){ // count down to zero digitalWrite(TRIGGER_START_SAMPLE_PERIOD_PIN,LOW); // indicate that sampling is complete samplingEnd = micros(); TCCR1B &= 248; // turns off timer } } //------------------------------------------------------sampleOneCycle void sampleOneCycle(){ // back up timer registers uint8_t TCNT1_b = TCNT1; uint8_t TCCR1B_b = TCCR1B; uint8_t TCCR1A_b = TCCR1A; uint8_t TIMSK1_b = TIMSK1; // configure timer which starts the sampling noInterrupts(); // disable all interrupts TCCR1A = 0; TCCR1B = 0; TCNT1 = TimerPreloadValue; // preload timer //TCCR1B |= (1 << CS10)|(1 << CS12); // 1024 prescaler TCCR1B &= 248; // turns off timer? TIMSK1 |= (1 << TOIE1); // enable timer overflow interrupt ISR // demark sampling sample = NUMBER_OF_SAMPLES; // count down to zero digitalWrite(TRIGGER_START_SAMPLE_PERIOD_PIN,HIGH); samplingStart = micros(); TCNT1 = 65535; // first trigger right away! TCCR1B |= 1; // turns on timer interrupts(); // enable all interrupts // wait for sampling to be complete while(digitalRead(TRIGGER_START_SAMPLE_PERIOD_PIN)){}; samplingEnd = micros(); // restore timer registers TCNT1 = TCNT1_b; TCCR1B = TCCR1B_b; TCCR1A = TCCR1A_b; TIMSK1 = TIMSK1_b; }
    • OldSurferDude

      Gateway stops communicating (again)
      Troubleshooting • • OldSurferDude  

      2
      0
      Votes
      2
      Posts
      15
      Views

      eiten

      Hm, maybe the problem is that your rPI has a short interruption in the WIFI connection, the MQTT TCP connection is interrupted and does not autostart again. Maybe there is something in the logs. Maybe you can find something about reconnects in one of these: journalctl --unit=systemd-networkd journalctl --unit=wpa_supplicant You could try to run wpa_cli in daemon mode to react to disconnects and connects. Create a script like this: #!/bin/bash case "$2" in CONNECTED) <your command to start the gateway>; ;; DISCONNECTED) <your command to stop the gateway>; ;; esac then, start wpa_cli in deamon mode: wpa_cli -a /path/to/your/script #use sudo if your gateway commands need sudo If that helps, you could create a service from this command. Regards, Edi
    • OldSurferDude

      Home Assistant "The notify.mysensors service will be removed"
      Home Assistant • • OldSurferDude  

      1
      0
      Votes
      1
      Posts
      33
      Views

      No one has replied

    • OldSurferDude

      testing with different controllers (mqtt brokers)
      Controllers • gateway mqtt home assistant • • OldSurferDude  

      2
      0
      Votes
      2
      Posts
      28
      Views

      mfalkvidd

      @OldSurferDude use a host name for the broker in the configure command (--my-controller-url-address=). Add the host name to /etc/hosts on the rpi where the gateway is. Start the MySensors gatway. When you want to switch brokers, modify /etc/hosts again and restart the MySensors gateway.
    • OldSurferDude

      completely remove MySensors integration for HA and start over
      Home Assistant • gateway • • OldSurferDude  

      2
      0
      Votes
      2
      Posts
      50
      Views

      OldSurferDude

      @OldSurferDude I posted this question in the Home Assistant forum, too. I figured it out! See my post in HA OSD
    • OldSurferDude

      Send configuration (numbers) from HA to Arduino
      Home Assistant • arduino home assistant communication • • OldSurferDude  

      7
      1
      Votes
      7
      Posts
      49
      Views

      OldSurferDude

      @electrik Thanks, I think I can do the same with the MQTT integration (not MySensors MQTT) OSD
    • OldSurferDude

      MySensors --> MQTT --X Home Assistant
      Home Assistant • • OldSurferDude  

      5
      0
      Votes
      5
      Posts
      41
      Views

      electrik

      great it works! Here the steps to delete a node are described: https://forum.mysensors.org/topic/10898/can-t-remove-unused-sensors-from-ha/7
    • OldSurferDude

      MySensors gateway running as a service
      Development • gateway • • OldSurferDude  

      4
      0
      Votes
      4
      Posts
      27
      Views

      OldSurferDude

      @mfalkvidd Thanks, I didn't see that! OSD
    • OldSurferDude

      Gateway on RPi zero config.h:39: first defined here
      Troubleshooting • • OldSurferDude  

      2
      0
      Votes
      2
      Posts
      15
      Views

      OldSurferDude

      I found the answer here. In config.c two lines have to be added and in config.h, one line is modified and two added
    • OldSurferDude

      Local Sensors on Raspberry Pi Gateway
      Hardware • • OldSurferDude  

      5
      0
      Votes
      5
      Posts
      29
      Views

      OldSurferDude

      @mfalkvidd I finally got it to work. Look at my post on the Home Assistant forum. There is an amazing thing that someone in the MySensors world did that makes RPi I/O very easy! Just like the Arduino, one uses the code: pinMode(MphysicalPin, OUTPUT); I couldn't believe my eyes when I saw that. And then got double flabbergasted when I discovered that pin is the physical pin of the RPi! No mapping of GPIOi to the pins. Whew! So the I/O was easier than both of us could have imagined! @mfalkvidd if you know who did this, send them praise and thanks. OSD