bphermansson / EspSparsnasGateway

Reads data from Ikea Sparsnäs energy meter and publish via Mqtt.
MIT License
39 stars 27 forks source link

Listening to the wrong frequency #20

Closed Freland closed 5 years ago

Freland commented 6 years ago

For some reason the log gives me "Listening on 1023999936hz. Done in setup." even though I've set the frequency: "Stored frequency: 867999900". Since it is listening to the wrong freq. I don't get any data. I've tried updating the freq. with MQTT with no luck.

Logfile:

Debug on
Vcc=3014
Stored data: 1
There are stored settings
Stored frequency: 867999900
Stored sender id: d2a94a
Over The Air programming enabled, port: EspSparsnasGateway
Attempting MQTT connection...Connected to Mqtt broker as EspSparsnasGateway
Ready
IP address: 192.168.1.XX
EspSparsnasGateway @ IP:192.168.1.XX SSID: XXXXXX
Stored freq: 867999900
RFM69 init done
Radio initialized.
Listening on 1023999936hz. Done in setup.
bphermansson commented 6 years ago

I don't get it to work either, haven't found why. See Issue #8 .

kalj commented 5 years ago

See #22 and #25 . Can probably be closed.

dogmatic69 commented 5 years ago

Edit: removed pointless debug of registries not being set correctly

kalj commented 5 years ago

@dogmatic69 Are your issue the same as the one we eventually sorted out in #22 ? Many of us had this exact problem when the MOSI/MISO wires were swapped and/or leaving the RST pin of the Adafruit RFM69HCW BoB unwired to ground. Using the new schematic from #27, it seems we all get it to work. Also, have you included the error checks in #25? Those can help ruling out a failed initialization.

dogmatic69 commented 5 years ago

Was missing the reset connected to ground! Now the registries are written.

bphermansson commented 5 years ago

Great work! Since I lack time for this project I invited Naesstrom and Freland as collaborators. Anyone else wanna join?

kalj commented 5 years ago

@bphermansson I would love to tag along. :)

dogmatic69 commented 5 years ago

This should now be sorted. If still getting that it listens to the wrong frequency check the wiring and make sure that registries that are written to actually have the correct values (eg: write -> read -> compare value). If that does not work the frequency is not being written to the registry and is probably due to wiring issue.