Hello, everyone!
Well, I've been struggling to get Mosquitto to play friendly with websockets. Has anyone else tried running Mosquitto with websockets enabled? I posted the following on someone's blog about running the MQTT server on a raspberry pi but it is still "awaiting moderation" so I'm reaching out to this wonderful community for some help! Otherwise, if I can't get it working, I'm just going to stick to the tried-and-true mqtt protocol and pass a text file to lighthttpd. Always have to have a back up plan!
I’m running mosquitto 1.4 on a raspberry pi. mosquitto is able to open a websockets port on 9001 and listen. I can connect fine but I get the socket error message: "Socket error on client , disconnecting." I’m using an example javascript Paho code found here:
https://www.eclipse.org/paho/clients/js/
Here is my mosquitto.conf:
allow_anonymous true
autosave_interval 1800
persistence true
persistence_file m2.db
persistence_location /var/lib/mosquitto/
#connection_messages true
#log_timestamp true
#log_type all
#log_dest file /var/log/mosquitto/mosquitto.loglistener 1883
listener 9001 127.0.0.1
protocol websockets
So, any thoughts?
In other news, I made this wonderful discovery. Film heating elements. I'm thinking of adding one to the delivery bag that I'm modifying so that it can maintain a decent internal temperature to keep the pizza(s) warm during travel. The idea is that the heating element can be monitored via the temperature sensor and (hopefully) adjusted via the RPis built into the bag.
The film heating elements vary in voltage, I've seen a lot of 12 and 24V ones but I did find a version on Sparkfun that would be ideal for the project and it warms up to approximately 65 degrees Celsius (150 degrees F). With some decent foam padding to insulate it, it could do a decent job of keeping things cozy.

Top Comments