Comments (21)
I know, I'm just wondering if "BSB-LAN" fits in easier in external systems because this is what people might know. Then I'd change it in all titles.
from bsb-lan.
No, it's not abandoned.
from bsb-lan.
Do you have experience with multicast libraries for the Arduino? If you could supply some code snippets including the kind of information you would like to be broadcasted, that would help.
from bsb-lan.
I am no Arduino expert, when I am finished with the BSB-Lan integration for Home-Assistant I could take a look. But my only language I know by a tiny bit is Python.
from bsb-lan.
found this with a quick search. https://gist.github.com/mqu/f8d4f6877703bb39676d68733801871d
the info to send is ip-address, port, device name and maybe mac address to make it unique?
That would be enough for the beginning.
from bsb-lan.
It would already help to define what kind of information would be necessary for your task that BSB-LAN would need to provide...
EDIT: Ok, your answer came in before I could post my question ;)...
from bsb-lan.
The example looks doable, but I wonder which port to use because 8266 sounds more like a demo/example port for the ESP8266. Or can this be choosen freely for your purpose?
from bsb-lan.
It should be the port that is defined in BSB_lan_config.h define Port 80
That is what I guess so the client can configure itself and communicate with BSB-Lan
from bsb-lan.
No, I mean the port that the broadcast is transmitted on (which then contains the ip-address, port, device name and mac address of BSB-LAN). I'm pretty sure that this can't be port 80 because that is reserved for webservers.
from bsb-lan.
Than your lucky number would be fine I guess;)
from bsb-lan.
I think that won't work because the program you want to use this broadcast with expects the broadcast message on a specific port. So when you want to use it with Home Automation, you should be able to identify the port where Home Automation expects the broadcast and then I would use this port as default.
from bsb-lan.
From wiki. The default is this it looks like UDP port 5353
Packet structure[edit]
An mDNS message is a multicast UDP packet sent using the following addressing:
IPv4 address 224.0.0.251 or IPv6 address ff02::fb
UDP port 5353
When using Ethernet frames, the standard multicast MAC address 01:00:5E:00:00:FB (for IPv4) or 33:33:00:00:00:FB (for IPv6)[a]
from bsb-lan.
Ah, thanks, that helps a lot! However, I just found out that the Arduino Ethernet library is not able to send UDP multicast packets, only the ESP could do so. Patches for the Arduino are flying around, but to include these would be futile once people update their libraries...
https://gist.github.com/aallan/9895961
from bsb-lan.
I found https://github.com/TrippyLighting/EthernetBonjour and the fork https://github.com/arduino-libraries/ArduinoMDNS for mDNS on Arduino
from bsb-lan.
Thanks, someone in the forum also came up with a solution, I just haven't found the time to implement it...
from bsb-lan.
A more simple approach would be to include the bsblan title in unauthorized html response, too:
Currently:
<!DOCTYPE HTML>
<HTML><HEAD><TITLE>Error</TITLE>
</HEAD> <BODY><H1>401 Unauthorized.</H1></BODY></HTML>
Solution:
<!DOCTYPE HTML>
<HTML><HEAD><TITLE>BSB-LAN Web</TITLE>
</HEAD> <BODY><H1>401 Unauthorized.</H1></BODY></HTML>
Now the device can be detected automatically (at least with iobroker)
from bsb-lan.
Should it say "BSB-LAN Web" or just "BSB-LAN"?
from bsb-lan.
I would prefer the same title as from authorized site. There it is BSB-LAN Web
from bsb-lan.
does that mean the mDNS option is abandonned ? To my mind that would be the better option to follow. I see the W5500 is compatible for example...
from bsb-lan.
Iobroker also supports detection over mdns and it would be the first choice I think.
But changing the title was low effort for a first solution.
from bsb-lan.
Implemented now for Ethernet connections. WiFiSpi library somehow creates neverending repeating error messages. Not sure if this is a general issue or a problem of misconfiguration or bug.
from bsb-lan.
Related Issues (20)
- [FEATURE REQUEST] Sending more than 40 register values to MQTT ? HOT 1
- [BUG] compile error HOT 4
- [FEATURE REQUEST] Provide older Version for Arduino Mega 2560 boards HOT 1
- [QUESTION] Publish MQTT into BSB_LAN_custom_setup.h file HOT 1
- [BUG] "/JS" POST request unexpected behavior HOT 8
- [BUG] Web Server Stopped Working HOT 4
- [FEATURE] Heating-Engineer Additional Parameters Access HOT 3
- [BUG] Constat reconnection to mqtt broker HOT 3
- [FEATURE REQUEST] Send BSB-LAN version to MQTT HOT 2
- [BUG] PPS Errors with BSB-LAN Versions > 2.0.16 HOT 116
- [FEATURE REQUEST] No wifi if started after wifi access point HOT 1
- [FEATURE REQUEST] Set date and time HOT 1
- [BUG] Set date and time reset after a while HOT 43
- [BUG] MQTT connection fails HOT 27
- [FEATURE REQUEST] Add support for WT32-ETH1 board HOT 4
- [BUG] SD card vs. flash memory HOT 5
- [BUG] Device hangs for some seconds on socket error with MQTT HOT 2
- [BUG] Heater function list disappeared in version 3.4.3 HOT 9
- [BUG] Set button is not working on parameter that require /I in the we interface HOT 4
- [BUG] BSB-LAN does not compile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bsb-lan.