How could I read any object data from my iobroker with ESPEasy
Moderators: grovkillen, Stuntteam, TD-er
How could I read any object data from my iobroker with ESPEasy
Hello,
I want to present the actual excess energy datapoint from my iobroker on a display. So I prepared an ESP8266 with ESPEasy and connected an OLED display. This work fine now (thanks to Ath). But how could I read any data from the iobroker? If I want to send from the ESP8266 any data to iobroker, I have to setup the MQTT controller in ESPEasy and I must start the MQTT Adapter in iobroker. But now it is the different direction. How could I send any data from iobroker and how could I receive this data with ESPEasy?
Thanks and best regards.
I want to present the actual excess energy datapoint from my iobroker on a display. So I prepared an ESP8266 with ESPEasy and connected an OLED display. This work fine now (thanks to Ath). But how could I read any data from the iobroker? If I want to send from the ESP8266 any data to iobroker, I have to setup the MQTT controller in ESPEasy and I must start the MQTT Adapter in iobroker. But now it is the different direction. How could I send any data from iobroker and how could I receive this data with ESPEasy?
Thanks and best regards.
Re: How could I read any object data from my iobroker with ESPEasy
You can use the MQTT import plugin.
To receive commands via MQTT, you can use C005: https://espeasy.readthedocs.io/en/lates ... #c005-page
To receive commands via MQTT, you can use C005: https://espeasy.readthedocs.io/en/lates ... #c005-page
Re: How could I read any object data from my iobroker with ESPEasy
Thanks, I will try to use it.
Re: How could I read any object data from my iobroker with ESPEasy
Hello TD-er,
I´m not able to realise it. My first step to find out how to work with the display, I tried to show the temperature of the connected DS18B20 temperature sensor. It worked with [Name#Temp]. But how could I take the value of the currentFeedIn which I have in the objects of my ioBroker? The MQTT adapter is working and receive the value of the DS18B20. But how could I subscribe the value of currentFeedIn and what have I to write in the line of the display [xxxxx#yyyyy]? something like this? And how have I to use the /cmd command?
I´m not able to realise it. My first step to find out how to work with the display, I tried to show the temperature of the connected DS18B20 temperature sensor. It worked with [Name#Temp]. But how could I take the value of the currentFeedIn which I have in the objects of my ioBroker? The MQTT adapter is working and receive the value of the DS18B20. But how could I subscribe the value of currentFeedIn and what have I to write in the line of the display [xxxxx#yyyyy]? something like this? And how have I to use the /cmd command?
- Attachments
-
- Screenshot-15-18-2022_05.18.16.jpg (286.21 KiB) Viewed 2939 times
Re: How could I read any object data from my iobroker with ESPEasy
You can use the MQTT Import plugin, and subscribe that to the MQTT topic(s) you want to monitor.
Then you can use the [<taskname>#<valuename>] notation in the display Lines, similar to the DS18b20 sensor, to display those values.
Then you can use the [<taskname>#<valuename>] notation in the display Lines, similar to the DS18b20 sensor, to display those values.
/Ton (PayPal.me)
Re: How could I read any object data from my iobroker with ESPEasy
Hello Ath, I tried to realise it, but it does not works? All values are shown with 0, but that is not correct. The values currentPower is 450W.
So could you tell me were is my mistake?
Here some screenshots: objects in ioBroker, MQTT import, devices overview, setting
So could you tell me were is my mistake?
Here some screenshots: objects in ioBroker, MQTT import, devices overview, setting
- Attachments
-
- Screenshot-18-18-2022_09.18.55.jpg (216.42 KiB) Viewed 2917 times
-
- Screenshot-18-09-2022_09.09.14.jpg (207.36 KiB) Viewed 2917 times
-
- Screenshot-18-11-2022_09.11.50.jpg (78.36 KiB) Viewed 2917 times
-
- Screenshot-18-11-2022_09.11.08.jpg (137.4 KiB) Viewed 2917 times
Re: How could I read any object data from my iobroker with ESPEasy
You didn't enter the topic prefix. (the same beginning for all topics you need)
According to the screenshot you posted, it should be something like this:
powerfox2/0/devices/240ac415c74c
I don't know if the messages are just numerical values, or maybe also include the stuff like "kWh".
Not sure what the import plugin will make of those, but perhaps it will filter out the numerical stuff just fine
According to the screenshot you posted, it should be something like this:
powerfox2/0/devices/240ac415c74c
I don't know if the messages are just numerical values, or maybe also include the stuff like "kWh".
Not sure what the import plugin will make of those, but perhaps it will filter out the numerical stuff just fine
Re: How could I read any object data from my iobroker with ESPEasy
Thanks, I added the prefix, but no change. But after typing slash before the topics it worked. As you write I had to add "W" vor the value.
Thanks all for your help and patience
Thanks all for your help and patience
Re: How could I read any object data from my iobroker with ESPEasy
One more thing, the value I could see will not be updated? It shows only 476.00W? To start the ESP new didn't help.
- Attachments
-
- Screenshot-19-15-2022_08.15.42.jpg (233 KiB) Viewed 2903 times
-
- Screenshot-19-09-2022_08.09.25.jpg (73.58 KiB) Viewed 2903 times
-
- Screenshot-19-14-2022_08.14.34.jpg (427.64 KiB) Viewed 2903 times
Re: How could I read any object data from my iobroker with ESPEasy
Where does the value 476 come from? Also when I create a new Generic - MQTT Import, it shows 476.It seems that after the first reading the value is fix stored? Reboot the ESP didn't help.
Re: How could I read any object data from my iobroker with ESPEasy
The value on the display will be updated every 'Interval' seconds, as configured on the display task.
The values on the MQTT Import task should update every time a new, recognized, MQTT message is received, that plugin doesn't have (or need) the 'Interval' setting.
If you want to update the display immediately when a new value is received via MQTT, you can add rules for that:
The values on the MQTT Import task should update every time a new, recognized, MQTT message is received, that plugin doesn't have (or need) the 'Interval' setting.
If you want to update the display immediately when a new value is received via MQTT, you can add rules for that:
Code: Select all
on MQTTin do // Will trigger for every MQTTin received value, change to MQTTin#Value1 to only respond to Value1 changes
TaskRun,SSD1306 // Use the Name, or number, of the Display task here
endon
/Ton (PayPal.me)
Re: How could I read any object data from my iobroker with ESPEasy
I tried to take other objects.I took it from my photovoltaic system. First the value of the total energy is not correct, instead of 4548Wh it shows only 2814Wh, and the value didn't change. Also when I try to write under formula %value%*2 nothing happens? It will be shown 2814. Did I make any thing wrong or is there a bug?
Last edited by bastler11 on 19 Nov 2022, 12:54, edited 1 time in total.
Re: How could I read any object data from my iobroker with ESPEasy
For your information, the taskvalues for every task are stored in "RTC" memory.
This is kept as long as the ESP is powered. On a reboot, these values (when the checksum matches) are restored.
Seeing an old value can thus be cunfusing when trying to figure out why things are not working.
Another thing to keep in mind.
The values on the "Devices" tab are being refreshed using some JavaScript.
This script does periodically fetch JSON from the ESP containing the latest values.
However the interval used to fetch this JSON is based on the lowest set "Interval" value of all tasks.
Thus when all (enabled) tasks have a relatively long interval, it may take a while for the values on the Devices tab to update.
It may then appear nothing is happening.
So you can also add some task to use the "system info" plugin and set that task to an interval of 1sec.
This way the values on de Devices tab will update every second.
Re: How could I read any object data from my iobroker with ESPEasy
Hello, I tried to realise it, it didn´t work. I changed the topics from row 1 to 2 and from row 2 to 1. and the values I could see in the overview will also change. But, all values I want to show, appears but will not be updated. Now I startet a MQTT Explorer and I could see, that the values I want to show didn't change? But in the object list from the iobroker it changes. You see it in the attached screenshot. The big picture shows in the blue marked line the value 256W and in the small window (grey marked line) you see in the MQTT Explorer still the old value 176, it does not change. It seems that the first read value will store in the memory of the ESP and instead of taking a new one value it take only the stored value. I rebooted the iobroker. Than I could see in the MQTT Explorer new values and this will also shown in the MQTT plugin and in the display. But again nor updates? So the system seems working. Do you have any idea were is the problem and how could I solve it?
- Attachments
-
- Screenshot-20-59-2022_01.59.09.jpg (464.3 KiB) Viewed 2858 times
Re: How could I read any object data from my iobroker with ESPEasy
Hello,
I found a very easy solution for my problem. I had do mark in the setting from the MQTT adapter the function "Send states also". Now I could see all datapionts I want on my display.
Best regards
Ingo
I found a very easy solution for my problem. I had do mark in the setting from the MQTT adapter the function "Send states also". Now I could see all datapionts I want on my display.
Best regards
Ingo
- Attachments
-
- Screenshot-04-27-2022_03.27.02.jpg (257.3 KiB) Viewed 2646 times
Who is online
Users browsing this forum: Ahrefs [Bot] and 89 guests