Skip to content

General Discussion

A place to talk about whateeeever you want
1.5k Topics 14.2k Posts
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • gateway MQTT

    2
    0 Votes
    2 Posts
    143 Views
    OldSurferDudeO
    I don't have a good answer for you @mimaret :( When I get to the point where I'm getting strange error messages, I bite the bullet and start from ground zero. Fortunately, with the RPi you just need a new SD card. Start with a fresh copy of the Raspberry Pi OS. If you enable SSH (and WiFI) when you create the image, you can do everything headless (without keyboard-mouse-video) by running raspi-config via a remote terminal ( PuTTY ) If you enable VNC with raspi-config you can have access to the GUI. Double check your radio wiring. Don't have anything unnecessary plugged in. Carefully follow the instructions I've done this tedious process many times. My RPi's are 3B+ and Zero 2 W. Here's what I've encountered: bad power supply bad SD card bad wiring corrupt download and, of course, more user errors than I care to think about! I have not come across bad RPi ... no, not true! I had a Zero 2 W with a bad WiFi chip (common problem). Overcame that with a USB WiFi dongle. Good luck! Let us know what you discover. -OSD
  • CHATGPT My new best friend!

    5
    3 Votes
    5 Posts
    243 Views
    OldSurferDudeO
    @Tmaster I think it writes better code than a lot of code I've seen, and the documentation is a lot better. The latter, of course, is because most coders don't document. :( some key elements: good statement of work -- Purpose of the Code is key (did you write that? Good job!). This will guide the AI to write what you want. descriptive variables good documentation code is independent of reading sensors up-to-down/down-to-up I spent a couple hours analyzing, researching and writing and re-writing this and all I can say is that the AI didn't catch is, as far as I can see, if your sensors are too far apart or your magnet is too weak, you could get false readings. You, being the author of AI directive, are responsible for for the code. The AI is just a tool. I started my coding with assembly language, though at that time we still had to enter the binary on some machines (set 16 switches, then press commit). ForTran and COBOL were the first real high level languages and subsequent languages, pascal, c, java, etc. were improvements. AI is a quantum step. It's still coding, but you have to learn how to talk to the AI to get what you want. Good project! Let us know how it turns out and if you had to tweak the code. -OSD
  • single-click, double-click, long-press button possible with MySensors?

    5
    0 Votes
    5 Posts
    287 Views
    dirkcD
    @ZenBlizzard , yes thanks, thats the point. How to deal with smartSleep() and battery lifetime.
  • What is actual status of MySensors?

    6
    0 Votes
    6 Posts
    276 Views
    TheoLT
    @skywatch I don't like ESPs to be honest. Seems like a waste using a Wifi MCU for mysensors.
  • ESP32 with LoRa

    5
    0 Votes
    5 Posts
    314 Views
    ZenBlizzardZ
    Hey! If you're using ESP32 with LoRa (RFM95) and a Raspberry Pi gateway, here are some quick tips: Hardware: Heltec ESP32 + LoRa boards work great with MySensors. Power: ESP32 (~600mA) + LoRa (~120mA) can drain batteries fast—Arduino might be better. Software: Use Arduino IDE for ESP32 (try EnergyMeterPulseSensor), and set up an MQTT gateway on the RPi. Home Assistant works well for data visualization. Real-World Tips: MySensors + LoRa is great for farm/weather monitoring—checking similar projects can help.
  • Is it possible to extract child ID from a just sent message?

    4
    0 Votes
    4 Posts
    200 Views
    ZenBlizzardZ
    It seems you can access the child ID from the sent message by looking at the destination property. If you have the message object, you can extract the ID directly from there.
  • 0 Votes
    4 Posts
    220 Views
    F
    @ZenBlizzard in case you are measuring the output with a multimeter, you will get an averaged level, since AC current waveform should be sinusoidal and overlapped with the Vcc/2->2.56V in your case. To measure the current you need a decently high sampling and some math. #define SENSITIVITY 66 // mV/A const float readings = 5; const float alpha = 2.0 / (2 * readings + 1); for (ifor = 0; ifor < 250; ifor++) { // Voltage voltageSampleRead = analogRead(V) * vccRead / 1023 - vccRead / 2; /* read the sample value including offset value*/ voltageSampleSum = voltageSampleSum + sq(voltageSampleRead); /* accumulate total analog values for each sample readings*/ voltageSampleOffsetSum = voltageSampleOffsetSum + voltageSampleRead; // Current currentSampleRead = analogRead(I) * vccRead / 1023 - vccRead / 2; /* read the sample value including offset value*/ currentSampleSum = currentSampleSum + currentSampleRead * currentSampleRead; /* accumulate total analog values for each sample readings*/ currentSampleOffsetSum = currentSampleOffsetSum + currentSampleRead; wait(1); } voltageMean = voltageSampleSum / ifor; /* calculate average value of all sample readings taken*/ voltageOffset = voltageSampleOffsetSum / ifor; reading = (sqrt(voltageMean) - voltageOffset) * 230.0 / 1.0; // read voltage / reported voltage. voltage = round_to_dp(alpha * reading + (1 - alpha) * voltage,1); Serial.println(voltage); if (voltage < 25) voltage = 0; currentMean = currentSampleSum / ifor; /* calculate average value of all sample readings taken*/ currentOffset = currentSampleOffsetSum / ifor; reading = (sqrt(currentMean) - currentOffset) / SENSITIVITY * 1000 - currentZeroOffset; // subtract no load current. if (reading < 0) reading = 0; current = round_to_dp( alpha * reading + (1 - alpha) * current,2);
  • Email notifications received twice

    3
    1
    1 Votes
    3 Posts
    159 Views
    ZenBlizzardZ
    It looks like duplicate email notifications may be linked to system settings or preferences. Have you noticed if the issue happens after specific actions or changes? Investigating your notification settings might shed some light
  • No merge into master in the last 5 years, should we use development?

    10
    0 Votes
    10 Posts
    333 Views
    bgunnarbB
    Well, my network with two handfulls of nodes in three different locations is still live and kicking! I agree that there does not seem to be a lot happening in the community. I'm running 2.4.0- alpha since this gives support for MQTT over TLS. Just managed today to create one more MQTT GW after reading a lot about support for ESP8266. You know, these things you do once per year and have to learn new each time. MySensors is the cheapest way I have found to create small sensor nodes etc. But now slowly running out of my supply of hardware. Well, time will tell...
  • 1 Votes
    5 Posts
    218 Views
    ZenBlizzardZ
    When connecting an accelerometer to your PC, consider its communication protocol (I2C or SPI) and the appropriate interface device, like a microcontroller (e.g., Arduino). You may also need additional hardware for voltage adjustment or signal conditioning, depending on the sensor’s specifications.
  • Meet in Malmö, Summer 2016?

    95
    2 Votes
    95 Posts
    151k Views
    TheoLT
    Maybe next summer the 10 years after party? I would still like to meet all of you guys in real person
  • 0 Votes
    23 Posts
    7k Views
    MasMatM
    Old topic, I know. Did anything ever come of this? I'm also thinking it would be easy & cheap to get the espnow working as a transport layer. I found this: https://www.mysensors.org/apidocs-beta/classESPNOW.html But it goes above my head and abilities when it comes to code.
  • Human presence sensors....

    13
    0 Votes
    13 Posts
    391 Views
    TheoLT
    @CodeGarage What I want is a lion powered Sensor if possible. And that in a case I can stick to the door frame. As I cannot screw or drill into the doorframe. But I have no idea how much current that draws.
  • Combination of networks

    4
    0 Votes
    4 Posts
    175 Views
    C
    Take a look on this article https://www.mysensors.org/build/rs485
  • Running out of nodeId's

    mysensors
    10
    3 Votes
    10 Posts
    347 Views
    nagelcN
    @GLAB You can set the frequencies using the settings in MyConfig.h, which is in the MySensors folder. If you put any of the defines from MyConfig.h into your sketch, they will override the MyConfig.h setting for that sketch only. If you are using the RF24 radio, there are different channels which correspond to a given frequency. The default is channel 76. There is a list of typical channels in MyConfig.h. If you want to change the channel for all the sketches, change it in MyConfig.h. If you want to change it just for the sketch, add a define to the sketch. For example: #define MY_RF24_CHANNEL (84) The problem with changing the channel in a sketch is that the gateway has to be on the same channel to receive from the node. So, normally it makes sense to change in MyConfig.h because you usually want the gateway and all the nodes on the same channel. Other radio's like the RFM69 list the frequency instead of using a channel. They can be overridden in the sketch as well. You can find the defines that are needed in MyConfig.h
  • What is form factor?

    1
    0 Votes
    1 Posts
    96 Views
    No one has replied
  • 0 Votes
    4 Posts
    171 Views
    OldSurferDudeO
    Thanks for the offer @TheoL ! I have moved on to a differenct project. Also, a lesson that I have learned many times, "If it works, don't fix it!" ;) -OSD
  • Need advice on solar powering with LiFePo4 battery

    17
    0 Votes
    17 Posts
    673 Views
    T
    LiFePO4 batteries are a great choice because they have a long life cycle and are much safer than other lithium-based batteries. However, you need a solar charge controller that’s compatible with LiFePO4 to prevent overcharging and maintain efficiency. A good MPPT controller can significantly boost energy harvest from your panels. Also, ensure your solar panel output matches your power needs. If you're in solar ireland, you might find some local companies that offer tailored solutions for maximizing solar efficiency in lower light conditions.
  • How to great variables

    variables mycontroller.org arduino
    2
    0 Votes
    2 Posts
    121 Views
    mfalkviddM
    Nice work so far @wint0178, great that you try expanding on the examples. Sorry for the late reply. If you look at https://github.com/mysensors/MySensorsArduinoExamples/blob/bba998bce09bc5139eb4ca7a05b0279f4083ff88/examples/PressureSensor/PressureSensor.ino#L90 you see where the existing child ids are defines. You just add another one for the gas sensor, with a unique number (incrementing by 1 is an easy way). Try that and report back on your result. If something is unclear, just post a followup.

11

Online

11.7k

Users

11.2k

Topics

113.2k

Posts