@noxx
R80 provides WiFi RSSI.
{
"name": "wifi-rssi",
"topic": "wemosd1r2/system/wifi-rssi",
"type": "number",
"unit": "dB",
"acronym": "WiFi-RSSI"
}
ESPEasy with Pimatic over MQTT
@noxx
R80 provides WiFi RSSI.
{
"name": "wifi-rssi",
"topic": "wemosd1r2/system/wifi-rssi",
"type": "number",
"unit": "dB",
"acronym": "WiFi-RSSI"
}
Pimatic = Smart Home
i use R78
i dont know whats wrong with my config
http://www.bilder-upload.eu/show.php?file=e85b1d-1456001509.png
http://www.bilder-upload.eu/show.php?file=f87193-1456001520.png
http://www.bilder-upload.eu/show.php?file=87c54b-1456001656.png
"class": "MqttSimpleSensor",
"id": "esp01",
"name": "ESP-01",
"mqtturl": "mqtt://192.168.1.81",
"attributes": [
{
"name": "uptime",
"topic": "/esp01/system/uptime",
"type": "number",
"unit": "minute",
"acronym": "Uptime"
},
{
"name": "freeram",
"topic": "/esp01/system/freeram",
"type": "number",
"unit": "B",
"acronym": "FreeRAM"
}
]
}
With this module https://github.com/wutu/pimatic-mqtt is possible to use other options.
Pimatic = Smart Home
@noxx check whether the template is filled. Tools > Advanced.
Pimatic = Smart Home
@noxx This seems ok . If you set Serial log level to 4. 'll see if it emits data to broker.
Pimatic = Smart Home
@wutu said:
@noxx This seems ok . If you set Serial log level to 4. 'll see if it emits data to broker.
hope this help
218929 : MQTT : Connection lost
221458 : MQTT : Failed to connected to broker
223583 : MQTT : Failed to connected to broker
224174 : SYS : 3.00
224177 : SYS : 26184.00
224178 : HTTP : Delay 1000 ms
248930 : WD : Uptime 4 ConnectFailures 14 FreeMem 26328
248930 : MQTT : Connection lost
251531 : MQTT : Failed to connected to broker
253681 : MQTT : Failed to connected to broker
@noxx Runs the broker? Mosquitto you installed ? If so, try:
sudo /etc/init.d/mosquitto status
Pimatic = Smart Home
@wutu said:
@noxx Runs the broker? Mosquitto you installed ? If so, try:
sudo /etc/init.d/mosquitto status
pi@raspberrypi:~ $ sudo /etc/init.d/mosquitto status
Feb 20 22:46:01 raspberrypi mosquitto[20780]: Starting network daemon:: mosq…
Feb 20 22:46:01 raspberrypi systemd[1]: Started LSB: mosquitto MQTT v3.1 mes…
Hint: Some lines were ellipsized, use -l to show in full.
pi@raspberrypi:~ $
what i dont unterstand. how recognizes espeasy the pimatic system?
esp is connected via wlan
pimatic via lan
both with my router
must i add the ip adress of the pimatic system in espeasy? if yes, where?
pi@raspberrypi:~ $ sudo /etc/init.d/mosquitto status
- mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
Loaded: loaded (/etc/init.d/mosquitto)
Active: active (running) since Sa 2016-02-20 22:46:01 CET; 4min 41s ago
CGroup: /system.slice/mosquitto.service
`-20785 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.confFeb 20 22:46:01 raspberrypi mosquitto[20780]: Starting network daemon:: mosq…
Feb 20 22:46:01 raspberrypi systemd[1]: Started LSB: mosquitto MQTT v3.1 mes…
Hint: Some lines were ellipsized, use -l to show in full.
pi@raspberrypi:~ $
I had trouble with the default mosquitto package for Raspbian. I installed according to the instructions in the first post.
what i dont unterstand. how recognizes espeasy the pimatic system?
Either work through a broker. Pimatic < Broker(mosquitto) <> ESP
Pimatic = Smart Home
my first guide to install mosquito was yours
then i uninstall it and install mosqito according to this guide:
sudo /etc/init.d/mosquitto stop
sudo apt-get --purge remove mosquitto mosquitto-clients python-mosquitto
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
cd /etc/apt/sources.list.d/
sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list
or
sudo wget http://repo.mosquitto.org/debian/mosquitto-jessie.list
apt-get update
apt-cache search mosquitto
The Broker looks for the IP of the ESP in Pimatic and get after this Infos from the ESP ?
@noxx said:
The Broker looks for the IP of the ESP in Pimatic and get after this Infos from the ESP ?
NO, ESP must be connected to the broker and sends data to the broker (independently of pimatic). Pimatic listens to the specified topic and takes data from them.
Broker functions as a mediator.
Pimatic = Smart Home
ok
if i use Pidome MQTT i get this in the Log
622 : WIFI : Connected!
4622 : INIT : I2C
5133 : MQTT : Connected to broker
5136 : Subscribed to: /Home/#
5136 : INIT : Boot OK
5136 : INIT : Normal boot
35138 : SYS : 0.00
35179 : SYS : 26064.00
35179 : HTTP : Delay 1000 ms
36218 : WD : Uptime 0 ConnectFailures 0 FreeMem 26224
Mosquito Log show now the ESP
1456008085: New connection from 192.168.1.81 on port 1883.
1456008085: New client connected from 192.168.1.81 as ESPClient0 (c1, k15).
1456008282: Socket error on client ESPClient0, disconnecting.
If i use OpenHAB, there is no entry in the Mosquito Log
Edit
after switch back to OpenHAB i get now a connection
Log
216355 : WD : Uptime 3 ConnectFailures 0 FreeMem 25824
246356 : WD : Uptime 4 ConnectFailures 0 FreeMem 25824
275338 : SYS : 4.00
275345 : SYS : 25632.00
275345 : HTTP : Delay 1000 ms
275346 : MQTT : Topic: /esp01/system/uptime
275346 : MQTT : Payload: 4.00
276351 : MQTT : Topic: /esp01/system/freeram
276351 : MQTT : Payload: 25632.00
276357 : WD : Uptime 4 ConnectFailures 0 FreeMem 25824
Powered by www.esp8266.nu
mosquito log show
1456008283: New connection from 192.168.1.81 on port 1883.
1456008283: New client connected from 192.168.1.81 as ESPClient0 (c1, k15).
1456008448: Socket error on client ESPClient0, disconnecting.
but pimatic show nothing, for both values “null”
@noxx It seems that the broker will not communicate with espeasy. I have Mosquitto version 1.4.7.
Pimatic = Smart Home
can I downgrade? I use Jessie, perhaps this is the problem
@noxx Downgrade might not be necessary. Look here: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=125532
Pimatic = Smart Home
ok
add
listener 1883
protocol mqtt
to mosquitto.conf
and open firewall on my router for 1883
mosquitto.log:
1456045366: Config loaded from /etc/mosquitto/mosquitto.conf.
1456045366: Opening ipv4 listen socket on port 1883.
1456045366: Opening ipv6 listen socket on port 1883.
1456045366: New connection from 192.168.1.81 on port 1883.
1456045366: New client connected from 192.168.1.81 as ESPClient0 (c1, k15).
1456045516: Error in poll: Interrupted system call.
1456045516: mosquitto version 1.4.8 terminating
1456045516: mosquitto version 1.4.8 (build date Sun, 14 Feb 2016 15:06:55 +0000) starting
1456045516: Config loaded from /etc/mosquitto/mosquitto.conf.
1456045516: Opening ipv4 listen socket on port 1883.
1456045516: Opening ipv6 listen socket on port 1883.
1456045523: New connection from 192.168.1.81 on port 1883.
@noxx your esp log is not long enough.
my looks as follows :
connected with wstudio.cz, channel 8
dhcp client start…
ip:10.0.0.60,mask:255.255.255.0,gw:10.0.0.1
WIFI : Connected!
INIT : I2C
MQTT : Connected to broker
Subscribed to: myhome/firstfloor/office/esp01/#
INIT : Boot OK
INIT : Cold Boot
SYS : 25496.00
SYS : -65.00
HTTP : Delay 1000 ms
MQTT : Topic: myhome/firstfloor/office/esp01/system/freeram
MQTT : Payload: 25496.00
MQTT : Topic: myhome/firstfloor/office/esp01/system/wifi-rssi
MQTT : Payload: -65.00
WD : Uptime 0 ConnectFailures 0 FreeMem 25656
SYS : 0.00
HTTP : Delay 1000 ms
MQTT : Topic: myhome/firstfloor/office/esp01/system/uptime
MQTT : Payload: 0.00
WD : Uptime 1 ConnectFailures 0 FreeMem 25640
SYS : 25432.00
SYS : -52.00
HTTP : Delay 1000 ms
MQTT : Topic: myhome/firstfloor/office/esp01/system/freeram
MQTT : Payload: 25432.00
MQTT : Topic: myhome/firstfloor/office/esp01/system/wifi-rssi
MQTT : Payload: -52.00
Pimatic = Smart Home
its ever 10 rows
@noxx Looks like they did not work again templates.
Pimatic = Smart Home