Save
Saving
  • R rob987

    Hi,
    Tried the date format yyyy-MM-dd'T'HH:mm:ss.SSS and the error changed to

    Error during read topic: "tele/tasmota_E14FF4/SENSOR" datapoint: "MQTT_NAS - Mealies_Temperature" payload: "{"Time":"2021-01-13T13:26:48","DS18B20":{"Id":"01192718DE3D","Temperature":28.1},"TempUnit":"C"}" exception: "Text '2021-01-13T13:26:48' could not be parsed at index 19"
    

    I have the Sensor temperature, and WiFi signal strength working now. ( Just using JSON, and not JSON + Timestamp, as I cannot find a parsing string that works )

    Mango is subscribed to two topics, STATE and SENSOR.

    The steps I took were

    1. Connect to MQTT Broker and get a copy of the raw data ( Also checks connection from Mango PC )
    robert@mango:~$ mosquitto_sub  -h 192.168.220.208 -p 1883 -u robert -P XXXXX -t tele/#
    
    Client mosqsub/22329-mango received PUBLISH (d0, q0, r0, m0, 'tele/tasmota_E14FF4/STATE', ... (274 bytes))
    tele/tasmota_E14FF4/STATE {"Time":"2021-01-13T10:46:48","Uptime":"4T17:22:27","UptimeSec":408147,"Heap":25,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":3,"Wifi":{"AP":1,"SSId":"NixNet","BSSId":"E4:8D:8C:3F:D7:A1","Channel":1,"RSSI":92,"Signal":-54,"LinkCount":1,"Downtime":"0T00:00:03"}}
    Client mosqsub/22329-mango received PUBLISH (d0, q0, r0, m0, 'tele/tasmota_E14FF4/SENSOR', ... (96 bytes))
    tele/tasmota_E14FF4/SENSOR {"Time":"2021-01-13T10:46:48","DS18B20":{"Id":"01192718DE3D","Temperature":26.6},"TempUnit":"C"}
    

    Check the Subscribed Data at https://jsonformatter.org/json-parser You can paste the received data string in, and get a readable JSON document.

    tele/tasmota_E14FF4/STATE

    object{9}
    	Time : 2021-01-13T10:46:48
    	Uptime : 4T17:22:27
    	UptimeSec : 408147
    	Heap : 25
    	SleepMode : Dynamic
    	Sleep : 50
    	LoadAvg : 19
    	MqttCount : 3
    	Wifi {8}
    		AP : 1
    		SSId : NixNet
    		BSSId : E4:8D:8C:3F:D7:A1
    		Channel : 1
    		RSSI : 92
    		Signal : -54
    		LinkCount : 1
    		Downtime : 0T00:00:03
    

    And
    tele/tasmota_E14FF4/SENSOR

    object {3}
        Time : 2021-01-13T10:46:48
        DS18B20 {2}
            Id : 01192718DE3D
            Temperature : 26.6
        TempUnit : C
    

    Here are the working MQTT Datapoint setups
    Wifi_Signal.png

    And Temperature
    Temperature_MQTT.png

    And The correct values shown on the datasource page
    DataSource_MQTT.png

    If anyone has some ideas on how to parse the Time (JSON + Timestamp) let me know

    Thanks

    posted in User help read more
  • R rob987

    I have been trying different patters, and have a new error which is confusing me.
    The Date could not be parsed, then the message ends with
    :ISO resolved to 2021-01-12T16:46:47 of type java.time.format.Parsed"

    ERROR 2021-01-12T16:46:47,246 (com.infiniteautomation.m2m2.mqtt.client.MqttClientDataSourceRT.messageArrived:375) - Error during read topic: "tele/tasmota_E14FF4/SENSOR" datapoint: "MQTT_NAS - Mealies_Temperature" payload: "{"Time":"2021-01-12T16:46:47","DS18B20":{"Id":"01192718DE3D","Temperature":26.6},"TempUnit":"C"}" exception: "Text '2021-01-12T16:46:47' could not be parsed: Unable to obtain Instant from TemporalAccessor: {},ISO resolved to 2021-01-12T16:46:47 of type java.time.format.Parsed" 
    

    MQTT_Point.png

    posted in User help read more
  • R rob987

    Hi,
    I need some pointers on getting MQTT data into mango.
    I have configured the MQTT Broker OK, and am receiving data,
    but I cannot work out how to parse it.

    INFO  2021-01-11T17:13:09,026 (com.serotonin.m2m2.rt.RuntimeManagerImpl.stopDataSourceShutdown:447) - Data source 'MQTT_NAS' stopped 
    INFO  2021-01-11T17:13:11,949 (com.serotonin.m2m2.rt.RuntimeManagerImpl.initializeDataSourceStartup:408) - Data source MQTT_NAS took 2ms to start 
    WARN  2021-01-11T17:16:46,079 (com.infiniteautomation.m2m2.mqtt.client.MqttClientDataSourceRT.messageArrived:355) - Unknown topic "tele/tasmota_E14FF4/STATE" payload: "{"Time":"2021-01-11T17:16:45","Uptime":"2T23:52:24","UptimeSec":258744,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":3,"Wifi":{"AP":1,"SSId":"NixNet","BSSId":"E4:8D:8C:3F:D7:A1","Channel":1,"RSSI":80,"Signal":-60,"LinkCount":1,"Downtime":"0T00:00:03"}}" 
    ERROR 2021-01-11T17:16:46,121 (com.infiniteautomation.m2m2.mqtt.client.MqttClientDataSourceRT.messageArrived:375) - Error during read topic: "tele/tasmota_E14FF4/SENSOR" datapoint: "MQTT_NAS - Mealies_Temperature" payload: "{"Time":"2021-01-11T17:16:45","DS18B20":{"Id":"01192718DE3D","Temperature":25.6},"TempUnit":"C"}" exception: "Text '2021-01-11T17:16:45' could not be parsed at index 0" 
    
    

    I have a json timestamp pattern of "yyyy'-'MM'-'dd'T'HH':'mm':'ss"
    Also, the temperature value is NaN :-(

    Thanks

    posted in User help read more
  • R rob987

    Hi All,
    Well its the next morning here in Australia, and I am at home waiting for the corona virus to get me, so I clicked on the link for my mango install, and firefox did the security warning for a self signed certificate again - strange, then
    then the login worked, and up came the screen.
    ![alt text](0_1585524922854_Mango_Screen.png image url)

    Anyway, any thoughts on what magic happened overnight ?

    Thanks

    posted in User help read more
  • R rob987

    Hi,
    I have had mango running for about 18 months, log in once a week or so and check the solar data it
    records, and emails me. Last login, I updated, an now a week later, I realise i cannot log in.

    The login screen comes up, but fails with "An error occurred while logging in - Connection error"

    System:

    $ uname -a
    Linux mango 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linux
    

    Java:
    I noticed the java install advice has changed to openjdk, so I upgraded, but no luck.

    $ java --version
    openjdk 14 2020-03-17
    OpenJDK Runtime Environment AdoptOpenJDK (build 14+36)
    OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14+36, mixed mode, sharing)
    

    mango:
    ma.log only has INFO data logged
    Starting Mango 3.7.5 with Schema Version: 29

    all the processes seem to be running OK

    $ netstat -antp
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      454/sshd            
    tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      422/cupsd           
    tcp        0    196 192.168.220.80:22       192.168.220.103:56870   ESTABLISHED 610/sshd: robert [p 
    tcp6       0      0 :::8080                 :::*                    LISTEN      2125/java           
    tcp6       0      0 :::22                   :::*                    LISTEN      454/sshd            
    tcp6       0      0 ::1:631                 :::*                    LISTEN      422/cupsd           
    tcp6       0      0 :::8443                 :::*                    LISTEN      2125/java           
    tcp6       0      0 :::5502                 :::*                    LISTEN      2125/java           
    tcp6       0      0 192.168.220.80:45056    192.168.220.75:502      ESTABLISHED 2125/java           
    tcp6       0      0 192.168.220.80:5502     192.168.220.75:2902     ESTABLISHED 2125/java           
    tcp6       0      0 192.168.220.80:43566    10.11.21.253:502        ESTABLISHED 2125/java           
    tcp6       0      0 192.168.220.80:8443     192.168.220.103:53812   TIME_WAIT   -                   
    tcp6       0      0 192.168.220.80:8443     192.168.220.103:53946   TIME_WAIT   -
    

    I think the two "TIME_WAIT" lines are my login attempt.

    Where can I look for errors / logs that might help resolve the issue.

    Thanks

    posted in User help read more
  • R rob987

    Hi all,
    Well, at least I have won the dummy of the week award this week :-)
    The DINTs have swapped words, so when you read from the correct address and swap the words, all is good.
    I "fixed" the publisher by creating a second publisher on same port number, and modbus address 2.
    I did have SINT and DINT data combined in the one publisher, and the PLC was making 2 read requests.
    The DINT values are now increasing as expected.

    Thanks all

    posted in Mango Automation general Discussion read more
  • R rob987

    Another problem discovered. I am reading 3 x 32 bit values from an inverter via modbus, and publish them for the PLC to read. The values in mango seems correct, but are not being updated to the publisher. The PLC read is showing success, and the value in the register is being overwritten, but is is not the same as the value in Mango.

    0_1554622881993_Exported_Energy.png

    M_Exported_Energy has a value of 444315 in Mango, but the PLC shows 4390912. This value has not changed all day, so "Export Today" shows as zero.

    I checked logIO in the publisher, files are created, but no data is logged

    -rw-r--r-- 1 root root 0 Apr 7 17:09 processLog.ModbusIpPublisherRT-1.log
    -rw-r--r-- 1 root root 0 Apr 7 17:09 processLog.ModbusProcessImageSendThread-1.log
    @mango:/opt/mango/logs$

    How do I debug the publisher?

    posted in Mango Automation general Discussion read more
  • R rob987

    Hi,
    I have a problem reading 32 bit unsigned ints from a PLC. The smaller values are correct, but larger values are not.
    I have done the point locater read using all the available 4 byte int types, with no luck. The data is good when read with modpoll, and agrees with the PLC data.

    The larger values are Watt hour values from power meters, and the PLC stores the midnight values, to show the current days usage.

    $ modpoll -m tcp -a 1 -r 16401 -c 18 -t 4:int -1 192.168.220.75
    modpoll 3.4 - FieldTalk(tm) Modbus(R) Master Simulator
    Copyright (c) 2002-2013 proconX Pty Ltd
    Visit http://www.modbusdriver.com for Modbus libraries and tools.
    
    Protocol configuration: MODBUS/TCP
    Slave configuration...: address = 1, start reference = 16401, count = 18
    Communication.........: 192.168.220.75, port 502, t/o 1.00 s, poll rate 1000 ms
    Data type.............: 32-bit integer, output (holding) register table
    
    -- Polling slave...
    [16401]: 712312
    [16403]: 0
    [16405]: 7787370
    [16407]: 4738731
    [16409]: 7431320
    [16411]: 1011237
    [16413]: 710242
    [16415]: 4390912
    [16417]: 4552479
    [16419]: 7269753
    [16421]: 11488
    [16423]: 6472
    [16425]: 12772
    [16427]: 6717
    [16429]: 2070
    [16431]: 0
    [16433]: 8466
    [16435]: 4306
    
    

    The above modpoll values are correct.
    The point locator test returns the following values -

    0_1554615288841_Screenshot from 2019-04-07 15-32-18.png

    Note, one of the zero values is correct, and the other is 655360

    In space separated text,

    Click PLC Modpoll Read Point Locator
    Register Type MB Address Name Value Value Address Value Address
    DD9 INT2 416401 Pool_Energy 712314 712314 [16401] 1029992 16399
    DD10 INT2 416403 Spare 0 0 [16403] 655360 16401
    DD11 INT2 416405 CP3_Import_Energy_MidN 7787370 7787370 [16405] 54122 16403
    DD12 INT2 416407 CP3_Export_Energy_MidN 4738731 4738731 [16407] 7753387 16405
    DD13 INT2 416409 H1_Energy_MidN 7431320 7431320 [16409] 4744344 16407
    DD14 INT2 416411 H2_Energy_MidN 1011237 1011237 [16411] 7433765 16409
    DD15 INT2 416413 Pool_Energy_MidN 710242 710242 [16413] 1037922 16411
    DD16 INT2 416415 SE5K_M_Export_Energy_Mid 4390912 4390912 [16415] 655360 16413
    DD17 INT2 416417 SE5K_M_Import_Energy_Mid 4552479 4552479 [16417] 4421407 16415
    DD18 INT2 416419 SE5K_I_Energy_MidN 7269753 7269753 [16419] 4582777 16417
    DD19 INT2 416421 CP3_Import_Today 11487 11487 [16421] 7220448 16419
    DD20 INT2 416423 CP3_Export_Today 5942 5942 [16423] 5942 16421
    DD21 INT2 416425 H1_Energy_Today 11989 11989 [16425] 11989 16423
    DD22 INT2 416427 H2_Energy_Today 6650 6650 [16427] 6650 16425
    DD23 INT2 416429 Pool_Energy_Today 2070 2070 [16429] 2070 16427
    DD24 INT2 416431 SE5K_M_Exp_Energy_Today 0 0 [16431] 0 16429
    DD25 INT2 416433 SE5K_M_Imp_Energy_Today 7242 7242 [16433] 7242 16431
    DD26 INT2 416435 SE5K_I_Energy_Today 4306 4306 [16435] 4306 16433

    Any suggestions on how to resolve ?

    Thanks

    posted in Mango Automation general Discussion read more
  • R rob987

    Hi,
    Just reporting that no errors in the last 24 hours,
    I have the TCP with keepalive set, Comms was very unreliable with a new connection for each request.
    Now the forest of errors has disappeared, I notice I get a "Connect timeout" twice a day, about an hour after sunset, and an hour before sunrise. I suspect a quick fix for a leaky system, as the inverter reboots twice a day.

    The inverter only accepts one modbus connection at a time, so a second device is not an option.

    The instant power value swings very quickly, as clouds move accross the sky, and the fastest update time I can get allows he PLC to adjust the load on 2 x hot water system elements via SSRs. The kWh value is only really used to display "daily usage" of 15 - 30 kWh. It could be read every 15 - 30 minutes.

    I have a support request open with solaredge, and have sent then the wireshark logs of a working modpoll connection from a PC, and a PLC connection showing only 3 x SYN request. I will sent them my findings from this, but I will ask for a "stress test" on the next inverter I purchase.

    Thanks for all your help

    posted in Mango Automation general Discussion read more
  • R rob987

    Hi,
    Thanks for all the input. 247 errors yesterday (27/03/2019) on a cloudy rainy day, so the inverter does not rest :-),
    and devote more time to comms.

    The inverter is on a wired ethernet connection, with mango and the inverter on the wired LAN.

    I had "Contiguous batches only" ticked, as the inverter would not answer back when I first added it. I have now ticked it and reduced the max read registers to 50. The This is giving me 2 requests.

    2019/03/28-08:33:28,568 O 00230000000601030053000d
    2019/03/28-08:33:28,833 I 00230000001d01031a22e2ffff1384fffe2494ffff91d8fffedac6fffe006aeaf70000
    2019/03/28-08:33:28,834 O 002400000006010300ce0025
    2019/03/28-08:33:28,914 I 00240000004d01034a033b012300f7011f00000388012c011d01440000fe93ffb7ff73ff6a0000de17db9ee036de71fffe004162a600191f070015cec0001e39760044aaeb002c0006001e72c40005fcb80000
    
    

    What is the ,nnn after the date-time in the above log (2019/03/28-08:33:28,568). Is it mS timestamp of Java sending and receiving?

    Is there any way to have a poll period associated with a point.? The 2nd longer read is for kWh values, and could be read every 15 minutes. This might allow the instant power values to be read more frequently.

    I am using mango to read, and publish the values to a Click PLC, as I cannot get the Click to talk to the inverter. I used wireshark on the line, and I see the PLC send 3 SYN requests, and the inverter does not reply. I suspect it may be "to fast" for the inverter.

    No errors for 30 minutes, so maybe solved, but not fixed !!!!!!
    Thanks

    posted in Mango Automation general Discussion read more