Gaston - Hi,I have a raspberry pi running Open...

Hi, I have a raspberry pi running OpenWRT as a router/gateway. I would like this RPi to give some info to SignalK server, for example the CPU temperature, but also the external network I am connected too. I think the way to do this is like other connected devices: send a request to join, get permission, and then act as a sensor that sends the information as JSON. So my first question is: is this the way to go or is there another way? I can't for example install NodeRed on OpenWRT (or at least that's challenging), so that doesn't seem to be a solution. If this is the way to go, can I find a script or so somewhere how to do this, or can someone help me with the basics.
9 Replies
Gaston
GastonOP3mo ago
Maybe it is possible with NodeRed on Signalk and the SSH Exec module installed, although I haven't got it working yet. Any tips are welcome.
Greg Young
Greg Young3mo ago
does the Open WRT application support MQTT? or you could install MQTT client onto the open WRT rpi, then send data to your signalk device (that needs MQTT server running on it, and a signalk MQTT client plugin) sorry i dont have any experience with Open WRT some googling confirms that yes you can install either a MQTT client or broker from Open WRT … and there are some specific open WRT packages that will publish wifi details to a MQTT broker. so you can install mqtt broker on either of your rpi devices.. and then the other is a mqtt client. if your planning to use mqtt for other things in signalk, then probably better to install the broker on signalk’s rpi.
Teppo Kurki
Teppo Kurki3mo ago
The simplest protocol to push data to the server is UDP broadcast, so if you can do that in sk deltas or nmea0183 you can configure a connection for that on the server No additional servers required Or if your router provides an api you can poll data from that with node-red
PaddyB
PaddyB3mo ago
tried the openplotter image instead of wrt? It runs a local network by default.
tobi42
tobi423mo ago
why not install a basic signalk-server on the openwrt box? slap the signalk-rpi-monitor and signalk-networking plugins on top, configure an outbound UDP connection to your main SK server, and you've got your router's info available in your SK server.
Gaston
GastonOP2mo ago
I don't think I can install signalk-server on the openwrt box, but Ialso prefer to seperate the router/gateway from the SignalK server (with grafana/influxdb and some other docker containers). I haven't explored the MQTT option. I will look into that I am afraid this is above my league. If there is an example of that, maybe I can understand it. The SSH Exec option should work, but although I get a connection with the Openwrt RPI using SSH, The SSH Exec seems to execute on the RedNode (Signalk) server, and not on the OpenWRT server.
chris
chris2mo ago
Does OpenWRT support SNMP? I read data from my RUT-Router via snmp and the send it to sk via websocket.
Unknown User
Unknown User3w ago
Message Not Public
Sign In & Join Server To View
chris
chris3w ago
Here you go, I use that script with a rut200, you need to adapt it to your setup (ip, token, ...)

Did you find this page helpful?