jhofstee / nefit-easy-c

3 stars 1 forks source link

Nefit easy #1

Closed BramvanLeeuwen closed 2 years ago

BramvanLeeuwen commented 7 years ago

I've implemented your code, (compiled with Qt on Ubuntu) but the program output is: tarting /home/bram/build-nefit-easy-Desktop-Debug/nefit-easy... DEBUG: connected

get /system/location/latitude

null

get /system/location/longitude

null

get /dhwCircuits/dhwA/dhwCurrentSwitchpoint

null

get /dhwCircuits/dhwA/dhwNextSwitchpoint

null

get /dhwCircuits/dhwA/dhwOffDuringAbsence

null

get /dhwCircuits/dhwA/dhwOffDuringNight

null

get /dhwCircuits/dhwA/dhwOperationMode

null

etcetera.....

What can I do to let it work? Any ideas??

jhofstee commented 7 years ago

hello Bram, sorry for the delay, I had to undust this is a bit. Out comment this line, https://github.com/jhofstee/nefit-easy-c/blob/master/nefit-easy.c#L265 and raw communication should be shown as well.

double check that these variables are available / valid in the environment (either from qt-creator or export ...=...):

NEFIT_SERIAL_NUMBER NEFIT_ACCESS_KEY NEFIT_PASSWORD

I double checked if it is working here, which it is. libstrophe is at an old version though, git hash 1a657c67e2549f4989f737e9237da091a1e25822.

Regards, Jeroen

BramvanLeeuwen commented 7 years ago

Thank you Jeroen!

In the meantime I played a little bit with your software. I added the possibility to import the serial number access key and password from an inifile (if not present it loads from the environment variables).

It was not successful in cross compiling the code with Eclipse (I could not read the .o files) but in Qt it was an easy job. The connection with the NefitEasy was OK. (Between NefitEasy and Ubuntu on my desktop as well as between NefitEasy and Beaglebone Black). Libstrophe did his job quite well.

I was able to decrypt the json strings, to extract temperature pressure outside temperature.

Super!

But now I have a new question. Do I have the possibility to send an instruction to the NefitEasy? I will begin with an instruction to set the room temperature, then to switch the weather dependent settings ‘on’ and ‘off’. Too much to answer for you, but can you give me a clue? I am able to produce a decent json string, but I have not so much understanding of the xmpp protocol. I understood that you can send a message and have to wait on answer. The answer can be delayed or can be absent. I’ve no idea of encryption and decryption, but until now it was not necessary to use your code.

If you could give me an answer on my queston I would be very grateful!

Kind regards,

Bram van Leeuwen

jhofstee commented 7 years ago

Current master has some rudimentary support to set the temperature.