Can't figure this one

(Bo Herrmannsen) #1

So almost a year ago i had success letting a pi zero control a heating element and report numbers to

now i have setup another pi with the emonsd image

thought i would start over with the pi controlling the heating element and now i get this error:

File “”, line 185
conn.request(“GET”, “/”+emoncmspath+"/input/post?node="+str(nodeid)+"&csv="+str_join&apikey="+apikey+")
SyntaxError: keyword can’t be an expression

the complete code here:

will try and look at it but since it used to work i have a hard time figuring it. something else must have changed

(Bo Herrmannsen) #2

solved it basicly by replacing the + with comma

(Bill Thomson) #3


Could you show the changes you made? That way if anyone else runs into the same or a similar
issue, they’ll have a better idea of what to do to resolve the problem.


(Bo Herrmannsen) #4

yep… line 185 changes to:

    conarg1 = ('/', emoncmspath, '/input/post?node=', str(nodeid), '&csv=', str_join, '&apikey=', apikey)
    conarg = "".join(str(x) for x in conarg1)

    conn.request("GET", conarg)

might not be pretty but does the job

(Bo Herrmannsen) #5


btw… do you know how to display the main dashboard when not logged in to emoncms?

ie its on a self hosted pi

(Bo Herrmannsen) #6

figured it

used wrong url


ie it must end on username and both feeds and dasboard needs to be public and published

(Bill Thomson) #7

Sounds good.

Mark it solved, That way it’ll show up if someone with the same question searchs for a solution.