• RE: Old hardware migration

    @OldSurferDude My old 2.0 setup is with nRF24L01 radios. This is a link to the thread on some light switches that I designed and built.
    https://forum.mysensors.org/topic/7376/us-decora-wall-switch-continued/2
    I am aware that you cannot have two MQTT gatways. When I designed my old setup I was not that familiar with MQTT so I never ended up implementing it. On the home assistant server that I have set up though, I have installed the MQTT broker on there so I should be able to comunicate with any MySensors stuff over MQTT in the future devices I make/set up. As I mentioned, I do have a Home Assistant box that I have started about 4 months ago and eventually want to migrate my Vera equipment to the HA box.

    As for the YAML and Python, I'll muddle my way through. used to program in PHP and have done enough on Arduino that I'm sure it won't hurt my brain too much.

    posted in General Discussion
  • RE: 💬 In-wall scene controller OLED keypad

    @Michael-Link I have been out of touch with MySensors for some time now and looking to slowly get back into it. I created this and a few other boards back in 2018 All of the GERBER files for this are in the "Design Files" tab. Those you should be able to send to JLC PCB or one of the other fab houses and have some made. This was designed to be used with 2 other boards that I designed. There was the processor board and the power supply board. The processor board was designed in a way that I could use a couple different switch boards. This one and a universal multi-switch board that had multiple configurations. If you look here you will see my other boards.

    posted in OpenHardware.io
  • Old hardware migration

    So I have been out of touch with MySensors for a few years now. I still have a bunch of hardware running that uses MySensors 2.0 I believe. It is all connected to my old Vera controller. I am working on setting up a machine to run Home Assistant and plan to slowly migrate hardware to the new system. My question is, if I configure a new 2.3.2 gateway and connect it to the Home Assistant box, will my 2.0 hardware be backwards compatible and connect to the new gateway? Also, is it possible for me to run 2 NRF24 gateways at the same time without the hardware freaking out? I do have the HomeAssistant box configured as an MQTT gateway and may put new hardware on the MQTT side going forward. What are peoples thoughts on the best approach. The migration will most likely be S L O W.

    Any input is appreciated.

    posted in General Discussion
  • RE: Best VOC sensor for detecting a wide range of VOC's?

    @eiten I haven't yet made any progress on finding a good VOC sensor, but along the way I did find out something interesting regarding CO2: namely, if you sleep with your bedroom door closed at night, then the odds are good that the CO2 levels rise to surprisingly high and unhealthy levels.

    The better CO2 sensors are factory calibrated and never again need recalibration for the life of the sensor (usually around 10 years or so), because they are used in HVAC systems to control fresh air intake to guarantee indoor air quality. As a for instance, here is one such CO2 sensor: https://www.digikey.com/en/products/detail/senseair/006-0-0008/15790694 At around $50 for just the sensor element itself, it's not exactly cheap, but then again, I'd say it's worth it, because who wants to be burdened by remembering to calibrate their CO2 sensors?

    Ideally, I'd like to find a sensitive VOC sensor that also will never require calibration.

    Nearly all, and maybe all, of the off-the-shelf IAQ montoring stuff that you might buy for, say, $300 or less seems to require periodic calibration. For that reason, this might be one of those occasions where build is rather than buy.

    posted in Hardware
  • Best VOC sensor for detecting a wide range of VOC's?

    I purchased a number of different consumer-ready off-the-shelf VOC monitors (priced in the range of $100-$300) from amazon for detecting the presence of VOCs (volatile organic compounds) in the air, and I'm finding that most of them detect very little of what's in the air, even if it's something I can plainly smell. 😞 What I want is a sensor (a canary in the coal mine) that will alert me as to whether there might be something in the air that I should be concerned about. From that point I would then have the somewhat arduous job of figuring out what it is. However, if I don't know it's there in the first place, then I'll never know to look further. So, I guess what I'm looking for is a sensor that's sensitive to a wide assortment of VOCs. Any recommendations?

    posted in Hardware
  • RE: CNC PCB milling

    Of possible interest: Here's a guy who is building an inexpensive open source ethernet controller for stepper motors:
    What happend to Ethersweep? Project Update! – 12:36
    — Neumi

    If you listen to the end, it's revealed that there is now generous funding available which allows people to do this kind of open-source development as a full time job, which is what he is now doing. For that reason, I think there's a good chance he will complete his project within the allowed 6 months., and so by the deadline it will likely be nicely polished.

    posted in General Discussion
  • RE: Awesome tip: run LinuxFX instead of Windows!

    @skywatch said in Awesome tip: run LinuxFX instead of Windows!:

    @NeverDie Thanks - Interestingly they show a free version on their site still. Did they revert due to bad publicity?

    https://www.linuxfx.org/

    I stopped following it, but I seem to recollect that the free version was noticeably missing things--otherwise, who'd buy the paid-for version? Anyway, its standing on Distro-watch has fallen considerably. It may seem unfair to niche distros, but I think it's generally better to stick with the more popular distros, unless you have good reason to choose otherwise.

    posted in General Discussion
  • RE: NewbiePCB sensors dying of old age

    Some humidity sensors are known to lose accuracy with age. For instance, the Si7021 is known to have this problem. If that matters to you, then the best choice is to pick sensors that have datasheets and which have specs as to their expected longevity or accuracy over time. Then buy from mouser/digikey to be certain you're getting the real thing rather than factory rejects or counterfeits.

    For extra insurance, I avoid electrolytic capacitors entirely whenever possible. I buy only 7XR rated ceramic capacitors that are overspec'd. The difference in price is small compared to a failure down the road.

    posted in General Discussion
  • RE: Awesome tip: run LinuxFX instead of Windows!

    @skywatch said in Awesome tip: run LinuxFX instead of Windows!:

    @NeverDie So how is it going for you? Have you tried USB devices with it? Did they work well? I am thinking of being able to run Win x64 SDR software on this but still wonder if it will work - Will try it out as soon as I can and report back. Meantime any hints or opinions you have would be good if you can share.

    Sometime after I made the original post the LinuxFX people decided they wanted to charge people money for their flavor of the OS. As near as I can tell, it kinda imploded after that. So, I settled on Linux Mint (Cinnamon version), and I'm happy with it. I still use Windows for programs that are only supported to run under windows, like Fusion360, rather than try to use wine to get it to run under Linux, but for everything else Linux Mint works great. Fast, stable, and without all the sluggishness you typically get (sooner or later) with Windows.

    posted in General Discussion
  • Using chatgpt to write code for the nrf52840....

    I haven't confirmed whether the offered solution will work or not, but it took only one second to generate, so on that basis alone I'm impressed.

    Anyone here using chatgpt for actual coding of any kind?

    By way of example, I gave this prompt:

    Without using zephyr, write a program for the nrf52840 to send a "Happy Birthday!" text message using the proprietary radio mode.
    

    and chatgpt's response was:

    To send a "Happy Birthday!" text message using the nRF52840 in proprietary radio mode without using the Zephyr RTOS, you can use Nordic Semiconductor's nRF5 SDK. Here's a basic example of how to create a custom radio communication program for the nRF52840. Please note that this code is a simplified example, and in a real-world scenario, you would implement error handling and more robust communication protocols.

    Transmitter (TX) Code:

    #include <stdint.h>
    #include <stdbool.h>
    #include "nrf.h"
    #include "nrf_gpio.h"
    
    #define RADIO_CHANNEL 76  // Choose a custom channel
    
    void radio_init(void) {
        NRF_RADIO->TXPOWER = RADIO_TXPOWER_TXPOWER_0dBm;
        NRF_RADIO->FREQUENCY = RADIO_CHANNEL;
        NRF_RADIO->MODE = RADIO_MODE_MODE_Nrf_2Mbit;
        NRF_RADIO->SHORTS = 0;
        NRF_RADIO->PCNF0 = (1 << RADIO_PCNF0_LFLEN_Pos);
        NRF_RADIO->PCNF1 = (1 << RADIO_PCNF1_WHITEEN_Pos) | (3 << RADIO_PCNF1_BALEN_Pos);
        NRF_RADIO->BASE0 = 0xE7E7E7E7;
        NRF_RADIO->BASE1 = 0x43434343;
        NRF_RADIO->PREFIX0 = 0x55443322;
        NRF_RADIO->TXADDRESS = 0x00;
        NRF_RADIO->RXADDRESSES = 0x01;
    }
    
    void radio_send(const uint8_t *data, uint8_t length) {
        NRF_RADIO->PACKETPTR = (uint32_t)data;
        NRF_RADIO->EVENTS_READY = 0;
        NRF_RADIO->EVENTS_END = 0;
    
        NRF_RADIO->TASKS_TXEN = 1;
        while (NRF_RADIO->EVENTS_READY == 0);
    
        NRF_RADIO->TASKS_START = 1;
    
        while (NRF_RADIO->EVENTS_END == 0);
        NRF_RADIO->EVENTS_END = 0;
    
        NRF_RADIO->TASKS_DISABLE = 1;
        while (NRF_RADIO->EVENTS_DISABLED == 0);
    }
    
    int main(void) {
        nrf_gpio_cfg_output(20); // LED on pin 20
    
        radio_init();
    
        while (1) {
            // Message to send
            uint8_t message[] = "Happy Birthday!";
            uint8_t message_len = sizeof(message) - 1; // Exclude null-terminator
    
            // Send the message
            radio_send(message, message_len);
    
            // Toggle an LED to indicate a transmission
            nrf_gpio_pin_toggle(20);
    
            // Delay between transmissions
            for (int i = 0; i < 1000000; i++) {
                __NOP();
            }
        }
    }
    

    Receiver (RX) Code:

    #include <stdint.h>
    #include <stdbool.h>
    #include "nrf.h"
    #include "nrf_gpio.h"
    
    #define RADIO_CHANNEL 76  // Should match the transmitter's channel
    
    void radio_init(void) {
        NRF_RADIO->TXPOWER = RADIO_TXPOWER_TXPOWER_0dBm;
        NRF_RADIO->FREQUENCY = RADIO_CHANNEL;
        NRF_RADIO->MODE = RADIO_MODE_MODE_Nrf_2Mbit;
        NRF_RADIO->SHORTS = 0;
        NRF_RADIO->PCNF0 = (1 << RADIO_PCNF0_LFLEN_Pos);
        NRF_RADIO->PCNF1 = (1 << RADIO_PCNF1_WHITEEN_Pos) | (3 << RADIO_PCNF1_BALEN_Pos);
        NRF_RADIO->BASE0 = 0xE7E7E7E7;
        NRF_RADIO->BASE1 = 0x43434343;
        NRF_RADIO->PREFIX0 = 0x55443322;
        NRF_RADIO->TXADDRESS = 0x00;
        NRF_RADIO->RXADDRESSES = 0x01;
    }
    
    void radio_receive(uint8_t *data, uint8_t *length) {
        NRF_RADIO->PACKETPTR = (uint32_t)data;
        NRF_RADIO->EVENTS_READY = 0;
        NRF_RADIO->EVENTS_END = 0;
    
        NRF_RADIO->TASKS_RXEN = 1;
        while (NRF_RADIO->EVENTS_READY == 0);
    
        NRF_RADIO->TASKS_START = 1;
    
        while (NRF_RADIO->EVENTS_END == 0);
        NRF_RADIO->EVENTS_END = 0;
    
        NRF_RADIO->TASKS_DISABLE = 1;
        while (NRF_RADIO->EVENTS_DISABLED == 0);
    
        *length = NRF_RADIO->RXMATCH;
    }
    
    int main(void) {
        nrf_gpio_cfg_output(20); // LED on pin 20
    
        radio_init();
    
        while (1) {
            uint8_t message[16]; // Adjust the buffer size as needed
            uint8_t message_len = 0;
    
            // Receive a message
            radio_receive(message, &message_len);
    
            // Toggle an LED to indicate a reception
            nrf_gpio_pin_toggle(20);
    
            // Process the received message (e.g., print it)
            if (message_len > 0) {
                message[message_len] = '\0'; // Null-terminate the received data
                printf("Received: %s\n", message);
            }
        }
    }
    

    This code sets up a transmitter (TX) and receiver (RX) using the nRF52840's radio peripheral. The TX repeatedly sends the "Happy Birthday!" message, and the RX receives and prints any incoming messages. Make sure both devices are configured to use the same radio channel and have matching radio settings.

    Remember to adapt this code to your specific hardware setup and application requirements, and consider adding more robust error handling for a production-quality solution.

    posted in General Discussion