I did a grep on the source code and found this snipper
#if defined(MY_GATEWAY_ESP8266) || defined(MY_GATEWAY_ESP32)
// Turn off access point
WiFi.mode(WIFI_STA);
#if defined(MY_GATEWAY_ESP8266)
WiFi.hostname(MY_HOSTNAME);
#elif defined(MY_GATEWAY_ESP32)
WiFi.setHostname(MY_HOSTNAME);
#endif
#if defined(MY_IP_ADDRESS)
WiFi.config(_MQTT_clientIp, _gatewayIp, _subnetIp);
#endif /* End of MY_IP_ADDRESS */
(void)WiFi.begin(MY_WIFI_SSID, MY_WIFI_PASSWORD, 0, MY_WIFI_BSSID);
#endif
MySensors uses the standard ESP libraries for this. So I expect it to work. But you need to provide at least a bit of source code. Right now it's hard to answer your question. Regarding to MySensors:
A HTTP hostname can only be set for Gateways that either use Wifi or Ethernet
For nodes you can provide a sketchname and that will be seen in your controller.
Regarding to static non static IP addresses. I prefer to use DHCP and set that device in my router as a static IP. There I also give it another hostname. So that in case I have to replace my Gateway I can do it all in the router.
Hope this helps. But please provide more info on what you're trying to achieve
@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
@nagelc I'm thinking about making some kind of shelves with PJON built in. The shelves will have a wireless charger and with PJON I can communicate "Wireless". So on that shelf I can put some things like small candles, maybe a modified humidifier.
Things like that xd
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
MySensors is an EXCELLENT project.
It allows for complete control over the various sensors.
It's extremely simple.
Its drawback is that it's open source, so it's unfunded and development is slow, but I don't think there are any better projects than this at the moment.