[SOLVED] Problem with emoncms control module

Hi

I have followed Trystan's excellent tutorial on writing modules for emoncms

https://github.com/emoncms/development/tree/master/Modules/myelectric_tu...

& those displaying live data from feeds are working fine!

However I am having problems with the control side. Myheating_view.php sort of works and the temperature set point is delivered to the packet gen module and hence to my emonTx but all attempts at getting the "Button" or "setpoint" examples to work have failed.

 Using the code from button.php (in the "myheating" example) there are no crashes or error messages and "Heating:" and the "button" are wrriten to the screen when called but the background stays white, the button is "on" but also white & it won't toggle or change colour. The state is not picked up by packet gen. I have also tried the code in setpoint.php and the same thing happens (The set point is also not picked up by packet gen) 

I have been through the code line by line but I can't make it work!

I'm sure it's something simple but as a novice programmer it's driving me mad!

any ideas?

Richard

hatfieldr's picture

Re: [SOLVED] Problem with emoncms control module

Many thanks Trystan!

After the latest mods to the button & setpoint files the control files now work!

arwed's picture

Re: [SOLVED] Problem with emoncms control module

Hi, I'm want to use the latest version of the really cool myheating stuff. I pulled the git rep into a temp directory and copied the myheating directory into my Modules directory. My packetgen definition is a little bit different, but I found the places in the files where to change it. Now I see on one hand the correct values displayed for power and temperature and I can change what is sent via packetgen through dialling the wheel. Really cool!

But I'm missing the place where to set the heating status; I would have expected a value change when I press the wheel button. And beside that I could not find the code for the more simple approach as shown in example 2 "Heating On/Off plus set point". What do I have to do to get this shown? I'm new to PHP and need an example that I can modify ... sorry.

Any help appreciated!

Thanks a lot; especially for driving the development! It's always nice to try out the new ideas ...

Arwed

 

arwed's picture

Re: [SOLVED] Problem with emoncms control module

Found the solution: I had to rename the file setpoint.php to myheating_view.php.

A.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.