http://www.sm7ucz.se/Elmaetaren/Elmaetaren.htm
Kul med analog mätare!

Oooooohh... ett finfint användningsområde till de två uA-visare som råkade hamna i min hand på en loppisAlbertE skrev:Den här elmätaren gillade jag:
http://www.sm7ucz.se/Elmaetaren/Elmaetaren.htm
Kul med analog mätare!
Kod: Markera allt
src\PubSubClient.cpp: In member function 'boolean PubSubClient::beginPublish(const char*, unsigned int, boolean)':
src\PubSubClient.cpp:456:18: warning: unused variable 'i' [-Wunused-variable]
uint16_t i;
^
src\mqttpub.cpp: In function 'bool mqttpub(String, String, String, int)':
src\mqttpub.cpp:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
src\RFM69functions.cpp:43:8: error: 'timeval' does not name a type
extern timeval tv;
^
src\RFM69functions.cpp: In function 'void interruptHandler()':
src\RFM69functions.cpp:365:21: error: 'tv' was not declared in this scope
gettimeofday(&tv, nullptr);
^
src\RFM69functions.cpp:365:32: error: 'gettimeofday' was not declared in this scope
gettimeofday(&tv, nullptr);
^
src\RFM69functions.cpp:367:25: error: 'time' was not declared in this scope
now = time(nullptr);
^
*** [.pio\build\d1_mini_lite\src\RFM69functions.cpp.o] Error 1
Kod: Markera allt
#include <time.h>
struct timeval {
time_t tv;
suseconds_t tv_usec;
};
#define gettimeofday
Kod: Markera allt
[21:05:30]In initialize, frequency = 867987500
[21:05:30]ERROR: Failed setting syncvalue1 1st time
[21:05:30]Unable to initialize the radio. Exiting.
Kod: Markera allt
Welcome to EspSparsnasGateway
Debug on
Vcc=2957
Set up WiFi...
ReconnectAttempting MQTT connection...Connected to Mqtt broker as EspSparsnasGateway
Welcome to EspSparsnasGateway, compiled at Mar 27 2020 23:04:49.
Mqtt topics: EspSparsnasGateway/valuesV2, EspSparsnasGateway/debugV2
IP: 192.168.1.201
EspSparsnasGateway/valuesV2
Over The Air programming enabled, port: EspSparsnasGateway
Settings:
Senderid: 602064
Frequency: 868040000
In initialize, frequency = 868040000
In setMode
RFM69 init done
Radio initialized.
Listening on 868040000hz. Done in setup.
In setMode
rssi: 65308
In setMode
In crc16
Got rf data
Bad packet!
93 C6 B6 38 54 10 85 CF 02 A9 55 C8 1B 6A D7 3A 75 27 EE AA
In setMode
rssi: 65303
In setMode
In crc16
Got rf data
Bad packet!
30 BF 8A 69 E4 51 C5 B9 48 FE 73 F7 21 79 25 DE 4E 4D C6 C8
In setMode
rssi: 65317
In setMode
In crc16
Got rf data
Bad packet!
CD 85 30 BF FC 53 8A E1 5A 53 1E 0B 44 48 2E 21 B2 F0 CD E4