- Posts: 12
- Thank you received: 0
Please Log in or Create an account to join the conversation.
bmwmilos wrote: Here is my code for ESP8266. I used EasyTransfer library to send/receive data to and from Arduino.For now I'm using 2004 LCD but will upgrade to 2.8" color lcd. I also need to add a rotary encoder with button so button will be used for local heating switch and encoder for modifying water temperature. Unfortunately I cannot get the ESP module 2 data to show up on cloud!!
Please Log in or Create an account to join the conversation.
bmwmilos wrote: I will also put ili9341 screen, I am just waiting to arrive. The arduino part is already in place and functioning. I will only add esp8266 part with additional display.
Will post the code this evening when I come home.
As for the publishing, I cannot seem to get it to work. I am using the code
String valueStr(TempPolaz) and add different topic with different module ID and sensor name but there are no values in cloud! I have even tried to eliminate that part of the code and publish a fixed value over longer period ( once every 60 seconds ) but no luck! I cannot understand where is the problem. The module ID is correct. Before this I had a problem with control module but the values were getting sent. Now when I separated into two modules,the one with generic type only shows sensor names and ":" and absolutely no values. This evening I wil try to eliminate "subscribe" to first module and see if I can upload data then!
I think you can make a module of type generic + dimmer, just the first two parameters would be for dimmer ( control ) and then the generic part would be :
with added & module.Parameters > 2 and modified for (var p = 2;This way one could add as many other monitoring sensors as necessary.if (module.Parameters != null & module.Parameters > 2) { for (var p = 2; p < module.Parameters.length; p++) { if (module.Parameters[p].Name.substring(0, 7) == "Sensor.") { data.status = data.status + ((module.Parameters[p].Description == "") ? module.Parameters[p].Name : module.Parameters[p].Description) + ": " + module.Parameters[p].Value + ((module.Parameters[p].Unit == "") ? "" : " " + module.Parameters[p].Unit) + "<br>"; if (data.timestamp < module.Parameters[p].Timestamp) data.timestamp = module.Parameters[p].Timestamp; } } }
I am still new to html and java but I'm trying.
Please Log in or Create an account to join the conversation.
EasyIoT wrote:
bmwmilos wrote: I will also put ili9341 screen, I am just waiting to arrive. The arduino part is already in place and functioning. I will only add esp8266 part with additional display.
Will post the code this evening when I come home.
As for the publishing, I cannot seem to get it to work. I am using the code
String valueStr(TempPolaz) and add different topic with different module ID and sensor name but there are no values in cloud! I have even tried to eliminate that part of the code and publish a fixed value over longer period ( once every 60 seconds ) but no luck! I cannot understand where is the problem. The module ID is correct. Before this I had a problem with control module but the values were getting sent. Now when I separated into two modules,the one with generic type only shows sensor names and ":" and absolutely no values. This evening I wil try to eliminate "subscribe" to first module and see if I can upload data then!
I think you can make a module of type generic + dimmer, just the first two parameters would be for dimmer ( control ) and then the generic part would be :
with added & module.Parameters > 2 and modified for (var p = 2;This way one could add as many other monitoring sensors as necessary.if (module.Parameters != null & module.Parameters > 2) { for (var p = 2; p < module.Parameters.length; p++) { if (module.Parameters[p].Name.substring(0, 7) == "Sensor.") { data.status = data.status + ((module.Parameters[p].Description == "") ? module.Parameters[p].Name : module.Parameters[p].Description) + ": " + module.Parameters[p].Value + ((module.Parameters[p].Unit == "") ? "" : " " + module.Parameters[p].Unit) + "<br>"; if (data.timestamp < module.Parameters[p].Timestamp) data.timestamp = module.Parameters[p].Timestamp; } } }
I am still new to html and java but I'm trying.
I guess module.Parameters > 2 is not correct. Try module.Parameters.length > 2.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Received topic:/4/Sensor.Parameter1: 1
switch state received: 1
Publish /4/Sensor.Parameter1 1
published.
Received topic:/4/Sensor.Parameter1: 0
switch state received: 0
Publish /4/Sensor.Parameter1 0
published.
Please Log in or Create an account to join the conversation.