Hi, I’m trying to use mosquitto from a web page from an iframe. I can not connect to the broker from javascript.
When I try from the server it tells me this:
pi@raspberrypi:~ $ mosquitto -v
1546215903: mosquitto version 1.5.5 starting
1546215903: Using default config.
1546215903: Opening ipv4 listen socket on port 1883.
1546215903: Error: Address already in use
But from home assistant I have no problem using mqtt.
Does anyone think why? What can I try?
I have home installed in a rasp. I do not have Hass.io. It looks like I could have duplicated the broker so I see home is clearly using another. The issue is how I use from Javascript from an external website the home assistant broker
Yes. I have no problem using mqtt with Javascript although I did not try it on this server. If I want to subscribe from command line pull error and if I do from Javascript also.
mosquitto_sub failed to connect because, as suggested by the not authorized message, you are attempting to connect to an MQTT broker (at 192.168.0.2) that requires authentication. You must specify a username and password.
I wanted to use the tasmota timer. I wanted to put it inside an iframe but it does not allow non-https addresses.
What I did is copy the html and with javascritp build a json to send by mqtt to a tastmota device.
Individually the port 9001 works but when I use it inside the iframe of home assisstant I have problems.
What EXACTLY are you trying to do? The idea here is to let HA control the devices, not force HA to be frontend for other software to control the devices.
I know. But there are things that are not yet. What I want is to configure schedules on off of tastmota sonoff switch from ha. So far as that does not exist.
The screenshots that is higher up is from the section where I control my aquarium. I also control lights in my house.
Visually I did not see any card that integrates tastmota to be able to configure on off a plug